Skip to content

Commit

Permalink
feat: update ENS
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaShWoof committed Jun 20, 2024
1 parent b196923 commit 878d5f9
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ export default migration('1717936901_configurate_and_end', {
const newMarketObject = { baseSymbol: 'USDT', cometAddress: comet.address };
const officialMarketsJSON = JSON.parse(await ENSResolver.text(subdomainHash, ENSTextRecordKey));

// add optimism-usdt comet (0x995E394b8B2437aC8Ce61Ee0bC610D617962B214)
// optimism chain id is 10
// and arbitrum-weth comet (0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486)
// arbitrum chain id is 42161
// if there is no usdt comet on optimism chain, add it
if (!officialMarketsJSON[10].find(market => market.baseSymbol === 'USDT')){
officialMarketsJSON[10].push({ baseSymbol: 'USDT', cometAddress: '0x995E394b8B2437aC8Ce61Ee0bC610D617962B214' });
}

if (!officialMarketsJSON[42161].find(market => market.baseSymbol === 'WETH')) {
officialMarketsJSON[42161].push({ baseSymbol: 'WETH', cometAddress: '0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486' });
}

if (officialMarketsJSON[ArbitrumChainId]) {
officialMarketsJSON[ArbitrumChainId].push(newMarketObject);
} else {
Expand Down Expand Up @@ -299,6 +312,10 @@ export default migration('1717936901_configurate_and_end', {
baseSymbol: 'USDC',
cometAddress: '0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf',
},
{
baseSymbol: 'WETH',
cometAddress: '0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486',
},
{
baseSymbol: 'USDT',
cometAddress: comet.address,
Expand All @@ -315,6 +332,10 @@ export default migration('1717936901_configurate_and_end', {
baseSymbol: 'USDC',
cometAddress: '0x2e44e174f7D53F0212823acC11C01A11d58c5bCB',
},
{
baseSymbol: 'USDT',
cometAddress: '0x995E394b8B2437aC8Ce61Ee0bC610D617962B214',
},
],
});

Expand Down

0 comments on commit 878d5f9

Please sign in to comment.