From 3ca4c8e2f1edf81eb53cd99a1cd6316d9b06cf97 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 4 Mar 2024 13:39:19 +0100 Subject: [PATCH] feat: deploy registry --- evm/script/Registry.s.sol | 19 ++++++++++--------- evm/script/config/config_contracts.json | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/evm/script/Registry.s.sol b/evm/script/Registry.s.sol index cc165f34..1e4c99cb 100644 --- a/evm/script/Registry.s.sol +++ b/evm/script/Registry.s.sol @@ -139,15 +139,16 @@ contract Registry is BaseMultiChainDeployer { if (current_factory != contracts.factory) desc.modifyWhitelistedFactory(contracts.factory, "v1"); // Set (or update) the cross-chain interfaces - if (vm.keyExists(config_interfaces, string.concat(".", currentChainKey))) { - string[] memory availableInterfaces = vm.parseJsonKeys(config_interfaces, string.concat(".", currentChainKey)); - for (uint256 i = 0; i < availableInterfaces.length; ++i) { - string memory incentiveVersion = availableInterfaces[i]; - address excepted_cci = abi.decode(config_interfaces.parseRaw(string.concat(".", currentChainKey, ".", incentiveVersion, ".interface")), (address)); - - address current_cci = desc.version_to_cci(incentiveVersion); - if (current_cci != excepted_cci) desc.modifyWhitelistedCCI(excepted_cci, incentiveVersion); - } + string[] memory availableInterfaces = vm.parseJsonKeys(config_interfaces, string.concat("$")); + for (uint256 i = 0; i < availableInterfaces.length; ++i) { + string memory incentiveVersion = availableInterfaces[i]; + if (!vm.keyExists(config_interfaces, string.concat(".", incentiveVersion, ".", currentChainKey))) { + continue; + } + address excepted_cci = abi.decode(config_interfaces.parseRaw(string.concat(".", incentiveVersion, ".", currentChainKey, ".interface")), (address)); + + address current_cci = desc.version_to_cci(incentiveVersion); + if (current_cci != excepted_cci) desc.modifyWhitelistedCCI(excepted_cci, incentiveVersion); } } diff --git a/evm/script/config/config_contracts.json b/evm/script/config/config_contracts.json index a01726fe..e5e75574 100644 --- a/evm/script/config/config_contracts.json +++ b/evm/script/config/config_contracts.json @@ -7,8 +7,8 @@ "volatile_template": "0x11A13784007510006c83978D1d0C82385df3A663" }, "registry": { - "describer": "0x6905586595Ab43CA97d401B6B152B6728ddc8aD4", - "describer_registry": "0xEdC6593910803B02Cca03beA9632CD674370A74a", - "lens": "0x1825c95672a95085e026254A791d0A1180753393" + "describer": "0x5514d9b55CdCbA70A6aF19Ca1E3443b1abEa104A", + "describer_registry": "0x56dCAa213D0da8dC0eb21ac71fB63EF28D497fd8", + "lens": "0x7E511493d23c0ad9dc1a6137D24BE5aa273773eE" } } \ No newline at end of file