Skip to content

Commit 8f57bb5

Browse files
authored
feat: add base tokens and fix helper scripts (#343)
* feat: add base deployments Signed-off-by: Matt Rice <[email protected]> * WIP Signed-off-by: Matt Rice <[email protected]> * WIP Signed-off-by: Matt Rice <[email protected]> * WIP Signed-off-by: Matt Rice <[email protected]> * WIP Signed-off-by: Matt Rice <[email protected]> * feat: add base tokens and fix helper scripts Signed-off-by: Matt Rice <[email protected]> * Update buildSampleTree.ts * lint Signed-off-by: Matt Rice <[email protected]> --------- Signed-off-by: Matt Rice <[email protected]>
1 parent 6fa430d commit 8f57bb5

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

scripts/buildSampleTree.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ async function main() {
139139
});
140140
console.group();
141141
console.log(`- slowRelayLeaf ID#${i}: `, leaves[i]);
142-
console.log("- Tuple representation of leaf that you can input into etherscan.io: \n", tuplelifyLeaf(leaves[i]));
142+
console.log(
143+
"- Tuple representation of leaf that you can input into etherscan.io: \n",
144+
tuplelifyLeaf(leaves[i].relayData)
145+
);
143146
console.groupEnd();
144147
}
145148

tasks/enableL1TokenAcrossEcosystem.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ task("enable-l1-token-across-ecosystem", "Enable a provided token across the ent
2626
(symbol) => symbol === taskArguments.token
2727
) as keyof typeof TOKEN_SYMBOLS_MAP;
2828
assert(matchedSymbol !== undefined, `Could not find token with symbol ${taskArguments.token} in TOKEN_SYMBOLS_MAP`);
29-
const l1Token = TOKEN_SYMBOLS_MAP[matchedSymbol];
29+
const hubPoolChainId = await hre.getChainId();
30+
const l1Token = TOKEN_SYMBOLS_MAP[matchedSymbol].addresses[hubPoolChainId];
3031

3132
// If deposit routes chains are provided then we'll only add routes involving these chains. This is used to add new
3233
// deposit routes to a new chain for an existing L1 token, so we also won't add a new LP token if this is defined.

utils/constants.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ export const CHAIN_IDs = {
55
BOBA: 288,
66
POLYGON: 137,
77
ZK_SYNC: 324,
8+
BASE: 8453,
89
GOERLI: 5,
910
SEPOLIA: 11155111,
1011
MUMBAI: 80001,
1112
ARBITRUM_GOERLI: 421613,
1213
OPTIMISM_GOERLI: 420,
1314
ZK_SYNC_GOERLI: 280,
15+
BASE_GOERLI: 84531,
1416
};
1517

1618
// NOTE: All addresses should be checksummed
@@ -37,6 +39,7 @@ export const TOKEN_SYMBOLS_MAP = {
3739
[CHAIN_IDs.OPTIMISM]: "0xFE8B128bA8C78aabC59d4c64cEE7fF28e9379921",
3840
[CHAIN_IDs.POLYGON]: "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3",
3941
[CHAIN_IDs.ARBITRUM]: "0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8",
42+
[CHAIN_IDs.BASE]: "0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2",
4043
},
4144
},
4245
BADGER: {
@@ -68,7 +71,10 @@ export const TOKEN_SYMBOLS_MAP = {
6871
[CHAIN_IDs.POLYGON]: "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",
6972
[CHAIN_IDs.BOBA]: "0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35",
7073
[CHAIN_IDs.ARBITRUM]: "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",
74+
[CHAIN_IDs.BASE]: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
7175
[CHAIN_IDs.GOERLI]: "0x5C221E77624690fff6dd741493D735a17716c26B",
76+
// [CHAIN_IDs.GOERLI]: "0x11fE4B6AE13d2a6055C8D9cF65c55bac32B5d844", // Uncomment for Optimism/Base testnet usage.
77+
[CHAIN_IDs.BASE_GOERLI]: "0x174956bDfbCEb6e53089297cce4fE2825E58d92C",
7278
},
7379
},
7480
ETH: {
@@ -86,6 +92,8 @@ export const TOKEN_SYMBOLS_MAP = {
8692
[CHAIN_IDs.SEPOLIA]: "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
8793
[CHAIN_IDs.ZK_SYNC]: "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
8894
[CHAIN_IDs.ZK_SYNC_GOERLI]: "0x20b28B1e4665FFf290650586ad76E977EAb90c5D",
95+
[CHAIN_IDs.BASE]: "0x4200000000000000000000000000000000000006",
96+
[CHAIN_IDs.BASE_GOERLI]: "0x4200000000000000000000000000000000000006",
8997
},
9098
},
9199
MATIC: {
@@ -142,10 +150,13 @@ export const TOKEN_SYMBOLS_MAP = {
142150
[CHAIN_IDs.POLYGON]: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
143151
[CHAIN_IDs.BOBA]: "0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc",
144152
[CHAIN_IDs.ARBITRUM]: "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
145-
[CHAIN_IDs.GOERLI]: "0x07865c6E87B9F70255377e024ace6630C1Eaa37F",
153+
// [CHAIN_IDs.GOERLI]: "0xd35CCeEAD182dcee0F148EbaC9447DA2c4D449c4",
154+
[CHAIN_IDs.GOERLI]: "0x07865c6E87B9F70255377e024ace6630C1Eaa37F", // Uncomment for Optimism/Base testnet usage.
146155
[CHAIN_IDs.MUMBAI]: "0xe6b8a5CF854791412c1f6EFC7CAf629f5Df1c747",
147156
[CHAIN_IDs.ZK_SYNC]: "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
148157
[CHAIN_IDs.ZK_SYNC_GOERLI]: "0x0faF6df7054946141266420b43783387A78d82A9",
158+
[CHAIN_IDs.BASE]: "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
159+
[CHAIN_IDs.BASE_GOERLI]: "0x853154e2A5604E5C74a2546E2871Ad44932eB92C",
149160
},
150161
},
151162
USDT: {
@@ -190,6 +201,8 @@ export const TOKEN_SYMBOLS_MAP = {
190201
[CHAIN_IDs.SEPOLIA]: "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
191202
[CHAIN_IDs.ZK_SYNC]: "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",
192203
[CHAIN_IDs.ZK_SYNC_GOERLI]: "0x20b28B1e4665FFf290650586ad76E977EAb90c5D",
204+
[CHAIN_IDs.BASE]: "0x4200000000000000000000000000000000000006",
205+
[CHAIN_IDs.BASE_GOERLI]: "0x4200000000000000000000000000000000000006",
193206
},
194207
},
195208
WMATIC: {

0 commit comments

Comments
 (0)