Skip to content

Commit

Permalink
feat: add optimism goerli (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxklenk committed Sep 2, 2022
1 parent b64465b commit 899089a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export enum ChainKey {
MUM = 'mum',
ARBT = 'arbt',
OPTT = 'optt',
OPTG = 'optg',
BSCT = 'bsct',
HECT = 'hect',
ONET = 'onet',
Expand Down Expand Up @@ -162,6 +163,7 @@ export enum ChainId {
MUM = 80001,
ARBT = 421611,
OPTT = 69,
OPTG = 420,
BSCT = 97,
HECT = 256,
ONET = 1666700000,
Expand Down
25 changes: 25 additions & 0 deletions src/chains/supported.chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,31 @@ export const supportedEVMChains: EVMChain[] = [
rpcUrls: ['https://kovan.optimism.io'],
},
},
// 420 - Optimistic Ethereum (Kovan)
{
key: ChainKey.OPTG,
chainType: ChainType.EVM,
name: 'Optimistic Ethereum Testnet Goerli',
coin: CoinKey.ETH,
id: 420,
mainnet: false,
logoURI:
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/optimism_test.png',
faucetUrls: ['https://gateway.optimism.io/'],
multicallAddress: multicallAddresses[ChainId.OPTG],

metamask: {
chainId: prefixChainId(69),
blockExplorerUrls: ['https://blockscout.com/optimism/goerli/'],
chainName: 'Optimistic Ethereum Testnet Goerli',
nativeCurrency: {
name: 'tETH',
symbol: 'tETH',
decimals: 18,
},
rpcUrls: ['https://goerli.optimism.io/'],
},
},
// 97 - Binance Smart Chain Testnet
{
key: ChainKey.BSCT,
Expand Down
19 changes: 19 additions & 0 deletions src/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ const basicCoins: BasicCoin[] = [
address: '0x0000000000000000000000000000000000000000',
decimals: 18,
},
[ChainId.OPTG]: {
address: '0x0000000000000000000000000000000000000000',
decimals: 18,
},
[ChainId.ARBT]: {
address: '0x0000000000000000000000000000000000000000',
decimals: 18,
Expand Down Expand Up @@ -877,6 +881,10 @@ const basicCoins: BasicCoin[] = [
address: '0x4200000000000000000000000000000000000006',
decimals: 18,
},
[ChainId.OPTG]: {
address: '0x4200000000000000000000000000000000000006',
decimals: 18,
},
},
},

Expand Down Expand Up @@ -1421,6 +1429,17 @@ export const wrappedTokens: { [ChainId: string]: Token } = {
logoURI:
'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
},
[ChainId.OPTG]: {
// https://blockscout.com/optimism/goerli/address/0x4200000000000000000000000000000000000006
address: '0x4200000000000000000000000000000000000006',
symbol: 'WETH',
decimals: 18,
chainId: ChainId.OPTG,
coinKey: CoinKey.WETH,
name: 'WETH',
logoURI:
'https://zapper.fi/images/networks/ethereum/0x0000000000000000000000000000000000000000.png',
},
[ChainId.BSCT]: {
// https://testnet.bscscan.com/token/0xae13d989dac2f0debff460ac112a837c89baa7cd
address: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd',
Expand Down
1 change: 1 addition & 0 deletions src/multicall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const multicallAddresses: { [ChainId: number]: string } = {
[ChainId.ONET]: '0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3',
[ChainId.AVAT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.OPTT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.OPTG]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.EVMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.MORT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
[ChainId.FTMT]: '0xcA11bde05977b3631167028862bE2a173976CA11',
Expand Down

0 comments on commit 899089a

Please sign in to comment.