Ejemplo n.º 1
0
 def inner_contract_from_address(address, contract_name, path):
     contract_abi, contract_bytecode = Contract.get_abi_and_bytecode(
         path, contract_name)
     contract = web3.eth.contract(address=address,
                                  abi=contract_abi,
                                  bytecode=contract_bytecode)
     return contract
Ejemplo n.º 2
0
def multisig_sender(status, web3, owner, ether_sender):
    path = os.path.abspath(
        "../../../../../../MultisigWallet/MultisigWallet/deployment/build")
    contract_abi, contract_bytecode = Contract.get_abi_and_bytecode(
        path, "MultiSigWallet")
    sender_nonce = web3.eth.getTransactionCount(owner)
    contract_address = Contract.generate_contract_address(owner, sender_nonce)
    multisig_wallet_contract = web3.eth.contract(address=contract_address,
                                                 abi=contract_abi,
                                                 bytecode=contract_bytecode)
    tx_hash = multisig_wallet_contract.constructor(
        [owner, ether_sender],
        1).transact(transaction=tx_args(owner, gas=3900000))
    status(tx_hash)
    return multisig_wallet_contract