import { BigNumber } from '@ethersproject/bignumber' ; import { Percent , Token } from '@uniswap/sdk-core' ; import JSBI from 'jsbi' ; import { AbstractConnector } from '@web3-react/abstract-connector' ; import { fortmatic , injected , portis , walletconnect , walletlink } from '../connectors' ; export const FACTORY_ADDRESS = '0xFeabCc62240297F1e4b238937D68e7516f0918D7' ; export const ROUTER_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D' ; export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' ; export const MAX_UINT128 = BigNumber . from ( 2 ) . pow ( 128 ) . sub ( 1 ) ; type ChainTokenList = { readonly [ chainId ] : Token [ ] ; } ; export const WETH_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' ; export const WETH_ADDRESSES = [ WETH_ADDRESS , '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' ] ; export const AVERAGE_BLOCK_TIME_IN_SECS = 13 ; export const PROPOSAL_LENGTH_IN_BLOCKS = 40320 ; export const PROPOSAL_LENGTH_IN_SECS = AVERAGE_BLOCK_TIME_IN_SECS * PROPOSAL_LENGTH_IN_BLOCKS ; export const GOVERNANCE_ADDRESS = '0x5e4be8Bc9637f0EAA1A755019e06A68ce081D58F' ; export const TIMELOCK_ADDRESS = '0x1a9C8182C09F50C8318d769245beA52c32BE35BC' ; export const NETWORK_ONLY = { fetchPolicy : 'network-only' , } ; export const TOKEN_HIDE = [ '0xd46ba6d942050d489dbd938a2c909a5d5039a161' , '0x7dfb72a2aad08c937706f21421b15bfc34cba9ca' ] ; export const POOL_HIDE = [ '0x86d257cdb7bc9c0df10e84c8709697f92770b335' , '0xf8dbd52488978a79dfe6ffbd81a01fc5948bf9ee' , '0x8fe8d9bb8eeba3ed688069c3d6b556c9ca258248' , ] ; export interface WalletInfo { connector ? : AbstractConnector ; name : string ; iconName : string ; description : string ; href : string | null ; color : string ; primary ? : true ; mobile ? : true ; mobileOnly ? : true ; } export const SUPPORTED_WALLETS = { INJECTED : { connector : injected , name : 'Injected' , iconName : 'arrow-right.svg' , description : 'Injected web3 provider.' , href : null , color : '#010101' , primary : true , } , METAMASK : { connector : injected , name : 'MetaMask' , iconName : 'metamask.png' , description : 'Easy-to-use browser extension.' , href : null , color : '#E8831D' , } , WALLET_CONNECT : { connector : walletconnect , name : 'WalletConnect' , iconName : 'walletConnectIcon.svg' , description : 'Connect to Trust Wallet, Rainbow Wallet and more...' , href : null , color : '#4196FC' , mobile : true , } , WALLET_LINK : { connector : walletlink , name : 'Coinbase Wallet' , iconName : 'coinbaseWalletIcon.svg' , description : 'Use Coinbase Wallet app on mobile device' , href : null , color : '#315CF5' , } , COINBASE_LINK : { name : 'Open in Coinbase Wallet' , iconName : 'coinbaseWalletIcon.svg' , description : 'Open in Coinbase Wallet app.' , href : 'https://go.cb-w.com/mtUDhEZPy1' , color : '#315CF5' , mobile : true , mobileOnly : true , } , FORTMATIC : { connector : fortmatic , name : 'Fortmatic' , iconName : 'fortmaticIcon.png' , description : 'Login using Fortmatic hosted wallet' , href : null , color : '#6748FF' , mobile : true , } , Portis : { connector : portis , name : 'Portis' , iconName : 'portisIcon.png' , description : 'Login using Portis hosted wallet' , href : null , color : '#4A6C9B' , mobile : true , } , } ; export const NetworkContextName = 'NETWORK' ; export const BIG_INT_SECONDS_IN_WEEK = JSBI . BigInt ( 60 * 60 * 24 * 7 ) ; export const BIG_INT_ZERO = JSBI . BigInt ( 0 ) ; export const ONE_BIPS = new Percent ( JSBI . BigInt ( 1 ) , JSBI . BigInt ( 10000 ) ) ; export const BIPS_BASE = JSBI . BigInt ( 10000 ) ; export const ALLOWED_PRICE_IMPACT_LOW = new Percent ( JSBI . BigInt ( 100 ) , BIPS_BASE ) ; export const ALLOWED_PRICE_IMPACT_MEDIUM = new Percent ( JSBI . BigInt ( 300 ) , BIPS_BASE ) ; export const ALLOWED_PRICE_IMPACT_HIGH = new Percent ( JSBI . BigInt ( 500 ) , BIPS_BASE ) ; export const PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN = new Percent ( JSBI . BigInt ( 1000 ) , BIPS_BASE ) ; export const BLOCKED_PRICE_IMPACT_NON_EXPERT = new Percent ( JSBI . BigInt ( 1500 ) , BIPS_BASE ) ; export const MIN_ETH = JSBI . exponentiate ( JSBI . BigInt ( 10 ) , JSBI . BigInt ( 16 ) ) ; export const BETTER_TRADE_LESS_HOPS_THRESHOLD = new Percent ( JSBI . BigInt ( 50 ) , JSBI . BigInt ( 10000 ) ) ; export const ZERO_PERCENT = new Percent ( '0' ) ; export const ONE_HUNDRED_PERCENT = new Percent ( '1' ) ; export const BLOCKED_ADDRESSES = [ '0x7F367cC41522cE07553e823bf3be79A889DEbe1B' , '0xd882cFc20F52f2599D84b8e8D58C7FB62cfE344b' , '0x901bb9583b24D97e995513C6778dc6888AB6870e' , '0xA7e5d5A720f06526557c513402f2e6B5fA20b008' , ] ;