Skip to content

Commit

Permalink
Check the number of constructor arguments
Browse files Browse the repository at this point in the history
of TokenNetworkRegistry.
  • Loading branch information
pirapira committed Jul 12, 2019
1 parent 1983528 commit e32ae57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion raiden_contracts/deploy/contract_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,13 @@ def verify_deployment_data(self, deployment_data: DeployedContracts) -> bool:
!= secret_registry.address
):
raise RuntimeError("secret_registry_address onchain has an unexpected value.")
if len(constructor_arguments) != 5:
raise RuntimeError(
"TokenNetworkRegistry received a wrong number of constructor arguments."
)
if secret_registry.address != constructor_arguments[0]:
raise RuntimeError(
"TokenNetwork's constructor received a different SecretRegistry address."
"TokenNetworkRegistry's constructor received a different SecretRegistry address."
)
assert token_network_registry.functions.chain_id().call() == constructor_arguments[1]
assert (
Expand Down

0 comments on commit e32ae57

Please sign in to comment.