RDOCMoCBProxManager, \ RDOCMoCState, \ RDOCMoCConnector from moneyonchain.token import RIFDoC, RIFPro from moneyonchain.governance import RDOCGoverned network = 'rdocMainnet' connection_manager = ConnectionManager(network=network) print("Connecting to %s..." % network) print( "Connected: {conectado}".format(conectado=connection_manager.is_connected)) moc_main = RDOCMoC(connection_manager) addresses = moc_main.connector_addresses() governed = RDOCGoverned(connection_manager, contract_address=moc_main.address()) count = 0 lines = list() md_header = ''' | Nº | Contract | Address Proxy | Address Implementation | Governor | | :---: | :---------------------------- | ---------------------------- | -------------------------------- | -------------------------------- | ''' # MOC count += 1 line = '| {0} | {1} | {2} | {3} | {4} |'.format(count, 'MOC', addresses['MoC'], moc_main.implementation(), governed.governor())
from moneyonchain.manager import ConnectionManager from moneyonchain.governance import RDOCStopper from moneyonchain.rdoc import RDOCMoC import logging import logging.config logging.basicConfig( level=logging.INFO, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S') log = logging.getLogger('default') network = 'rdocTestnetAlpha' connection_manager = ConnectionManager(network=network) print("Connecting to %s..." % network) print( "Connected: {conectado}".format(conectado=connection_manager.is_connected)) contract_moc = RDOCMoC(connection_manager) contract_stopper = RDOCStopper(connection_manager) contract_to_pause = contract_moc.address() tx_hash, tx_receipt = contract_stopper.pause(contract_to_pause) if tx_receipt: print("Stop Contract Address: {address} successfully!".format( address=contract_to_pause)) else: print("Error Stopping contract") """ """
from moneyonchain.manager import ConnectionManager from moneyonchain.governance import RDOCStopper from moneyonchain.rdoc import RDOCMoC import logging import logging.config logging.basicConfig( level=logging.INFO, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S') log = logging.getLogger('default') network = 'rdocMainnet' connection_manager = ConnectionManager(network=network) print("Connecting to %s..." % network) print( "Connected: {conectado}".format(conectado=connection_manager.is_connected)) contract_moc = RDOCMoC(connection_manager) contract_stopper = RDOCStopper(connection_manager) print("Paused: {0}".format(contract_moc.paused())) print("Stoppable: {0}".format(contract_moc.stoppable())) print("Stopper Address: {0}".format(contract_moc.stopper())) print("Owner: {0}".format(contract_stopper.owner())) print("MoC Address: {0}".format(contract_moc.address()))