UNPKG

simple-sushiswap-sdk

Version:
34 lines (33 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DAI = void 0; const chain_id_1 = require("../../enums/chain-id"); const error_codes_1 = require("../errors/error-codes"); const sushiswap_error_1 = require("../errors/sushiswap-error"); /** * DAI token context CHANGE CONTRACT ADDRESS INFO ETC */ class DAI { static MAINNET() { return { chainId: chain_id_1.ChainId.MAINNET, contractAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F', decimals: 18, symbol: 'DAI', name: 'Dai Stablecoin', }; } /** * Get DAI token info by chain id * @param chainId The chain id */ static token(chainId) { switch (chainId) { case chain_id_1.ChainId.MAINNET: return this.MAINNET(); default: throw new sushiswap_error_1.SushiswapError(`${chainId} is not allowed`, error_codes_1.ErrorCodes.tokenChainIdContractDoesNotExist); } } } exports.DAI = DAI;