Skip to content

Commit

Permalink
feat: Add rari mainnet arbified list (#126)
Browse files Browse the repository at this point in the history
* Add rari mainnet arbified list

* Add generation

* Ignore previous list on first generation

* Update Arbitrum one config for Rari chain

* Revert config changes

* Update multicall address for rari

* Reduce chunk size for tokenData
  • Loading branch information
chrstph-dvx authored Jan 31, 2024
1 parent 9549d57 commit 6a66b52
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/generate-token-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ jobs:
version: true
command: yarn arbify --l2NetworkID 660279 --prevArbifiedList https://tokenlist.arbitrum.io/ArbTokenLists/660279_arbed_uniswap_labs.json --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/660279_arbed_uniswap_labs.json

- name: Rari Arbify Uniswap
paths:
- ArbTokenLists/1380012617_arbed_uniswap_labs.json
version: true
command: yarn arbify --l2NetworkID 1380012617 --ignore-previous-list --tokenList https://tokenlist.arbitrum.io/ArbTokenLists/arbed_uniswap_labs.json --newArbifiedList ./src/ArbTokenLists/1380012617_arbed_uniswap_labs.json

env:
INFURA_KEY: '${{ secrets.INFURA_KEY }}'
MAINNET_RPC: 'https://mainnet.infura.io/v3/${{ secrets.INFURA_KEY }}'
Expand Down
1 change: 1 addition & 0 deletions src/lib/instantiate_bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const getNetworkConfig = async () => {
421613: 'https://goerli-rollup.arbitrum.io/rpc',
421614: 'https://sepolia-rollup.arbitrum.io/rpc',
660279: 'https://xai-chain.net/rpc',
1380012617: 'https://mainnet.rpc.rarichain.org/http',
}[networkID];

if (!childRpc) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/token_list_gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const generateTokenList = async (
l2AddressesFromL2 = filteredL2AddressesFromL1;

const intermediateTokenData = [];
for (const addrs of getChunks(l2AddressesFromL1)) {
for (const addrs of getChunks(l2AddressesFromL1, 100)) {
const tokenDataTemp = await promiseErrorMultiplier(
l2.multiCaller.getTokenData(
addrs.map((t) => t || constants.AddressZero),
Expand Down
37 changes: 37 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,43 @@ const xai: Chain = {
nitroGenesisL1Block: 0,
depositTimeout: 1800000,
};
const rari: Chain = {
chainID: 1380012617,
confirmPeriodBlocks: 45818,
ethBridge: {
bridge: '0x255f80Ef2F09FCE0944faBb292b8510F01316Cf0',
inbox: '0x37e60F80d921dc5E7f501a7130F31f6548dBa564',
outbox: '0x91591BB66075BCfF94AA128B003134165C3Ab83a',
rollup: '0x2e988Ea0873C9d712628F0bf38DAFdE754927C89',
sequencerInbox: '0xA436f1867adD490BF1530c636f2FB090758bB6B3',
},
explorerUrl: 'https://mainnet.explorer.rarichain.org',
isArbitrum: true,
isCustom: true,
name: 'RARI Mainnet',
partnerChainID: 42161,
retryableLifetimeSeconds: 604800,
tokenBridge: {
l1CustomGateway: '0x8bE956aB42274056ef4471BEb211b33e258b7324',
l1ERC20Gateway: '0x46406c88285AD9BE2fB23D9aD96Cb578d824cAb6',
l1GatewayRouter: '0x2623C144B4d167f70893f6A8968B98c89a6C5F97',
l1MultiCall: '0x842eC2c7D803033Edf55E478F461FC547Bc54EB2',
l1ProxyAdmin: '0x003e70b041abb993006c03e56c8515622a02928c',
l1Weth: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
l1WethGateway: '0x8DF47DAe3313663C80f5E94A893190710A719224',
l2CustomGateway: '0x90E43f5d772e50B01B3F9596f65AD5653467d010',
l2ERC20Gateway: '0x0CA4c24079a191e08F659699292e5C75274EF253',
l2GatewayRouter: '0x9a2859B2a83148b8DE25d26643B5407555D219E1',
l2Multicall: '0x4c753F58Ee9E83B38170abAbBEa8B47976C7ee1b',
l2ProxyAdmin: '0x18AB1fE7CBeB5F40d2eAf8A3906A966d59E79767',
l2Weth: '0xf037540e51D71b2D2B1120e8432bA49F29EDFBD0',
l2WethGateway: '0xd0C21F7960ea9835E7B2E636548f4deDD9E2309C',
},
nitroGenesisBlock: 0,
nitroGenesisL1Block: 0,
depositTimeout: 1800000,
};
addCustomChain({ customChain: xai });
addCustomChain({ customChain: rari });

export { update, yargsInstance };

0 comments on commit 6a66b52

Please sign in to comment.