Skip to content

Commit

Permalink
Merge pull request #27 from DIMO-Network/chore/si-2535-migrate-dcn
Browse files Browse the repository at this point in the history
Chore/si 2535 migrate dcn
  • Loading branch information
LorranSutter authored May 1, 2024
2 parents 929aa73 + 4b0453b commit b2780ed
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 105 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
POLYGONSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
POLYGON_URL=https://polygon-mainnet.g.alchemy.com/v2/[YOUR_ALCHEMY_KEY]
MUMBAI_URL=https://polygon-mumbai.g.alchemy.com/v2/[YOUR_ALCHEMY_KEY]
AMOY_URL=https://polygon-amoy.g.alchemy.com/v2/[YOUR_ALCHEMY_KEY]
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
COIN_MARKETCAP_API_KEY=[YOUR-API-KEY]
GAS_PRICE=30000000000
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ cache
artifacts

# OpenZeppelin
.openzeppelin/unknown-*.json
.openzeppelin/unknown-*.json
.DS_Store
17 changes: 16 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ const config: HardhatUserConfig = {
url: process.env.POLYGON_URL || '',
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : []
},
amoy: {
url: process.env.AMOY_URL || '',
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [],
},
mumbai: {
url: process.env.MUMBAI_URL || '',
accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : []
Expand All @@ -40,8 +44,19 @@ const config: HardhatUserConfig = {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY || '',
polygon: process.env.POLYGONSCAN_API_KEY || '',
polygonAmoy: process.env.POLYGONSCAN_API_KEY || '',
polygonMumbai: process.env.POLYGONSCAN_API_KEY || ''
}
},
customChains: [
{
network: 'polygonAmoy',
chainId: 80002,
urls: {
apiURL: 'https://api-amoy.polygonscan.com/api',
browserURL: 'https://amoy.polygonscan.com/',
},
},
],
},
contractSizer: {
alphaSort: true,
Expand Down
64 changes: 64 additions & 0 deletions scripts/data/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,70 @@
}
}
},
"amoy": {
"modules": {
"ResolverRegistry": {
"address": "0x8E498009CaCa11ca9dD6696Bc00eEFcCd51811d5",
"selectors": [
"0x0df5b997",
"0x248a9ca3",
"0x2f2ff15d",
"0x91d14854",
"0x9748a762",
"0x8bb9c5bf",
"0xd547741f",
"0x06d1d2a1"
]
},
"Shared": {
"address": "0xCFB64F73c881b2Dc384475682b9936727720d22c",
"selectors": [
"0x56f98b37",
"0xa1caf728",
"0x5b6c1979",
"0xf41377ca"
]
},
"NameResolver": {
"address": "0x1fE42E74fB191826392d5f887B9D97892b474d52",
"selectors": [
"0x691f3431",
"0x77372213"
]
},
"VehicleIdResolver": {
"address": "0x459306CcA09E7B29f393EAC8A1CF97297398dCC0",
"selectors": [
"0x01e11675",
"0x1bd59757",
"0xf3cdd5c3",
"0x9bfae6da",
"0x24f9e9da"
]
},
"Multicall": {
"address": "0x6b4751FD291DbDF20C565ce4Cf8Ba49D4630541a",
"selectors": [
"0x415c2d96",
"0x1c0c6e51"
]
}
},
"contracts": {
"DcnRegistry": {
"proxy": "0x374350Ab806E06217e84a0238150E98788cd26ab",
"implementation": "0x95b78E4e4a0DCCDb4367aB22d9F7f97244c43e96"
},
"PriceManager": {
"proxy": "0x07290D02F11F707DA3Ad9bE95e4bE63BbFFC59c3",
"implementation": "0x5A5BB56159E2B0bfAB10201e51cDc3ED78dD9940"
},
"DcnManager": {
"proxy": "0x0c96a406e4883Ce60EFAF704aD38b381B34474d2",
"implementation": "0x916bb6552c5561B7c81CE1cd03d8A6cBCd49Eeac"
}
}
},
"mumbai": {
"modules": {
"ResolverRegistry": {
Expand Down
13 changes: 8 additions & 5 deletions scripts/data/deployConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ export const MANAGER_RESOLVER_ROLE = ethers.utils.keccak256(

export const networkName = network.name;
export const dimoToken: NetworkValue = {
amoy: '0x21cFE003997fB7c2B3cfe5cf71e7833B7B2eCe10',
mumbai: '0x80ee7ec4493a1d7975ab900f94db25ba7c688201',
polygon: '0xe261d618a959afffd53168cd07d12e37b26761db',
hardhat: '0xffffffffffffffffffffffffffffffffffffffff',
localhost: '0xffffffffffffffffffffffffffffffffffffffff'
};
};
export const foundationAddress: NetworkValue = {
mumbai: '0x1741ec2915ab71fc03492715b5640133da69420b',
polygon: '0xCED3c922200559128930180d3f0bfFd4d9f4F123',
hardhat: '0xffffffffffffffffffffffffffffffffffffffff',
localhost: '0xffffffffffffffffffffffffffffffffffffffff'
amoy: '0x07B584f6a7125491C991ca2a45ab9e641B1CeE1b',
mumbai: '0x1741ec2915ab71fc03492715b5640133da69420b',
polygon: '0xCED3c922200559128930180d3f0bfFd4d9f4F123',
hardhat: '0xffffffffffffffffffffffffffffffffffffffff',
localhost: '0xffffffffffffffffffffffffffffffffffffffff'
};
export const dimoVehicleIdAddress: NetworkValue = {
amoy: '0x45fbCD3ef7361d156e8b16F5538AE36DEdf61Da8',
mumbai: '0x90C4D6113Ec88dd4BDf12f26DB2b3998fd13A144',
polygon: '0xbA5738a18d83D41847dfFbDC6101d37C69c9B0cF',
hardhat: '0xffffffffffffffffffffffffffffffffffffffff',
Expand Down
5 changes: 4 additions & 1 deletion scripts/data/disallowed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,8 @@ export const disallowedList = [
'Dimo',
'DAF',
'HINO',
'Scania'
'Scania',
'Chery',
'Hashdog',
'International'
];
Loading

0 comments on commit b2780ed

Please sign in to comment.