{"version":3,"sources":["components/Address.jsx","components/Balance.jsx","helpers/Transactor.js","assets/coinbase.webp","helpers/Web3ModalSetup.js","helpers/ipfs.js","components/Wallet.jsx","components/Account.jsx","components/BytesStringInput.jsx","components/Contract/utils.jsx","components/Contract/FunctionForm.jsx","components/Faucet.jsx","hooks/useStaticJsonRPC.js","helpers/loadAppContracts.js","components/Swap.jsx","components/Timeline.jsx","components/L2Bridge.jsx","components/NetworkDisplay.jsx","App.jsx","index.jsx","contracts/external_contracts.js","constants.js"],"names":["Text","Typography","Address","props","currentTheme","useThemeSwitcher","address","value","ens","useLookupAddress","ensProvider","ensSplit","split","validEnsCheck","length","etherscanLink","blockExplorer","blockExplorerLink","displayAddress","substr","size","minimized","style","verticalAlign","color","target","href","rel","seed","toLowerCase","scale","onChange","editable","utils","require","Balance","useState","dollarMode","setDollarMode","balance","useBalance","provider","floatBalance","parseFloat","usingBalance","etherBalance","formatEther","toFixed","displayBalance","price","dollarMultiplier","paddingRight","fontSize","cursor","onClick","ethers","callbacks","Transactor","providerOrSigner","gasPrice","etherscan","tx","callback","a","Signer","isSigner","signer","getNetwork","network","_isProvider","getSigner","console","log","notify","options","dappId","BLOCKNATIVE_DAPPID","system","networkId","chainId","transactionHandler","txInformation","possibleFunction","transaction","hash","Notify","etherscanNetwork","name","etherscanTxUrl","Promise","result","parseUnits","gasLimit","hexlify","sendTransaction","indexOf","emitter","on","onclick","window","open","notification","info","message","description","placement","txResult","listeningInterval","setInterval","getTransactionReceipt","currentTransactionReceipt","confirmations","clearInterval","wait","data","error","JSON","parse","stringify","body","obj","errorObj","e","walletLinkProvider","WalletLink","appName","makeWeb3Provider","ALCHEMY_KEY","web3ModalSetup","Web3Modal","cacheProvider","theme","providerOptions","walletconnect","package","WalletConnectProvider","bridge","infuraId","INFURA_ID","rpc","fortmatic","Fortmatic","key","display","logo","Coinbase","connector","_options","enable","create","host","port","protocol","Paragraph","Account","useBurner","localProvider","userSigner","mainnetProvider","web3Modal","loadWeb3Modal","logoutOfWeb3Modal","isContract","modalButtons","cachedProvider","push","constants","BigNumber","createProvider","url","p","providers","StaticJsonRpcProvider","ready","useStaticJsonRPC","urlArray","setProvider","handleProviders","useCallback","race","map","_p","useEffect","Select","Option","NetworkDisplay","NETWORKCHECK","localChainId","selectedChainId","targetNetwork","USE_NETWORK_SELECTOR","networkDisplay","networkSelected","NETWORK","networkLocal","zIndex","position","right","top","padding","type","closable","ethereum","toString","chainName","nativeCurrency","rpcUrls","rpcUrl","blockExplorerUrls","request","method","params","switchTx","Panel","Collapse","initialNetwork","NETWORKS","rinkeby","DEBUG","Web3ModalSetup","App","networkOptions","mintAmount","setMintAmount","totalMinted","setTotalMinted","setLoading","injectedProvider","setInjectedProvider","setAddress","selectedNetwork","useLocation","process","REACT_APP_PROVIDER","clearCachedProvider","disconnect","setTimeout","location","reload","useExchangeEthPrice","useGasPrice","useUserProviderAndSigner","getAddress","newAddress","_network","yourLocalBalance","mainnetContracts","yourMainnetBalance","contractConfig","deployedContracts","externalContracts","readContracts","useContractLoader","writeContracts","useOnBlock","_lastBlockNumber","useContractReader","connect","Web3Provider","code","reason","CONTRACT_ADDRESS","ethValue","HandleMint","event","contract","Contract","BrokenSea","abi","contractSigner","ethValueString","txParamsOverride","parseEther","crashShip","alert","getTotalSupply","totalSupply","toNumber","fetchTotals","className","id","defaultValue","disabled","min","max","tooltipVisible","trackStyle","backgroundColor","height","handleStyle","width","railStyle","ghost","defaultActiveKey","header","themes","dark","light","prevTheme","localStorage","getItem","subgraphUri","client","ApolloClient","uri","cache","InMemoryCache","ReactDOM","render","ApolloProvider","themeMap","defaultTheme","document","getElementById","module","exports","contracts","DAI","inputs","internalType","payable","stateMutability","anonymous","indexed","constant","outputs","UNI","localhost","global","hostname","mainnet","kovan","faucet","ropsten","goerli","xdai","polygon","mumbai","localArbitrum","localArbitrumL1","rinkebyArbitrum","arbitrum","localOptimismL1","localOptimism","kovanOptimism","optimism","localAvalanche","fujiAvalanche","mainnetAvalanche","testnetHarmony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static/js/main.bb612cfd.chunk.js","sourcesContent":["import { Skeleton, Typography } from \"antd\";\nimport React from \"react\";\nimport { useThemeSwitcher } from \"react-css-theme-switcher\";\nimport Blockies from \"react-blockies\";\nimport { useLookupAddress } from \"eth-hooks/dapps/ens\";\n\n// changed value={address} to address={address}\n\nconst { Text } = Typography;\n\n/** \n ~ What it does? ~\n\n Displays an address with a blockie image and option to copy address\n\n ~ How can I use? ~\n\n \n\n ~ Features ~\n\n - Provide ensProvider={mainnetProvider} and your address will be replaced by ENS name\n (ex. \"0xa870\" => \"user.eth\")\n - Provide blockExplorer={blockExplorer}, click on address and get the link\n (ex. by default \"https://etherscan.io/\" or for xdai \"https://blockscout.com/poa/xdai/\")\n - Provide fontSize={fontSize} to change the size of address text\n**/\n\nconst blockExplorerLink = (address, blockExplorer) => `${blockExplorer || \"https://etherscan.io/\"}address/${address}`;\n\nexport default function Address(props) {\n const { currentTheme } = useThemeSwitcher();\n const address = props.value || props.address;\n const ens = useLookupAddress(props.ensProvider, address);\n const ensSplit = ens && ens.split(\".\");\n const validEnsCheck = ensSplit && ensSplit[ensSplit.length - 1] === \"eth\";\n const etherscanLink = blockExplorerLink(address, props.blockExplorer);\n let displayAddress = address?.substr(0, 5) + \"...\" + address?.substr(-4);\n\n if (validEnsCheck) {\n displayAddress = ens;\n } else if (props.size === \"short\") {\n displayAddress += \"...\" + address.substr(-4);\n } else if (props.size === \"long\") {\n displayAddress = address;\n }\n\n if (!address) {\n return (\n \n \n );\n }\n\n if (props.minimized) {\n return (\n \n \n \n \n \n );\n }\n\n return (\n \n \n {props.onChange ? (\n \n \n {displayAddress}\n \n \n ) : (\n \n {displayAddress} \n \n )}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { useBalance } from \"eth-hooks\";\n\nconst { utils } = require(\"ethers\");\n\n/** \n ~ What it does? ~\n\n Displays a balance of given address in ether & dollar\n\n ~ How can I use? ~\n\n \n\n ~ If you already have the balance as a bignumber ~\n \n\n ~ Features ~\n\n - Provide address={address} and get balance corresponding to given address\n - Provide provider={mainnetProvider} to access balance on mainnet or any other network (ex. localProvider)\n - Provide price={price} of ether and get your balance converted to dollars\n**/\n\nexport default function Balance(props) {\n const [dollarMode, setDollarMode] = useState(false);\n\n const balance = useBalance(props.provider, props.address);\n let floatBalance = parseFloat(\"0.00\");\n let usingBalance = balance;\n\n if (typeof props.balance !== \"undefined\") usingBalance = props.balance;\n if (typeof props.value !== \"undefined\") usingBalance = props.value;\n\n if (usingBalance) {\n const etherBalance = utils.formatEther(usingBalance);\n parseFloat(etherBalance).toFixed(2);\n floatBalance = parseFloat(etherBalance);\n }\n\n let displayBalance = \"Ξ\" + floatBalance.toFixed(4);\n\n const price = props.price || props.dollarMultiplier || 1;\n\n if (dollarMode) {\n displayBalance = \"$\" + (floatBalance * price).toFixed(2);\n }\n\n return (\n {\n setDollarMode(!dollarMode);\n }}\n >\n {displayBalance}\n \n );\n}\n","import { notification } from \"antd\";\nimport Notify from \"bnc-notify\";\nimport { BLOCKNATIVE_DAPPID } from \"../constants\";\n\nconst { ethers } = require(\"ethers\");\n\n// this should probably just be renamed to \"notifier\"\n// it is basically just a wrapper around BlockNative's wonderful Notify.js\n// https://docs.blocknative.com/notify\nconst callbacks = {};\n\nconst DEBUG = true;\n\nexport default function Transactor(providerOrSigner, gasPrice, etherscan) {\n if (typeof providerOrSigner !== \"undefined\") {\n // eslint-disable-next-line consistent-return\n return async (tx, callback) => {\n let signer;\n let network;\n let provider;\n if (ethers.Signer.isSigner(providerOrSigner) === true) {\n provider = providerOrSigner.provider;\n signer = providerOrSigner;\n network = providerOrSigner.provider && (await providerOrSigner.provider.getNetwork());\n } else if (providerOrSigner._isProvider) {\n provider = providerOrSigner;\n signer = providerOrSigner.getSigner();\n network = await providerOrSigner.getNetwork();\n }\n\n console.log(\"network\", network);\n var options = null;\n var notify = null;\n options = {\n dappId: BLOCKNATIVE_DAPPID, // GET YOUR OWN KEY AT https://account.blocknative.com\n system: \"ethereum\",\n networkId: network.chainId,\n // darkMode: Boolean, // (default: false)\n transactionHandler: txInformation => {\n if (DEBUG) console.log(\"HANDLE TX\", txInformation);\n const possibleFunction = callbacks[txInformation.transaction.hash];\n if (typeof possibleFunction === \"function\") {\n possibleFunction(txInformation.transaction);\n }\n },\n };\n\n notify = Notify(options);\n\n let etherscanNetwork = \"\";\n if (network.name && network.chainId > 1) {\n etherscanNetwork = network.name + \".\";\n }\n\n let etherscanTxUrl = \"https://\" + etherscanNetwork + \"etherscan.io/tx/\";\n if (network.chainId === 100) {\n etherscanTxUrl = \"https://blockscout.com/poa/xdai/tx/\";\n }\n\n try {\n let result;\n if (tx instanceof Promise) {\n if (DEBUG) console.log(\"AWAITING TX\", tx);\n result = await tx;\n } else {\n if (!tx.gasPrice) {\n tx.gasPrice = gasPrice || ethers.utils.parseUnits(\"4.1\", \"gwei\");\n }\n if (!tx.gasLimit) {\n tx.gasLimit = ethers.utils.hexlify(120000);\n }\n if (DEBUG) console.log(\"RUNNING TX\", tx);\n result = await signer.sendTransaction(tx);\n }\n if (DEBUG) console.log(\"RESULT:\", result);\n // console.log(\"Notify\", notify);\n\n if (callback) {\n callbacks[result.hash] = callback;\n }\n\n // if it is a valid Notify.js network, use that, if not, just send a default notification\n if (notify && [1, 3, 4, 5, 42, 100].indexOf(network.chainId) >= 0) {\n const { emitter } = notify.hash(result.hash);\n emitter.on(\"all\", transaction => {\n return {\n onclick: () => window.open((etherscan || etherscanTxUrl) + transaction.hash),\n };\n });\n } else {\n notification.info({\n message: \"Local Transaction Sent\",\n description: result.hash,\n placement: \"bottomRight\",\n });\n // on most networks BlockNative will update a transaction handler,\n // but locally we will set an interval to listen...\n if (callback) {\n const txResult = await tx;\n const listeningInterval = setInterval(async () => {\n console.log(\"CHECK IN ON THE TX\", txResult, provider);\n const currentTransactionReceipt = await provider.getTransactionReceipt(txResult.hash);\n if (currentTransactionReceipt && currentTransactionReceipt.confirmations) {\n callback({ ...txResult, ...currentTransactionReceipt });\n clearInterval(listeningInterval);\n }\n }, 500);\n }\n }\n\n if (typeof result.wait === \"function\") {\n await result.wait();\n }\n\n return result;\n } catch (e) {\n if (DEBUG) console.log(e);\n // Accounts for Metamask and default signer on all networks\n let message =\n e.data && e.data.message\n ? e.data.message\n : e.error && JSON.parse(JSON.stringify(e.error)).body\n ? JSON.parse(JSON.parse(JSON.stringify(e.error)).body).error.message\n : e.data\n ? e.data\n : JSON.stringify(e);\n if (!e.error && e.message) {\n message = e.message;\n }\n\n console.log(\"Attempt to clean up:\", message);\n try {\n let obj = JSON.parse(message);\n if (obj && obj.body) {\n let errorObj = JSON.parse(obj.body);\n if (errorObj && errorObj.error && errorObj.error.message) {\n message = errorObj.error.message;\n }\n }\n } catch (e) {\n //ignore\n }\n\n notification.error({\n message: \"Transaction Error\",\n description: message,\n });\n if (callback && typeof callback === \"function\") {\n callback(e);\n }\n }\n };\n }\n}\n","export default __webpack_public_path__ + \"static/media/coinbase.6f083bb6.webp\";","import Portis from \"@portis/web3\";\nimport WalletConnectProvider from \"@walletconnect/web3-provider\";\nimport Authereum from \"authereum\";\nimport Fortmatic from \"fortmatic\";\nimport WalletLink from \"walletlink\";\nimport Web3Modal from \"web3modal\";\nimport { ALCHEMY_KEY, INFURA_ID } from \"../constants\";\nimport Coinbase from \"../assets/coinbase.webp\"\n// Coinbase walletLink init\nconst walletLink = new WalletLink({\n appName: \"coinbase\",\n});\n\n// WalletLink provider\nconst walletLinkProvider = walletLink.makeWeb3Provider(`https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`, 1);\n\n// Portis ID: 6255fb2b-58c8-433b-a2c9-62098c05ddc9\n/**\n Web3 modal helps us \"connect\" external wallets:\n**/\nconst web3ModalSetup = () =>\n new Web3Modal({\n network: \"mainnet\", // Optional. If using WalletConnect on xDai, change network to \"xdai\" and add RPC info below for xDai chain.\n cacheProvider: true, // optional\n theme: \"light\", // optional. Change to \"dark\" for a dark theme.\n providerOptions: {\n walletconnect: {\n package: WalletConnectProvider, // required\n options: {\n bridge: \"https://polygon.bridge.walletconnect.org\",\n infuraId: INFURA_ID,\n rpc: {\n 10: \"https://mainnet.optimism.io\", // xDai\n 100: \"https://rpc.gnosischain.com\", // xDai\n 137: \"https://polygon-rpc.com\",\n 31337: \"http://localhost:8545\",\n 42161: \"https://arb1.arbitrum.io/rpc\",\n 80001: \"https://rpc-mumbai.maticvigil.com\",\n },\n },\n },\n fortmatic: {\n package: Fortmatic, // required\n options: {\n key: \"pk_live_5A7C91B2FC585A17\", // required\n },\n },\n // torus: {\n // package: Torus,\n // options: {\n // networkParams: {\n // host: \"https://localhost:8545\", // optional\n // chainId: 1337, // optional\n // networkId: 1337 // optional\n // },\n // config: {\n // buildEnv: \"development\" // optional\n // },\n // },\n // },\n \"custom-walletlink\": {\n display: {\n logo: Coinbase,\n name: \"Coinbase\",\n description: \"Connect to Coinbase Wallet (not Coinbase App)\",\n },\n package: walletLinkProvider,\n connector: async (provider, _options) => {\n await provider.enable();\n return provider;\n },\n },\n },\n });\n\nexport default web3ModalSetup;\n","import { create } from \"ipfs-http-client\";\nimport { BufferList } from \"bl\";\nexport const ipfs = create({ host: \"ipfs.infura.io\", port: \"5001\", protocol: \"https\" });\n\nexport async function addToIPFS(file) {\n const fileAdded = await ipfs.add(file);\n\n return fileAdded;\n}\n\nexport function urlFromCID(cid) {\n return `https://ipfs.infura.io/ipfs/${cid}`;\n}\n\nexport async function getFromIPFS(hashToGet) {\n for await (const file of ipfs.cat(hashToGet)) {\n const content = new BufferList(file).toString();\n\n return content;\n }\n}\n","import { Button, Modal, Spin, Tooltip, Typography } from \"antd\";\nimport React, { useState, useEffect } from \"react\";\nimport { ethers } from \"ethers\";\nimport { KeyOutlined, QrcodeOutlined, SendOutlined, WalletOutlined } from \"@ant-design/icons\";\nimport QR from \"qrcode.react\";\n\nimport { Transactor } from \"../helpers\";\nimport Address from \"./Address\";\nimport AddressInput from \"./AddressInput\";\nimport Balance from \"./Balance\";\nimport EtherInput from \"./EtherInput\";\n\nconst { Text, Paragraph } = Typography;\n\n/**\n ~ What it does? ~\n\n Displays a wallet where you can specify address and send USD/ETH, with options to\n scan address, to convert between USD and ETH, to see and generate private keys,\n to send, receive and extract the burner wallet\n\n ~ How can I use? ~\n\n \n\n ~ Features ~\n\n - Provide provider={userProvider} to display a wallet\n - Provide address={address} if you want to specify address, otherwise\n your default address will be used\n - Provide ensProvider={mainnetProvider} and your address will be replaced by ENS name\n (ex. \"0xa870\" => \"user.eth\") or you can enter directly ENS name instead of address\n - Provide price={price} of ether and easily convert between USD and ETH\n - Provide color to specify the color of wallet icon\n**/\n\nexport default function Wallet(props) {\n const [signerAddress, setSignerAddress] = useState();\n useEffect(() => {\n async function getAddress() {\n if (props.signer) {\n const newAddress = await props.signer.getAddress();\n setSignerAddress(newAddress);\n }\n }\n getAddress();\n }, [props.signer]);\n\n const selectedAddress = props.address || signerAddress;\n\n const [open, setOpen] = useState();\n const [qr, setQr] = useState();\n const [amount, setAmount] = useState();\n const [toAddress, setToAddress] = useState();\n const [pk, setPK] = useState();\n\n const providerSend = props.provider ? (\n \n {\n setOpen(!open);\n }}\n rotate={-90}\n style={{\n padding: 7,\n color: props.color ? props.color : \"\",\n cursor: \"pointer\",\n fontSize: 28,\n verticalAlign: \"middle\",\n }}\n />\n \n ) : (\n \"\"\n );\n\n let display;\n let receiveButton;\n let privateKeyButton;\n if (qr) {\n display = (\n
\n
\n {selectedAddress}\n
\n \n
\n );\n receiveButton = (\n {\n setQr(\"\");\n }}\n >\n Hide\n \n );\n privateKeyButton = (\n {\n setPK(selectedAddress);\n setQr(\"\");\n }}\n >\n Private Key\n \n );\n } else if (pk) {\n const pk = localStorage.getItem(\"metaPrivateKey\");\n const wallet = new ethers.Wallet(pk);\n\n if (wallet.address !== selectedAddress) {\n display = (\n
\n *injected account*, private key unknown\n
\n );\n } else {\n const extraPkDisplayAdded = {};\n const extraPkDisplay = [];\n extraPkDisplayAdded[wallet.address] = true;\n extraPkDisplay.push(\n ,\n );\n for (const key in localStorage) {\n if (key.indexOf(\"metaPrivateKey_backup\") >= 0) {\n console.log(key);\n const pastpk = localStorage.getItem(key);\n const pastwallet = new ethers.Wallet(pastpk);\n if (!extraPkDisplayAdded[pastwallet.address] /* && selectedAddress!=pastwallet.address */) {\n extraPkDisplayAdded[pastwallet.address] = true;\n extraPkDisplay.push(\n ,\n );\n }\n }\n }\n\n display = (\n
\n Private Key:\n\n
\n {pk}\n
\n\n
\n\n \n Point your camera phone at qr code to open in\n \n burner wallet\n \n :\n \n \n\n \n {\"https://xdai.io/\" + pk}\n \n\n {extraPkDisplay ? (\n
\n

Known Private Keys:

\n {extraPkDisplay}\n {\n const currentPrivateKey = window.localStorage.getItem(\"metaPrivateKey\");\n if (currentPrivateKey) {\n window.localStorage.setItem(\"metaPrivateKey_backup\" + Date.now(), currentPrivateKey);\n }\n const randomWallet = ethers.Wallet.createRandom();\n const privateKey = randomWallet._signingKey().privateKey;\n window.localStorage.setItem(\"metaPrivateKey\", privateKey);\n window.location.reload();\n }}\n >\n Generate\n \n
\n ) : (\n \"\"\n )}\n
\n );\n }\n\n receiveButton = (\n {\n setQr(selectedAddress);\n setPK(\"\");\n }}\n >\n Receive\n \n );\n privateKeyButton = (\n {\n setPK(\"\");\n setQr(\"\");\n }}\n >\n Hide\n \n );\n } else {\n const inputStyle = {\n padding: 10,\n };\n\n display = (\n
\n
\n \n
\n
\n {\n setAmount(value);\n }}\n />\n
\n
\n );\n receiveButton = (\n {\n setQr(selectedAddress);\n setPK(\"\");\n }}\n >\n Receive\n \n );\n privateKeyButton = (\n {\n setPK(selectedAddress);\n setQr(\"\");\n }}\n >\n Private Key\n \n );\n }\n\n return (\n \n {providerSend}\n \n {selectedAddress ?
: }\n
\n \n
\n \n }\n onOk={() => {\n setQr();\n setPK();\n setOpen(!open);\n }}\n onCancel={() => {\n setQr();\n setPK();\n setOpen(!open);\n }}\n footer={[\n privateKeyButton,\n receiveButton,\n {\n const tx = Transactor(props.signer || props.provider);\n\n let value;\n try {\n value = ethers.utils.parseEther(\"\" + amount);\n } catch (e) {\n // failed to parseEther, try something else\n value = ethers.utils.parseEther(\"\" + parseFloat(amount).toFixed(8));\n }\n\n tx({\n to: toAddress,\n value,\n });\n setOpen(!open);\n setQr();\n }}\n >\n Send\n ,\n ]}\n >\n {display}\n \n \n );\n}\n","import { Button } from \"antd\";\nimport React from \"react\";\nimport { useThemeSwitcher } from \"react-css-theme-switcher\";\nimport Address from \"./Address\";\nimport Balance from \"./Balance\";\nimport Wallet from \"./Wallet\";\n\n/** \n ~ What it does? ~\n\n Displays an Address, Balance, and Wallet as one Account component,\n also allows users to log in to existing accounts and log out\n\n ~ How can I use? ~\n\n \n\n ~ Features ~\n\n - Provide address={address} and get balance corresponding to the given address\n - Provide localProvider={localProvider} to access balance on local network\n - Provide userProvider={userProvider} to display a wallet\n - Provide mainnetProvider={mainnetProvider} and your address will be replaced by ENS name\n (ex. \"0xa870\" => \"user.eth\")\n - Provide price={price} of ether and get your balance converted to dollars\n - Provide web3Modal={web3Modal}, loadWeb3Modal={loadWeb3Modal}, logoutOfWeb3Modal={logoutOfWeb3Modal}\n to be able to log in/log out to/from existing accounts\n - Provide blockExplorer={blockExplorer}, click on address and get the link\n (ex. by default \"https://etherscan.io/\" or for xdai \"https://blockscout.com/poa/xdai/\")\n**/\n\nexport default function Account({\n useBurner,\n address,\n userSigner,\n localProvider,\n mainnetProvider,\n price,\n minimized,\n web3Modal,\n loadWeb3Modal,\n logoutOfWeb3Modal,\n blockExplorer,\n isContract,\n}) {\n const { currentTheme } = useThemeSwitcher();\n\n const modalButtons = [];\n if (web3Modal) {\n if (web3Modal.cachedProvider) {\n modalButtons.push(\n \n
\n ,\n );\n } else {\n modalButtons.push(\n \n Connect\n ,\n );\n }\n }\n const display = minimized ? (\n \"\"\n ) : (\n \n {web3Modal && web3Modal.cachedProvider ? (\n <>\n \n \n ) : useBurner ? (\n \"\"\n ) : isContract ? (\n <>\n \n \n ) : (\n \"\"\n )}\n {useBurner && web3Modal && !web3Modal.cachedProvider ? (\n <>\n \n \n ) : (\n <>\n )}\n \n );\n\n return (\n
\n {display}\n {modalButtons}\n
\n );\n}\n","import { Input } from \"antd\";\nimport React, { useEffect, useState } from \"react\";\n\nconst { utils, constants } = require(\"ethers\");\n\n/** \n ~ What it does? ~\n\n Displays input field with options to convert between STRING and BYTES32\n\n ~ How can I use? ~\n\n {\n setValue(value);\n }}\n />\n\n ~ Features ~\n\n - Provide value={value} to specify initial string\n - Provide placeholder=\"Enter value...\" value for the input\n - Control input change by onChange={value => { setValue(value);}}\n\n**/\n\nexport default function BytesStringInput(props) {\n const [mode, setMode] = useState(\"STRING\");\n const [display, setDisplay] = useState();\n const [value, setValue] = useState(constants.HashZero);\n\n // current value is the value in bytes32\n const currentValue = typeof props.value !== \"undefined\" ? props.value : value;\n\n const option = title => {\n return (\n {\n if (mode === \"STRING\") {\n setMode(\"BYTES32\");\n if (!utils.isHexString(currentValue)) {\n /* in case user enters invalid bytes32 number,\n it considers it as string and converts to bytes32 */\n const changedValue = utils.formatBytes32String(currentValue);\n setDisplay(changedValue);\n } else {\n setDisplay(currentValue);\n }\n } else {\n setMode(\"STRING\");\n if (currentValue && utils.isHexString(currentValue)) {\n setDisplay(utils.parseBytes32String(currentValue));\n } else {\n setDisplay(currentValue);\n }\n }\n }}\n >\n {title}\n \n );\n };\n\n let addonAfter;\n if (mode === \"STRING\") {\n addonAfter = option(\"STRING πŸ”€\");\n } else {\n addonAfter = option(\"BYTES32 πŸ”€\");\n }\n\n useEffect(() => {\n if (!currentValue) {\n setDisplay(\"\");\n }\n }, [currentValue]);\n\n return (\n {\n const newValue = e.target.value;\n if (mode === \"STRING\") {\n // const ethValue = parseFloat(newValue) / props.price;\n // setValue(ethValue);\n if (typeof props.onChange === \"function\") {\n props.onChange(utils.formatBytes32String(newValue));\n }\n setValue(utils.formatBytes32String(newValue));\n setDisplay(newValue);\n } else {\n if (typeof props.onChange === \"function\") {\n props.onChange(newValue);\n }\n setValue(newValue);\n setDisplay(newValue);\n }\n }}\n />\n );\n}\n","import React from \"react\";\n\nimport Address from \"../Address\";\n\nconst { utils } = require(\"ethers\");\n\nconst tryToDisplay = (thing, asText = false, blockExplorer) => {\n if (thing && thing.toNumber) {\n try {\n return thing.toNumber();\n } catch (e) {\n const displayable = \"Ξ\" + utils.formatUnits(thing, \"ether\");\n return asText ? displayable : {displayable};\n }\n }\n if (thing && thing.indexOf && thing.indexOf(\"0x\") === 0 && thing.length === 42) {\n return asText ? thing :
;\n }\n if (thing && thing.constructor && thing.constructor.name === \"Array\") {\n const mostReadable = v => ([\"number\", \"boolean\"].includes(typeof v) ? v : tryToDisplayAsText(v));\n const displayable = JSON.stringify(thing.map(mostReadable));\n return asText ? (\n displayable\n ) : (\n {displayable.replaceAll(\",\", \",\\n\")}\n );\n }\n return JSON.stringify(thing);\n};\n\nconst tryToDisplayAsText = thing => tryToDisplay(thing, true);\n\nexport { tryToDisplay, tryToDisplayAsText };\n","import { Button, Col, Divider, Input, Row, Tooltip } from \"antd\";\nimport React, { useState } from \"react\";\nimport Blockies from \"react-blockies\";\n\nimport { Transactor } from \"../../helpers\";\nimport { tryToDisplay, tryToDisplayAsText } from \"./utils\";\n\nconst { utils, BigNumber } = require(\"ethers\");\n\nconst getFunctionInputKey = (functionInfo, input, inputIndex) => {\n const name = input?.name ? input.name : \"input_\" + inputIndex + \"_\";\n return functionInfo.name + \"_\" + name + \"_\" + input.type;\n};\n\nexport default function FunctionForm({ contractFunction, functionInfo, provider, gasPrice, triggerRefresh }) {\n const [form, setForm] = useState({});\n const [txValue, setTxValue] = useState();\n const [returnValue, setReturnValue] = useState();\n\n const tx = Transactor(provider, gasPrice);\n\n const inputs = functionInfo.inputs.map((input, inputIndex) => {\n const key = getFunctionInputKey(functionInfo, input, inputIndex);\n\n let buttons = \"\";\n if (input.type === \"bytes32\") {\n buttons = (\n \n {\n if (utils.isHexString(form[key])) {\n const formUpdate = { ...form };\n formUpdate[key] = utils.parseBytes32String(form[key]);\n setForm(formUpdate);\n } else {\n const formUpdate = { ...form };\n formUpdate[key] = utils.formatBytes32String(form[key]);\n setForm(formUpdate);\n }\n }}\n >\n #️⃣\n \n \n );\n } else if (input.type === \"bytes\") {\n buttons = (\n \n {\n if (utils.isHexString(form[key])) {\n const formUpdate = { ...form };\n formUpdate[key] = utils.toUtf8String(form[key]);\n setForm(formUpdate);\n } else {\n const formUpdate = { ...form };\n formUpdate[key] = utils.hexlify(utils.toUtf8Bytes(form[key]));\n setForm(formUpdate);\n }\n }}\n >\n #️⃣\n \n \n );\n } else if (input.type === \"uint256\") {\n buttons = (\n \n {\n const formUpdate = { ...form };\n formUpdate[key] = utils.parseEther(form[key]);\n setForm(formUpdate);\n }}\n >\n ✴️\n \n \n );\n } else if (input.type === \"address\") {\n const possibleAddress = form[key] && form[key].toLowerCase && form[key].toLowerCase().trim();\n if (possibleAddress && possibleAddress.length === 42) {\n buttons = (\n \n \n \n );\n }\n }\n\n return (\n
\n {\n const formUpdate = { ...form };\n formUpdate[event.target.name] = event.target.value;\n setForm(formUpdate);\n }}\n suffix={buttons}\n />\n
\n );\n });\n\n const txValueInput = (\n
\n setTxValue(e.target.value)}\n value={txValue}\n addonAfter={\n
\n \n \n \n {\n const floatValue = parseFloat(txValue);\n if (floatValue) setTxValue(\"\" + floatValue * 10 ** 18);\n }}\n >\n ✳️\n
\n \n \n \n \n {\n setTxValue(BigNumber.from(txValue).toHexString());\n }}\n >\n #️⃣\n
\n \n \n \n \n }\n />\n \n );\n\n if (functionInfo.payable) {\n inputs.push(txValueInput);\n }\n\n const handleForm = returned => {\n if (returned) {\n setForm({});\n }\n };\n\n const buttonIcon =\n functionInfo.type === \"call\" ? (\n \n ) : (\n \n );\n inputs.push(\n
\n setReturnValue(e.target.value)}\n defaultValue=\"\"\n bordered={false}\n disabled\n value={returnValue}\n suffix={\n {\n const args = functionInfo.inputs.map((input, inputIndex) => {\n const key = getFunctionInputKey(functionInfo, input, inputIndex);\n let value = form[key];\n if (input.baseType === \"array\") {\n value = JSON.parse(value);\n } else if (input.type === \"bool\") {\n if (value === \"true\" || value === \"1\" || value === \"0x1\" || value === \"0x01\" || value === \"0x0001\") {\n value = 1;\n } else {\n value = 0;\n }\n }\n return value;\n });\n\n let result;\n if (functionInfo.stateMutability === \"view\" || functionInfo.stateMutability === \"pure\") {\n try {\n const returned = await contractFunction(...args);\n handleForm(returned);\n result = tryToDisplayAsText(returned);\n } catch (err) {\n console.error(err);\n }\n } else {\n const overrides = {};\n if (txValue) {\n overrides.value = txValue; // ethers.utils.parseEther()\n }\n if (gasPrice) {\n overrides.gasPrice = gasPrice;\n }\n // Uncomment this if you want to skip the gas estimation for each transaction\n // overrides.gasLimit = hexlify(1200000);\n\n // console.log(\"Running with extras\",extras)\n const returned = await tx(contractFunction(...args, overrides));\n handleForm(returned);\n result = tryToDisplay(returned);\n }\n\n console.log(\"SETTING RESULT:\", result);\n setReturnValue(result);\n triggerRefresh(true);\n }}\n >\n {buttonIcon}\n
\n }\n />\n ,\n );\n\n return (\n
\n \n \n {functionInfo.name}\n \n {inputs}\n \n \n
\n );\n}\n","import { Button, Input, Tooltip } from \"antd\";\nimport React, { useState, useEffect } from \"react\";\nimport Blockies from \"react-blockies\";\nimport { SendOutlined } from \"@ant-design/icons\";\nimport { Transactor } from \"../helpers\";\nimport Wallet from \"./Wallet\";\n\nconst { utils } = require(\"ethers\");\n\n// improved a bit by converting address to ens if it exists\n// added option to directly input ens name\n// added placeholder option\n\n/**\n ~ What it does? ~\n\n Displays a local faucet to send ETH to given address, also wallet is provided\n\n ~ How can I use? ~\n\n \n\n ~ Features ~\n\n - Provide price={price} of ether and convert between USD and ETH in a wallet\n - Provide localProvider={localProvider} to be able to send ETH to given address\n - Provide ensProvider={mainnetProvider} and your address will be replaced by ENS name\n (ex. \"0xa870\" => \"user.eth\") or you can enter directly ENS name instead of address\n works both in input field & wallet\n - Provide placeholder=\"Send local faucet\" value for the input\n**/\n\nexport default function Faucet(props) {\n const [address, setAddress] = useState();\n const [faucetAddress, setFaucetAddress] = useState();\n\n const { price, placeholder, localProvider, ensProvider } = props;\n\n useEffect(() => {\n const getFaucetAddress = async () => {\n if (localProvider) {\n const _faucetAddress = await localProvider.listAccounts();\n setFaucetAddress(_faucetAddress[0]);\n }\n };\n getFaucetAddress();\n }, [localProvider]);\n\n let blockie;\n if (address && typeof address.toLowerCase === \"function\") {\n blockie = ;\n } else {\n blockie =
;\n }\n\n const updateAddress = newValue => {\n if (typeof newValue !== \"undefined\" && utils.isAddress(newValue)) {\n setAddress(newValue);\n }\n };\n\n const tx = Transactor(localProvider);\n\n return (\n \n updateAddress(e.target.value)}\n suffix={\n \n {\n tx({\n to: address,\n value: utils.parseEther(\"0.01\"),\n });\n setAddress(\"\");\n }}\n shape=\"circle\"\n icon={}\n />\n \n \n }\n />\n \n );\n}\n","import { useCallback, useEffect, useState } from \"react\";\nimport { ethers } from \"ethers\";\n\nconst createProvider = async url => {\n const p = new ethers.providers.StaticJsonRpcProvider(url);\n\n await p.ready;\n\n return p;\n};\n\nexport default function useStaticJsonRPC(urlArray) {\n const [provider, setProvider] = useState(null);\n\n const handleProviders = useCallback(async () => {\n try {\n const p = await Promise.race(urlArray.map(createProvider));\n const _p = await p;\n\n setProvider(_p);\n } catch (error) {\n // todo: show notification error about provider issues\n console.log(error);\n }\n }, [urlArray]);\n\n useEffect(() => {\n handleProviders();\n // eslint-disable-next-line\n }, [JSON.stringify(urlArray)]);\n\n return provider;\n}\n","const contractListPromise = import(\"../contracts/hardhat_contracts.json\");\n// @ts-ignore\nconst externalContractsPromise = import(\"../contracts/external_contracts\");\n\nexport const loadAppContracts = async () => {\n const config = {};\n config.deployedContracts = (await contractListPromise).default ?? {};\n config.externalContracts = (await externalContractsPromise).default ?? {};\n return config;\n};\n","import {\n Button,\n Card,\n Descriptions,\n Divider,\n Drawer,\n InputNumber,\n Modal,\n notification,\n Row,\n Select,\n Space,\n Tooltip,\n Typography,\n} from \"antd\";\nimport React, { useEffect, useState } from \"react\";\nimport { ethers } from \"ethers\";\nimport { useBlockNumber, usePoller } from \"eth-hooks\";\nimport { RetweetOutlined, SettingOutlined } from \"@ant-design/icons\";\nimport { ChainId, Fetcher, Percent, Token, TokenAmount, Trade, WETH } from \"@uniswap/sdk\";\nimport { abi as IUniswapV2Router02ABI } from \"@uniswap/v2-periphery/build/IUniswapV2Router02.json\";\n\nimport { useDebounce } from \"../hooks\";\n\nconst { Option } = Select;\nconst { Text } = Typography;\n\nexport const ROUTER_ADDRESS = \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\";\n\nexport const ZERO_ADDRESS = \"0x0000000000000000000000000000000000000000\";\n\nconst erc20Abi = [\n \"function balanceOf(address owner) view returns (uint256)\",\n \"function approve(address _spender, uint256 _value) public returns (bool success)\",\n \"function allowance(address _owner, address _spender) public view returns (uint256 remaining)\",\n];\n\nconst makeCall = async (callName, contract, args, metadata = {}) => {\n if (contract[callName]) {\n let result;\n if (args) {\n result = await contract[callName](...args, metadata);\n } else {\n result = await contract[callName]();\n }\n return result;\n }\n console.log(\"no call of that name!\");\n return undefined;\n};\n\nconst defaultToken = \"ETH\";\nconst defaultTokenOut = \"DAI\";\nconst defaultSlippage = \"0.5\";\nconst defaultTimeLimit = 60 * 10;\n\nconst tokenListToObject = array =>\n array.reduce((obj, item) => {\n obj[item.symbol] = new Token(item.chainId, item.address, item.decimals, item.symbol, item.name);\n return obj;\n }, {});\n\nfunction Swap({ selectedProvider, tokenListURI }) {\n const [tokenIn, setTokenIn] = useState(defaultToken);\n const [tokenOut, setTokenOut] = useState(defaultTokenOut);\n const [exact, setExact] = useState();\n const [amountIn, setAmountIn] = useState();\n const [amountInMax, setAmountInMax] = useState();\n const [amountOut, setAmountOut] = useState();\n const [amountOutMin, setAmountOutMin] = useState();\n const [trades, setTrades] = useState();\n const [routerAllowance, setRouterAllowance] = useState();\n const [balanceIn, setBalanceIn] = useState();\n const [balanceOut, setBalanceOut] = useState();\n const [slippageTolerance, setSlippageTolerance] = useState(\n new Percent(Math.round(defaultSlippage * 100).toString(), \"10000\"),\n );\n const [timeLimit, setTimeLimit] = useState(defaultTimeLimit);\n const [swapping, setSwapping] = useState(false);\n const [approving, setApproving] = useState(false);\n const [settingsVisible, setSettingsVisible] = useState(false);\n const [swapModalVisible, setSwapModalVisible] = useState(false);\n\n const [tokenList, setTokenList] = useState([]);\n const [tokens, setTokens] = useState();\n const [invertPrice, setInvertPrice] = useState(false);\n\n const blockNumber = useBlockNumber(selectedProvider, 3000);\n\n const signer = selectedProvider.getSigner();\n const routerContract = new ethers.Contract(ROUTER_ADDRESS, IUniswapV2Router02ABI, signer);\n\n const _tokenListUri = tokenListURI || \"https://gateway.ipfs.io/ipns/tokens.uniswap.org\";\n\n const debouncedAmountIn = useDebounce(amountIn, 500);\n const debouncedAmountOut = useDebounce(amountOut, 500);\n\n const activeChainId = process.env.REACT_APP_NETWORK === \"kovan\" ? ChainId.KOVAN : ChainId.MAINNET;\n\n useEffect(() => {\n const getTokenList = async () => {\n console.log(_tokenListUri);\n try {\n const tokenListResponse = await fetch(_tokenListUri);\n const tokenListJson = await tokenListResponse.json();\n const filteredTokens = tokenListJson.tokens.filter(function (t) {\n return t.chainId === activeChainId;\n });\n const ethToken = WETH[activeChainId];\n ethToken.name = \"Ethereum\";\n ethToken.symbol = \"ETH\";\n ethToken.logoURI =\n \"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png\";\n const _tokenList = [ethToken, ...filteredTokens];\n setTokenList(_tokenList);\n const _tokens = tokenListToObject(_tokenList);\n setTokens(_tokens);\n } catch (e) {\n console.log(e);\n }\n };\n getTokenList();\n }, [tokenListURI, _tokenListUri, activeChainId]);\n\n const getTrades = async () => {\n if (tokenIn && tokenOut && (amountIn || amountOut)) {\n const pairs = arr => arr.map((v, i) => arr.slice(i + 1).map(w => [v, w])).flat();\n\n const baseTokens = tokenList\n .filter(function (t) {\n return [\"DAI\", \"USDC\", \"USDT\", \"COMP\", \"ETH\", \"MKR\", \"LINK\", tokenIn, tokenOut].includes(t.symbol);\n })\n .map(el => {\n return new Token(el.chainId, el.address, el.decimals, el.symbol, el.name);\n });\n\n const listOfPairwiseTokens = pairs(baseTokens);\n\n const getPairs = async list => {\n const listOfPromises = list.map(item => Fetcher.fetchPairData(item[0], item[1], selectedProvider));\n return Promise.all(listOfPromises.map(p => p.catch(() => undefined)));\n };\n\n const listOfPairs = await getPairs(listOfPairwiseTokens);\n\n let bestTrade;\n\n if (exact === \"in\") {\n setAmountInMax();\n bestTrade = Trade.bestTradeExactIn(\n listOfPairs.filter(item => item),\n new TokenAmount(tokens[tokenIn], ethers.utils.parseUnits(amountIn.toString(), tokens[tokenIn].decimals)),\n tokens[tokenOut],\n { maxNumResults: 3, maxHops: 1 },\n );\n if (bestTrade[0]) {\n setAmountOut(bestTrade[0].outputAmount.toSignificant(6));\n } else {\n setAmountOut();\n }\n } else if (exact === \"out\") {\n setAmountOutMin();\n bestTrade = Trade.bestTradeExactOut(\n listOfPairs.filter(item => item),\n tokens[tokenIn],\n new TokenAmount(tokens[tokenOut], ethers.utils.parseUnits(amountOut.toString(), tokens[tokenOut].decimals)),\n { maxNumResults: 3, maxHops: 1 },\n );\n if (bestTrade[0]) {\n setAmountIn(bestTrade[0].inputAmount.toSignificant(6));\n } else {\n setAmountIn();\n }\n }\n\n setTrades(bestTrade);\n\n console.log(bestTrade);\n }\n };\n\n useEffect(() => {\n getTrades();\n // eslint-disable-next-line\n }, [tokenIn, tokenOut, debouncedAmountIn, debouncedAmountOut, slippageTolerance, selectedProvider]);\n\n useEffect(() => {\n if (trades && trades[0]) {\n if (exact === \"in\") {\n setAmountOutMin(trades[0].minimumAmountOut(slippageTolerance));\n } else if (exact === \"out\") {\n setAmountInMax(trades[0].maximumAmountIn(slippageTolerance));\n }\n }\n }, [slippageTolerance, amountIn, amountOut, trades, exact]);\n\n const getBalance = async (_token, _account, _contract) => {\n let newBalance;\n if (_token === \"ETH\") {\n newBalance = await selectedProvider.getBalance(_account);\n } else {\n newBalance = await makeCall(\"balanceOf\", _contract, [_account]);\n }\n return newBalance;\n };\n\n const getAccountInfo = async () => {\n if (tokens) {\n const accountList = await selectedProvider.listAccounts();\n\n if (tokenIn) {\n const tempContractIn = new ethers.Contract(tokens[tokenIn].address, erc20Abi, selectedProvider);\n const newBalanceIn = await getBalance(tokenIn, accountList[0], tempContractIn);\n setBalanceIn(newBalanceIn);\n\n let allowance;\n\n if (tokenIn === \"ETH\") {\n setRouterAllowance();\n } else {\n allowance = await makeCall(\"allowance\", tempContractIn, [accountList[0], ROUTER_ADDRESS]);\n setRouterAllowance(allowance);\n }\n }\n\n if (tokenOut) {\n const tempContractOut = new ethers.Contract(tokens[tokenOut].address, erc20Abi, selectedProvider);\n const newBalanceOut = await getBalance(tokenOut, accountList[0], tempContractOut);\n setBalanceOut(newBalanceOut);\n }\n }\n };\n\n usePoller(getAccountInfo, 6000);\n\n const route = trades\n ? trades.length > 0\n ? trades[0].route.path.map(function (item) {\n return item.symbol;\n })\n : []\n : [];\n\n const updateRouterAllowance = async newAllowance => {\n setApproving(true);\n try {\n const tempContract = new ethers.Contract(tokens[tokenIn].address, erc20Abi, signer);\n const result = await makeCall(\"approve\", tempContract, [ROUTER_ADDRESS, newAllowance]);\n console.log(result);\n setApproving(false);\n return true;\n } catch (e) {\n notification.open({\n message: \"Approval unsuccessful\",\n description: `Error: ${e.message}`,\n });\n }\n };\n\n const approveRouter = async () => {\n const approvalAmount =\n exact === \"in\"\n ? ethers.utils.hexlify(ethers.utils.parseUnits(amountIn.toString(), tokens[tokenIn].decimals))\n : amountInMax.raw.toString();\n console.log(approvalAmount);\n const approval = updateRouterAllowance(approvalAmount);\n if (approval) {\n notification.open({\n message: \"Token transfer approved\",\n description: `You can now swap up to ${amountIn} ${tokenIn}`,\n });\n }\n };\n\n const removeRouterAllowance = async () => {\n const approvalAmount = ethers.utils.hexlify(0);\n console.log(approvalAmount);\n const removal = updateRouterAllowance(approvalAmount);\n if (removal) {\n notification.open({\n message: \"Token approval removed\",\n description: `The router is no longer approved for ${tokenIn}`,\n });\n }\n };\n\n const executeSwap = async () => {\n setSwapping(true);\n try {\n let args;\n const metadata = {};\n\n let call;\n const deadline = Math.floor(Date.now() / 1000) + timeLimit;\n const path = trades[0].route.path.map(function (item) {\n return item.address;\n });\n console.log(path);\n const accountList = await selectedProvider.listAccounts();\n const address = accountList[0];\n\n if (exact === \"in\") {\n const _amountIn = ethers.utils.hexlify(ethers.utils.parseUnits(amountIn.toString(), tokens[tokenIn].decimals));\n const _amountOutMin = ethers.utils.hexlify(ethers.BigNumber.from(amountOutMin.raw.toString()));\n if (tokenIn === \"ETH\") {\n call = \"swapExactETHForTokens\";\n args = [_amountOutMin, path, address, deadline];\n metadata.value = _amountIn;\n } else {\n call = tokenOut === \"ETH\" ? \"swapExactTokensForETH\" : \"swapExactTokensForTokens\";\n args = [_amountIn, _amountOutMin, path, address, deadline];\n }\n } else if (exact === \"out\") {\n const _amountOut = ethers.utils.hexlify(\n ethers.utils.parseUnits(amountOut.toString(), tokens[tokenOut].decimals),\n );\n const _amountInMax = ethers.utils.hexlify(ethers.BigNumber.from(amountInMax.raw.toString()));\n if (tokenIn === \"ETH\") {\n call = \"swapETHForExactTokens\";\n args = [_amountOut, path, address, deadline];\n metadata.value = _amountInMax;\n } else {\n call = tokenOut === \"ETH\" ? \"swapTokensForExactETH\" : \"swapTokensForExactTokens\";\n args = [_amountOut, _amountInMax, path, address, deadline];\n }\n }\n console.log(call, args, metadata);\n const result = await makeCall(call, routerContract, args, metadata);\n console.log(result);\n notification.open({\n message: \"Swap complete πŸ¦„\",\n description: (\n <>\n {`Swapped ${tokenIn} for ${tokenOut}, transaction: `}\n {result.hash}\n \n ),\n });\n setSwapping(false);\n } catch (e) {\n console.log(e);\n setSwapping(false);\n notification.open({\n message: \"Swap unsuccessful\",\n description: `Error: ${e.message}`,\n });\n }\n };\n\n const showSwapModal = () => {\n setSwapModalVisible(true);\n };\n\n const handleSwapModalOk = () => {\n setSwapModalVisible(false);\n executeSwap();\n };\n\n const handleSwapModalCancel = () => {\n setSwapModalVisible(false);\n };\n\n const insufficientBalance = balanceIn\n ? parseFloat(ethers.utils.formatUnits(balanceIn, tokens[tokenIn].decimals)) < amountIn\n : null;\n const inputIsToken = tokenIn !== \"ETH\";\n const insufficientAllowance = !inputIsToken\n ? false\n : routerAllowance\n ? parseFloat(ethers.utils.formatUnits(routerAllowance, tokens[tokenIn].decimals)) < amountIn\n : null;\n const formattedBalanceIn = balanceIn\n ? parseFloat(ethers.utils.formatUnits(balanceIn, tokens[tokenIn].decimals)).toPrecision(6)\n : null;\n const formattedBalanceOut = balanceOut\n ? parseFloat(ethers.utils.formatUnits(balanceOut, tokens[tokenOut].decimals)).toPrecision(6)\n : null;\n\n const metaIn =\n tokens && tokenList && tokenIn\n ? tokenList.filter(function (t) {\n return t.address === tokens[tokenIn].address;\n })[0]\n : null;\n const metaOut =\n tokens && tokenList && tokenOut\n ? tokenList.filter(function (t) {\n return t.address === tokens[tokenOut].address;\n })[0]\n : null;\n\n const cleanIpfsURI = uri => {\n try {\n return uri.replace(\"ipfs://\", \"https://ipfs.io/ipfs/\");\n } catch (e) {\n console.log(e, uri);\n return uri;\n }\n };\n\n const logoIn = metaIn ? cleanIpfsURI(metaIn.logoURI) : null;\n const logoOut = metaOut ? cleanIpfsURI(metaOut.logoURI) : null;\n\n const rawPrice = trades && trades[0] ? trades[0].executionPrice : null;\n const price = rawPrice ? rawPrice.toSignificant(7) : null;\n const priceDescription = rawPrice\n ? invertPrice\n ? `${rawPrice.invert().toSignificant(7)} ${tokenIn} per ${tokenOut}`\n : `${price} ${tokenOut} per ${tokenIn}`\n : null;\n\n const priceWidget = (\n \n {priceDescription}\n {\n setInvertPrice(!invertPrice);\n }}\n >\n \n \n \n );\n\n const swapModal = (\n \n \n \n {tokenIn}\n {amountIn}\n {tokenIn}\n \n \n \n ↓\n \n \n \n {tokenOut}\n {amountOut}\n {tokenOut}\n \n \n \n {priceWidget}\n \n {trades && ((amountOutMin && exact === \"in\") || (amountInMax && exact === \"out\"))\n ? exact === \"in\"\n ? `Output is estimated. You will receive at least ${amountOutMin.toSignificant(\n 6,\n )} ${tokenOut} or the transaction will revert.`\n : `Input is estimated. You will sell at most ${amountInMax.toSignificant(\n 6,\n )} ${tokenIn} or the transaction will revert.`\n : null}\n \n \n );\n\n return (\n \n \"uniswapLogo\"\n Uniswapper\n \n }\n extra={\n {\n setSettingsVisible(true);\n }}\n >\n \n \n }\n >\n \n \n \n {tokenIn}\n {\n setAmountOut();\n setAmountIn(ethers.utils.formatUnits(balanceIn, tokens[tokenIn].decimals));\n setAmountOutMin();\n setAmountInMax();\n setExact(\"in\");\n }}\n >\n {formattedBalanceIn}\n \n \n }\n style={{ width: 400, textAlign: \"left\" }}\n >\n {\n setAmountOut();\n setTrades();\n setAmountIn(e);\n setExact(\"in\");\n }}\n />\n {\n console.log(value);\n if (value === tokenOut) {\n console.log(\"switch!\", tokenIn);\n setTokenOut(tokenIn);\n setAmountOut(amountIn);\n setBalanceOut(balanceIn);\n }\n setTokenIn(value);\n setTrades();\n setAmountIn();\n setExact(\"out\");\n setBalanceIn();\n }}\n filterOption={(input, option) => option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}\n optionFilterProp=\"children\"\n >\n {tokenList.map(token => (\n \n ))}\n \n \n \n \n \")}>\n ↓\n \n \n \n \n {tokenOut}\n \n \n }\n style={{ width: 400, textAlign: \"left\" }}\n >\n {\n setAmountOut(e);\n setAmountIn();\n setTrades();\n setExact(\"out\");\n }}\n />\n {\n console.log(value, tokenIn, tokenOut);\n if (value === tokenIn) {\n console.log(\"switch!\", tokenOut);\n setTokenIn(tokenOut);\n setAmountIn(amountOut);\n setBalanceIn(balanceOut);\n }\n setTokenOut(value);\n setExact(\"in\");\n setAmountOut();\n setTrades();\n setBalanceOut();\n }}\n filterOption={(input, option) => option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}\n optionFilterProp=\"children\"\n >\n {tokenList.map(token => (\n \n ))}\n \n \n \n \n {priceDescription ? priceWidget : null}\n \n \n \n {inputIsToken ? (\n \n ) : null}\n \n {insufficientBalance ? \"Insufficient balance\" : \"Swap!\"}\n \n {swapModal}\n \n \n \n {\n setSettingsVisible(false);\n }}\n width={500}\n >\n \n {blockNumber}\n \n \n {routerAllowance ? ethers.utils.formatUnits(routerAllowance, tokens[tokenIn].decimals) : null}\n {routerAllowance > 0 ? : null}\n \n \n {route.join(\"->\")}\n {exact}\n \n {trades ? (trades.length > 0 ? trades[0].executionPrice.toSignificant(6) : null) : null}\n \n \n {trades ? (trades.length > 0 ? trades[0].nextMidPrice.toSignificant(6) : null) : null}\n \n \n {trades ? (trades.length > 0 ? trades[0].priceImpact.toSignificant(6) : null) : null}\n \n \n `${value}%`}\n parser={value => value.replace(\"%\", \"\")}\n onChange={value => {\n console.log(value);\n\n const slippagePercent = new Percent(Math.round(value * 100).toString(), \"10000\");\n setSlippageTolerance(slippagePercent);\n }}\n />\n \n {amountInMax ? amountInMax.toExact() : null}\n {amountOutMin ? amountOutMin.toExact() : null}\n \n {\n console.log(value);\n setTimeLimit(value);\n }}\n />\n \n \n \n \n );\n}\n\nexport default Swap;\n","import { Timeline, Typography } from \"antd\";\nimport React from \"react\";\nimport Blockies from \"react-blockies\";\nimport { DownloadOutlined, EditOutlined, SendOutlined } from \"@ant-design/icons\";\n\nconst { Text } = Typography;\n\n// displays a timeline for scaffold-eth usage\n\nexport default function TimelineDisplay(props) {\n return (\n \n \n \n Clone and Install from the{\" \"}\n \n github repo\n \n \n \n\n \n \n Start your frontend app with: yarn start\n \n \n\n \n \n Start your local blockchain with: yarn run chain (and refresh)\n \n \n\n \n \n Compile and deploy your smart contract: yarn run deploy\n \n \n\n \n \n Fix error in SmartContractWallet.sol then: yarn run deploy\n \n \n\n } color={props.hasEther ? \"green\" : \"blue\"}>\n \n Send test ether to your{\" \"}\n address using\n (bottom left) faucet\n \n \n\n }\n color={props.contractHasEther ? \"green\" : \"blue\"}\n >\n \n Deposit some funds into your{\" \"}\n {\" \"}\n smart contract wallet\n \n \n\n }\n color={props.amOwnerOfContract ? \"green\" : \"blue\"}\n >\n \n Set owner of your{\" \"}\n {\" \"}\n smart contract wallet to your{\" \"}\n address\n \n \n\n \n \n Yikes, anyone can take ownership of SmartContractWallet.sol\n \n \n\n \n \n Test your contract with buidler/test/myTest.js then:\n yarn run test\n \n \n\n \n \n Build something awesome with πŸ— scaffold-eth and{\" \"}\n \n @ me\n \n !\n \n \n\n \n \n Read more about{\" \"}\n \n Ethereum\n \n ,{\" \"}\n \n Solidity\n \n , and{\" \"}\n \n Buidler\n \n \n \n \n );\n}\n","import { Button, Input, Form, Select, InputNumber, Table, Radio } from \"antd\";\nimport React, { useState, useEffect } from \"react\";\nimport { utils, ethers } from \"ethers\";\nimport { useContractLoader, useOnBlock } from \"eth-hooks\";\n\nimport { NETWORKS } from \"../constants\";\nimport { Transactor } from \"../helpers\";\n\n/** \nThis is a component for bridging between L1 & L2\nCurrently it supports Testnet deposits for Arbitrum & Optimism\n\n __ _______ _____\n \\ \\ / /_ _| __ \\\n \\ \\ /\\ / / | | | |__) |\n \\ \\/ \\/ / | | | ___/\n \\ /\\ / _| |_| |\n \\/ \\/ |_____|_|\n\n\n**/\n\nexport default function L2ArbitrumBridge({ address, userSigner }) {\n const [L1EthBalance, setL1EthBalance] = useState(\"...\");\n const [L2EthBalance, setL2EthBalance] = useState(\"...\");\n const [L1Provider, setL1Provider] = useState(\"\");\n const [L2Provider, setL2Provider] = useState(\"\");\n const [rollup, setRollup] = useState(\"arbitrum\");\n const [environment] = useState(\"test\");\n\n const rollupConfig = {\n arbitrum: {\n test: { L1: NETWORKS.rinkeby, L2: NETWORKS.rinkebyArbitrum },\n main: { L1: NETWORKS.mainnet, L2: NETWORKS.arbitrum },\n local: { L1: NETWORKS.localArbitrumL1, L2: NETWORKS.localArbitrum },\n },\n optimism: {\n test: { L1: NETWORKS.kovan, L2: NETWORKS.kovanOptimism },\n local: { L1: NETWORKS.localOptimismL1, L2: NETWORKS.localOptimism },\n },\n };\n\n const activeConfig = rollupConfig[rollup][environment];\n\n const selectedChainId =\n userSigner && userSigner.provider && userSigner.provider._network && userSigner.provider._network.chainId;\n\n const tx = Transactor(userSigner);\n\n useEffect(() => {\n async function setProviders() {\n const L1 = activeConfig.L1;\n const L2 = activeConfig.L2;\n setL1Provider(new ethers.providers.StaticJsonRpcProvider(L1.rpcUrl));\n setL2Provider(new ethers.providers.StaticJsonRpcProvider(L2.rpcUrl));\n setL1EthBalance(\"...\");\n setL2EthBalance(\"...\");\n }\n setProviders();\n }, [rollup, activeConfig.L1, activeConfig.L2]);\n\n const contracts = useContractLoader(userSigner, { externalContracts: L1BridgeMetadata, hardhatContracts: {} });\n\n useOnBlock(L1Provider, async () => {\n console.log(`β›“ A new mainnet block is here: ${L1Provider._lastBlockNumber}`);\n const yourL1Balance = await L1Provider.getBalance(address);\n setL1EthBalance(yourL1Balance ? ethers.utils.formatEther(yourL1Balance) : \"...\");\n const yourL2Balance = await L2Provider.getBalance(address);\n setL2EthBalance(yourL2Balance ? ethers.utils.formatEther(yourL2Balance) : \"...\");\n });\n\n const { Option } = Select;\n const formItemLayout = {\n labelCol: {\n xs: { span: 24 },\n sm: { span: 8 },\n },\n wrapperCol: {\n xs: { span: 24 },\n sm: { span: 12 },\n },\n };\n const tailFormItemLayout = {\n wrapperCol: {\n xs: {\n span: 24,\n offset: 0,\n },\n sm: {\n span: 12,\n offset: 8,\n },\n },\n };\n\n const columns = [\n {\n title: \"\",\n dataIndex: \"token\",\n key: \"token\",\n align: \"center\",\n },\n {\n title: `${activeConfig.L1.name} L1 Balance`,\n dataIndex: \"l1\",\n key: \"l1\",\n align: \"center\",\n },\n {\n title: `${activeConfig.L1.name} ${rollup} Balance`,\n dataIndex: \"l2\",\n key: \"l2\",\n align: \"center\",\n },\n ];\n\n const data = [\n {\n key: \"1\",\n token: \"ETH\",\n l1: \"Ξ\" + L1EthBalance,\n l2: \"Ξ\" + L2EthBalance,\n },\n ];\n\n const [form] = Form.useForm();\n\n const onAssetChange = value => {\n console.log(value);\n };\n\n async function onFinish(values) {\n console.log(contracts);\n console.log(values.amount.toString());\n console.log(rollup);\n let newTx;\n try {\n if (rollup === \"arbitrum\") {\n newTx = await tx(\n contracts.Inbox.depositEth(1_300_000, {\n value: utils.parseEther(values.amount.toString()),\n gasLimit: 300000,\n }),\n );\n } else if (rollup === \"optimism\") {\n newTx = await tx(\n contracts.OVM_L1StandardBridge.depositETH(1_300_000, \"0x\", {\n value: utils.parseEther(values.amount.toString()),\n }),\n );\n }\n await newTx.wait();\n console.log(\"woop!\");\n } catch (e) {\n console.log(e);\n console.log(\"something went wrong!\");\n }\n }\n\n const wrongNetwork = selectedChainId !== activeConfig.L1.chainId;\n\n return (\n
\n
\n

Welcome to the L2 Deposit Bridge!

\n {\n setRollup(e.target.value);\n }}\n style={{ marginBottom: 10 }}\n >\n Arbitrum\n Optimism\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\n// Arbitrum Inbox https://rinkeby.etherscan.io/address/0xa157dc79ca26d69c3b1282d03ec42bdee2790a8f#code\nconst ArbitrumInboxABI = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"uint256\", name: \"messageNum\", type: \"uint256\" },\n { indexed: false, internalType: \"bytes\", name: \"data\", type: \"bytes\" },\n ],\n name: \"InboxMessageDelivered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [{ indexed: true, internalType: \"uint256\", name: \"messageNum\", type: \"uint256\" }],\n name: \"InboxMessageDeliveredFromOrigin\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [{ indexed: false, internalType: \"address\", name: \"newSource\", type: \"address\" }],\n name: \"WhitelistSourceUpdated\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"bridge\",\n outputs: [{ internalType: \"contract IBridge\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"address\", name: \"destAddr\", type: \"address\" },\n { internalType: \"uint256\", name: \"l2CallValue\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"maxSubmissionCost\", type: \"uint256\" },\n { internalType: \"address\", name: \"excessFeeRefundAddress\", type: \"address\" },\n { internalType: \"address\", name: \"callValueRefundAddress\", type: \"address\" },\n { internalType: \"uint256\", name: \"maxGas\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"gasPriceBid\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" },\n ],\n name: \"createRetryableTicket\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"uint256\", name: \"maxSubmissionCost\", type: \"uint256\" }],\n name: \"depositEth\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"contract IBridge\", name: \"_bridge\", type: \"address\" },\n { internalType: \"address\", name: \"_whitelist\", type: \"address\" },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isMaster\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"maxGas\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"gasPriceBid\", type: \"uint256\" },\n { internalType: \"address\", name: \"destAddr\", type: \"address\" },\n { internalType: \"uint256\", name: \"amount\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" },\n ],\n name: \"sendContractTransaction\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"maxGas\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"gasPriceBid\", type: \"uint256\" },\n { internalType: \"address\", name: \"destAddr\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" },\n ],\n name: \"sendL1FundedContractTransaction\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"maxGas\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"gasPriceBid\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"address\", name: \"destAddr\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" },\n ],\n name: \"sendL1FundedUnsignedTransaction\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"messageData\", type: \"bytes\" }],\n name: \"sendL2Message\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"messageData\", type: \"bytes\" }],\n name: \"sendL2MessageFromOrigin\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"maxGas\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"gasPriceBid\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"address\", name: \"destAddr\", type: \"address\" },\n { internalType: \"uint256\", name: \"amount\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" },\n ],\n name: \"sendUnsignedTransaction\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [{ internalType: \"address\", name: \"newSource\", type: \"address\" }],\n name: \"updateWhitelistSource\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"whitelist\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\",\n },\n];\n\n// https://github.com/ethereum-optimism/optimism/blob/2bd49730fa8d2c10953873f0ccc792198a49d5c9/packages/contracts/contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L1StandardBridge.sol\nconst OVM_L1StandardBridgeABI = [\n \"function depositETH(uint32 _l2Gas,bytes calldata _data) external payable\",\n \"function depositETHTo(address _to,uint32 _l2Gas,bytes calldata _data) external payable\",\n \"function finalizeETHWithdrawal (address _from,address _to,uint _amount,bytes calldata _data) external\",\n];\n\nconst L1BridgeMetadata = {\n // Arbitrium Contract's\n 44010: {\n contracts: {\n Inbox: {\n address: \"0xA4d796Ad4e79aFB703340a596AEd88f8a5924183\",\n abi: ArbitrumInboxABI,\n },\n },\n },\n 4: {\n contracts: {\n Inbox: {\n address: \"0x578bade599406a8fe3d24fd7f7211c0911f5b29e\",\n abi: ArbitrumInboxABI,\n },\n },\n },\n // Optimism Contract's\n 31337: {\n contracts: {\n OVM_L1StandardBridge: {\n address: \"0x998abeb3E57409262aE5b751f60747921B33613E\",\n abi: OVM_L1StandardBridgeABI,\n },\n },\n },\n 42: {\n contracts: {\n OVM_L1StandardBridge: {\n address: \"0x22F24361D548e5FaAfb36d1437839f080363982B\",\n abi: OVM_L1StandardBridgeABI,\n },\n },\n },\n};\n","import { Alert, Button } from \"antd\";\nimport React from \"react\";\n\nimport { NETWORK } from \"../constants\";\n\nfunction NetworkDisplay({\n NETWORKCHECK,\n localChainId,\n selectedChainId,\n targetNetwork,\n USE_NETWORK_SELECTOR,\n logoutOfWeb3Modal,\n}) {\n let networkDisplay = \"\";\n if (NETWORKCHECK && localChainId && selectedChainId && localChainId !== selectedChainId) {\n const networkSelected = NETWORK(selectedChainId);\n const networkLocal = NETWORK(localChainId);\n if (selectedChainId === 1337 && localChainId === 31337) {\n networkDisplay = (\n
\n \n You have chain id 1337 for localhost and you need to change it to 31337 to work with\n HardHat.\n
(MetaMask -> Settings -> Networks -> Chain ID -> 31337)
\n
\n }\n type=\"error\"\n closable={false}\n />\n \n );\n } else {\n networkDisplay = (\n
\n \n You have {networkSelected && networkSelected.name} selected and you need to be on{\" \"}\n {\n const ethereum = window.ethereum;\n const data = [\n {\n chainId: \"0x\" + targetNetwork.chainId.toString(16),\n chainName: targetNetwork.name,\n nativeCurrency: targetNetwork.nativeCurrency,\n rpcUrls: [targetNetwork.rpcUrl],\n blockExplorerUrls: [targetNetwork.blockExplorer],\n },\n ];\n console.log(\"data\", data);\n\n let switchTx;\n // https://docs.metamask.io/guide/rpc-api.html#other-rpc-methods\n try {\n switchTx = await ethereum.request({\n method: \"wallet_switchEthereumChain\",\n params: [{ chainId: data[0].chainId }],\n });\n } catch (switchError) {\n // not checking specific error code, because maybe we're not using MetaMask\n try {\n switchTx = await ethereum.request({\n method: \"wallet_addEthereumChain\",\n params: data,\n });\n } catch (addError) {\n // handle \"add\" error\n }\n }\n\n if (switchTx) {\n console.log(switchTx);\n }\n }}\n >\n {networkLocal && networkLocal.name}\n \n
\n }\n type=\"error\"\n closable={false}\n />\n \n );\n }\n } else {\n networkDisplay = USE_NETWORK_SELECTOR ? null : (\n
\n
\n );\n }\n\n console.log({ networkDisplay });\n\n return networkDisplay;\n}\n\nexport default NetworkDisplay;\n","import { Slider, InputNumber, Row, Col, Collapse } from \"antd\";\nimport {\n useBalance,\n useContractLoader,\n useContractReader,\n useGasPrice,\n useOnBlock,\n useUserProviderAndSigner,\n} from \"eth-hooks\";\nimport { useExchangeEthPrice } from \"eth-hooks/dapps/dex\";\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport { useLocation } from \"react-router-dom\";\nimport \"./App.css\";\nimport { Account, NetworkDisplay, NetworkSwitch} from \"./components\";\nimport { NETWORKS, ALCHEMY_KEY } from \"./constants\";\nimport externalContracts from \"./contracts/external_contracts\";\n// contracts\nimport deployedContracts from \"./contracts/hardhat_contracts.json\";\nimport { Transactor, Web3ModalSetup } from \"./helpers\";\nimport { useStaticJsonRPC } from \"./hooks\";\nimport BrokenSea from \"./contracts/BrokenSea.json\";\n\nconst { ethers } = require(\"ethers\");\n\nconst { Panel } = Collapse;\nconst initialNetwork = NETWORKS.rinkeby;\nconst DEBUG = false;\nconst NETWORKCHECK = true;\nconst USE_BURNER_WALLET = false;\nconst USE_NETWORK_SELECTOR = false;\nconst web3Modal = Web3ModalSetup();\nconst providers = [\n \"https://eth-mainnet.gateway.pokt.network/v1/lb/611156b4a585a20035148406\",\n `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}`,\n \"https://rpc.scaffoldeth.io:48544\",\n];\n\nfunction callback(key) {\n console.log(key);\n}\n\nfunction App(props) {\n const networkOptions = [initialNetwork.name, \"mainnet\", \"rinkeby\"];\n\n const [mintAmount, setMintAmount] = useState(1);\n const [totalMinted, setTotalMinted] = useState(0);\n const [loading, setLoading] = useState(true);\n const [injectedProvider, setInjectedProvider] = useState();\n const [address, setAddress] = useState();\n const [selectedNetwork, setSelectedNetwork] = useState(networkOptions[0]);\n const location = useLocation();\n\n const targetNetwork = NETWORKS[selectedNetwork];\n const blockExplorer = targetNetwork.blockExplorer;\n\n // load all your providers\n const localProvider = useStaticJsonRPC([\n process.env.REACT_APP_PROVIDER ? process.env.REACT_APP_PROVIDER : targetNetwork.rpcUrl,\n ]);\n const mainnetProvider = useStaticJsonRPC(providers);\n\n if (DEBUG) console.log(`Using ${selectedNetwork} network`);\n\n // πŸ›° providers\n if (DEBUG) console.log(\"πŸ“‘ Connecting to Mainnet Ethereum\");\n\n const logoutOfWeb3Modal = async () => {\n await web3Modal.clearCachedProvider();\n if (injectedProvider && injectedProvider.provider && typeof injectedProvider.provider.disconnect == \"function\") {\n await injectedProvider.provider.disconnect();\n }\n setTimeout(() => {\n window.location.reload();\n }, 1);\n };\n\n /* πŸ’΅ This hook will get the price of ETH from πŸ¦„ Uniswap: */\n const price = useExchangeEthPrice(targetNetwork, mainnetProvider);\n const gasPrice = useGasPrice(targetNetwork, \"fast\");\n\n const userProviderAndSigner = useUserProviderAndSigner(injectedProvider, localProvider, USE_BURNER_WALLET);\n const userSigner = userProviderAndSigner.signer;\n\n useEffect(() => {\n async function getAddress() {\n if (userSigner) {\n const newAddress = await userSigner.getAddress();\n setAddress(newAddress);\n }\n }\n getAddress();\n }, [userSigner]);\n\n // You can warn the user if you would like them to be on a specific network\n const localChainId = localProvider && localProvider._network && localProvider._network.chainId;\n const selectedChainId =\n userSigner && userSigner.provider && userSigner.provider._network && userSigner.provider._network.chainId;\n\n // The transactor wraps transactions and provides notificiations\n const tx = Transactor(userSigner, gasPrice);\n const yourLocalBalance = useBalance(mainnetContracts, address);\n const yourMainnetBalance = useBalance(mainnetProvider, address);\n\n const contractConfig = { deployedContracts: deployedContracts || {}, externalContracts: externalContracts || {} };\n const readContracts = useContractLoader(localProvider, contractConfig);\n const writeContracts = useContractLoader(userSigner, contractConfig, localChainId);\n\n const mainnetContracts = useContractLoader(mainnetProvider, contractConfig);\n\n // If you want to call a function on a new block\n useOnBlock(mainnetProvider, () => {\n console.log(`β›“ A new mainnet block is here: ${mainnetProvider._lastBlockNumber}`);\n });\n\n const purpose = useContractReader(readContracts, \"YourContract\", \"purpose\");\n\n //\n // 🧫 DEBUG πŸ‘¨πŸ»β€πŸ”¬\n //\n useEffect(() => {\n if (\n DEBUG &&\n mainnetProvider &&\n address &&\n selectedChainId &&\n yourLocalBalance &&\n yourMainnetBalance &&\n readContracts &&\n writeContracts &&\n mainnetContracts\n ) {\n console.log(\"_____________________________________ πŸ— scaffold-eth _____________________________________\");\n console.log(\"🌎 mainnetProvider\", mainnetProvider);\n console.log(\"🏠 localChainId\", localChainId);\n console.log(\"πŸ‘©β€πŸ’Ό selected address:\", address);\n console.log(\"πŸ•΅πŸ»β€β™‚οΈ selectedChainId:\", selectedChainId);\n console.log(\"πŸ’΅ yourLocalBalance\", yourLocalBalance ? ethers.utils.formatEther(yourLocalBalance) : \"...\");\n console.log(\"πŸ’΅ yourMainnetBalance\", yourMainnetBalance ? ethers.utils.formatEther(yourMainnetBalance) : \"...\");\n console.log(\"πŸ“ readContracts\", readContracts);\n console.log(\"🌍 DAI contract on mainnet:\", mainnetContracts);\n console.log(\"πŸ” writeContracts\", writeContracts);\n }\n }, [\n mainnetProvider,\n address,\n selectedChainId,\n yourLocalBalance,\n yourMainnetBalance,\n readContracts,\n writeContracts,\n mainnetContracts,\n localChainId,\n ]);\n\n const loadWeb3Modal = useCallback(async () => {\n const provider = await web3Modal.connect();\n setInjectedProvider(new ethers.providers.Web3Provider(provider));\n\n provider.on(\"chainChanged\", chainId => {\n console.log(`chain changed to ${chainId}! updating providers`);\n setInjectedProvider(new ethers.providers.Web3Provider(provider));\n });\n\n provider.on(\"accountsChanged\", () => {\n console.log(`account changed!`);\n setInjectedProvider(new ethers.providers.Web3Provider(provider));\n });\n\n // Subscribe to session disconnection\n provider.on(\"disconnect\", (code, reason) => {\n console.log(code, reason);\n logoutOfWeb3Modal();\n });\n // eslint-disable-next-line\n }, [setInjectedProvider]);\n const CONTRACT_ADDRESS = \"0xb46Be0FA02Dc6e79b5dBadDDde2F2d0a64da73c4\";\n const ethValue = (mintAmount * 0.0169).toFixed(4);\n\n const decrementMintAmount = () => {\n let newMintAmount = mintAmount - 1;\n if (newMintAmount < 1) {\n newMintAmount = 1;\n }\n setMintAmount(newMintAmount);\n };\n\n const incrementMintAmount = () => {\n let newMintAmount = mintAmount + 1;\n if (newMintAmount > 100) {\n newMintAmount = 100;\n }\n setMintAmount(newMintAmount);\n };\n\n const HandleMint = async event => {\n try {\n const contract = new ethers.Contract(CONTRACT_ADDRESS, BrokenSea.abi, injectedProvider);\n const signer = injectedProvider.getSigner(0);\n const contractSigner = contract.connect(signer);\n\n const ethValueString = ethValue.toString();\n console.log(ethValue.toString());\n\n const txParamsOverride = {\n value: ethers.utils.parseEther(ethValueString),\n };\n\n const tx = await contractSigner.crashShip(mintAmount, txParamsOverride);\n await tx.wait();\n } catch (error) {\n alert(error.error.message);\n console.error(error);\n }\n };\n\n async function getTotalSupply() {\n try {\n const contract = new ethers.Contract(CONTRACT_ADDRESS, BrokenSea.abi, injectedProvider);\n const data = await contract.totalSupply();\n\n setTotalMinted(data.toNumber());\n } catch (error) {\n console.error(error);\n }\n }\n\n useEffect(function () {\n async function fetchTotals() {\n if (!ethers) {\n console.log(\"Install MetaMask\");\n setLoading(false);\n return;\n }\n\n await getTotalSupply();\n setLoading(false);\n }\n fetchTotals();\n });\n\n useEffect(() => {\n if (web3Modal.cachedProvider) {\n loadWeb3Modal();\n }\n }, [loadWeb3Modal]);\n\n return (\n
\n \n
\n \n

Broken Sea

\n
\n
\n {USE_NETWORK_SELECTOR && (\n
\n \n
\n )}\n \n
\n
\n
\n
\n
\n

Welcome To Broken Sea

\n

Find your wrecked Ship!

\n

Cost to Mint: Ξ{ethValue}

\n
\n\n {/* */}\n
\n

{mintAmount}

\n \n
\n \n\n

Wrecks left to find: {totalMinted} / 404

\n \n \n

Absolute Wrecks

\n
\n \n

It Sunk

\n
\n \n

We Like The Wreck

\n
\n \n

Broken Sea Contract

\n
\n \n

Opensea
Looks Rare

\n
\n
\n
\n
\n\n
\n );\n}\n\nexport default App;\n","import { ApolloClient, ApolloProvider, InMemoryCache } from \"@apollo/client\";\nimport React from \"react\";\nimport { ThemeSwitcherProvider } from \"react-css-theme-switcher\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App\";\nimport \"./index.css\";\n\nconst themes = {\n dark: `${process.env.PUBLIC_URL}/dark-theme.css`,\n light: `${process.env.PUBLIC_URL}/light-theme.css`,\n};\n\nconst prevTheme = window.localStorage.getItem(\"theme\");\n\nconst subgraphUri = \"http://localhost:8000/subgraphs/name/scaffold-eth/your-contract\";\n\nconst client = new ApolloClient({\n uri: subgraphUri,\n cache: new InMemoryCache(),\n});\n\nReactDOM.render(\n \n \n \n \n \n \n ,\n document.getElementById(\"root\"),\n);\n","const ERC20ABI = [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n];\nconst DAIABI = [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"chainId_\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"src\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"guy\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: true,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes4\",\n name: \"sig\",\n type: \"bytes4\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"usr\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"arg1\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"arg2\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n name: \"LogNote\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"src\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"dst\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n constant: true,\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"PERMIT_TYPEHASH\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"usr\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"usr\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"burn\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"guy\",\n type: \"address\",\n },\n ],\n name: \"deny\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"usr\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"mint\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"src\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"dst\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"move\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"holder\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expiry\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"allowed\",\n type: \"bool\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"usr\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"pull\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"usr\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"push\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"guy\",\n type: \"address\",\n },\n ],\n name: \"rely\",\n outputs: [],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"dst\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n internalType: \"address\",\n name: \"src\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"dst\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"wad\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"wards\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n];\n\n// Mainnet DAI, Optimism and Arbitrium Rollup Contracts with local addresses\nmodule.exports = {\n 1: {\n contracts: {\n DAI: {\n address: \"0x6B175474E89094C44Da98b954EedeAC495271d0F\",\n abi: DAIABI,\n },\n UNI: {\n address: \"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984\",\n abi: ERC20ABI,\n },\n },\n },\n};\n","// MY INFURA_ID, SWAP IN YOURS FROM https://infura.io/dashboard/ethereum\nexport const INFURA_ID = \"460f40a260564ac4a4f4b3fffb032dad\";\n\n// MY ETHERSCAN_ID, SWAP IN YOURS FROM https://etherscan.io/myapikey\nexport const ETHERSCAN_KEY = \"DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW\";\n\n// BLOCKNATIVE ID FOR Notify.js:\nexport const BLOCKNATIVE_DAPPID = \"0b58206a-f3c0-4701-a62f-73c7243e8c77\";\n\nexport const ALCHEMY_KEY = \"oKxs-03sij-U_N0iOlrSsZFr29-IqbuF\";\n\nexport const NETWORKS = {\n localhost: {\n name: \"localhost\",\n color: \"#666666\",\n chainId: 31337,\n blockExplorer: \"\",\n rpcUrl: \"http://\" + (global.window ? window.location.hostname : \"localhost\") + \":8545\",\n },\n mainnet: {\n name: \"mainnet\",\n color: \"#ff8b9e\",\n chainId: 1,\n rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}`,\n blockExplorer: \"https://etherscan.io/\",\n },\n kovan: {\n name: \"kovan\",\n color: \"#7003DD\",\n chainId: 42,\n rpcUrl: `https://kovan.infura.io/v3/${INFURA_ID}`,\n blockExplorer: \"https://kovan.etherscan.io/\",\n faucet: \"https://gitter.im/kovan-testnet/faucet\", // https://faucet.kovan.network/\n },\n rinkeby: {\n name: \"rinkeby\",\n color: \"#e0d068\",\n chainId: 4,\n rpcUrl: `https://rinkeby.infura.io/v3/${INFURA_ID}`,\n faucet: \"https://faucet.rinkeby.io/\",\n blockExplorer: \"https://rinkeby.etherscan.io/\",\n },\n ropsten: {\n name: \"ropsten\",\n color: \"#F60D09\",\n chainId: 3,\n faucet: \"https://faucet.ropsten.be/\",\n blockExplorer: \"https://ropsten.etherscan.io/\",\n rpcUrl: `https://ropsten.infura.io/v3/${INFURA_ID}`,\n },\n goerli: {\n name: \"goerli\",\n color: \"#0975F6\",\n chainId: 5,\n faucet: \"https://goerli-faucet.slock.it/\",\n blockExplorer: \"https://goerli.etherscan.io/\",\n rpcUrl: `https://goerli.infura.io/v3/${INFURA_ID}`,\n },\n xdai: {\n name: \"xdai\",\n color: \"#48a9a6\",\n chainId: 100,\n price: 1,\n gasPrice: 1000000000,\n rpcUrl: \"https://dai.poa.network\",\n faucet: \"https://xdai-faucet.top/\",\n blockExplorer: \"https://blockscout.com/poa/xdai/\",\n },\n polygon: {\n name: \"polygon\",\n color: \"#2bbdf7\",\n chainId: 137,\n price: 1,\n gasPrice: 1000000000,\n rpcUrl: \"https://polygon-rpc.com/\",\n blockExplorer: \"https://polygonscan.com/\",\n },\n mumbai: {\n name: \"mumbai\",\n color: \"#92D9FA\",\n chainId: 80001,\n price: 1,\n gasPrice: 1000000000,\n rpcUrl: \"https://rpc-mumbai.maticvigil.com\",\n faucet: \"https://faucet.polygon.technology/\",\n blockExplorer: \"https://mumbai.polygonscan.com/\",\n },\n localArbitrum: {\n name: \"localArbitrum\",\n color: \"#50a0ea\",\n chainId: 153869338190755,\n blockExplorer: \"\",\n rpcUrl: `http://localhost:8547`,\n },\n localArbitrumL1: {\n name: \"localArbitrumL1\",\n color: \"#50a0ea\",\n chainId: 44010,\n blockExplorer: \"\",\n rpcUrl: `http://localhost:7545`,\n },\n rinkebyArbitrum: {\n name: \"Arbitrum Testnet\",\n color: \"#50a0ea\",\n chainId: 421611,\n blockExplorer: \"https://rinkeby-explorer.arbitrum.io/#/\",\n rpcUrl: `https://rinkeby.arbitrum.io/rpc`,\n },\n arbitrum: {\n name: \"Arbitrum\",\n color: \"#50a0ea\",\n chainId: 42161,\n blockExplorer: \"https://explorer.arbitrum.io/#/\",\n rpcUrl: `https://arb1.arbitrum.io/rpc`,\n gasPrice: 0,\n },\n localOptimismL1: {\n name: \"localOptimismL1\",\n color: \"#f01a37\",\n chainId: 31337,\n blockExplorer: \"\",\n rpcUrl: \"http://\" + (global.window ? window.location.hostname : \"localhost\") + \":9545\",\n },\n localOptimism: {\n name: \"localOptimism\",\n color: \"#f01a37\",\n chainId: 420,\n blockExplorer: \"\",\n rpcUrl: \"http://\" + (global.window ? window.location.hostname : \"localhost\") + \":8545\",\n gasPrice: 0,\n },\n kovanOptimism: {\n name: \"kovanOptimism\",\n color: \"#f01a37\",\n chainId: 69,\n blockExplorer: \"https://kovan-optimistic.etherscan.io/\",\n rpcUrl: `https://kovan.optimism.io`,\n gasPrice: 0,\n },\n optimism: {\n name: \"optimism\",\n color: \"#f01a37\",\n chainId: 10,\n blockExplorer: \"https://optimistic.etherscan.io/\",\n rpcUrl: `https://mainnet.optimism.io`,\n },\n localAvalanche: {\n name: \"localAvalanche\",\n color: \"#666666\",\n chainId: 43112,\n blockExplorer: \"\",\n rpcUrl: `http://localhost:9650/ext/bc/C/rpc`,\n gasPrice: 225000000000,\n },\n fujiAvalanche: {\n name: \"fujiAvalanche\",\n color: \"#666666\",\n chainId: 43113,\n blockExplorer: \"https://cchain.explorer.avax-test.network/\",\n rpcUrl: `https://api.avax-test.network/ext/bc/C/rpc`,\n gasPrice: 225000000000,\n },\n mainnetAvalanche: {\n name: \"mainnetAvalanche\",\n color: \"#666666\",\n chainId: 43114,\n blockExplorer: \"https://cchain.explorer.avax.network/\",\n rpcUrl: `https://api.avax.network/ext/bc/C/rpc`,\n gasPrice: 225000000000,\n },\n testnetHarmony: {\n name: \"testnetHarmony\",\n color: \"#00b0ef\",\n chainId: 1666700000,\n blockExplorer: \"https://explorer.pops.one/\",\n rpcUrl: `https://api.s0.b.hmny.io`,\n gasPrice: 1000000000,\n },\n mainnetHarmony: {\n name: \"mainnetHarmony\",\n color: \"#00b0ef\",\n chainId: 1666600000,\n blockExplorer: \"https://explorer.harmony.one/\",\n rpcUrl: `https://api.harmony.one`,\n gasPrice: 1000000000,\n },\n fantom: {\n name: \"fantom\",\n color: \"#1969ff\",\n chainId: 250,\n blockExplorer: \"https://ftmscan.com/\",\n rpcUrl: `https://rpcapi.fantom.network`,\n gasPrice: 1000000000,\n },\n testnetFantom: {\n name: \"testnetFantom\",\n color: \"#1969ff\",\n chainId: 4002,\n blockExplorer: \"https://testnet.ftmscan.com/\",\n rpcUrl: `https://rpc.testnet.fantom.network`,\n gasPrice: 1000000000,\n faucet: \"https://faucet.fantom.network/\",\n },\n};\n\nexport const NETWORK = chainId => {\n for (const n in NETWORKS) {\n if (NETWORKS[n].chainId === chainId) {\n return NETWORKS[n];\n }\n }\n};\n"],"sourceRoot":""}