Skip to content

Commit

Permalink
feat: gnosis on mt pelerin (shapeshift#4585)
Browse files Browse the repository at this point in the history
Co-authored-by: Łukasz Myśliński <[email protected]>
Co-authored-by: gomes <[email protected]>
  • Loading branch information
3 people authored May 26, 2023
1 parent d7db18e commit 753f316
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions packages/caip/src/adapters/mtpelerin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
btcChainId,
ethAssetId,
ethChainId,
gnosisAssetId,
gnosisChainId,
optimismAssetId,
optimismChainId,
polygonAssetId,
Expand All @@ -20,31 +22,39 @@ import {
const MtPelerinSymbolToAssetIds: Record<string, AssetId[]> = {
ETH: [ethAssetId, optimismAssetId],
MATIC: [polygonAssetId],
XDAI: [gnosisAssetId],
BTC: [btcAssetId],
DAI: ['eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f'],
USDT: [
'eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7',
'eip155:137/erc20:0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
'eip155:100/erc20:0x4ecaba5870353805a9f068101a40e0f32ed605c6',
],
USDC: [
'eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
'eip155:43114/erc20:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e',
'eip155:10/erc20:0x7f5c764cbc14f9669b88837ca1490cca17c31607',
'eip155:137/erc20:0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
'eip155:100/erc20:0xddafbb505ad214d7b80b1f830fccc89b60fb7a83',
],
jEUR: [
'eip155:1/erc20:0x0f17bc9a994b87b5225cfb6a2cd4d667adb4f20b',
'eip155:137/erc20:0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c',
'eip155:100/erc20:0x9fb1d52596c44603198fb0aee434fac3a679f702',
],
jCHF: [
'eip155:1/erc20:0x53dfea0a8cc2a2a2e425e1c174bc162999723ea0',
'eip155:137/erc20:0xbd1463f02f61676d53fd183c2b19282bff93d099',
'eip155:100/erc20:0x2d5563da42b06fbbf9c67b7dc073cf6a7842239e',
],
jGBP: [
'eip155:1/erc20:0x7409856cae628f5d578b285b45669b36e7005283',
'eip155:137/erc20:0x767058f11800fba6a682e73a6e79ec5eb74fac8c',
],
WBTC: ['eip155:1/erc20:0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'],
WBTC: [
'eip155:1/erc20:0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
'eip155:100/erc20:0x8e5bbbb09ed1ebde8674cda39a0c169401db4252',
],
AVAX: [avalancheAssetId],
EURS: [
'eip155:1/erc20:0xdb25f211ab05b1c97d595516f45794528a807ad8',
Expand All @@ -64,18 +74,13 @@ const MtPelerinSymbolToAssetIds: Record<string, AssetId[]> = {
EUROC: ['eip155:1/erc20:0x1abaea1f7c830bd89acc67ec4af516284b1bc33c'],
LUSD: ['eip155:1/erc20:0x5f98805a4e8be255a32880fdec7f6728c6568ba0'],
XCHF: ['eip155:1/erc20:0xb4272071ecadd69d933adcd19ca99fe80664fc08'],
WETH: ['eip155:100/erc20:0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1'],
}

/**
* The following is the list of assets that Mt Pelerin supports
* but they're **not supported** (yet?) in ShapeShift
* {
'[xdai_mainnet]/0x0000000000000000000000000000000000000000': 'XDAI',
'[xdai_mainnet]/0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83': 'USDC',
'[xdai_mainnet]/0x4ECaBa5870353805a9F068101A40E0f32ed605C6': 'USDT',
'[xdai_mainnet]/0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252': 'WBTC',
'[xdai_mainnet]/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1': 'WETH',
'[xdai_mainnet]/0x9fB1d52596c44603198fB0aee434fac3a679f702': 'jEUR',
'[xdai_mainnet]/0x2d5563da42b06FbBF9c67b7DC073cF6A7842239e': 'jCHF',
'[bsc_mainnet]/0x0000000000000000000000000000000000000000': 'BNB',
'[bsc_mainnet]/0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d': 'USDC',
'[bsc_mainnet]/0x55d398326f99059fF775485246999027B3197955': 'USDT',
Expand Down Expand Up @@ -147,6 +152,7 @@ const chainIdToMtPelerinNetworkCodeMap: Record<ChainId, string> = {
[avalancheChainId]: 'avalanche_mainnet', // this is actually the C-Chain
[optimismChainId]: 'optimism_mainnet',
[polygonChainId]: 'matic_mainnet',
[gnosisChainId]: 'xdai_mainnet',
} as const

/**
Expand Down

0 comments on commit 753f316

Please sign in to comment.