Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REG-1416] Deploy new version of USDC mock to Amoy testnet #365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
218 changes: 218 additions & 0 deletions .openzeppelin/unknown-80002.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@
"address": "0x4FF860525ccb6E992E0A4579860465f7EF581aed",
"txHash": "0x4b0c26448dd2540d194cc9063cd3c686e6074ad2dd33a4e81c98fcd06ca18a2e",
"kind": "transparent"
},
{
"address": "0x33eb4E083dE4901cBB2fC1B8412cD416F65b741e",
"txHash": "0x79c907dabba436c4c4f7457b758ba02bf1e11819be55da623ab23c55ceefb267",
"kind": "transparent"
},
{
"address": "0xDe1DAdcF11a7447C3D093e97FdbD513f488cE3b4",
"txHash": "0xd6b226987afea5997966311c56ffca2fb319ebbfcd38af60fb18a9460fba0cfa",
"kind": "transparent"
},
{
"address": "0x9f9fc5E92FCc601Bee83a6A2364386ec5B006d49",
"txHash": "0x7c4db70d7a4f598322f34b4dc2ed8f47f695c032d9aa3221f827c4b98d1324a0",
"kind": "transparent"
},
{
"address": "0x9E85b0F8a298Eb0ACc175cFFEd0674718d552C11",
"txHash": "0x29890cc5ab99d6b3feee2ddf8cfb22c6363ac04061b39e9b3be61d47fea68eb7",
"kind": "transparent"
}
],
"impls": {
Expand Down Expand Up @@ -1264,6 +1284,204 @@
},
"namespaces": {}
}
},
"ff8601f54dcbf36bb1521e5dbec840aa26ebb07335ded560371353c4f754c198": {
"address": "0x53B01e32807127D3c2Fb6eA1A3b268753183Ed68",
"txHash": "0xcf78b5da17c1ed9c593d7dd52d7c814ce50637fa7fc952b6a959dba01accf3bd",
"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": "_balances",
"offset": 0,
"slot": "51",
"type": "t_mapping(t_address,t_uint256)",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:37"
},
{
"label": "_allowances",
"offset": 0,
"slot": "52",
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:39"
},
{
"label": "_totalSupply",
"offset": 0,
"slot": "53",
"type": "t_uint256",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:41"
},
{
"label": "_name",
"offset": 0,
"slot": "54",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:43"
},
{
"label": "_symbol",
"offset": 0,
"slot": "55",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44"
},
{
"label": "__gap",
"offset": 0,
"slot": "56",
"type": "t_array(t_uint256)45_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:394"
},
{
"label": "_HASHED_NAME",
"offset": 0,
"slot": "101",
"type": "t_bytes32",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:32"
},
{
"label": "_HASHED_VERSION",
"offset": 0,
"slot": "102",
"type": "t_bytes32",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:33"
},
{
"label": "__gap",
"offset": 0,
"slot": "103",
"type": "t_array(t_uint256)50_storage",
"contract": "EIP712Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:120"
},
{
"label": "_nonces",
"offset": 0,
"slot": "153",
"type": "t_mapping(t_address,t_struct(Counter)17502_storage)",
"contract": "ERC20PermitUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:28"
},
{
"label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT",
"offset": 0,
"slot": "154",
"type": "t_bytes32",
"contract": "ERC20PermitUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:40",
"renamedFrom": "_PERMIT_TYPEHASH"
},
{
"label": "__gap",
"offset": 0,
"slot": "155",
"type": "t_array(t_uint256)49_storage",
"contract": "ERC20PermitUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:108"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)45_storage": {
"label": "uint256[45]",
"numberOfBytes": "1440"
},
"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_mapping(t_address,t_mapping(t_address,t_uint256))": {
"label": "mapping(address => mapping(address => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_struct(Counter)17502_storage)": {
"label": "mapping(address => struct CountersUpgradeable.Counter)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Counter)17502_storage": {
"label": "struct CountersUpgradeable.Counter",
"members": [
{
"label": "_value",
"type": "t_uint256",
"offset": 0,
"slot": "0"
}
],
"numberOfBytes": "32"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
},
"allAddresses": [
"0x53B01e32807127D3c2Fb6eA1A3b268753183Ed68",
"0xf66A05D55F6a71E74e131b9870B9131EE56ef12E"
]
}
}
}
62 changes: 31 additions & 31 deletions ens-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,45 +73,45 @@
"1337": {
"contracts": {
"ENSRegistry": {
"address": "0x951c830a0471C04DCB60Ce244DEe38eE4b0609ec",
"deploymentBlock": "0x5c",
"legacyAddresses": []
},
"BaseRegistrarImplementation": {
"address": "0x5831f0664Ee58C88DE672946678Fed9a228Eb83B",
"deploymentBlock": "0x5d",
"legacyAddresses": []
},
"ReverseRegistrar": {
"BaseRegistrarImplementation": {
"address": "0x50eBEc0b0EAfc732324C1A28963C1FcB7889DA39",
"deploymentBlock": "0x5e",
"legacyAddresses": []
},
"NameWrapper": {
"address": "0x4de18142969d365e29189e7093da83ad4FB182df",
"deploymentBlock": "0x61",
"ReverseRegistrar": {
"address": "0xc86965b7720a64c86263030f7B2902c752084F46",
"deploymentBlock": "0x5f",
"legacyAddresses": []
},
"DummyOracle": {
"address": "0xd70Ab4F5767a8fa0e1e261A2f51189316a7C0d86",
"deploymentBlock": "0x63",
"NameWrapper": {
"address": "0x399Da84d05f49e44338fe949D0eC54dACf7cb7F2",
"deploymentBlock": "0x62",
"legacyAddresses": []
},
"StablePriceOracle": {
"DummyOracle": {
"address": "0x7a7d9531c7d9D270e7b12e60761546f4e432eEb3",
"deploymentBlock": "0x64",
"legacyAddresses": []
},
"ETHRegistrarController": {
"StablePriceOracle": {
"address": "0x6D264795bBa755974bBBB84Ea5E66eA893BbF606",
"deploymentBlock": "0x65",
"legacyAddresses": []
},
"ETHRegistrarController": {
"address": "0x25D0359804421aDF8E28c3629f611bfD4F04F4fD",
"deploymentBlock": "0x66",
"legacyAddresses": []
},
"PublicResolver": {
"address": "0xFC047CFaAb3b3a81D629f5192202756b3103987F",
"deploymentBlock": "0x6e",
"address": "0x5481dDE809984c7F6363269F6AbE54B6F6A47a1c",
"deploymentBlock": "0x6f",
"legacyAddresses": [
"0x5481dDE809984c7F6363269F6AbE54B6F6A47a1c"
"0xcA8C131DC1f9f62EE54012b10BCA2DA71B8d42e7"
]
},
"ProxyAdmin": {
Expand All @@ -120,34 +120,34 @@
"legacyAddresses": []
},
"ENSCustody": {
"address": "0x8b302811c839b46e3a3C3907174C73A8559835bA",
"deploymentBlock": "0x85",
"implementation": "0x6BeD74EA7DfA87F26ad8F64DfCaE0aa46A76Cd1c",
"forwarder": "0x8b302811c839b46e3a3C3907174C73A8559835bA",
"address": "0x97e711b69fa03aA2859153FCA5656F213A7b51c3",
"deploymentBlock": "0x86",
"implementation": "0x8b302811c839b46e3a3C3907174C73A8559835bA",
"forwarder": "0x97e711b69fa03aA2859153FCA5656F213A7b51c3",
"legacyAddresses": []
},
"LegacyENSRegistry": {
"address": "0xb9025e16A304BA1604e4b93e0A5d6cc4C699a772",
"deploymentBlock": "0x71",
"address": "0xA6E5BE3e1b70543baE007f108F11e275AC45c434",
"deploymentBlock": "0x72",
"legacyAddresses": []
},
"LegacyETHRegistrarController": {
"address": "0x25D0359804421aDF8E28c3629f611bfD4F04F4fD",
"deploymentBlock": "0x66",
"address": "0x51A944e573DdcA58500583A997F2E46616A15770",
"deploymentBlock": "0x67",
"legacyAddresses": []
},
"DNSSECImpl": {
"address": "0xE22d997f9f86801B0405a691B28CF74285fBbC79",
"deploymentBlock": "0x78"
"address": "0x6EACD6613004f5B029fe62DC800CB22172be286A",
"deploymentBlock": "0x79"
},
"DNSRegistrar": {
"address": "0x56e87da626B8D91d93f512064400470C7Eb6f24f",
"deploymentBlock": "0x7f"
},
"Root": {
"address": "0x0F5cF62AD1c3D5d524d9Ed283abe9554aAE181FC",
"deploymentBlock": "0x80"
},
"Root": {
"address": "0x15f5427fbbE5e4c3aA2137C176B7558F5B53265D",
"deploymentBlock": "0x81"
},
"LegacyPublicResolver": {
"address": "0x4fbf7B2f171336958BE5D15FF762a5CfF5363568",
"deploymentBlock": "0x3b"
Expand Down
2 changes: 1 addition & 1 deletion sandbox/state.json

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
SeaportProxyBuyer,
UNSOperator,
UNSRegistry,
USDC,
ZilliqaRecover,
} from '../types';
import { Deployer } from './deployer';
Expand Down Expand Up @@ -559,14 +560,14 @@
const mintUnsTldsTask: Task = {
tags: ['min_uns_tlds', 'uns', 'full'],
priority: 110,
run: async (ctx: Deployer, dependencies: DependenciesMap, params?: Record<string, string>) => {

Check warning on line 563 in src/tasks.ts

View workflow job for this annotation

GitHub Actions / lint

'dependencies' is defined but never used

Check warning on line 563 in src/tasks.ts

View workflow job for this annotation

GitHub Actions / lint

'params' is defined but never used
const { owner } = ctx.accounts;
if (!isSandbox) {
throw new Error('This task is only available for sandbox');
}

const mintingManagerAddr =
ctx.getNetworkConfig().networks[network.config.chainId!].contracts[UnsContractName.MintingManager].address;

Check warning on line 570 in src/tasks.ts

View workflow job for this annotation

GitHub Actions / lint

Forbidden non-null assertion

const mintingManager = await ethers.getContractAt(ArtifactName.MintingManager, mintingManagerAddr, owner);
await mintUnsTlds(mintingManager, owner);
Expand Down Expand Up @@ -1121,10 +1122,14 @@
throw new Error('This task is only available for sandbox or testnet');
}

const usdcMock = await ethers.deployContract(ArtifactName.USDC, [], owner);
const usdcMock = await deployProxy<USDC>(await ethers.getContractFactory(ArtifactName.USDC, owner), [], {
redeployImplementation: 'onchange',
});
await usdcMock.waitForDeployment();
await ctx.saveContractConfig(UnsContractName.USDC, usdcMock);
await verify(ctx, await usdcMock.getAddress(), [], 'contracts/mocks/USDC.sol:USDC');
const proxyAdmin = await upgrades.admin.getInstance();
const usdcMockImpl = await proxyAdmin.getProxyImplementation.staticCall(await usdcMock.getAddress());
await ctx.saveContractConfig(UnsContractName.USDC, usdcMock, usdcMockImpl, usdcMock);
await verify(ctx, usdcMockImpl, []);
},
ensureDependencies: () => ({}),
};
Expand Down Expand Up @@ -1175,6 +1180,7 @@
priority: 30,
run: async (ctx: Deployer, dependencies: DependenciesMap) => {
const { owner } = ctx.accounts;
const amountToFund = parseUnits('1000000000', 6); // 1B USDC

if (!isSandbox && !isTestnet) {
throw new Error('This task is only available for sandbox or testnet');
Expand All @@ -1185,7 +1191,7 @@
UnsContractName.USDC,
]);
const usdcMockContract = await ethers.getContractAt(UnsContractName.USDC, USDCMock.address, owner);
await usdcMockContract.mint(SeaportProxyBuyer.address, parseUnits('1000000', 6)); // 1M USDC
await usdcMockContract.mint(SeaportProxyBuyer.address, amountToFund);
const seaportProxyBuyerContract = await ethers.getContractAt(
UnsContractName.SeaportProxyBuyer,
SeaportProxyBuyer.address,
Expand Down
Loading
Loading