pull/2101/head
damon 2020-06-19 04:43:16 -07:00
parent 7725859467
commit 0c8a9c3c5f
3 changed files with 4 additions and 3 deletions

View File

@ -807,7 +807,8 @@ class PolicyManagerAgent(EthereumContractAgent):
_receipt = self.blockchain.client.wait_for_receipt(txhash, timeout=timeout)
transaction = self.blockchain.client.w3.eth.getTransaction(txhash)
try:
_signature, parameters = self.contract.decode_function_input(self.blockchain.client.parse_transaction_data(transaction))
_signature, parameters = self.contract.decode_function_input(
self.blockchain.client.parse_transaction_data(transaction))
except AttributeError:
raise RuntimeError(f"Eth Client incompatibility issue: {self.blockchain.client} could not extract data from {transaction}")
return parameters['_nodes']

View File

@ -43,7 +43,7 @@ class Proposal:
proposal_elements = dict(trustee_address=trustee_address,
target_address=transaction['to'],
value=transaction['value'],
data=Web3.toBytes(hexstr=transaction['data']),
data=Web3.toBytes(hexstr=transaction['data']), # TODO: should use a blockchain client to get correct data
nonce=multisig_agent.nonce)
digest = multisig_agent.get_unsigned_transaction_hash(**proposal_elements)

View File

@ -172,7 +172,7 @@ def test_manual_proxy_retargeting(testerchain, test_registry, token_economics):
just_build_transaction=True)
assert transaction['to'] == proxy_deployer.contract.address
upgrade_function, _params = proxy_deployer.contract.decode_function_input(transaction['data'])
upgrade_function, _params = proxy_deployer.contract.decode_function_input(transaction['data']) # TODO: this only tests for ethtester
assert upgrade_function.fn_name == proxy_deployer.contract.functions.upgrade.fn_name
# Retarget, for real