Ejemplo n.º 1
0
def withdraw_dividends(contract, account):
    tx_hash = transact_function(account, contract, 'withdrawDividends')
    withdraw_event = wait_event(contract, tx_hash, 'WithdrawalDividends')

    print("SUCCESS: Withdrew Dividends: {} Event: {}".format(
        short_address(account), withdraw_event))
Ejemplo n.º 2
0
def update_account(contract, account):
    tx_hash = transact_function(account, contract, 'updateAccount', [account])
    gas_used = wait_transaction(contract.web3, tx_hash)
    print("SUCCESS: Account Updated: {} Gas used: {}".format(
        short_address(account), gas_used))
Ejemplo n.º 3
0
def get_last_eth_points(contract, account):
    last_eth_points = call_function(contract, 'getLastEthPoints', [account])
    print("Last Eth Points for {}: {}".format(short_address(account),
                                              last_eth_points))
Ejemplo n.º 4
0
def unlock_account(owner, contract, account):
    tx_hash = transact_function(owner, contract, 'unlockAccount', [account])
    gas_used = wait_transaction(contract.web3, tx_hash)
    print("SUCCESS: Account Unlocked: {} Gas used: {}".format(
        short_address(account), gas_used))
Ejemplo n.º 5
0
def get_dividends_owing(contract, account):
    dividends_owing = call_function(contract, 'dividendsOwing', [account])
    print("Dividends owed for {}: {}".format(short_address(account),
                                             dividends_owing))