diff --git a/ape-config.yaml b/ape-config.yaml index 1841bc8a..66fa695b 100644 --- a/ape-config.yaml +++ b/ape-config.yaml @@ -12,6 +12,10 @@ dependencies: - name: openzeppelin github: OpenZeppelin/openzeppelin-contracts version: 4.9.1 + config_override: + solidity: + version: 0.8.20 + evm_version: paris - name: openzeppelin-upgradeable github: OpenZeppelin/openzeppelin-contracts-upgradeable version: 4.9.1 @@ -35,36 +39,36 @@ deployments: polygon: mainnet: - contract_type: DAI - address: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063' + address: "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063" - contract_type: fx_child - address: '0x8397259c983751DAf40400790063935a11afa28a' + address: "0x8397259c983751DAf40400790063935a11afa28a" mumbai: - contract_type: DAI - address: '0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F' + address: "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F" - contract_type: StakeInfo - address: '0xC1379866Fb0c100DCBFAb7b470009C4827D47DD8' + address: "0xC1379866Fb0c100DCBFAb7b470009C4827D47DD8" - contract_type: fx_child - address: '0xCf73231F28B7331BBe3124B907840A94851f9f11' + address: "0xCf73231F28B7331BBe3124B907840A94851f9f11" ethereum: local: - nu_token_supply: 1_000_000_000 pre_min_authorization: 40000000000000000000000 - pre_min_operator_seconds: 86400 # one day in seconds + pre_min_operator_seconds: 86400 # one day in seconds pre_hash_algorithm: 1 pre_base_penalty: 2 pre_penalty_history_coefficient: 0 pre_percentage_penalty_coefficient: 100000 - reward_duration: 604800 # one week in seconds - deauthorization_duration: 5184000 # 60 days in seconds + reward_duration: 604800 # one week in seconds + deauthorization_duration: 5184000 # 60 days in seconds verify: False rinkeby: - - nu_token: '0x78D591D90a4a768B9D2790deA465D472b6Fe0f18' + - nu_token: "0x78D591D90a4a768B9D2790deA465D472b6Fe0f18" nu_token_supply: 1_000_000_000 - t_staking: '0x18eFb520dA5D387982C860a64855C14C0AcADF3F' - work_lock: '0x0000000000000000000000000000000000000000' - staking_escrow: '0x6A6F917a3FF3d33d26BB4743140F205486cD6B4B' + t_staking: "0x18eFb520dA5D387982C860a64855C14C0AcADF3F" + work_lock: "0x0000000000000000000000000000000000000000" + staking_escrow: "0x6A6F917a3FF3d33d26BB4743140F205486cD6B4B" pre_min_authorization: 40000000000000000000000 - pre_min_operator_seconds: 86400 # one day in seconds + pre_min_operator_seconds: 86400 # one day in seconds verify: True # TODO: is there a batter way to manage multiple deployments on the same network? # goerli-tapir: @@ -78,39 +82,38 @@ deployments: # pre_min_authorization: 40000000000000000000000 # pre_min_operator_seconds: 86400 # one day in seconds goerli: # -lynx - - t_staking: '0x81eEefb7B1b3313C89976910096F8f1487301Bb1' + - t_staking: "0x81eEefb7B1b3313C89976910096F8f1487301Bb1" pre_min_authorization: 40000000000000000000000 - pre_min_operator_seconds: 86400 # one day in seconds + pre_min_operator_seconds: 86400 # one day in seconds ritual_timeout: 3600 max_dkg_size: 8 - pre_application: '0x685b8Fd02aB87d8FfFff7346cB101A5cE4185bf3' + pre_application: "0x685b8Fd02aB87d8FfFff7346cB101A5cE4185bf3" verify: True - reward_duration: 604800 # one week in seconds - deauthorization_duration: 5184000 # 60 days in seconds + reward_duration: 604800 # one week in seconds + deauthorization_duration: 5184000 # 60 days in seconds - contract_type: fx_root - address: '0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA' + address: "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA" - contract_type: checkpoint_manager - address: '0x2890bA17EfE978480615e330ecB65333b880928e' + address: "0x2890bA17EfE978480615e330ecB65333b880928e" mumbai: - - stake_info_contract: '0xC1379866Fb0c100DCBFAb7b470009C4827D47DD8' + - stake_info_contract: "0xC1379866Fb0c100DCBFAb7b470009C4827D47DD8" max_dkg_size: 16 - ritual_timeout: 86400 # one day in seconds + ritual_timeout: 86400 # one day in seconds verify: True - checkpoint_manager: '0x2890bA17EfE978480615e330ecB65333b880928e' - fx_root: '0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA' + checkpoint_manager: "0x2890bA17EfE978480615e330ecB65333b880928e" + fx_root: "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA" mainnet: - - nu_token: '0x4fE83213D56308330EC302a8BD641f1d0113A4Cc' - t_staking: '0x01B67b1194C75264d06F808A921228a95C765dd7' - work_lock: '0xe9778E69a961e64d3cdBB34CF6778281d34667c2' - staking_escrow: '0xbbD3C0C794F40c4f993B03F65343aCC6fcfCb2e2' + - nu_token: "0x4fE83213D56308330EC302a8BD641f1d0113A4Cc" + t_staking: "0x01B67b1194C75264d06F808A921228a95C765dd7" + work_lock: "0xe9778E69a961e64d3cdBB34CF6778281d34667c2" + staking_escrow: "0xbbD3C0C794F40c4f993B03F65343aCC6fcfCb2e2" pre_min_authorization: 40000000000000000000000 - pre_min_operator_seconds: 86400 # one day in seconds + pre_min_operator_seconds: 86400 # one day in seconds verify: True - contract_type: fx_root - address: '0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2' + address: "0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2" - contract_type: checkpoint_manager - address: '0x86e4dc95c7fbdbf52e33d563bbdb00823894c287' - + address: "0x86e4dc95c7fbdbf52e33d563bbdb00823894c287" test: mnemonic: test test test test test test test test test test test junk diff --git a/contracts/contracts/coordination/TACoChildApplication.sol b/contracts/contracts/coordination/TACoChildApplication.sol index 96cb428f..e898a5ef 100644 --- a/contracts/contracts/coordination/TACoChildApplication.sol +++ b/contracts/contracts/coordination/TACoChildApplication.sol @@ -104,8 +104,8 @@ contract TACoChildApplication is ITACoRootToChild, ITACoChildApplication, Initia // TODO maybe allow second confirmation, just do not send root call? require(!info.operatorConfirmed, "Can't confirm same operator twice"); info.operatorConfirmed = true; - rootApplication.confirmOperatorAddress(_operator); emit OperatorConfirmed(stakingProvider, _operator); + rootApplication.confirmOperatorAddress(_operator); } } diff --git a/requirements.txt b/requirements.txt index eec4de04..29f15ef8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -i https://pypi.org/simple aiohttp==3.8.4 ; python_version >= '3.6' aiosignal==1.3.1 ; python_version >= '3.7' -ape-solidity==0.6.7 +ape-solidity==0.6.8 appnope==0.1.3 ; sys_platform == 'darwin' asn1crypto==1.5.1 asttokens==2.2.1 @@ -18,7 +18,7 @@ cffi==1.15.1 cfgv==3.3.1 ; python_full_version >= '3.6.1' chardet==5.1.0 ; python_version >= '3.7' charset-normalizer==3.1.0 ; python_full_version >= '3.7.0' -click==8.1.3 ; python_version >= '3.7' +click==8.1.6 ; python_version >= '3.7' coincurve==18.0.0 colorama==0.4.6 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6' commonmark==0.9.1 @@ -29,19 +29,19 @@ decorator==5.1.1 ; python_version >= '3.5' deprecated==1.2.13 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' distlib==0.3.6 eip712==0.2.1 ; python_version >= '3.8' and python_version < '4' -eth-abi==4.0.0 ; python_version >= '3.7' and python_version < '4' +eth-abi==4.1.0 ; python_version >= '3.7' and python_version < '4' eth-account==0.8.0 ; python_version >= '3.6' and python_version < '4' -eth-ape==0.6.13 +eth-ape==0.6.19 eth-bloom==2.0.0 ; python_version >= '3.7' and python_version < '4' eth-hash[pycryptodome]==0.5.1 ; python_version >= '3.7' and python_version < '4' eth-keyfile==0.6.1 eth-keys==0.4.0 eth-rlp==0.3.0 ; python_version >= '3.7' and python_version < '4' -eth-tester[py-evm]==0.9.0b1 -eth-typing==3.3.0 ; python_full_version >= '3.7.2' and python_version < '4' -eth-utils==2.1.0 ; python_version >= '3.7' and python_version < '4' -ethpm-types==0.5.3 ; python_version >= '3.8' and python_version < '4' -evm-trace==0.1.0a21 ; python_version >= '3.8' and python_version < '4' +eth-tester[py-evm]==0.9.1b1 +eth-typing==3.4.0 ; python_full_version >= '3.7.2' and python_version < '4' +eth-utils==2.2.0 ; python_version >= '3.7' and python_version < '4' +ethpm-types==0.5.4 ; python_version >= '3.8' and python_version < '4' +evm-trace==0.1.0a23 ; python_version >= '3.8' and python_version < '4' exceptiongroup==1.1.1 ; python_version < '3.11' executing==1.2.0 filelock==3.12.0 ; python_version >= '3.7' @@ -66,7 +66,7 @@ mccabe==0.7.0 ; python_version >= '3.6' morphys==1.0 msgspec==0.15.1 ; python_version >= '3.8' multidict==6.0.4 ; python_version >= '3.7' -mypy-extensions==0.4.4 ; python_version >= '2.7' +mypy-extensions==1.0.0 ; python_version >= '2.7' nodeenv==1.8.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6' nucypher-core==0.8.0 numpy==1.24.3 ; python_version < '3.10' @@ -79,7 +79,7 @@ pexpect==4.8.0 ; sys_platform != 'win32' pickleshare==0.7.5 pkgutil-resolve-name==1.3.10 ; python_version < '3.9' platformdirs==3.5.1 ; python_version >= '3.7' -pluggy==1.0.0 ; python_version >= '3.6' +pluggy==1.3.0 ; python_version >= '3.6' pre-commit==3.3.2 prompt-toolkit==3.0.38 ; python_full_version >= '3.7.0' protobuf==4.23.1 ; python_version >= '3.7' @@ -87,7 +87,7 @@ ptyprocess==0.7.0 pure-eval==0.2.2 py-cid==0.3.0 py-ecc==6.0.0 ; python_version >= '3.6' and python_version < '4' -py-evm==0.7.0a2 +py-evm==0.7.0a4 py-geth==3.13.0 ; python_version >= '3' py-multibase==1.0.3 py-multicodec==0.2.1 @@ -99,7 +99,7 @@ pycryptodome==3.18.0 pydantic==1.10.8 ; python_version >= '3.7' pyethash==0.1.27 pyflakes==3.0.1 ; python_version >= '3.6' -pygithub==1.58.2 ; python_version >= '3.7' +pygithub==1.59.0 ; python_version >= '3.7' pygments==2.15.1 ; python_version >= '3.7' pyjwt[crypto]==2.7.0 ; python_version >= '3.7' pynacl==1.5.0 ; python_version >= '3.6' @@ -132,9 +132,9 @@ typing-extensions==4.5.0 ; python_version < '3.10' urllib3==2.0.2 ; python_version >= '3.7' varint==1.0.2 virtualenv==20.23.0 ; python_version >= '3.7' -watchdog==2.3.1 ; python_version >= '3.6' +watchdog==3.0.0 ; python_version >= '3.6' wcwidth==0.2.6 -web3[tester]==6.5.0 ; python_full_version >= '3.7.2' +web3[tester]==6.7.0 ; python_full_version >= '3.7.2' websockets==11.0.3 ; python_version >= '3.7' wrapt==1.15.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' yarl==1.9.2 ; python_version >= '3.7' diff --git a/scripts/deploy_xchain_test.py b/scripts/deploy_xchain_test.py index 8f06720c..edb4c9d2 100644 --- a/scripts/deploy_xchain_test.py +++ b/scripts/deploy_xchain_test.py @@ -57,6 +57,7 @@ def deploy_eth_contracts(deployer, child_address, config, eth_network): sender=deployer, publish=False, ) + proxy_contract.setChildApplication(root.address, sender=deployer) return root, proxy_contract, threshold_staking @@ -82,7 +83,7 @@ def deploy_polygon_contracts(deployer, config, poly_network): b"", sender=deployer, ) - proxy_contract = project.TACoChildApplication.at(proxy.address) + proxy_contract = project.TestnetTACoChildApplication.at(proxy.address) polygon_child.setChildApplication(proxy_contract.address, sender=deployer) coordinator = project.CoordinatorForTACoChildApplicationMock.deploy( @@ -125,7 +126,6 @@ def cli(network_type, account): # Set the root contract address in the child contract with poly_network.use_provider("infura"): poly_child.setFxRootTunnel(root.address) - taco_child_app.addUpdaters([poly_child.address]) print("CHILD: {}".format(poly_child.address)) print("TACo CHILD APP: {}".format(taco_child_app.address))