Skip to content

Commit

Permalink
feat: deploy registry
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Mar 4, 2024
1 parent b393a13 commit 3ca4c8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions evm/script/Registry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
6 changes: 3 additions & 3 deletions evm/script/config/config_contracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"volatile_template": "0x11A13784007510006c83978D1d0C82385df3A663"
},
"registry": {
"describer": "0x6905586595Ab43CA97d401B6B152B6728ddc8aD4",
"describer_registry": "0xEdC6593910803B02Cca03beA9632CD674370A74a",
"lens": "0x1825c95672a95085e026254A791d0A1180753393"
"describer": "0x5514d9b55CdCbA70A6aF19Ca1E3443b1abEa104A",
"describer_registry": "0x56dCAa213D0da8dC0eb21ac71fB63EF28D497fd8",
"lens": "0x7E511493d23c0ad9dc1a6137D24BE5aa273773eE"
}
}

0 comments on commit 3ca4c8e

Please sign in to comment.