Add fantom / arbitrum token type (#13296)

* add fantom / arbitrum token type
* add arbitrum info
* fix check script
This commit is contained in:
hewigovens 2021-09-02 13:42:58 +08:00 committed by GitHub
parent a2b81abec3
commit c9fda9283c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 5 deletions

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1,17 @@
{
"name": "Arbitrum",
"website": "https://offchainlabs.com",
"description": "Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private",
"explorer": "https://arbiscan.io",
"research": "https://coinmarketcap.com/alexandria/article/what-is-arbitrum",
"symbol": "ARETH",
"type": "coin",
"decimals": 18,
"status": "active",
"links": [
{
"name": "twitter",
"url": "https://twitter.com/arbitrum"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -219,7 +219,9 @@ export function chainFromAssetType(type: string): string {
case "POA": return "poa";
case "POLYGON": return "polygon";
case "OPTIMISM": return "optimism";
case "AVALANCHE": return 'avalanchec';
case "AVALANCHE": return "avalanchec";
case "ARBITRUM": return "arbitrum";
case "FANTOM": return "fantom";
default: return "";
}
}
@ -294,16 +296,20 @@ export function explorerUrl(chain: string, contract: string): string {
return `https://blockscout.com/xdai/mainnet/tokens/${contract}`;
case CoinType.name(CoinType.poa).toLowerCase():
case 'poa':
case "poa":
return `https://blockscout.com/poa/core/tokens/${contract}`;
case CoinType.name(CoinType.polygon).toLowerCase():
case 'polygon':
case "polygon":
return `https://polygonscan.com/token/${contract}`;
case 'optimism':
case "optimism":
return `https://optimistic.etherscan.io/address/${contract}`;
case 'avalanchec':
case "avalanchec":
return `https://cchain.explorer.avax.network/address/${contract}`
case "arbitrum":
return `https://arbiscan.io/token/${contract}`
case "fantom":
return `https://ftmscan.com/token/${contract}`
}
}
return "";

View File

@ -29,6 +29,8 @@ export const Polygon = getChainName(CoinType.polygon);
export const Optimism = "optimism";
export const xDAI = "xdai";
export const Avalanche = "avalanchec";
export const Arbitrum = "arbitrum";
export const Fantom = "fantom";
export const ethForkChains = [
Ethereum,
@ -43,6 +45,8 @@ export const ethForkChains = [
Optimism,
xDAI,
Avalanche,
Arbitrum,
Fantom,
];
export const stakingChains = [
Tezos,

View File

@ -56,6 +56,10 @@ export class EthForks implements ActionInterface {
check: async () => {
const errors: string[] = [];
const assetsFolder = getChainAssetsPath(chain);
if (!isPathExistsSync(assetsFolder)) {
console.log(` Found 0 assets for chain ${chain}`);
return [errors, []];
}
const assetsList = getChainAssetsList(chain);
console.log(` Found ${assetsList.length} assets for chain ${chain}`);
await bluebird.each(assetsList, async (address) => {