I have a contract that creates other contracts. It then pushes these contracts in an array, address public newContracts. The only problem is I'm having trouble calling them from python.
factory.json is my abi and the address and web3 seem to connect fine, just can't call the variables correctly.
Thanks for any help
from web3 import Web3 import json from web3.providers.rpc import HTTPProvider contractAddress = '0x3c7bec02bd4fa73dce24413d2a13c02e1a91e858' web3 = Web3(HTTPProvider('https://ropsten.infura.io')) with open('factory.json', 'r') as abi_definition: abi = json.load(abi_definition) print (web3.eth.blockNumber) fContract = web3.eth.contract(abi,contractAddress) print ('Creator',fContract.call().creator) print ('Contracts',fContract.call().newContracts) print ('OracleName',fContract.call().oracleName)