From a88b8230acd1d32a638390c164d9cdec3ed6abb2 Mon Sep 17 00:00:00 2001 From: Nick Shatilo Date: Mon, 28 Oct 2024 17:20:16 +0000 Subject: [PATCH] [REG-1431] Deployed RegistrarCustody to amoy --- .openzeppelin/unknown-80002.json | 204 +++++++++++++++++++++++++++++ CHANGELOG.md | 4 + package.json | 2 +- scripts/deploy_RegistrarCustody.ts | 27 ++++ uns-config.json | 9 +- 5 files changed, 241 insertions(+), 5 deletions(-) create mode 100644 scripts/deploy_RegistrarCustody.ts diff --git a/.openzeppelin/unknown-80002.json b/.openzeppelin/unknown-80002.json index c18f3a84..34d00ae9 100644 --- a/.openzeppelin/unknown-80002.json +++ b/.openzeppelin/unknown-80002.json @@ -59,6 +59,11 @@ "address": "0x9E85b0F8a298Eb0ACc175cFFEd0674718d552C11", "txHash": "0x29890cc5ab99d6b3feee2ddf8cfb22c6363ac04061b39e9b3be61d47fea68eb7", "kind": "transparent" + }, + { + "address": "0x64ED8886421Da2118f988fAC5D65d0b8f7f7fbB6", + "txHash": "0x4936df62b0ec0efe19d7f2fb939a387630cb3f7a6a0fc905a63778b515bdeaa2", + "kind": "transparent" } ], "impls": { @@ -1482,6 +1487,205 @@ "0x53B01e32807127D3c2Fb6eA1A3b268753183Ed68", "0xf66A05D55F6a71E74e131b9870B9131EE56ef12E" ] + }, + "01f5cfc49078c35201ec92195d6b030d837eb5e76bdc824d80a7dacccd9a7cba": { + "address": "0x1cd82f8bD1636D3F40435a45e9CB3effA3b30bcF", + "txHash": "0x5ce16007a2b3ec932955dbec92e1799a756fa7a2a82a432e967c773dc695aba4", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC2771RegistryContext", + "src": "contracts/metatx/ERC2771RegistryContext.sol:89" + }, + { + "label": "_status", + "offset": 0, + "slot": "101", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes32,t_struct(RoleData)12512_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "unsRegistry", + "offset": 0, + "slot": "301", + "type": "t_contract(IUNSRegistry)30036", + "contract": "RegistrarCustody", + "src": "contracts/RegistrarCustody.sol:32" + }, + { + "label": "mintingManager", + "offset": 0, + "slot": "302", + "type": "t_contract(IMintingManager)29501", + "contract": "RegistrarCustody", + "src": "contracts/RegistrarCustody.sol:33" + }, + { + "label": "virtualOwners", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_address)", + "contract": "RegistrarCustody", + "src": "contracts/RegistrarCustody.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "304", + "type": "t_array(t_uint256)50_storage", + "contract": "RegistrarCustody", + "src": "contracts/RegistrarCustody.sol:109" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IMintingManager)29501": { + "label": "contract IMintingManager", + "numberOfBytes": "20" + }, + "t_contract(IUNSRegistry)30036": { + "label": "contract IUNSRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)12512_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)12512_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 530b7407..44ee1712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.9.39 + +- Deployed `RegistrarCustody@0.1.0` on Amoy + ## v0.9.38 - Upgraded `ENSCustody@0.1.4` on Sepolia and Mainnet diff --git a/package.json b/package.json index 1cc539c7..c43595bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uns", - "version": "0.9.38", + "version": "0.9.39", "description": "UNS contracts and tools", "repository": "https://github.com/unstoppabledomains/uns.git", "main": "./dist/index.js", diff --git a/scripts/deploy_RegistrarCustody.ts b/scripts/deploy_RegistrarCustody.ts new file mode 100644 index 00000000..261bdf07 --- /dev/null +++ b/scripts/deploy_RegistrarCustody.ts @@ -0,0 +1,27 @@ +import { network } from 'hardhat'; +import { getNetworkConfig, mergeNetworkConfig } from '../src/config'; +import { Deployer } from '../src/deployer'; +import { unwrap } from '../src/utils'; + +async function main () { + console.log('Network:', network.name); + + const chainId: number = unwrap(network.config, 'chainId'); + const config = getNetworkConfig(chainId); + if (!config) { + throw new Error(`Config not found for network ${chainId}`); + } + + const deployer = await Deployer.create(); + const deployConfig = await deployer.execute(['registrar_custody'], config); + mergeNetworkConfig(deployConfig); + + console.log('Deployed!'); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/uns-config.json b/uns-config.json index a4dc6629..4bd030af 100644 --- a/uns-config.json +++ b/uns-config.json @@ -1,5 +1,5 @@ { - "version": "0.9.15", + "version": "0.9.16", "networks": { "1": { "contracts": { @@ -704,10 +704,11 @@ "deploymentBlock": "0x0" }, "RegistrarCustody": { - "address": "0x0000000000000000000000000000000000000000", - "forwarder": "0x0000000000000000000000000000000000000000", + "address": "0x64ED8886421Da2118f988fAC5D65d0b8f7f7fbB6", + "forwarder": "0x64ED8886421Da2118f988fAC5D65d0b8f7f7fbB6", "legacyAddresses": [], - "deploymentBlock": "0x0" + "deploymentBlock": "0xd1938c", + "implementation": "0x1cd82f8bD1636D3F40435a45e9CB3effA3b30bcF" } } },