{"version":3,"sources":["components/CommonItem.tsx","constants/misc.ts","utils/getExplorerLink.ts","components/Loader.tsx","components/WalletConnectButton/Row/index.tsx","constants/yamato.ts","assets/images/metamask_logo.png","utils/getLibrary.ts","constants/chains.ts","assets/svg/arbitrum_logo.svg","assets/svg/optimistic_ethereum.svg","assets/images/ethereum_logo.png","assets/images/txjp_logo.png","utils/web3.ts","assets/images/cjpy_logo.png","utils/userAgent.ts","hooks/web3.ts","components/WalletConnectButton/AccountDetails/index.tsx","components/WalletConnectButton/AccountDetails/Copy.tsx","hooks/useCopyClipboard.ts","components/WalletConnectButton/AccountDetails/TransactionSummary.tsx","components/WalletConnectButton/AccountDetails/Transaction.tsx","i18n/configs.ts","components/Web3ReactManager.tsx","utils/bignumber.ts","utils/prices.ts","state/yamato-entirety/hooks.ts","components/TerminologyPopover/index.tsx","components/Dashboard/Item.tsx","components/Dashboard/index.tsx","components/svgs/ArrowYen.js","components/svgs/spring-with-props/Spring0.js","components/svgs/spring-with-props/SpringMinus1.js","components/svgs/spring-with-props/SpringMinus10.js","components/svgs/spring-with-props/SpringMinus2.js","components/svgs/spring-with-props/SpringMinus3.js","components/svgs/spring-with-props/SpringMinus4.js","components/svgs/spring-with-props/SpringMinus5.js","components/svgs/spring-with-props/SpringMinus6.js","components/svgs/spring-with-props/SpringMinus7.js","components/svgs/spring-with-props/SpringMinus8.js","components/svgs/spring-with-props/SpringMinus9.js","components/svgs/spring-with-props/SpringPlus1.js","components/svgs/spring-with-props/SpringPlus10.js","components/svgs/spring-with-props/SpringPlus2.js","components/svgs/spring-with-props/SpringPlus3.js","components/svgs/spring-with-props/SpringPlus4.js","components/svgs/spring-with-props/SpringPlus5.js","components/svgs/spring-with-props/SpringPlus6.js","components/svgs/spring-with-props/SpringPlus7.js","components/svgs/spring-with-props/SpringPlus8.js","components/svgs/spring-with-props/SpringPlus9.js","components/Infographics/functions.ts","components/Infographics/CjpyPrice.tsx","assets/svg/sources/eth-change-arrow/eth-change-arrow-zero.svg","components/svgs/eth-change-arrow-with-props/EthChangeArrowDown.js","components/svgs/eth-change-arrow-with-props/EthChangeArrowUp.js","components/Infographics/EthPrice.tsx","components/svgs/battery/Battery10Charge.js","components/svgs/battery/Battery10Discharge.js","components/svgs/battery/Battery1Charge.js","components/svgs/battery/Battery1Discharge.js","components/svgs/battery/Battery2Charge.js","components/svgs/battery/Battery2Discharge.js","components/svgs/battery/Battery3Charge.js","components/svgs/battery/Battery3Discharge.js","components/svgs/battery/Battery4Charge.js","components/svgs/battery/Battery4Discharge.js","components/svgs/battery/Battery5Charge.js","components/svgs/battery/Battery5Discharge.js","components/svgs/battery/Battery6Charge.js","components/svgs/battery/Battery6Discharge.js","components/svgs/battery/Battery7Charge.js","components/svgs/battery/Battery7Discharge.js","components/svgs/battery/Battery8Charge.js","components/svgs/battery/Battery8Discharge.js","components/svgs/battery/Battery9Charge.js","components/svgs/battery/Battery9Discharge.js","components/Infographics/Pool.tsx","components/svgs/thermometer-with-props/Thermometer.js","components/Infographics/Tcr.tsx","components/Infographics/index.tsx","state/pledge/actions.ts","state/pledge/hooks.ts","hooks/useContract.ts","hooks/yamato/helper.ts","state/wallet/actions.ts","state/wallet/hooks.ts","utils/errorToast.ts","components/Pledge/Collateral/DepositInput.tsx","hooks/yamato/useDepositCallback.ts","components/Pledge/Collateral/WithdrawalInput.tsx","hooks/yamato/useWithdrawCallback.ts","components/Pledge/Collateral/index.tsx","components/Pledge/Debt/BorrowingInput.tsx","hooks/yamato/useBorrowCallback.ts","utils/calcFee.ts","components/Pledge/Debt/RepayInput.tsx","hooks/yamato/useRepayCallback.ts","components/Pledge/Debt/index.tsx","components/Pledge/index.tsx","hooks/yamato/useRedemption.ts","components/Redemption/shared/function.ts","components/Redemption/CoreRedemption/RedemptionInput.tsx","components/Redemption/CoreRedemption/index.tsx","components/Redemption/SelfRedemption/RedemptionInput.tsx","components/Redemption/SelfRedemption/index.tsx","components/Redemption/Sweep/SweepInput.tsx","hooks/yamato/useSweep.ts","components/Redemption/Sweep/index.tsx","components/Redemption/index.tsx","components/World/LogViewer/index.tsx","components/World/index.tsx","state/application/actions.ts","assets/images/background_main.webp","constants/about.ts","state/application/hooks.ts","components/svgs/CommunityLogoBlack.js","components/layout/Footer.tsx","state/multicall/actions.ts","state/multicall/utils.ts","state/multicall/hooks.ts","hooks/useDebounce.ts","hooks/ens/useENSName.ts","utils/isZero.ts","components/svgs/CjpyLogo.js","components/WalletConnectButton/CurrencyToggle.tsx","hooks/usePrevious.ts","components/WalletConnectButton/WalletModal/Option.tsx","components/WalletConnectButton/WalletModal/PendingView.tsx","components/WalletConnectButton/WalletModal/index.tsx","components/WalletConnectButton/index.tsx","components/svgs/YamatoLogoWithTitle.js","components/layout/Header.tsx","components/layout/index.tsx","pages/index.tsx","components/tools/InfographicsTool.tsx","pages/tools.tsx","hooks/useIsWindowVisible.ts","state/yamato-entirety/actions.ts","state/yamato-entirety/reducer.ts","utils/fetchState/fetchSubgraph.ts","utils/supportedChainId.ts","utils/addNetwork.ts","utils/switchToNetwork.ts","state/application/updater.ts","hooks/useInterval.ts","utils/fetchState/fetchCjpyPriceFromCurve.ts","state/mockData.ts","state/market/actions.ts","state/market/updater.tsx","state/market/hooks.ts","utils/chunkArray.ts","utils/retry.ts","state/multicall/updater.tsx","utils/fetchState/fetchYamatoEntiretyState.ts","utils/fetchState/fetchPledgeState.ts","utils/fetchState/fetchTokenState.ts","state/pledge/updater.tsx","state/transactions/updater.tsx","state/wallet/updater.tsx","utils/fetchState/fetchEventLogs.ts","state/yamato-entirety/updater.tsx","App.tsx","reportWebVitals.ts","state/application/reducer.ts","state/global/actions.ts","state/market/reducer.ts","state/multicall/reducer.ts","state/pledge/reducer.ts","state/transactions/reducer.ts","state/wallet/reducer.ts","state/index.ts","theme/index.tsx","theme/color.tsx","index.tsx","state/transactions/actions.ts","state/hooks.ts","constants/addresses.ts","utils/constructSameAddressMap.ts","state/transactions/hooks.tsx","infrastructures/connectors/NetworkConnector.ts","infrastructures/connectors/index.ts","assets/svg/arrow-right.svg","constants/web3.ts","components/ExternalLink.tsx","constants/api.ts"],"names":["Text","styled","span","theme","text1","CategoryTitle","h2","text2","ButtonInHeaderBox1","button","popoverBorderColor","ItemTitleForPledge","label","width","marginTop","ItemTitleForInfographics","ItemTitleValue","p","boxStyle","color","backgroundColor","border","boxSizing","boxShadow","HeaderBox1","props","style","height","paddingLeft","HeaderBox2","ConentBox","CustomFormLabel","fontStyle","fontWeight","fontSize","lineHeight","text","CustomInput","borderRadius","textAlign","background","maxWidth","CustomButton","children","NetworkContextName","IS_IN_IFRAME","window","parent","BIPS_BASE","JSBI","BigInt","Percent","ExplorerDataType","ETHERSCAN_PREFIXES","SupportedChainId","MAINNET","GOERLI","SEPOLIA","OPTIMISM","OPTIMISTIC_KOVAN","getExplorerLink","chainId","data","type","ARBITRUM_ONE","TRANSACTION","ADDRESS","TOKEN","BLOCK","ARBITRUM_RINKEBY","prefix","rotate","keyframes","StyledSVG","svg","size","stroke","text0","Loader","rest","viewBox","fill","xmlns","d","strokeWidth","strokeLinecap","strokeLinejoin","Row","Box","align","justify","padding","RowBetween","AutoRow","div","gap","RowFixed","YAMATO_SYMBOL","COLLATERAL","YEN","GOVERNANCE","GOVERNANCE_LOCK","TXJP","LOG_EVENT_NAME","deposit","withdrawal","borrowing","repay","governance_lock","governance_extension","governance_withdrawal","self_redemption","core_redemption","sweep","REVERT_REASON_DESCRIPTION","default","depositShortage","transferFailure","underMCR","withdrawLock","notFlashLoan","nonPledge","noSweepReserve","noRedeemablePledge","noSweepablePledge","zeroRepay","overDebt","overBalance","zeroFee","insufficientBorrowing","notGoverner","notTester","justReverted","walletRejected","zeroInput","ErrorToastConfig","title","status","duration","position","isClosable","MIN_COLLATERAL","NETWORK_POLLING_INTERVALS","getLibrary","provider","library","Web3Provider","parseInt","pollingInterval","detectNetwork","then","network","networkPollingInterval","console","debug","ALL_SUPPORTED_CHAIN_IDS","L1_CHAIN_IDS","L2_CHAIN_IDS","CHAIN_INFO","blockWaitMsBeforeWarning","bridge","docs","explorer","infoLink","logoUrl","arbitrumLogoUrl","nativeCurrency","name","symbol","decimals","rpcUrls","optimismLogoUrl","statusPage","BIGNUMBER_ZERO","BigNumber","from","isAddress","value","getAddress","shortenAddress","address","chars","parsed","Error","substring","getContract","ABI","account","AddressZero","Contract","getSigner","connectUnchecked","getProviderOrSigner","zeros","length","parseEther","ether","includes","integerPart","match","isNegative","exponentialPart","pow","toNumber","e","getMultiplier","Number","mul","ethers","utils","formatEther","wei","formatYen","formatCjpy","getEthBalance","a","getBalance","parser","UAParser","navigator","userAgent","getDevice","isMobile","getResult","useActiveWeb3React","context","useWeb3React","contextNetwork","active","useEagerConnect","activate","useState","tried","setTried","triedSafe","useEffect","injected","isAuthorized","ethereum","undefined","catch","useInactiveListener","suppress","error","on","handleChainChanged","handleAccountsChanged","accounts","removeListener","HeaderRow","flexRowNoWrap","mediaWidth","upToMedium","UpperSection","InfoCard","bg0","AccountGroupingRow","AccountSection","YourAccount","TokenSection","LowerSection","flexColumnNoWrap","bg2","AccountControl","AddressLink","ExternalLink","ClearButton","WalletName","TransactionListWrapper","WalletAction","Button","renderTokenButton","logo","currency","onClick","handeAddToken","spacing","src","MetamaskIcon","renderTransactions","transactions","map","hash","i","getToken","options","CJPY_ADDRESSES","image","CJPYLogo","TXJP_ADDRESSES","TXJPLogo","stopPropagation","global","request","method","params","AccountDetails","pendingTransactions","confirmedTransactions","ENSName","openOptions","connector","dispatch","useDispatch","clearAllTransactionsCallback","useCallback","clearAllTransactions","isMetaMask","Object","keys","SUPPORTED_WALLETS","filter","k","formatConnectorName","id","toCopy","marginLeft","hasENS","isENS","href","CopyIcon","LinkStyledButton","TransactionStatusText","CopyHelper","timeout","isCopied","setIsCopied","staticCopy","didCopy","copy","hide","setTimeout","clearTimeout","useCopyClipboard","setCopied","DepositSummary","info","WithdrawSummary","BorrowSummary","RepaySummary","SelfRedeemSummary","t","useTranslation","expected","CoreRedeemSummary","SweepSummary","TransactionSummary","TransactionType","DEPOSIT","WITHDRAW","BORROW","REPAY","SELF_REDEEM","CORE_REDEEM","SWEEP","TransactionState","IconWrapper","pending","success","Transaction","allTransactions","useAllTransactions","tx","receipt","resources","ja","translation","en","translation_en","i18next","use","initReactI18next","init","lng","preload","interpolation","escapeValue","MessageWrapper","Message","Web3ReactManager","networkActive","networkError","activateNetwork","triedEager","showLoader","setShowLoader","addToNum","v1","v2","getBigNumber","b","plus","add","subtractToNum","minus","subtract","multiplyToNum","times","multiply","divideToNum","divide","val","Big","formatPrice","isZeroByRound","decimalDigits","base","flooredValue","Math","floor","fixedValue","toFixed","format","numbers","split","s","ret","replace","formatCollateralizationRatio","collateral","debt","min","toLocaleString","maximumFractionDigits","getEthChangePercent","current","previous","useYamatoStateForPledge","useSelector","state","rateOfEthJpy","yamatoEntirety","redemptionReserve","pool","sweepReserve","redeemableCandidate","pledges","sweepableCandiate","sweepableCandidate","MCR","parameter","GRR","firstLoadCompleted","createRateOfCjpyJpy","rateOfCjpyEth","entries","sort","amount","convertCjpyToEth","TerminologyPopover","isLazy","closeOnEsc","placement","bgColor","borderColor","borderWidth","textColor","StyledItemTitleForPledge","StyledItemTitleValue","DashboardItem","stat","getMarketRateOfCjpyJpy","rateOfCjpyJpy","getDeviationRate","deviationRate","Dashboard","totalSupplyOfCjpy","token","cjpy","totalSupply","tvl","lending","tcr","market","ethChangePercent","prevRateOfEthJpy","cjpyAddress","useMemo","getExternalLink","exchangeName","templateColumns","md","colSpan","SvgArrowYen","SvgSpring0","springcolor","SvgSpringMinus1","SvgSpringMinus10","SvgSpringMinus2","SvgSpringMinus3","SvgSpringMinus4","SvgSpringMinus5","SvgSpringMinus6","SvgSpringMinus7","SvgSpringMinus8","SvgSpringMinus9","SvgSpringPlus1","SvgSpringPlus10","SvgSpringPlus2","SvgSpringPlus3","SvgSpringPlus4","SvgSpringPlus5","SvgSpringPlus6","SvgSpringPlus7","SvgSpringPlus8","SvgSpringPlus9","getBrightnessPerEth","ethPriceRank","abs","getReserveRank","reserveAmount","baseNumber","getTcrRate","switchSpring","cjpyPriceRank","colorCode","springColor","SpringMinus10","SpringMinus9","SpringMinus8","SpringMinus7","SpringMinus6","SpringMinus5","SpringMinus4","SpringMinus3","SpringMinus2","SpringMinus1","Spring0","SpringPlus1","SpringPlus2","SpringPlus3","SpringPlus4","SpringPlus5","SpringPlus6","SpringPlus7","SpringPlus8","SpringPlus9","SpringPlus10","CjpyPrice","colorCodePerTcr","brightness","switchBackgroundColor","margin","SvgEthChangeArrowDown","SvgEthChangeArrowUp","renderArrow","svgProps","ArrowZero","paddingBottom","EthPrice","ethPrice","display","alignItems","justifyContent","SvgBattery10Charge","rx","x","y","SvgBattery10Discharge","SvgBattery1Charge","SvgBattery1Discharge","SvgBattery2Charge","SvgBattery2Discharge","SvgBattery3Charge","SvgBattery3Discharge","SvgBattery4Charge","SvgBattery4Discharge","SvgBattery5Charge","SvgBattery5Discharge","SvgBattery6Charge","SvgBattery6Discharge","SvgBattery7Charge","SvgBattery7Discharge","SvgBattery8Charge","SvgBattery8Discharge","SvgBattery9Charge","SvgBattery9Discharge","BatteryContainer","BatterySvgWrapper","renderBattery","reserveRank","isDecrease","svgProps2","Battery1Discharge","Battery1Charge","Battery2Discharge","Battery2Charge","Battery3Discharge","Battery3Charge","Battery4Discharge","Battery4Charge","Battery5Discharge","Battery5Charge","Battery6Discharge","Battery6Charge","Battery7Discharge","Battery7Charge","Battery8Discharge","Battery8Charge","Battery9Discharge","Battery9Charge","Battery10Discharge","Battery10Charge","Pool","reserveRankOfRedemption","isDecreaseForRedemptionReserve","reserveRankOfSweep","isDecreaseForSweepReserve","SvgThermometer","x1","y1","x2","y2","gradientUnits","offset","stopColor","transform","rate","InkscapeFontSpecification","fontFamily","letterSpacing","wordSpacing","dx","dy","Tcr","Thermometer","getCjpyRank","cjpyPrice","fixedPrice","getCjpyPriceRank","InfographicsHelp","InfographicsContent","yamatoState","totalCollateral","totalDebt","prevRedemptionReserve","prevSweepReserve","isRedeemablePledge","mixedValues","fixedTcr","hasOwnProperty","changePercent","getEthPriceRank","getColorCodePerTcr","renderSignalMessages","messages","push","getSignalMessages","message","index","minHeight","marginBottom","Infographics","fetchMyPledge","createAction","reset","usePledgeData","pledge","list","toLowerCase","useContract","addressOrAddressMap","withSignerIfPossible","ZERO_ADDRESS","useYamatoMainContract","YAMATO_MAIN_ADDRESSES","YAMATO_MAIN_ABI","useCjpyContract","CJPY_ABI","CallbackState","InvalidCallback","INVALID","callback","swapErrorToUserReadableMessage","reason","Boolean","originalError","indexOf","substr","defaultMessage","getErrorMessage","methodName","code","estimateGas","option","signer","withdraw","borrow","redeem","gasEstimate","calculateGasMargin","gasError","fetchWallet","useWalletState","wallet","eth","errorToast","toast","createStandaloneToast","description","JSON","stringify","config","DepositInput","yamatoMainContract","addTransaction","useTransactionAdder","VALID","toString","eq","connect","call","gasLimit","response","useDepositCallback","setDeposit","validateDeposit","submitDeposit","values","formikHelpers","res","resetForm","initialValues","onSubmit","formikProps","errors","touched","validate","field","isInvalid","htmlFor","placeholder","data-testid","isLoading","isSubmitting","isDisabled","minWidth","WithdrawalInput","useWithdrawCallback","setWithdrawal","validateWithdrawal","submitWithdrawal","form","variant","setFieldValue","Collateral","my","mt","ml","BorrowingInput","useBorrowCallback","setBorrowing","feeResult","fee","feeRate","ICR","borrowingAmount","ICRperTenk","calcFee","validateBorrowing","sum","submitBorrowing","RepayInput","useRepayCallback","repayment","setRepayment","validateRepayment","submitRepayment","getBorrowableAmount","collateralBasedJpy","MCR2","Debt","templateRows","Pledge","borderBottom","useRedeemCallback","isCore","getExpectedReward","candidateAmount","convertEthFromCjpy","getEthAmountFromCjpy","amountOfCjpy","amountOfJpy","RedemptionInput","formattedRedeemableCandidate","formattedRedemptionReserve","expectedReward","submitRedemption","redemption","sm","mb","colorScheme","CoreRedemption","setRedemption","validateRedemption","SelfRedemption","SweepInput","useSweepCallback","submitSweep","Sweep","Redemption","Animation","LogViewer","events","slice","overflowY","TransitionGroup","event","category","getColor","descriptor","getDescriptor","CSSTransition","classNames","renderLogEvents","World","ApplicationModal","ReferenceList","updateChainId","updateBlockNumber","setOpenModal","setImplements3085","setChainConnectivityWarning","useBlockNumber","useAppSelector","application","blockNumber","useModalOpen","modal","openModal","useWalletModalToggle","open","useAppDispatch","useToggleModal","WALLET","SvgCommunityLogoBlack","InkscapeStroke","FooterItem","StyledPollingNumber","breathe","Footer","isMounting","setIsMounting","mountingTimer","flexWrap","CommunityLogoBlack","target","rel","addMulticallListeners","removeMulticallListeners","fetchingMulticallResults","errorFetchingMulticallResults","updateMulticallResults","toCallKey","key","callData","gasRequired","isSafeInteger","parseCallKey","callKey","pcs","isMethodArg","isBigNumber","isValidMethodArgs","Array","isArray","every","xi","INVALID_RESULT","valid","useCallsData","calls","blocksPerFetch","callResults","multicall","serializedCallKeys","c","callKeys","parse","result","INVALID_CALL_STATE","loading","syncing","LOADING_CALL_STATE","toCallState","callResult","contractInterface","fragment","latestBlockNumber","decodeFunctionResult","useSingleContractMultipleData","contract","callInputs","interface","getFunction","callDatas","callInput","encodeFunctionData","results","useSingleCallResult","inputs","useDebounce","delay","debouncedValue","setDebouncedValue","handler","useENSName","debouncedAddress","ensNodeArgument","namehash","resolverAddress","ENS_REGISTRAR_ADDRESSES","ENS_ABI","resolverAddressResult","ENS_PUBLIC_RESOLVER_ABI","useENSResolverContract","test","changed","SvgCjpyLogo","aria-label","CurrencyToggleButton","text3","CurrencyToggle","useBreakpointValue","mainFontSize","flexDirection","FlexText","usePrevious","ref","useRef","OptionCard","OptionCardLeft","OptionCardClickable","bg1","clickable","disabled","GreenCircle","CircleWrapper","HeaderText","SubHeader","Option","link","header","subheader","icon","content","alt","PendingSection","LoadingMessage","ErrorGroup","ErrorButton","LoadingWrapper","PendingView","setPendingError","tryActivation","isMetamask","iconURL","Wrapper","ContentWrapper","OptionGrid","HoverText","WALLET_VIEWS","WalletModal","walletView","setWalletView","pendingWallet","setPendingWallet","pendingError","walletModalOpen","toggleWalletModal","previousAccount","activePrevious","connectorPrevious","WalletConnectConnector","walletConnectProvider","wc","uri","UnsupportedChainIdError","getOptions","web3","mobile","mobileOnly","isOpen","onClose","WalletText","WalletButton","RebassButton","ResponsiveWalletText","ChainInfo","marginRight","newTransactionsFirst","addedTime","Web3StatusInner","isTransactionRecent","hasPendingTransactions","Web3Status","sortedRecentTransactions","confirmed","SvgYamatoLogoWithTitle","LanguageButton","TranslateIcon","BsTranslate","LanguageListButton","LangugeChange","history","useHistory","changeLanguage","lang","currentPath","location","pathname","trigger","MobileNav","useLocation","isActiveLink","path","pointerEvents","opacity","mx","pt","Header","useDisclosure","onOpen","currentSearch","search","px","top","zIndex","bg","maxW","as","py","lg","boxSize","Layout","Helmet","flexShrink","backgroundImage","BackgroundImage","flex","pb","Index","className","InputField","formik","onChange","onChangeHandler","parseFloat","isNaN","InfographicsTool","rowSpan","manual","Tools","VISIBILITY_STATE_SUPPORTED","document","isWindowVisible","visibilityState","useIsWindowVisible","focused","setFocused","listener","addEventListener","removeEventListener","fetchYamatoState","fetchTokenState","fetchRateOfEthJpy","fetchEvents","initialState","ymt","veYmt","boostRate","farmingScore","RRR","SRR","createReducer","builder","addCase","payload","newState","additionals","newEvent","some","concat","date","logIndex","cache","yamatoEntiretyState","deepCopy","currentStateQuery","gql","fetchSubgraph","activeChainId","DEFAULT_CHAINID","endpoint","SUBGRAPH_YAMATO_URLS","variables","worldStates","transformWorldStates","transformEvents","sweepablePledges","transformSweepablePledges","myPledge","transformMyPledge","worldState","lastPrice","totalColl","totalSupplyCjpy","ethAmount","borrowedCjpyAmount","cjpyAmount","isCoreRedemption","gasCompensationAmount","reduce","prev","curr","supportedChainId","addNetwork","formattedChainId","hexStripZeros","toHexString","chainName","blockExplorerUrls","switchToNetwork","getNetwork","DEFAULT_MS_BEFORE_WARNING","Updater","windowVisible","setState","chainConnectivityWarningActive","chainConnectivityWarning","msSinceLastBlock","setMsSinceLastBlock","currentBlock","waitMsBeforeWarning","warn","useBlockWarningTimer","blockNumberCallback","max","getBlockNumber","debouncedState","resetOfYamato","resetOfPledge","implements3085","useInterval","leading","savedCallback","tick","setInterval","clearInterval","curvePoolContract","ONE_ETH","get_dy","price","isZero","formattedPrice","formatUnits","random","mockState","mockYamatoEntirety","yamatoParams","mockTokenTotalSupply","mockWalletBalance","mockPledge","mockAddress","S","join","fetchRateOfCjpyEth","isUseMock","process","CURVE_POOL_ADDRESS","CURVE_POOL_ABI","dispatchFetchRateOfCjpyEth","source","useFetchRateOfCjpyEth","updateRates","fetchCjpyPriceFromCurve","DEFAULT_GAS_REQUIRED","waitRandom","ms","round","Promise","resolve","CancelledError","isCancelledError","RetryableError","isRetryableError","retry","fn","rejectCancelled","n","minWait","maxWait","completed","promise","reject","cancel","chunk","callStatic","obj","blockTag","returnData","debouncedListeners","callListeners","multicall2Contract","MULTICALL_ADDRESS","MulticallABI","cancellations","listeningKeys","allListeners","listeners","memo","keyListeners","previousMin","Infinity","activeListeningKeys","unserializedOutdatedCallKeys","minDataBlockNumber","fetchingBlockNumber","outdatedListeningKeys","serializedOutdatedCallKeys","outdatedCallKeys","chunkedCalls","items","CONSERVATIVE_BLOCK_GAS_LIMIT","chunks","currentChunk","currentChunkCumulativeGas","item","chunkArray","forEach","fetchChunk","firstCallKeyIndex","lastCallKeyIndex","erroredCalls","fetchYamatoEntiretyStateFromContract","contracts","getYamatoMainResults","yamatoMainResults","getYamatoPoolResults","yamatoPoolContract","yamatoPoolResults","getYamatoPriceFeedResults","yamatoPriceFeedContract","yamatoPriceFeedResults","getYamatoPriorityRegistryResults","yamatoPriorityRegistryContract","yamatoPriorityRegistryResults","fetchRedeemablPledges","getStates","getPrice","getRedeemablesCap","getSweepablesCap","fetchPledgeStateFromContract","getIndividualStates","indivisualStates","fetchTotalSupply","cjpyContract","fetchTokenBalanceOf","balanceOf","initialPledgeParams","dispatchFetchMyPledge","useFetchMyPledge","isEnableSubgraph","RETRY_OPTIONS_BY_CHAIN_ID","DEFAULT_RETRY_OPTIONS","lastBlockNumber","isL2","getReceipt","getTransactionReceipt","cancels","lastCheckedBlockNumber","blocksSinceCheck","minutesPending","Date","getTime","shouldCheck","finalizeTransaction","blockHash","contractAddress","to","transactionHash","transactionIndex","checkedTransaction","initialWalletParams","dispatchFetchWallet","useFetchWallet","ymtContract","veYmtContract","walletParams","fetchEventLogs","borrowed","filters","Borrowed","withdrawn","Withdrawn","deposited","Deposited","repaid","Repaid","redeemedMeta","RedeemedMeta","swept","Swept","eventFilter","topics","queryFilter","logs","iface","Interface","log","parseLog","args","initialYamatoParams","initialTokenParams","YAMATO_POOL_ADDRESSES","YAMATO_POOL_ABI","YAMATO_PRICE_FEED_ADDRESSES","YAMATO_PRICE_FEED_ABI","YAMATO_PRIORITY_REGISTRY_ADDRESSES","YAMATO_PRIORITY_REGISTRY_ABI","fetch","res2","tokenParams","eventParams","polling","language","URLSearchParams","get","getLanguageFromUrl","App","exact","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","action","updateVersion","now","chainTransactions","txs","confirmedTime","PERSISTED_KEYS","store","configureStore","reducer","middleware","getDefaultMiddleware","thunk","save","states","preloadedState","load","MEDIA_WIDTHS","upToExtraSmall","upToSmall","upToLarge","mediaWidthTemplates","accumulator","css","ThemeProvider","themeObject","warning","grids","ThemedGlobalStyle","createGlobalStyle","Web3ProviderNetwork","createWeb3ReactRoot","autoRefreshOnNetworkChange","ReactDOM","render","StrictMode","getElementById","YMT_ADDRESSES","VEYMT_ADDRESSES","additionalNetworks","constructSameAddressMap","RequestError","MiniRpcProvider","url","batchWaitTimeMs","host","nextId","batchTimeoutId","batch","clearBatch","headers","accept","body","ok","statusText","json","byKey","sendAsync","jsonrpc","this","URL","urls","defaultChainId","invariant","supportedChainIds","providers","currentChainId","AbstractConnector","NETWORK_URLS","InjectedConnector","INJECTED","INJECTED_ICON_URL","primary","METAMASK","METAMASK_ICON_URL","StyledLink","LinkIconFeather","handleClick","ctrlKey","metaKey","preventDefault","INFURA_KEY","ENABLE_SUBGRAPH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H,IAAiBU,aAChB,0EANyD,cAO1DV,IAAiBI,SAChB,0EAGyD,mBAC1DJ,IAAiBC,QAAU,IAD+B,cAE1DD,IAAiBE,OAAS,IAFgC,cAG1DF,IAAiBG,QAAU,IAH+B,cAI1DH,IAAiBU,aAChB,0EALyD,cAM1DV,IAAiBI,SAChB,4E","file":"static/js/main.b5bb1fbe.chunk.js","sourcesContent":["import { Box } from '@chakra-ui/layout';\nimport {\n Button,\n ButtonProps,\n FormLabel,\n Input,\n InputProps,\n} from '@chakra-ui/react';\nimport styled from 'styled-components';\n\nexport const Text = styled.span`\n font-style: normal;\n font-weight: 500;\n font-size: 1.4rem;\n line-height: 1.6rem;\n color: ${({ theme }) => theme.text1};\n`;\n\nexport const CategoryTitle = styled.h2`\n color: ${({ theme }) => theme.text2};\n font-style: normal;\n font-weight: bold;\n font-size: 1.8rem;\n line-height: 2.1rem;\n`;\n\nexport const headerBox1Color = '#5bad92';\n\nexport const ButtonInHeaderBox1 = styled.button`\n color: ${headerBox1Color};\n background-color: ${({ theme }) => theme.text2};\n font-style: normal;\n font-weight: bold;\n font-size: 1.6rem;\n line-height: 2.1rem;\n border-radius: 30%;\n padding: 0 0.3em 0 0.3em;\n box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.25);\n`;\n\nexport const popoverBorderColor = '#A0CFC0';\n\n/**\n * ItemTitle\n */\nexport const ItemTitleForPledge = styled.label<{\n width?: string;\n marginTop?: number;\n}>`\n width: ${({ width }) => width ?? '150px'};\n color: ${({ theme }) => theme.text1};\n margin-top: ${({ marginTop }) => marginTop ?? 0}px;\n display: inline-block;\n font-style: normal;\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.6rem;\n white-space: normal;\n overflow: hidden;\n text-overflow: ellipsis;`;\n\nexport const ItemTitleForInfographics = styled.label<{\n marginTop?: number;\n}>`\n font-style: normal;\n font-weight: bold;\n font-size: 1.2rem;\n line-height: 1.4rem;\n color: ${({ theme }) => theme.text1};\n`;\n\nexport const ItemTitleValue = styled.p<{\n width?: string;\n marginTop?: number;\n}>`\n width: ${({ width }) => width ?? '100%'};\n color: ${({ theme }) => theme.text1};\n margin-top: ${({ marginTop }) => marginTop ?? 0}px;\n display: inline-block;\n font-style: normal;\n font-weight: bold;\n font-size: 1.4rem;\n line-height: 1.6rem;\n`;\n\n/**\n * Box\n */\nconst boxStyle = (color: string) => ({\n backgroundColor: `${color}`,\n border: `1px solid ${color}`,\n boxSizing: 'border-box',\n boxShadow: '3px 3px 0px rgba(0, 0, 0, 0.25)',\n});\n\nexport function HeaderBox1(props: any) {\n return (\n \n );\n}\n\nexport function HeaderBox2(props: any) {\n return (\n \n );\n}\n\nexport function ConentBox(props: any) {\n return (\n \n );\n}\n\n/**\n * Form\n */\nexport function CustomFormLabel(props: {\n text: string;\n htmlFor?: string;\n children?: string;\n}) {\n return (\n \n {props.text}\n \n );\n}\n\nexport function CustomInput(\n props: {\n children?: string;\n } & InputProps\n) {\n return (\n \n );\n}\n\nexport function CustomButton(\n props: {\n isLoading?: boolean;\n children: string;\n } & ButtonProps\n) {\n return (\n \n {props.children}\n \n );\n}\n","import { Percent } from '@uniswap/sdk-core';\nimport JSBI from 'jsbi';\n\nexport const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';\n\nexport const NetworkContextName = 'NETWORK';\n\nexport const IS_IN_IFRAME = window.parent !== window;\n\n// 30 minutes, denominated in seconds\nexport const DEFAULT_DEADLINE_FROM_NOW = 60 * 30;\nexport const L2_DEADLINE_FROM_NOW = 60 * 5;\n\n// transaction popup dismisal amounts\nexport const DEFAULT_TXN_DISMISS_MS = 25000;\nexport const L2_TXN_DISMISS_MS = 5000;\n\n// used for rewards deadlines\nexport const BIG_INT_SECONDS_IN_WEEK = JSBI.BigInt(60 * 60 * 24 * 7);\n\nexport const BIG_INT_ZERO = JSBI.BigInt(0);\n\n// one basis JSBI.BigInt\nconst BIPS_BASE = JSBI.BigInt(10000);\nexport const ONE_BIPS = new Percent(JSBI.BigInt(1), BIPS_BASE);\n\n// used for warning states\nexport const ALLOWED_PRICE_IMPACT_LOW: Percent = new Percent(\n JSBI.BigInt(100),\n BIPS_BASE\n); // 1%\nexport const ALLOWED_PRICE_IMPACT_MEDIUM: Percent = new Percent(\n JSBI.BigInt(300),\n BIPS_BASE\n); // 3%\nexport const ALLOWED_PRICE_IMPACT_HIGH: Percent = new Percent(\n JSBI.BigInt(500),\n BIPS_BASE\n); // 5%\n// if the price slippage exceeds this number, force the user to type 'confirm' to execute\nexport const PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN: Percent = new Percent(\n JSBI.BigInt(1000),\n BIPS_BASE\n); // 10%\n// for non expert mode disable swaps above this\nexport const BLOCKED_PRICE_IMPACT_NON_EXPERT: Percent = new Percent(\n JSBI.BigInt(1500),\n BIPS_BASE\n); // 15%\n\nexport const BETTER_TRADE_LESS_HOPS_THRESHOLD = new Percent(\n JSBI.BigInt(50),\n BIPS_BASE\n);\n\nexport const ZERO_PERCENT = new Percent('0');\nexport const TWO_PERCENT = new Percent(JSBI.BigInt(200), BIPS_BASE);\nexport const ONE_HUNDRED_PERCENT = new Percent('1');\n","import { SupportedChainId } from '../constants/chains';\n\nconst ETHERSCAN_PREFIXES: { [chainId: number]: string } = {\n [SupportedChainId.MAINNET]: '',\n [SupportedChainId.GOERLI]: 'goerli.',\n [SupportedChainId.SEPOLIA]: 'sepolia.',\n [SupportedChainId.OPTIMISM]: 'optimistic.',\n [SupportedChainId.OPTIMISTIC_KOVAN]: 'kovan-optimistic.',\n};\n\nexport enum ExplorerDataType {\n TRANSACTION = 'transaction',\n TOKEN = 'token',\n ADDRESS = 'address',\n BLOCK = 'block',\n}\n\n/**\n * Return the explorer link for the given data and data type\n * @param chainId the ID of the chain for which to return the data\n * @param data the data to return a link for\n * @param type the type of the data\n */\nexport function getExplorerLink(\n chainId: number,\n data: string,\n type: ExplorerDataType\n): string {\n if (chainId === SupportedChainId.ARBITRUM_ONE) {\n switch (type) {\n case ExplorerDataType.TRANSACTION:\n return `https://arbiscan.io/tx/${data}`;\n case ExplorerDataType.ADDRESS:\n case ExplorerDataType.TOKEN:\n return `https://arbiscan.io/address/${data}`;\n case ExplorerDataType.BLOCK:\n return `https://arbiscan.io/block/${data}`;\n default:\n return `https://arbiscan.io/`;\n }\n }\n\n if (chainId === SupportedChainId.ARBITRUM_RINKEBY) {\n switch (type) {\n case ExplorerDataType.TRANSACTION:\n return `https://rinkeby-explorer.arbitrum.io/tx/${data}`;\n case ExplorerDataType.ADDRESS:\n case ExplorerDataType.TOKEN:\n return `https://rinkeby-explorer.arbitrum.io/address/${data}`;\n case ExplorerDataType.BLOCK:\n return `https://rinkeby-explorer.arbitrum.io/block/${data}`;\n default:\n return `https://rinkeby-explorer.arbitrum.io/`;\n }\n }\n\n const prefix = `https://${ETHERSCAN_PREFIXES[chainId] ?? ''}etherscan.io`;\n\n switch (type) {\n case ExplorerDataType.TRANSACTION:\n return `${prefix}/tx/${data}`;\n\n case ExplorerDataType.TOKEN:\n return `${prefix}/token/${data}`;\n\n case ExplorerDataType.BLOCK:\n if (\n chainId === SupportedChainId.OPTIMISM ||\n chainId === SupportedChainId.OPTIMISTIC_KOVAN\n ) {\n return `${prefix}/tx/${data}`;\n }\n return `${prefix}/block/${data}`;\n\n case ExplorerDataType.ADDRESS:\n return `${prefix}/address/${data}`;\n default:\n return `${prefix}`;\n }\n}\n","import React from 'react';\n\nimport styled, { keyframes } from 'styled-components';\n\nconst rotate = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`;\n\nconst StyledSVG = styled.svg<{ size: string; stroke?: string }>`\n animation: 2s ${rotate} linear infinite;\n height: ${({ size }) => size};\n width: ${({ size }) => size};\n path {\n stroke: ${({ stroke, theme }) => stroke ?? theme.text0};\n }\n`;\n\n/**\n * Takes in custom size and stroke for circle color, default to primary color as fill,\n * need ...rest for layered styles on top\n */\nexport default function Loader({\n size = '16px',\n stroke = '#FCFAF2',\n ...rest\n}: {\n size?: string;\n stroke?: string;\n [k: string]: any;\n}) {\n return (\n \n \n \n );\n}\n","import { Box } from 'rebass/styled-components';\nimport styled from 'styled-components/macro';\n\nconst Row = styled(Box)<{\n width?: string;\n align?: string;\n justify?: string;\n padding?: string;\n border?: string;\n borderRadius?: string;\n}>`\n width: ${({ width }) => width ?? '100%'};\n display: flex;\n padding: 0;\n align-items: ${({ align }) => align ?? 'center'};\n justify-content: ${({ justify }) => justify ?? 'flex-start'};\n padding: ${({ padding }) => padding};\n border: ${({ border }) => border};\n border-radius: ${({ borderRadius }) => borderRadius};\n`;\n\nexport const RowBetween = styled(Row)`\n justify-content: space-between;\n`;\n\nexport const RowFlat = styled.div`\n display: flex;\n align-items: flex-end;\n`;\n\nexport const AutoRow = styled(Row)<{ gap?: string; justify?: string }>`\n flex-wrap: wrap;\n margin: ${({ gap }) => gap && `-${gap}`};\n justify-content: ${({ justify }) => justify && justify};\n\n & > * {\n margin: ${({ gap }) => gap} !important;\n }\n`;\n\nexport const RowFixed = styled(Row)<{ gap?: string; justify?: string }>`\n width: fit-content;\n margin: ${({ gap }) => gap && `-${gap}`};\n`;\n\nexport default Row;\n","import { UseToastOptions } from '@chakra-ui/toast';\nimport { LogEventType } from '../state/yamato-entirety/reducer';\n\nexport const YAMATO_SYMBOL = {\n COLLATERAL: 'ETH',\n YEN: 'CJPY',\n GOVERNANCE: 'YMT',\n GOVERNANCE_LOCK: 'veYMT',\n TXJP: 'TXJP',\n};\n\nexport const LOG_EVENT_NAME: {\n [eventType in LogEventType]: string;\n} = {\n deposit: '預入',\n withdrawal: '引出',\n borrowing: '借入',\n repay: '返済',\n governance_lock: 'YMTロック',\n governance_extension: 'YMT延長',\n governance_withdrawal: 'YMT引出',\n self_redemption: '償還',\n core_redemption: 'Yamato償還',\n sweep: 'Yamato代位弁済',\n};\n\nexport const REVERT_REASON_DESCRIPTION = {\n // yamato\n default: 'Unknown error occurred',\n depositShortage: 'Collateral is insufficient',\n transferFailure: 'Transfer failed within the contract.',\n underMCR: 'Below the minimum collateral rate.',\n withdrawLock: 'Withdraw is locked.',\n notFlashLoan: 'This operation cannot be performed on the same block.',\n nonPledge: 'The pledge has not yet been made.',\n noSweepReserve: 'Liquidation Pool is empty.',\n noRedeemablePledge: 'There is no redeemable pledge.',\n noSweepablePledge: 'There is no pledge that can be repaid.',\n zeroRepay: 'The repayment volume is 0.',\n overDebt: 'The repayment volume exceeds the borrow balance.',\n overBalance: 'The specified amount exceeds the balance held.',\n zeroFee: 'The commission fee is zero.',\n insufficientBorrowing: 'Fees exceed the amount borrowed.',\n // authority\n notGoverner: 'You are not a governor.',\n notTester: 'You are not a tester.',\n // others\n justReverted: 'An unknown error has occurred. Or please switch networks.',\n walletRejected: 'Transmission has been canceled.',\n zeroInput: 'Input value is 0. Or too small.',\n};\n\nexport const ErrorToastConfig: UseToastOptions = {\n title: 'Transaction failed',\n status: 'error',\n duration: 15000,\n position: 'top',\n isClosable: true,\n};\n\nexport const MIN_COLLATERAL = 0.1;\n","export default __webpack_public_path__ + \"static/media/metamask_logo.02e3ec27.png\";","import { Web3Provider } from '@ethersproject/providers';\nimport ms from 'ms.macro';\nimport { SupportedChainId } from '../constants/chains';\n\nconst NETWORK_POLLING_INTERVALS: { [chainId: number]: number } = {\n [SupportedChainId.ARBITRUM_ONE]: ms`1s`,\n [SupportedChainId.ARBITRUM_RINKEBY]: ms`1s`,\n [SupportedChainId.OPTIMISM]: ms`1s`,\n [SupportedChainId.OPTIMISTIC_KOVAN]: ms`1s`,\n};\n\nexport default function getLibrary(provider: any): Web3Provider {\n const library = new Web3Provider(\n provider,\n typeof provider.chainId === 'number'\n ? provider.chainId\n : typeof provider.chainId === 'string'\n ? parseInt(provider.chainId)\n : 'any'\n );\n library.pollingInterval = 5_000;\n library.detectNetwork().then((network) => {\n const networkPollingInterval = NETWORK_POLLING_INTERVALS[network.chainId];\n if (networkPollingInterval) {\n console.debug('Setting polling interval', networkPollingInterval);\n library.pollingInterval = networkPollingInterval;\n }\n });\n return library;\n}\n","import ms from 'ms.macro';\nimport ethereumLogoUrl from '../assets/images/ethereum_logo.png';\nimport arbitrumLogoUrl from '../assets/svg/arbitrum_logo.svg';\nimport optimismLogoUrl from '../assets/svg/optimistic_ethereum.svg';\n\nexport enum SupportedChainId {\n MAINNET = 1,\n GOERLI = 5,\n SEPOLIA = 11155111,\n ARBITRUM_ONE = 42161,\n ARBITRUM_RINKEBY = 421611,\n OPTIMISM = 10,\n OPTIMISTIC_KOVAN = 69,\n}\n\nexport const ALL_SUPPORTED_CHAIN_IDS: SupportedChainId[] = [\n SupportedChainId.MAINNET,\n SupportedChainId.GOERLI,\n SupportedChainId.SEPOLIA,\n\n SupportedChainId.ARBITRUM_ONE,\n SupportedChainId.ARBITRUM_RINKEBY,\n SupportedChainId.OPTIMISM,\n SupportedChainId.OPTIMISTIC_KOVAN,\n];\n\nexport const L1_CHAIN_IDS = [\n SupportedChainId.MAINNET,\n SupportedChainId.GOERLI,\n SupportedChainId.SEPOLIA,\n] as const;\n\nexport type SupportedL1ChainId = typeof L1_CHAIN_IDS[number];\n\nexport const L2_CHAIN_IDS = [\n SupportedChainId.ARBITRUM_ONE,\n SupportedChainId.ARBITRUM_RINKEBY,\n SupportedChainId.OPTIMISM,\n SupportedChainId.OPTIMISTIC_KOVAN,\n] as const;\n\nexport type SupportedL2ChainId = typeof L2_CHAIN_IDS[number];\n\nexport interface L1ChainInfo {\n readonly blockWaitMsBeforeWarning?: number;\n readonly docs: string;\n readonly explorer: string;\n readonly infoLink: string;\n readonly label: string;\n readonly logoUrl?: string;\n readonly rpcUrls?: string[];\n readonly nativeCurrency: {\n name: string; // 'Goerli ETH',\n symbol: string; // 'gorETH',\n decimals: number; //18,\n };\n}\nexport interface L2ChainInfo extends L1ChainInfo {\n readonly bridge: string;\n readonly logoUrl: string;\n readonly statusPage?: string;\n}\n\nexport type ChainInfo = {\n readonly [chainId: number]: L1ChainInfo | L2ChainInfo;\n} & {\n readonly [chainId in SupportedL2ChainId]: L2ChainInfo;\n} &\n { readonly [chainId in SupportedL1ChainId]: L1ChainInfo };\n\nexport const CHAIN_INFO: ChainInfo = {\n [SupportedChainId.ARBITRUM_ONE]: {\n blockWaitMsBeforeWarning: ms`10m`,\n bridge: 'https://bridge.arbitrum.io/',\n docs: 'https://offchainlabs.com/',\n explorer: 'https://arbiscan.io/',\n infoLink: 'https://info.uniswap.org/#/arbitrum',\n label: 'Arbitrum',\n logoUrl: arbitrumLogoUrl,\n nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },\n rpcUrls: ['https://arb1.arbitrum.io/rpc'],\n },\n [SupportedChainId.ARBITRUM_RINKEBY]: {\n blockWaitMsBeforeWarning: ms`10m`,\n bridge: 'https://bridge.arbitrum.io/',\n docs: 'https://offchainlabs.com/',\n explorer: 'https://rinkeby-explorer.arbitrum.io/',\n infoLink: 'https://info.uniswap.org/#/arbitrum/',\n label: 'Arbitrum Rinkeby',\n logoUrl: arbitrumLogoUrl,\n nativeCurrency: {\n name: 'Rinkeby ArbETH',\n symbol: 'rinkArbETH',\n decimals: 18,\n },\n rpcUrls: ['https://rinkeby.arbitrum.io/rpc'],\n },\n [SupportedChainId.MAINNET]: {\n docs: 'https://docs.uniswap.org/',\n explorer: 'https://etherscan.io/',\n infoLink: 'https://info.uniswap.org/#/',\n label: 'Ethereum',\n logoUrl: ethereumLogoUrl,\n nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },\n },\n [SupportedChainId.GOERLI]: {\n docs: 'https://docs.uniswap.org/',\n explorer: 'https://goerli.etherscan.io/',\n infoLink: 'https://info.uniswap.org/#/',\n label: 'Goerli',\n nativeCurrency: { name: 'Goerli ETH', symbol: 'goerliETH', decimals: 18 },\n },\n [SupportedChainId.SEPOLIA]: {\n docs: 'https://docs.uniswap.org/',\n explorer: 'https://sepolia.etherscan.io/',\n infoLink: 'https://info.uniswap.org/#/',\n label: 'Sepolia',\n nativeCurrency: { name: 'Sepolia ETH', symbol: 'sepoliaETH', decimals: 18 },\n },\n [SupportedChainId.OPTIMISM]: {\n blockWaitMsBeforeWarning: ms`10m`,\n bridge: 'https://gateway.optimism.io/',\n docs: 'https://optimism.io/',\n explorer: 'https://optimistic.etherscan.io/',\n infoLink: 'https://info.uniswap.org/#/optimism',\n label: 'OΞ',\n logoUrl: optimismLogoUrl,\n nativeCurrency: { name: 'Optimistic ETH', symbol: 'ETH', decimals: 18 },\n rpcUrls: ['https://mainnet.optimism.io'],\n statusPage: 'https://optimism.io/status',\n },\n [SupportedChainId.OPTIMISTIC_KOVAN]: {\n blockWaitMsBeforeWarning: ms`10m`,\n bridge: 'https://gateway.optimism.io/',\n docs: 'https://optimism.io/',\n explorer: 'https://optimistic.etherscan.io/',\n infoLink: 'https://info.uniswap.org/#/optimism',\n label: 'Optimistic Kovan',\n rpcUrls: ['https://kovan.optimism.io'],\n logoUrl: optimismLogoUrl,\n nativeCurrency: {\n name: 'Optimistic kovETH',\n symbol: 'kovOpETH',\n decimals: 18,\n },\n statusPage: 'https://optimism.io/status',\n },\n};\n\nexport const ARBITRUM_HELP_CENTER_LINK =\n 'https://help.uniswap.org/en/collections/3137787-uniswap-on-arbitrum';\nexport const OPTIMISM_HELP_CENTER_LINK =\n 'https://help.uniswap.org/en/collections/3137778-uniswap-on-optimistic-ethereum-oξ';\n","export default __webpack_public_path__ + \"static/media/arbitrum_logo.ec8e5080.svg\";","export default __webpack_public_path__ + \"static/media/optimistic_ethereum.6510cce8.svg\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADxdJREFUeJztXVtzFMcVplwuP8VVeYmf7HJ+RKqSl/AQP6X8H+yqXUEIjhMnQY5jO9oVCIzA5mowdzAYG4xAGAyWLC5G3IyDL8gOASUYKrarYGZWC7qi23b6692VV6uZ7e6ZnT3di07VV6JUaLfnnG+6z+lz+vScOXUoL6SzP52/2PtlQ9p7piHlLU2k3P2JJqcjkX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8xCPNfdRP7wOcFmUjAC7j9hR3TNlfG4D2KLmBCiQ4JFEyu2iVoIqyquIyglgT3VPAVz3gSXetZJEq/tossm9TK4MRbSWVBGVEwDtXqjHpwqhc657UuMXZUF64DHuiPRSK0UVOLJdTgCcPKIelzrcXuic2u7TJNmSfdIWEhSriIoEsKm6BzqGrqnt7StgpS3LAc7to+MIqntMvM/HD9CtcW9+uWBdssUxxDk+dPGiHocSoFNT1nyZiIOmloWIJqMQ6tF6+7oi9gnEZpE9O4bmwc1Bh2RxfjUkv21sT+7AIHg1396NS5CksC2LSAnoqmaJnVqJSCWLeoLZJSEYophjeewpXUpBtYpN5WW1AnQSWyWPaQKGc7Y32lRtHJvhhQ7cxrp+64NElJw3OW3URqB76522qpVu2yw4vWLTMbTohne7I5/YqUfBIUZbTiWHMjx/ttAHNR8kwVn2fJOKeogYxGZOu/b5/FnJt6vJ9yyyI8tYZvhejF25LcusVBa0N0OPO5ObWWJsGKO0FdushBckRdDqFP1u0fSYsss5vluMgY8FY7IuYVMPgrbn6H2PCxBEJBHn9Tf8s4UHz78L3zmj5fqsmCG4DAk3YiWbvGfFvYgpdz888EJL/J7Chdkerk8XEP8Wv+vJzyo8EsHf8L/FZ+Czpi5YqjP5P2ey0rAsl+yGAAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/txjp_logo.c3cbadbc.png\";","import { getAddress } from '@ethersproject/address';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { JsonRpcSigner, Web3Provider } from '@ethersproject/providers';\nimport { ethers } from 'ethers';\n\nexport const BIGNUMBER_ZERO = BigNumber.from(0);\n\n// returns the checksummed address if the address is valid, otherwise returns false\nexport function isAddress(value: any): string | false {\n try {\n return getAddress(value);\n } catch {\n return false;\n }\n}\n\n// shorten the checksummed version of the input address to have 0x + 4 characters at start and end\nexport function shortenAddress(address: string, chars = 4): string {\n const parsed = isAddress(address);\n if (!parsed) {\n throw Error(`Invalid 'address' parameter '${address}'.`);\n }\n return `${parsed.substring(0, chars + 2)}...${parsed.substring(42 - chars)}`;\n}\n\n// account is not optional\nfunction getSigner(library: Web3Provider, account: string): JsonRpcSigner {\n return library.getSigner(account).connectUnchecked();\n}\n\n// account is optional\nfunction getProviderOrSigner(\n library: Web3Provider,\n account?: string\n): Web3Provider | JsonRpcSigner {\n return account ? getSigner(library, account) : library;\n}\n\n// account is optional\nexport function getContract(\n address: string,\n ABI: any,\n library: Web3Provider,\n account?: string\n): Contract {\n if (!isAddress(address) || address === AddressZero) {\n throw Error(`Invalid 'address' parameter '${address}'.`);\n }\n\n return new Contract(\n address,\n ABI,\n getProviderOrSigner(library, account) as any\n );\n}\n\n/**\n *\n * Additions for Yamato\n *\n */\n\n// See: node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts\nconst WEI_UNIT = 18;\nlet zeros = '0';\nwhile (zeros.length < WEI_UNIT) {\n zeros += zeros;\n}\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getMultiplier(decimals: ethers.BigNumberish): string {\n if (typeof decimals !== 'number') {\n try {\n decimals = BigNumber.from(decimals).toNumber();\n } catch (e) {}\n }\n\n if (typeof decimals !== 'number' || decimals < 0 || decimals > WEI_UNIT)\n return '0';\n\n return '1' + zeros.substring(0, decimals);\n}\n\nexport function parseEther(ether: string): BigNumber {\n if (ether.includes('e')) {\n // Parse\n const integerPart = ether.match(/^([0-9])+e/);\n const isNegative = ether.includes('e-');\n const exponentialPart = ether.match(/^[0-9]+e-?([0-9]+)/);\n if (\n !integerPart ||\n !integerPart[1] ||\n !exponentialPart ||\n !exponentialPart[1]\n ) {\n return BigNumber.from(0);\n }\n\n // Resolve exponential number\n // Plus 18 to convert ETH to WEI\n const pow = getMultiplier(\n !isNegative\n ? Number(exponentialPart[1]) + 18\n : -Number(exponentialPart[1]) + 18\n );\n return BigNumber.from(integerPart[1]).mul(pow);\n }\n\n return ethers.utils.parseEther(ether);\n}\n\nexport function formatEther(wei: ethers.BigNumberish) {\n return ethers.utils.formatEther(wei);\n}\n\nexport function formatYen(value: ethers.BigNumberish) {\n return ethers.utils.formatEther(value);\n}\n\nexport function formatCjpy(value: ethers.BigNumberish) {\n return ethers.utils.formatEther(value);\n}\n\nexport async function getEthBalance(\n account: string | null | undefined,\n library: Web3Provider | undefined\n): Promise {\n return library && account\n ? Number(formatEther(await library.getBalance(account)))\n : 0;\n}\n","export default __webpack_public_path__ + \"static/media/cjpy_logo.1bab7d81.png\";","import { UAParser } from 'ua-parser-js';\n\nconst parser = new UAParser(window.navigator.userAgent);\nconst { type } = parser.getDevice();\n\nexport const userAgent = parser.getResult();\n\nexport const isMobile = type === 'mobile' || type === 'tablet';\n","import { Web3Provider } from '@ethersproject/providers';\nimport { useWeb3React } from '@web3-react/core';\nimport { useEffect, useState } from 'react';\n\nimport { IS_IN_IFRAME, NetworkContextName } from '../constants/misc';\nimport {\n //gnosisSafe,\n injected,\n} from '../infrastructures/connectors';\nimport { isMobile } from '../utils/userAgent';\n\nexport function useActiveWeb3React() {\n const context = useWeb3React();\n const contextNetwork = useWeb3React(NetworkContextName);\n return context.active ? context : contextNetwork;\n}\n\nexport function useEagerConnect() {\n const { activate, active } = useWeb3React();\n const [tried, setTried] = useState(false);\n\n // gnosisSafe.isSafeApp() races a timeout against postMessage, so it delays pageload if we are not in a safe app;\n // if we are not embedded in an iframe, it is not worth checking\n // eslint-disable-next-line\n const [triedSafe, setTriedSafe] = useState(!IS_IN_IFRAME);\n\n // first, try connecting to a gnosis safe\n // useEffect(() => {\n // if (!triedSafe) {\n // gnosisSafe.isSafeApp().then((loadedInSafe) => {\n // if (loadedInSafe) {\n // activate(gnosisSafe, undefined, true).catch(() => {\n // setTriedSafe(true);\n // });\n // } else {\n // setTriedSafe(true);\n // }\n // });\n // }\n // }, [activate, setTriedSafe, triedSafe]);\n\n // then, if that fails, try connecting to an injected connector\n useEffect(() => {\n if (!active && triedSafe) {\n injected.isAuthorized().then((isAuthorized) => {\n if (isAuthorized) {\n activate(injected, undefined, true).catch(() => {\n setTried(true);\n });\n } else {\n if (isMobile && window.ethereum) {\n activate(injected, undefined, true).catch(() => {\n setTried(true);\n });\n } else {\n setTried(true);\n }\n }\n });\n }\n }, [activate, active, triedSafe]);\n\n // wait until we get confirmation of a connection to flip the flag\n useEffect(() => {\n if (active) {\n setTried(true);\n }\n }, [active]);\n\n return tried;\n}\n\n/**\n * Use for network and injected - logs user in\n * and out after checking what network theyre on\n */\nexport function useInactiveListener(suppress = false) {\n const { active, error, activate } = useWeb3React();\n\n useEffect(() => {\n const { ethereum } = window;\n\n if (ethereum && ethereum.on && !active && !error && !suppress) {\n const handleChainChanged = () => {\n // eat errors\n activate(injected, undefined, true).catch((error) => {\n console.error('Failed to activate after chain changed', error);\n });\n };\n\n const handleAccountsChanged = (accounts: string[]) => {\n if (accounts.length > 0) {\n // eat errors\n activate(injected, undefined, true).catch((error) => {\n console.error('Failed to activate after accounts changed', error);\n });\n }\n };\n\n ethereum.on('chainChanged', handleChainChanged);\n ethereum.on('accountsChanged', handleAccountsChanged);\n\n return () => {\n if (ethereum.removeListener) {\n ethereum.removeListener('chainChanged', handleChainChanged);\n ethereum.removeListener('accountsChanged', handleAccountsChanged);\n }\n };\n }\n return undefined;\n }, [active, error, suppress, activate]);\n}\n","import { HStack } from '@chakra-ui/react';\nimport { useCallback } from 'react';\nimport { ExternalLink as LinkIcon } from 'react-feather';\nimport { useDispatch } from 'react-redux';\nimport { Button } from 'rebass/styled-components';\nimport styled from 'styled-components';\nimport CJPYLogo from '../../../assets/images/cjpy_logo.png';\nimport MetamaskIcon from '../../../assets/images/metamask_logo.png';\nimport TXJPLogo from '../../../assets/images/txjp_logo.png';\nimport {\n CJPY_ADDRESSES,\n TXJP_ADDRESSES,\n // YMT_ADDRESSES,\n} from '../../../constants/addresses';\nimport { SUPPORTED_WALLETS } from '../../../constants/web3';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport {\n injected,\n // walletconnect,\n // walletlink,\n // fortmatic,\n // portis,\n} from '../../../infrastructures/connectors';\nimport { AppDispatch } from '../../../state';\nimport { clearAllTransactions } from '../../../state/transactions/actions';\nimport {\n ExplorerDataType,\n getExplorerLink,\n} from '../../../utils/getExplorerLink';\nimport { shortenAddress } from '../../../utils/web3';\nimport { CategoryTitle } from '../../CommonItem';\nimport { ExternalLink } from '../../ExternalLink';\nimport { RowBetween } from '../Row';\nimport Copy from './Copy';\nimport Transaction from './Transaction';\n\nconst HeaderRow = styled.div`\n ${({ theme }) => theme.flexRowNoWrap};\n padding: 1rem 1rem;\n font-weight: 500;\n color: ${({ theme }) => theme.text1};\n ${({ theme }) => theme.mediaWidth.upToMedium`\n padding: 1rem;\n `};\n`;\n\nconst UpperSection = styled.div`\n position: relative;\n h5 {\n margin: 0;\n margin-bottom: 0.5rem;\n font-size: 1.2rem;\n font-weight: 400;\n }\n h5:last-child {\n margin-bottom: 0px;\n }\n h4 {\n margin-top: 0;\n font-weight: 500;\n }\n`;\n\nconst InfoCard = styled.div`\n padding: 1rem;\n border: 1px solid ${({ theme }) => theme.text1};\n border-radius: 20px;\n position: relative;\n display: grid;\n grid-row-gap: 12px;\n margin-bottom: 20px;\n background-color: ${({ theme }) => theme.bg0};\n`;\n\nconst AccountGroupingRow = styled.div`\n ${({ theme }) => theme.flexRowNoWrap};\n justify-content: space-between;\n align-items: center;\n font-weight: 400;\n color: ${({ theme }) => theme.text1};\n div {\n ${({ theme }) => theme.flexRowNoWrap}\n align-items: center;\n }\n`;\n\nconst AccountSection = styled.div`\n padding: 0rem 1rem;\n ${({ theme }) =>\n theme.mediaWidth.upToMedium`padding: 0rem 1rem 1.5rem 1rem;`};\n`;\n\nconst YourAccount = styled.div`\n h5 {\n margin: 0 0 1rem 0;\n font-weight: 400;\n }\n h4 {\n margin: 0;\n font-weight: 500;\n }\n`;\n\nconst TokenSection = styled.button`\n padding: 1rem;\n margin: 0 4rem;\n border: 1px solid ${({ theme }) => theme.text1};\n border-bottom: 5px solid ${({ theme }) => theme.text1};\n border-radius: 20px;\n position: relative;\n display: grid;\n grid-row-gap: 12px;\n margin-bottom: 20px;\n background-color: ${({ theme }) => theme.bg0};\n`;\n\nconst LowerSection = styled.div`\n ${({ theme }) => theme.flexColumnNoWrap}\n padding: 1.5rem;\n flex-grow: 1;\n overflow: auto;\n background-color: ${({ theme }) => theme.bg2};\n border-bottom-left-radius: 20px;\n border-bottom-right-radius: 20px;\n h5 {\n margin: 0;\n font-weight: 400;\n color: ${({ theme }) => theme.text1};\n }\n`;\n\nconst AccountControl = styled.div`\n display: flex;\n justify-content: space-between;\n min-width: 0;\n width: 100%;\n font-weight: 500;\n font-size: 1.4rem;\n a:hover {\n text-decoration: underline;\n }\n p {\n min-width: 0;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n\nconst AddressLink = styled(ExternalLink)<{ hasENS: boolean; isENS: boolean }>`\n color: ${({ theme }) => theme.text1};\n margin-left: 1rem;\n font-size: 1.2rem;\n display: flex;\n :hover {\n color: ${({ theme }) => theme.text0};\n }\n`;\n\nconst ClearButton = styled.div`\n border-radius: 12px;\n font-size: 1rem;\n color: ${({ theme }) => theme.text1};\n background-color: ${({ theme }) => theme.bg0};\n padding: 0.3rem;\n font-weight: 600;\n user-select: none;\n &:hover {\n cursor: pointer;\n border: 1px solid;\n border-color: ${({ theme }) => theme.text0};\n }\n`;\n\nconst WalletName = styled.div`\n width: initial;\n font-size: 1.2rem;\n font-weight: 500;\n color: ${({ theme }) => theme.text1};\n`;\n\nconst TransactionListWrapper = styled.div`\n ${({ theme }) => theme.flexColumnNoWrap};\n`;\n\nconst WalletAction = styled(Button)`\n width: fit-content;\n font-weight: 400;\n margin-left: 8px;\n font-size: 1.4rem;\n padding: 4px 6px;\n color: ${({ theme }) => theme.text1};\n :hover {\n cursor: pointer;\n text-decoration: underline;\n }\n`;\n\nfunction renderTokenButton(chainId: number, logo: string, currency: string) {\n return (\n handeAddToken(e, chainId, currency)}>\n \n Add {currency}\n \n to your Metamask\n \n \n \n );\n}\n\nfunction renderTransactions(transactions: string[]) {\n return (\n \n {transactions.map((hash, i) => {\n return ;\n })}\n \n );\n}\n\ninterface AccountDetailsProps {\n pendingTransactions: string[];\n confirmedTransactions: string[];\n ENSName?: string;\n openOptions: () => void;\n}\n\ninterface WatchAssetParams {\n type: string;\n options: {\n address: string;\n symbol: string;\n decimals: number;\n image: string;\n };\n}\n\nconst getToken = (chainId: number, symbol: string): WatchAssetParams => {\n switch (symbol) {\n case YAMATO_SYMBOL.YEN:\n return {\n type: 'ERC20',\n options: {\n address: CJPY_ADDRESSES[chainId],\n symbol: YAMATO_SYMBOL.YEN,\n decimals: 18,\n image: CJPYLogo,\n },\n };\n // case YAMATO_SYMBOL.GOVERNANCE:\n // return {\n // type: 'ERC20',\n // options: {\n // address: YMT_ADDRESSES[chainId],\n // symbol: YAMATO_SYMBOL.GOVERNANCE,\n // decimals: 18,\n // image: generateTokenImagePath(YMTLogo),\n // },\n // };\n case YAMATO_SYMBOL.TXJP:\n return {\n type: 'ERC20',\n options: {\n address: TXJP_ADDRESSES[chainId],\n symbol: YAMATO_SYMBOL.TXJP,\n decimals: 8,\n image: TXJPLogo,\n },\n };\n default:\n return {\n type: 'ERC20',\n options: {\n address: TXJP_ADDRESSES[chainId],\n symbol: YAMATO_SYMBOL.TXJP,\n decimals: 8,\n image: TXJPLogo,\n },\n };\n }\n};\n\nconst handeAddToken = (e: any, chainId: number, symbol: string) => {\n e.stopPropagation();\n (global.window as any)?.ethereum\n ?.request({\n method: 'wallet_watchAsset',\n params: getToken(chainId, symbol),\n })\n .catch((error: any) => {\n console.error(error);\n });\n};\n\nexport default function AccountDetails({\n pendingTransactions,\n confirmedTransactions,\n ENSName,\n openOptions,\n}: AccountDetailsProps) {\n const { chainId, account, connector } = useActiveWeb3React();\n const dispatch = useDispatch();\n\n function formatConnectorName() {\n const { ethereum } = window;\n const isMetaMask = !!(ethereum && ethereum.isMetaMask);\n const name = Object.keys(SUPPORTED_WALLETS)\n .filter(\n (k) =>\n SUPPORTED_WALLETS[k].connector === connector &&\n (connector !== injected || isMetaMask === (k === 'METAMASK'))\n )\n .map((k) => SUPPORTED_WALLETS[k].name)[0];\n return Connected with {name};\n }\n\n const clearAllTransactionsCallback = useCallback(() => {\n if (chainId) dispatch(clearAllTransactions({ chainId }));\n }, [dispatch, chainId]);\n\n return (\n <>\n \n \n Account\n \n \n \n \n \n {formatConnectorName()}\n
\n {/* {connector !== injected && connector !== walletlink && (\n {\n (connector as any).close();\n }}\n >\n Disconnect\n \n )} */}\n {\n openOptions();\n }}\n >\n Change\n \n
\n
\n \n \n {ENSName ? (\n <>\n
\n

{ENSName}

\n
\n \n ) : (\n <>\n
\n

{account && shortenAddress(account)}

\n
\n \n )}\n
\n
\n \n \n
\n {account && (\n \n Copy Address\n \n )}\n {chainId && account && (\n \n \n

View on Etherscan

\n \n )}\n
\n
\n
\n
\n
\n
\n
\n {chainId != null ? (\n <>\n {renderTokenButton(chainId, CJPYLogo, YAMATO_SYMBOL.YEN)}\n {renderTokenButton(chainId, TXJPLogo, YAMATO_SYMBOL.TXJP)}\n \n ) : (\n <>\n )}\n {!!pendingTransactions.length || !!confirmedTransactions.length ? (\n \n \n Recent Transactions\n \n clear all\n \n \n {renderTransactions(pendingTransactions)}\n {renderTransactions(confirmedTransactions)}\n \n ) : (\n \n Your transactions will appear here...\n \n )}\n \n );\n}\n","import { CheckCircle, Copy } from 'react-feather';\nimport styled from 'styled-components';\nimport useCopyClipboard from '../../../hooks/useCopyClipboard';\nimport { LinkStyledButton } from '../../ExternalLink';\n\nconst CopyIcon = styled(LinkStyledButton)`\n color: ${({ theme }) => theme.text1};\n flex-shrink: 0;\n display: flex;\n text-decoration: none;\n font-size: 1.2rem;\n :hover,\n :active,\n :focus {\n text-decoration: none;\n color: ${({ theme }) => theme.text0};\n }\n`;\nconst TransactionStatusText = styled.span`\n margin-left: 0.25rem;\n font-size: 1.2rem;\n ${({ theme }) => theme.flexRowNoWrap};\n align-items: center;\n`;\n\nexport default function CopyHelper(props: {\n toCopy: string;\n children?: React.ReactNode;\n}) {\n const [isCopied, setCopied] = useCopyClipboard();\n\n return (\n setCopied(props.toCopy)}>\n {isCopied ? (\n \n \n Copied\n \n ) : (\n \n \n \n )}\n {isCopied ? '' : props.children}\n \n );\n}\n","import copy from 'copy-to-clipboard';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport default function useCopyClipboard(\n timeout = 500\n): [boolean, (toCopy: string) => void] {\n const [isCopied, setIsCopied] = useState(false);\n\n const staticCopy = useCallback((text) => {\n const didCopy = copy(text);\n setIsCopied(didCopy);\n }, []);\n\n useEffect(() => {\n if (isCopied) {\n const hide = setTimeout(() => {\n setIsCopied(false);\n }, timeout);\n\n return () => {\n clearTimeout(hide);\n };\n }\n return undefined;\n }, [isCopied, setIsCopied, timeout]);\n\n return [isCopied, staticCopy];\n}\n","import { useTranslation } from 'react-i18next';\nimport { LOG_EVENT_NAME, YAMATO_SYMBOL } from '../../../constants/yamato';\nimport {\n BorrowTransactionInfo,\n CoreRedeemTransactionInfo,\n DepositTransactionInfo,\n RepayTransactionInfo,\n SelfRedeemTransactionInfo,\n SweepTransactionInfo,\n TransactionInfo,\n TransactionType,\n WithdrawTransactionInfo,\n} from '../../../state/transactions/actions';\n\nfunction DepositSummary({ info }: { info: DepositTransactionInfo }) {\n return (\n <>\n {LOG_EVENT_NAME.deposit} {info.value} {YAMATO_SYMBOL.COLLATERAL}\n \n );\n}\nfunction WithdrawSummary({ info }: { info: WithdrawTransactionInfo }) {\n return (\n <>\n {LOG_EVENT_NAME.withdrawal} {info.value} {YAMATO_SYMBOL.COLLATERAL}\n \n );\n}\nfunction BorrowSummary({ info }: { info: BorrowTransactionInfo }) {\n return (\n <>\n {LOG_EVENT_NAME.borrowing} {info.value} {YAMATO_SYMBOL.YEN}\n \n );\n}\nfunction RepaySummary({ info }: { info: RepayTransactionInfo }) {\n return (\n <>\n {LOG_EVENT_NAME.repay} {info.value} {YAMATO_SYMBOL.YEN}\n \n );\n}\nfunction SelfRedeemSummary({ info }: { info: SelfRedeemTransactionInfo }) {\n const { t } = useTranslation();\n return (\n <>\n {LOG_EVENT_NAME.self_redemption} {info.value} {YAMATO_SYMBOL.YEN}{' '}\n {t('walletConnectButton.accountDetails.predictedGain')} {info.expected}{' '}\n {YAMATO_SYMBOL.COLLATERAL}\n \n );\n}\nfunction CoreRedeemSummary({ info }: { info: CoreRedeemTransactionInfo }) {\n const { t } = useTranslation();\n return (\n <>\n {LOG_EVENT_NAME.core_redemption}{' '}\n {t('walletConnectButton.accountDetails.predictedGain')} {info.expected}{' '}\n {YAMATO_SYMBOL.COLLATERAL}\n \n );\n}\nfunction SweepSummary({ info }: { info: SweepTransactionInfo }) {\n const { t } = useTranslation();\n return (\n <>\n {LOG_EVENT_NAME.sweep}{' '}\n {t('walletConnectButton.accountDetails.predictedGain')} {info.expected}{' '}\n {YAMATO_SYMBOL.YEN}\n \n );\n}\n\nexport function TransactionSummary({ info }: { info: TransactionInfo }) {\n switch (info.type) {\n case TransactionType.DEPOSIT:\n return ;\n case TransactionType.WITHDRAW:\n return ;\n case TransactionType.BORROW:\n return ;\n case TransactionType.REPAY:\n return ;\n case TransactionType.SELF_REDEEM:\n return ;\n case TransactionType.CORE_REDEEM:\n return ;\n case TransactionType.SWEEP:\n return ;\n }\n}\n","import { CheckCircle, Triangle } from 'react-feather';\nimport styled from 'styled-components/macro';\n\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useAllTransactions } from '../../../state/transactions/hooks';\nimport {\n ExplorerDataType,\n getExplorerLink,\n} from '../../../utils/getExplorerLink';\nimport { ExternalLink } from '../../ExternalLink';\nimport Loader from '../../Loader';\nimport { RowFixed } from '../Row';\nimport { TransactionSummary } from './TransactionSummary';\n\nconst TransactionStatusText = styled.div`\n margin-right: 0.5rem;\n display: flex;\n align-items: center;\n color: ${({ theme }) => theme.text2};\n font-style: normal;\n font-weight: 500;\n font-size: 1.4rem;\n line-height: 1.6rem;\n :hover {\n text-decoration: underline;\n }\n`;\n\nconst TransactionState = styled(ExternalLink)<{\n pending: boolean;\n success?: boolean;\n}>`\n display: flex;\n justify-content: space-between;\n align-items: center;\n text-decoration: none !important;\n border-radius: 0.5rem;\n padding: 0.25rem 0rem;\n font-weight: 500;\n font-size: 0.825rem;\n color: ${({ theme }) => theme.text1};\n`;\n\nconst IconWrapper = styled.div<{ pending: boolean; success?: boolean }>`\n color: ${({ pending, success, theme }) =>\n pending ? theme.text1 : success ? theme.success : theme.error};\n`;\n\nexport default function Transaction({ hash }: { hash: string }) {\n const { chainId } = useActiveWeb3React();\n const allTransactions = useAllTransactions();\n\n const tx = allTransactions?.[hash];\n const info = tx?.info;\n const pending = !tx?.receipt;\n const success =\n !pending &&\n tx &&\n (tx.receipt?.status === 1 || typeof tx.receipt?.status === 'undefined');\n\n if (!chainId) return null;\n\n return (\n
\n \n \n \n ↗\n \n \n \n {pending ? (\n \n ) : success ? (\n \n ) : (\n \n )}\n \n \n
\n );\n}\n","import i18next from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\n// 言語jsonファイルのimport\nimport translation_en from './en.json';\nimport translation_ja from './ja.json';\n\nconst resources = {\n ja: {\n translation: translation_ja,\n },\n en: {\n translation: translation_en,\n },\n};\n\ni18next.use(initReactI18next).init({\n resources,\n lng: 'ja',\n preload: ['ja'],\n interpolation: { escapeValue: false },\n});\n\nexport default i18next;\n","import { useWeb3React } from '@web3-react/core';\nimport { useState, useEffect } from 'react';\nimport styled from 'styled-components/macro';\nimport { NetworkContextName } from '../constants/misc';\nimport { useEagerConnect, useInactiveListener } from '../hooks/web3';\nimport { network } from '../infrastructures/connectors';\nimport Loader from './Loader';\n\nconst MessageWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 20rem;\n`;\n\nconst Message = styled.h2`\n color: ${({ theme }) => theme.text1};\n`;\n\nexport default function Web3ReactManager({\n children,\n}: {\n children: JSX.Element;\n}) {\n const { active } = useWeb3React();\n const {\n active: networkActive,\n error: networkError,\n activate: activateNetwork,\n } = useWeb3React(NetworkContextName);\n\n // try to eagerly connect to an injected provider, if it exists and has granted access already\n const triedEager = useEagerConnect();\n\n // after eagerly trying injected, if the network connect ever isn't active or in an error state, activate itd\n useEffect(() => {\n if (triedEager && !networkActive && !networkError && !active) {\n activateNetwork(network);\n }\n }, [triedEager, networkActive, networkError, activateNetwork, active]);\n\n // when there's no account connected, react to logins (broadly speaking) on the injected provider, if it exists\n useInactiveListener(!triedEager);\n\n // handle delayed loader state\n const [showLoader, setShowLoader] = useState(false);\n useEffect(() => {\n const timeout = setTimeout(() => {\n setShowLoader(true);\n }, 600);\n\n return () => {\n clearTimeout(timeout);\n };\n }, []);\n\n // on page load, do nothing until we've tried to connect to the injected connector\n if (!triedEager) {\n return null;\n }\n\n // if the account context isn't active, and there's an error on the network context, it's an irrecoverable error\n if (!active && networkError) {\n return (\n \n \n Oops! An unknown error occurred. Please refresh the page, or visit\n from another browser or device.\n \n \n );\n }\n\n // if neither context is active, spin\n if (!active && !networkActive) {\n return showLoader ? (\n \n \n \n ) : null;\n }\n\n return children;\n}\n","import Big from 'big.js';\n\nexport type BigNumberValueType = Big | number;\n\nexport function add(v1: BigNumberValueType, v2: BigNumberValueType): Big {\n const a = getBigNumber(v1);\n const b = getBigNumber(v2);\n return a.plus(b);\n}\nexport function addToNum(\n v1: BigNumberValueType,\n v2: BigNumberValueType\n): number {\n return add(v1, v2).toNumber();\n}\n\nexport function subtract(v1: BigNumberValueType, v2: BigNumberValueType): Big {\n const a = getBigNumber(v1);\n const b = getBigNumber(v2);\n return a.minus(b);\n}\nexport function subtractToNum(\n v1: BigNumberValueType,\n v2: BigNumberValueType\n): number {\n return subtract(v1, v2).toNumber();\n}\n\nexport function multiply(v1: BigNumberValueType, v2: BigNumberValueType): Big {\n const a = getBigNumber(v1);\n const b = getBigNumber(v2);\n return a.times(b);\n}\nexport function multiplyToNum(\n v1: BigNumberValueType,\n v2: BigNumberValueType\n): number {\n return multiply(v1, v2).toNumber();\n}\n\nexport function divide(v1: BigNumberValueType, v2: BigNumberValueType): Big {\n const a = getBigNumber(v1);\n const b = getBigNumber(v2);\n return a.div(b);\n}\nexport function divideToNum(\n v1: BigNumberValueType,\n v2: BigNumberValueType\n): number {\n return divide(v1, v2).toNumber();\n}\n\nexport function getBigNumber(val: BigNumberValueType | string): Big {\n if (val instanceof Big) {\n return val;\n }\n return new Big(val);\n}\n","import { divideToNum, getBigNumber, multiplyToNum } from './bignumber';\n\nexport type CryptoCurrency = 'eth' | 'txjp';\nexport type FiatCurrency = 'jpy';\nexport type CurrencyName = CryptoCurrency | FiatCurrency;\n\nexport function formatPrice(\n value: number,\n currency?: CurrencyName\n): { value: string; isZeroByRound: boolean } {\n if (!value) {\n return { value: '0', isZeroByRound: false };\n }\n\n let decimalDigits = 18;\n if (currency) {\n // eth and erc20 may all be 9 digits.\n if (currency === 'eth') {\n decimalDigits = 9;\n } else if (currency === 'txjp') {\n decimalDigits = 8;\n } else if (currency === 'jpy') {\n decimalDigits = 4;\n }\n }\n\n const base = 10 ** decimalDigits;\n const flooredValue = Math.floor(multiplyToNum(value, base)) / base;\n if (!flooredValue) {\n return { value: '0', isZeroByRound: false };\n }\n const fixedValue = flooredValue.toFixed(decimalDigits); // to pad with zero to the right.\n return {\n value: format(fixedValue),\n isZeroByRound: isZeroByRound(fixedValue),\n };\n}\n\nfunction isZeroByRound(value: string): boolean {\n const numbers = value.split('.');\n if (!numbers[1]) {\n return false;\n }\n if (Number(numbers[0]) > 0) {\n return false;\n }\n\n return Number(numbers[1]) === 0;\n}\n\nfunction format(value: string) {\n let s = value.split('.');\n if (s.length > 1) {\n // eliminate unnecessary zero if it's not all zeros.\n // `0.0100` -> `0.01`\n // `0.0000` -> `0.0000` Keep. Don't chage!\n if (!(Number(s[0]) === 0 && s[1].match(/^(0)\\1*$/))) {\n value = getBigNumber(value).toFixed();\n s = value.split('.');\n }\n }\n\n // add comma\n let ret = s[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g, '$1,');\n if (s.length > 1) {\n ret += '.' + s[1];\n }\n\n return ret;\n}\n\nexport function getFialSymbol(currency: FiatCurrency) {\n if (currency === 'jpy') {\n return '¥';\n }\n return '';\n}\n\nexport function formatCollateralizationRatio(\n collateral: number,\n debt: number\n): string {\n if (debt === 0) {\n return '0.00';\n }\n return Math.min(divideToNum(collateral, debt) * 100, 9999.9).toLocaleString(\n undefined,\n {\n maximumFractionDigits: 2,\n }\n );\n}\n\nexport function getEthChangePercent(current: number, previous: number): number {\n if (current === 0 || previous === 0) {\n return 0;\n }\n\n return ((current - previous) / previous) * 100;\n}\n","import { useSelector } from 'react-redux';\nimport { getEthChangePercent } from '../../utils/prices';\nimport { AppState } from '../index';\n\n/**\n * selector\n */\nexport function useYamatoStateForDashboard() {\n return useSelector((state: AppState) => {\n return {\n totalSupplyOfCjpy: state.yamatoEntirety.token.cjpy.totalSupply,\n tvl: state.yamatoEntirety.lending.tvl,\n tcr: state.yamatoEntirety.lending.tcr,\n rateOfEthJpy: state.yamatoEntirety.rateOfEthJpy,\n rateOfCjpyJpy: createRateOfCjpyJpy(\n state.market.rateOfCjpyEth,\n state.yamatoEntirety.rateOfEthJpy\n ),\n ethChangePercent: getEthChangePercent(\n state.yamatoEntirety.rateOfEthJpy,\n state.yamatoEntirety.prevRateOfEthJpy\n ),\n firstLoadCompleted: state.yamatoEntirety.firstLoadCompleted,\n };\n });\n}\nexport function useYamatoStateForPledge() {\n return useSelector((state: AppState) => ({\n rateOfEthJpy: state.yamatoEntirety.rateOfEthJpy,\n redemptionReserve: state.yamatoEntirety.pool.redemptionReserve,\n sweepReserve: state.yamatoEntirety.pool.sweepReserve,\n redeemableCandidate: state.yamatoEntirety.pledges.redeemableCandidate,\n sweepableCandiate: state.yamatoEntirety.pledges.sweepableCandidate,\n MCR: state.yamatoEntirety.parameter.MCR,\n GRR: state.yamatoEntirety.parameter.GRR,\n firstLoadCompleted: state.yamatoEntirety.firstLoadCompleted,\n }));\n}\nexport function useYamatoStateForWorld() {\n return useSelector((state: AppState) => ({\n events: state.yamatoEntirety.events.slice(0, 20),\n firstLoadCompleted: state.yamatoEntirety.firstLoadCompleted,\n }));\n}\nexport function useYamatoStateForInfographics() {\n return useSelector((state: AppState) => {\n return {\n rateOfCjpyJpy: createRateOfCjpyJpy(\n state.market.rateOfCjpyEth,\n state.yamatoEntirety.rateOfEthJpy\n ),\n totalCollateral: state.yamatoEntirety.lending.totalCollateral,\n totalDebt: state.yamatoEntirety.lending.totalDebt,\n tcr: state.yamatoEntirety.lending.tcr,\n rateOfEthJpy: state.yamatoEntirety.rateOfEthJpy,\n prevRateOfEthJpy: state.yamatoEntirety.prevRateOfEthJpy,\n redemptionReserve: state.yamatoEntirety.pool.redemptionReserve,\n prevRedemptionReserve: state.yamatoEntirety.pool.prevRedemptionReserve,\n sweepReserve: state.yamatoEntirety.pool.sweepReserve,\n prevSweepReserve: state.yamatoEntirety.pool.prevSweepReserve,\n MCR: state.yamatoEntirety.parameter.MCR,\n isRedeemablePledge: state.yamatoEntirety.pledges.isRedeemablePledge,\n };\n });\n}\n\n/**\n * utils\n */\n\nfunction createRateOfCjpyJpy(\n rateOfCjpyEth: { [source: string]: number },\n rateOfEthJpy: number\n) {\n return Object.entries(rateOfCjpyEth)\n .sort((a, b) => (a[1] > b[1] ? -1 : 1))\n .map((data) => {\n data[1] = convertCjpyToEth(data[1], rateOfEthJpy);\n return data;\n });\n}\n\nfunction convertCjpyToEth(amount: number, rateOfEthJpy: number) {\n return rateOfEthJpy && amount ? rateOfEthJpy / amount : 0;\n}\n","import {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverArrow,\n PopoverBody,\n PopoverCloseButton,\n PopoverHeader,\n Box,\n HStack,\n} from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport {\n ButtonInHeaderBox1,\n popoverBorderColor,\n ItemTitleForPledge,\n} from '../CommonItem';\n\nexport default function TerminologyPopover({\n title,\n width,\n children,\n}: {\n title?: string;\n width?: string;\n children: React.ReactNode;\n}) {\n const { t } = useTranslation();\n return (\n \n \n ?\n \n \n \n \n \n {title ?? t('terminologyPopover.terminology')}\n \n \n \n \n \n \n \n {children}\n \n \n \n );\n}\n","import { HStack, Skeleton } from '@chakra-ui/react';\nimport styled from 'styled-components';\nimport { ItemTitleValue, ItemTitleForPledge } from '../CommonItem';\n\nconst StyledItemTitleForPledge = styled(ItemTitleForPledge)`\n width: min(180px, 40%); // 最大180pxまたは親要素の40%\n min-width: 120px; // 最小幅を設定\n white-space: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nconst StyledItemTitleValue = styled(ItemTitleValue)`\n white-space: nowrap;\n`;\n\ninterface Props {\n title: string;\n stat: any;\n firstLoadCompleted: boolean;\n children?: any;\n}\n\nexport default function DashboardItem(props: Props) {\n return (\n \n {props.title}\n {props.firstLoadCompleted ? (\n \n {props.stat}\n {props.children}\n \n ) : (\n \n )}\n \n );\n}\n","import { ExternalLinkIcon } from '@chakra-ui/icons';\nimport { Grid, GridItem, HStack, VStack } from '@chakra-ui/react';\nimport { useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { CJPY_ADDRESSES } from '../../constants/addresses';\nimport { YAMATO_SYMBOL } from '../../constants/yamato';\nimport { useActiveWeb3React } from '../../hooks/web3';\nimport { useYamatoStateForDashboard } from '../../state/yamato-entirety/hooks';\nimport { formatPrice } from '../../utils/prices';\nimport {\n CategoryTitle,\n ConentBox,\n HeaderBox1,\n ItemTitleValue,\n} from '../CommonItem';\nimport { ExternalLink } from '../ExternalLink';\nimport TerminologyPopover from '../TerminologyPopover';\nimport DashboardItem from './Item';\n\nfunction getMarketRateOfCjpyJpy(rateOfCjpyJpy: [string, number]) {\n if (!rateOfCjpyJpy) {\n return ``;\n }\n\n return `${rateOfCjpyJpy[0]}: ¥${\n formatPrice(rateOfCjpyJpy[1], 'jpy').value\n }\\n`;\n}\n\nfunction getDeviationRate(rateOfCjpyJpy: [string, number]) {\n if (!rateOfCjpyJpy) {\n return `0%`;\n }\n\n const deviationRate = (rateOfCjpyJpy[1] - 1) * 100;\n return `${deviationRate.toLocaleString(undefined, {\n maximumFractionDigits: 2,\n })}%`;\n}\n\nexport default function Dashboard() {\n const {\n tvl,\n tcr,\n rateOfEthJpy,\n totalSupplyOfCjpy,\n rateOfCjpyJpy,\n firstLoadCompleted,\n } = useYamatoStateForDashboard();\n\n const { chainId } = useActiveWeb3React();\n const cjpyAddress = useMemo(\n () => (chainId != null ? CJPY_ADDRESSES[chainId] : ''),\n [chainId]\n );\n\n const getExternalLink = useCallback(\n (exchangeName: string) => {\n if (exchangeName.includes('uniswap')) {\n return `https://app.uniswap.org/#/swap?inputCurrency=eth&outputCurrency=${cjpyAddress}`;\n }\n if (exchangeName.includes('Curve')) {\n return `https://curve.fi/#/ethereum/pools/factory-twocrypto-5/swap`;\n }\n return '';\n },\n [cjpyAddress]\n );\n\n const { t } = useTranslation();\n\n return (\n <>\n \n \n Yamato Statistics\n \n {t('dashboard.tvl')}\n {t('dashboard.tcr')}\n \n \n \n \n \n {' '}\n \n \n \n \n \n {rateOfCjpyJpy[0] && (\n \n \n \n )}\n \n {/* \n {rateOfCjpyJpy[1] && (\n \n \n \n )}\n \n \n {rateOfCjpyJpy[2] && (\n \n \n \n )}\n */}\n \n \n \n \n {/* v1.5 feature\n \n */}\n \n \n \n \n \n \n \n );\n}\n","import * as React from 'react';\n\nfunction SvgArrowYen(props) {\n return (\n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgArrowYen;\n","import * as React from 'react';\n\nfunction SvgSpring0(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpring0;\n","import * as React from 'react';\n\nfunction SvgSpringMinus1(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus1;\n","import * as React from 'react';\n\nfunction SvgSpringMinus10(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus10;\n","import * as React from 'react';\n\nfunction SvgSpringMinus2(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus2;\n","import * as React from 'react';\n\nfunction SvgSpringMinus3(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus3;\n","import * as React from 'react';\n\nfunction SvgSpringMinus4(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus4;\n","import * as React from 'react';\n\nfunction SvgSpringMinus5(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus5;\n","import * as React from 'react';\n\nfunction SvgSpringMinus6(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus6;\n","import * as React from 'react';\n\nfunction SvgSpringMinus7(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus7;\n","import * as React from 'react';\n\nfunction SvgSpringMinus8(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus8;\n","import * as React from 'react';\n\nfunction SvgSpringMinus9(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringMinus9;\n","import * as React from 'react';\n\nfunction SvgSpringPlus1(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus1;\n","import * as React from 'react';\n\nfunction SvgSpringPlus10(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus10;\n","import * as React from 'react';\n\nfunction SvgSpringPlus2(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus2;\n","import * as React from 'react';\n\nfunction SvgSpringPlus3(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus3;\n","import * as React from 'react';\n\nfunction SvgSpringPlus4(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus4;\n","import * as React from 'react';\n\nfunction SvgSpringPlus5(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus5;\n","import * as React from 'react';\n\nfunction SvgSpringPlus6(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus6;\n","import * as React from 'react';\n\nfunction SvgSpringPlus7(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus7;\n","import * as React from 'react';\n\nfunction SvgSpringPlus8(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus8;\n","import * as React from 'react';\n\nfunction SvgSpringPlus9(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgSpringPlus9;\n","export function getCjpyPriceRank(cjpyPrice: number): number {\n const fixedPrice = Number(cjpyPrice.toFixed(2));\n const base = Math.floor(((fixedPrice - 1) / 2) * 100); // rank up per 0.02 YEN\n // 21 ranks\n if (base < -9) {\n return -10;\n } else if (base > 10) {\n return 10;\n }\n return base;\n}\n\nexport function getEthPriceRank(changePercent: number): number {\n const base = Math.floor(changePercent * 100); // rank up per 1%\n // 91 ranks\n if (base < -45) {\n return -45;\n } else if (base > 45) {\n return 45;\n }\n return base;\n}\n\nexport function getColorCodePerTcr(tcr: number, MCR: number): number {\n const base = Math.floor(tcr - MCR) * (124 / 190); // Min 236 - Mid 298 - Max 360\n // 125 ranks\n if (base > 124) {\n return 360;\n } else if (base <= 0) {\n return 236;\n }\n return base + 236;\n}\n\nexport function getBrightnessPerEth(ethPriceRank: number): number {\n return 95 - Math.abs(ethPriceRank); // Max95% - Min50%\n}\n\nexport function getReserveRankOfRedemption(reserveAmount: number): number {\n return getReserveRank(reserveAmount, 500 * 10000); // rank up per 5000,000\n}\n\nexport function getReserveRankOfSweep(reserveAmount: number): number {\n return getReserveRank(reserveAmount, 100 * 10000); // rank up per 1000,000\n}\n\nfunction getReserveRank(reserveAmount: number, baseNumber: number): number {\n const base = Math.floor(reserveAmount / baseNumber);\n // 10 ranks\n if (base === 0) {\n return 1;\n } else if (base > 10) {\n return 10;\n }\n return base;\n}\n\nexport function getTcrRate(tcr: number): number {\n if (tcr <= 0) {\n return 100;\n } else if (tcr > 300) {\n return 1;\n }\n return Math.abs(tcr / 3 - 99); // 0% to 300% fits in 100 to 1\n}\n\nexport function getSignalMessages(\n cjpyPriceRank: number,\n ethPriceRank: number,\n isRedeemablePledge: boolean,\n t: any\n): string[] {\n const messages = [];\n if (cjpyPriceRank > 0 && ethPriceRank >= 10) {\n messages.push('CJPY ' + t('infographics.borrowRecommend'));\n }\n if (cjpyPriceRank < 0) {\n messages.push('CJPY ' + t('infographics.buyRecommend'));\n }\n if (cjpyPriceRank < 0 && ethPriceRank <= -10) {\n messages.push('CJPY ' + t('infographics.repaymentRecommend'));\n }\n if (isRedeemablePledge) {\n messages.push(t('infographics.redemptionRecommend'));\n }\n return messages;\n}\n","import { Box, HStack } from '@chakra-ui/react';\nimport { useMemo } from 'react';\nimport Arrow from '../svgs/ArrowYen';\nimport {\n Spring0,\n SpringMinus1,\n SpringMinus10,\n SpringMinus2,\n SpringMinus3,\n SpringMinus4,\n SpringMinus5,\n SpringMinus6,\n SpringMinus7,\n SpringMinus8,\n SpringMinus9,\n SpringPlus1,\n SpringPlus10,\n SpringPlus2,\n SpringPlus3,\n SpringPlus4,\n SpringPlus5,\n SpringPlus6,\n SpringPlus7,\n SpringPlus8,\n SpringPlus9,\n} from '../svgs/spring-with-props';\nimport { getBrightnessPerEth } from './functions';\n\ninterface Props {\n cjpyPriceRank: number;\n ethPriceRank: number;\n colorCodePerTcr: number;\n}\n\nfunction switchSpring(cjpyPriceRank: number, colorCode: number) {\n const springColor = `hsl(${colorCode},100%,76%)`;\n switch (cjpyPriceRank) {\n case -10:\n return ;\n case -9:\n return ;\n case -8:\n return ;\n case -7:\n return ;\n case -6:\n return ;\n case -5:\n return ;\n case -4:\n return ;\n case -3:\n return ;\n case -2:\n return ;\n case -1:\n return ;\n case 0:\n return ;\n case 1:\n return ;\n case 2:\n return ;\n case 3:\n return ;\n case 4:\n return ;\n case 5:\n return ;\n case 6:\n return ;\n case 7:\n return ;\n case 8:\n return ;\n case 9:\n return ;\n case 10:\n return ;\n default:\n return ;\n }\n}\n\nfunction switchBackgroundColor(ethPriceRank: number) {\n const brightness = getBrightnessPerEth(ethPriceRank); // Max95% - Min50%\n if (ethPriceRank > 0) {\n return `linear-gradient(180deg, hsla(360, 0%, 100%, 0) 0%, hsl(360, 100%, ${brightness}%) 100%)`;\n } else if (ethPriceRank < 0) {\n return `linear-gradient(180deg, hsla(236, 0%, 100%, 0) 0%, hsl(236, 100%, ${brightness}%) 100%)`;\n } else {\n return `linear-gradient(180deg, hsla(298, 0%, 100%, 0) 0%, hsl(298, 100%, 95%) 100%)`;\n }\n}\n\nexport default function CjpyPrice(props: Props) {\n const { cjpyPriceRank, ethPriceRank, colorCodePerTcr } = props;\n\n const background = useMemo(\n () => switchBackgroundColor(ethPriceRank),\n [ethPriceRank]\n );\n return (\n \n \n
\n \n
\n
\n {switchSpring(cjpyPriceRank, colorCodePerTcr)}\n
\n
\n \n );\n}\n","export default __webpack_public_path__ + \"static/media/eth-change-arrow-zero.1d8a169b.svg\";","import * as React from 'react';\n\nfunction SvgEthChangeArrowDown(props) {\n return (\n \n \n \n );\n}\n\nexport default SvgEthChangeArrowDown;\n","import * as React from 'react';\n\nfunction SvgEthChangeArrowUp(props) {\n return (\n \n \n \n );\n}\n\nexport default SvgEthChangeArrowUp;\n","import { Box } from '@chakra-ui/react';\nimport ArrowZero from '../../assets/svg/sources/eth-change-arrow/eth-change-arrow-zero.svg';\nimport { formatPrice } from '../../utils/prices';\nimport { ItemTitleForInfographics } from '../CommonItem';\nimport ArrowDown from '../svgs/eth-change-arrow-with-props/EthChangeArrowDown.js';\nimport ArrowUp from '../svgs/eth-change-arrow-with-props/EthChangeArrowUp.js';\nimport { getBrightnessPerEth } from './functions';\n\ninterface Props {\n ethPrice: number;\n ethPriceRank: number;\n}\n\nfunction renderArrow(ethPriceRank: number) {\n const brightness = getBrightnessPerEth(ethPriceRank);\n const style = { margin: 'auto' };\n const svgProps = { width: 55, height: 22, viewBox: '0 0 55 55' };\n if (ethPriceRank > 0) {\n return (\n \n );\n } else if (ethPriceRank < 0) {\n return (\n \n );\n } else {\n return (\n \n );\n }\n}\n\nexport default function EthPrice(props: Props) {\n const { ethPrice, ethPriceRank } = props;\n\n return (\n \n \n ETH\n \n ¥{formatPrice(ethPrice, 'jpy').value}\n \n \n
{renderArrow(ethPriceRank)}
\n \n );\n}\n","import * as React from 'react';\n\nfunction SvgBattery10Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery10Charge;\n","import * as React from 'react';\n\nfunction SvgBattery10Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery10Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery1Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery1Charge;\n","import * as React from 'react';\n\nfunction SvgBattery1Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery1Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery2Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery2Charge;\n","import * as React from 'react';\n\nfunction SvgBattery2Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery2Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery3Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery3Charge;\n","import * as React from 'react';\n\nfunction SvgBattery3Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery3Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery4Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery4Charge;\n","import * as React from 'react';\n\nfunction SvgBattery4Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery4Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery5Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery5Charge;\n","import * as React from 'react';\n\nfunction SvgBattery5Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery5Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery6Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery6Charge;\n","import * as React from 'react';\n\nfunction SvgBattery6Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery6Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery7Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery7Charge;\n","import * as React from 'react';\n\nfunction SvgBattery7Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery7Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery8Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery8Charge;\n","import * as React from 'react';\n\nfunction SvgBattery8Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery8Discharge;\n","import * as React from 'react';\n\nfunction SvgBattery9Charge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery9Charge;\n","import * as React from 'react';\n\nfunction SvgBattery9Discharge(props) {\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default SvgBattery9Discharge;\n","import { Box } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport styled from 'styled-components';\nimport { ItemTitleForInfographics } from '../CommonItem';\nimport {\n Battery10Charge,\n Battery10Discharge,\n Battery1Charge,\n Battery1Discharge,\n Battery2Charge,\n Battery2Discharge,\n Battery3Charge,\n Battery3Discharge,\n Battery4Charge,\n Battery4Discharge,\n Battery5Charge,\n Battery5Discharge,\n Battery6Charge,\n Battery6Discharge,\n Battery7Charge,\n Battery7Discharge,\n Battery8Charge,\n Battery8Discharge,\n Battery9Charge,\n Battery9Discharge,\n} from '../svgs/battery';\n\nconst BatteryContainer = styled.div`\n margin: auto;\n height: 4.1rem;\n display: table;\n`;\nconst BatterySvgWrapper = styled.div`\n display: table-cell;\n text-align: center;\n vertical-align: middle;\n`;\n\ninterface Props {\n reserveRankOfRedemption: number;\n isDecreaseForRedemptionReserve: boolean;\n reserveRankOfSweep: number;\n isDecreaseForSweepReserve: boolean;\n}\n\nfunction renderBattery(reserveRank: number, isDecrease: boolean) {\n const svgProps = { viewBox: '10 -3 40 40' };\n const svgProps2 = { height: '4rem', viewBox: '22 0 50 50' };\n switch (reserveRank) {\n case 1:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 2:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 3:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 4:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 5:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 6:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 7:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 8:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 9:\n return !isDecrease ? (\n \n ) : (\n \n );\n case 10:\n return !isDecrease ? (\n \n ) : (\n \n );\n default:\n return ;\n }\n}\n\nexport default function Pool(props: Props) {\n const { t } = useTranslation();\n const {\n reserveRankOfRedemption,\n isDecreaseForRedemptionReserve,\n reserveRankOfSweep,\n isDecreaseForSweepReserve,\n } = props;\n\n return (\n \n \n \n {t('infographics.redemptionPool')}\n \n \n \n \n {renderBattery(\n reserveRankOfRedemption,\n isDecreaseForRedemptionReserve\n )}\n \n \n \n \n {t('infographics.liquidationPool')}\n \n \n \n \n {renderBattery(reserveRankOfSweep, isDecreaseForSweepReserve)}\n \n \n \n );\n}\n","import * as React from 'react';\n\nfunction SvgThermometer(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {'MCR 130%'}\n \n \n \n );\n}\n\nexport default SvgThermometer;\n","import { Box } from '@chakra-ui/react';\nimport { ItemTitleForInfographics } from '../CommonItem';\nimport { Thermometer } from '../svgs/thermometer-with-props';\nimport { getTcrRate } from './functions';\n\ninterface Props {\n tcr: number;\n}\n\nexport default function Tcr(props: Props) {\n const { tcr } = props;\n\n return (\n \n \n TCR\n \n {tcr.toLocaleString(undefined, {\n maximumFractionDigits: 2,\n })}\n %\n \n \n
\n \n
\n \n );\n}\n","import { Grid, GridItem, HStack } from '@chakra-ui/react';\nimport { useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useYamatoStateForInfographics } from '../../state/yamato-entirety/hooks';\nimport { getEthChangePercent } from '../../utils/prices';\nimport {\n CategoryTitle,\n ConentBox,\n HeaderBox1,\n ItemTitleValue,\n} from '../CommonItem';\nimport TerminologyPopover from '../TerminologyPopover';\nimport CjpyPrice from './CjpyPrice';\nimport EthPrice from './EthPrice';\nimport Pool from './Pool';\nimport Tcr from './Tcr';\nimport {\n getReserveRankOfRedemption,\n getReserveRankOfSweep,\n getCjpyPriceRank,\n getColorCodePerTcr,\n getEthPriceRank,\n getSignalMessages,\n} from './functions';\n\nfunction getCjpyRank(rateOfCjpyJpy: [string, number]) {\n if (!rateOfCjpyJpy || !rateOfCjpyJpy[1]) {\n return 0;\n }\n\n const rawPrice = rateOfCjpyJpy[1];\n return getCjpyPriceRank(rawPrice);\n}\n\nexport interface InfographicsProps {\n // state.market\n rateOfCjpyJpy: [string, number][];\n\n // state.yamatoEntirety\n totalCollateral: number; // state.yamatoEntirety.lending.totalCollateral\n totalDebt: number; // state.yamatoEntirety.lending.totalDebt\n tcr: number; // state.yamatoEntirety.lending.tcr\n rateOfEthJpy: number; // state.yamatoEntirety.rateOfEthJpy\n prevRateOfEthJpy: number; // state.yamatoEntirety.prevRateOfEthJpy\n redemptionReserve: number; // state.yamatoEntirety.pool.redemptionReserve\n prevRedemptionReserve: number; // state.yamatoEntirety.pool.prevRedemptionReserve\n sweepReserve: number; // state.yamatoEntirety.pool.sweepReserve\n prevSweepReserve: number; // state.yamatoEntirety.pool.prevSweepReserve\n}\n\nexport function InfographicsHelp() {\n const { t } = useTranslation();\n return (\n \n {t('infographics.tcr')}\n {t('infographics.mcr')}\n \n );\n}\n\nexport function InfographicsContent(props: Partial) {\n const yamatoState = useYamatoStateForInfographics();\n const mixedValues = { ...yamatoState, ...props };\n const { t } = useTranslation();\n\n const {\n rateOfCjpyJpy,\n rateOfEthJpy,\n prevRateOfEthJpy,\n redemptionReserve,\n prevRedemptionReserve,\n sweepReserve,\n prevSweepReserve,\n totalCollateral,\n totalDebt,\n tcr,\n MCR,\n isRedeemablePledge,\n } = mixedValues;\n\n const fixedTcr = useMemo(() => {\n return props.hasOwnProperty('totalCollateral') ||\n props.hasOwnProperty('totalDebt') ||\n props.hasOwnProperty('rateOfEthJpy')\n ? (100 * totalCollateral * rateOfEthJpy) / totalDebt\n : tcr;\n }, [props, totalDebt, totalCollateral, rateOfEthJpy, tcr]);\n const ethChangePercent = useMemo(\n () => getEthChangePercent(rateOfEthJpy, prevRateOfEthJpy),\n [rateOfEthJpy, prevRateOfEthJpy]\n );\n const isDecreaseForRedemptionReserve = useMemo(\n () => redemptionReserve < prevRedemptionReserve,\n [redemptionReserve, prevRedemptionReserve]\n );\n const isDecreaseForSweepReserve = useMemo(\n () => sweepReserve < prevSweepReserve,\n [sweepReserve, prevSweepReserve]\n );\n\n /**\n * All 21 Ranks(-10 ~ +10)\n */\n const cjpyPriceRank = useMemo(\n () => getCjpyRank(rateOfCjpyJpy[0]),\n [rateOfCjpyJpy]\n );\n /**\n * All 91 Ranks(-45 ~ +45)\n */\n const ethPriceRank = useMemo(\n () => getEthPriceRank(ethChangePercent),\n [ethChangePercent]\n );\n /**\n * All 125 ranks. Min 236 - Mid 298 - Max 360\n */\n const colorCodePerTcr = useMemo(\n () => getColorCodePerTcr(fixedTcr, MCR),\n [fixedTcr, MCR]\n );\n /**\n * Rank up per 5000,000\n */\n const reserveRankOfRedemption = useMemo(\n () => getReserveRankOfRedemption(redemptionReserve),\n [redemptionReserve]\n );\n /**\n * Rank up per 1000,000\n */\n const reserveRankOfSweep = useMemo(\n () => getReserveRankOfSweep(sweepReserve),\n [sweepReserve]\n );\n\n const renderSignalMessages = useCallback(() => {\n const messages = getSignalMessages(\n cjpyPriceRank,\n ethPriceRank,\n isRedeemablePledge,\n t\n );\n return messages.map((message, index) => (\n \n {message}\n \n ));\n }, [cjpyPriceRank, ethPriceRank, isRedeemablePledge, t]);\n\n return (\n <>\n
\n {renderSignalMessages()}\n
\n \n \n \n \n \n \n
\n \n
\n \n
\n
\n \n );\n}\n\nexport default function Infographics(props: Partial) {\n return (\n <>\n \n \n CJPY Now\n \n \n \n \n \n \n \n );\n}\n","import { createAction } from '@reduxjs/toolkit';\nimport { PledgeState } from './reducer';\n\nexport const fetchMyPledge = createAction(\n 'pledge/fetchMyPledge'\n);\n\nexport const reset = createAction('pledge/reset');\n","import { useCallback } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { useActiveWeb3React } from '../../hooks/web3';\nimport { AppDispatch, AppState } from '../index';\nimport { fetchMyPledge } from './actions';\nimport { PledgeDetail, PledgeState } from './reducer';\n\n/**\n * selector\n */\nexport function usePledgeData(): PledgeDetail['owner'] {\n const { account } = useActiveWeb3React();\n return useSelector((state: AppState) => {\n if (!account || !state.pledge.list[account.toLowerCase()]) {\n return {\n collateral: 0,\n debt: 0,\n };\n }\n return {\n ...state.pledge.list[account.toLowerCase()],\n };\n });\n}\n\n/**\n * dispatcher\n */\nexport function useFetchMyPledge() {\n const dispatch = useDispatch();\n return useCallback(\n (pledge: PledgeState['list']) => dispatch(fetchMyPledge(pledge)),\n [dispatch]\n );\n}\n","import { Contract } from '@ethersproject/contracts';\n// import ARGENT_WALLET_DETECTOR_ABI from 'abis/argent-wallet-detector.json';\n// import EIP_2612 from 'abis/eip_2612.json';\nimport { abi as MulticallABI } from '@uniswap/v3-periphery/artifacts/contracts/lens/UniswapInterfaceMulticall.sol/UniswapInterfaceMulticall.json';\nimport { useMemo } from 'react';\nimport {\n ENS_REGISTRAR_ADDRESSES,\n YAMATO_MAIN_ADDRESSES,\n YAMATO_POOL_ADDRESSES,\n YAMATO_PRICE_FEED_ADDRESSES,\n CURVE_POOL_ADDRESS,\n CJPY_ADDRESSES,\n YMT_ADDRESSES,\n VEYMT_ADDRESSES,\n MULTICALL_ADDRESS,\n YAMATO_PRIORITY_REGISTRY_ADDRESSES,\n ZERO_ADDRESS,\n} from '../constants/addresses';\nimport CURVE_POOL_ABI from '../infrastructures/abis/curve/curveTwocryptoOptimized.json';\nimport ENS_PUBLIC_RESOLVER_ABI from '../infrastructures/abis/external/ens-public-resolver.json';\nimport ENS_ABI from '../infrastructures/abis/external/ens-registrar.json';\nimport {\n // ArgentWalletDetector,\n YamatoV3,\n Pool,\n PriceFeedV3,\n YMT,\n VeYMT,\n EnsPublicResolver,\n EnsRegistrar,\n CJPY,\n CurveTwocryptoOptimized,\n UniswapInterfaceMulticall,\n PriorityRegistryV6,\n} from '../infrastructures/abis/types';\nimport CJPY_ABI from '../infrastructures/abis/yamato/CJPY.json';\nimport YAMATO_POOL_ABI from '../infrastructures/abis/yamato/PoolV2.json';\nimport YAMATO_PRICE_FEED_ABI from '../infrastructures/abis/yamato/PriceFeedV3.json';\nimport YAMATO_PRIORITY_REGISTRY_ABI from '../infrastructures/abis/yamato/PriorityRegistryV6.json';\nimport YMT_ABI from '../infrastructures/abis/yamato/YMT.json';\nimport YAMATO_MAIN_ABI from '../infrastructures/abis/yamato/YamatoV3.json';\nimport VEYMT_ABI from '../infrastructures/abis/yamato/veYMT.json';\nimport { getContract } from '../utils/web3';\nimport { useActiveWeb3React } from './web3';\n\n// returns null on errors\nexport function useContract(\n addressOrAddressMap: string | { [chainId: number]: string } | undefined,\n ABI: any,\n withSignerIfPossible = true\n): T | null {\n const { library, account, chainId } = useActiveWeb3React();\n\n return useMemo(() => {\n if (!addressOrAddressMap || !ABI || !library) return null;\n\n // chainIdがnullの場合は1(Ethereum Mainnet)を使用\n const effectiveChainId = chainId ?? 1;\n\n let address: string | undefined;\n if (typeof addressOrAddressMap === 'string') address = addressOrAddressMap;\n else address = addressOrAddressMap[effectiveChainId];\n\n if (!address || address === ZERO_ADDRESS) return null;\n try {\n return getContract(\n address,\n ABI,\n library,\n withSignerIfPossible && account ? account : undefined\n );\n } catch (error) {\n console.error('Failed to get contract', error);\n return null;\n }\n }, [\n addressOrAddressMap,\n ABI,\n library,\n chainId,\n withSignerIfPossible,\n account,\n ]) as T;\n}\n\n/**\n * Yamato\n */\nexport function useYamatoMainContract() {\n return useContract(YAMATO_MAIN_ADDRESSES, YAMATO_MAIN_ABI);\n}\nexport function useYamatoPoolContract() {\n return useContract(YAMATO_POOL_ADDRESSES, YAMATO_POOL_ABI);\n}\nexport function useYamatoPriceFeedContract() {\n return useContract(\n YAMATO_PRICE_FEED_ADDRESSES,\n YAMATO_PRICE_FEED_ABI\n );\n}\nexport function useYamatoPriorityRegistryContract() {\n return useContract(\n YAMATO_PRIORITY_REGISTRY_ADDRESSES,\n YAMATO_PRIORITY_REGISTRY_ABI\n );\n}\n\n/**\n * POOL\n */\nexport function useCurvePoolContract() {\n return useContract(\n CURVE_POOL_ADDRESS,\n CURVE_POOL_ABI\n );\n}\n\n/**\n * Token\n */\nexport function useCjpyContract() {\n return useContract(CJPY_ADDRESSES, CJPY_ABI);\n}\nexport function useYmtContract() {\n return useContract(YMT_ADDRESSES, YMT_ABI);\n}\nexport function useVeYmtContract() {\n return useContract(VEYMT_ADDRESSES, VEYMT_ABI);\n}\n\n// export function useArgentWalletDetectorContract() {\n// return useContract(\n// ARGENT_WALLET_DETECTOR_ADDRESS,\n// ARGENT_WALLET_DETECTOR_ABI,\n// false\n// );\n// }\n\n/**\n * ENS\n */\nexport function useENSRegistrarContract(withSignerIfPossible?: boolean) {\n return useContract(\n ENS_REGISTRAR_ADDRESSES,\n ENS_ABI,\n withSignerIfPossible\n );\n}\nexport function useENSResolverContract(\n address: string | undefined,\n withSignerIfPossible?: boolean\n) {\n return useContract(\n address,\n ENS_PUBLIC_RESOLVER_ABI,\n withSignerIfPossible\n );\n}\n\n// export function useEIP2612Contract(tokenAddress?: string): Contract | null {\n// return useContract(tokenAddress, EIP_2612, false);\n// }\n\nexport function useMulticall2Contract() {\n return useContract(\n MULTICALL_ADDRESS,\n MulticallABI,\n false\n ) as UniswapInterfaceMulticall;\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { PopulatedTransaction } from '@ethersproject/contracts';\nimport { REVERT_REASON_DESCRIPTION } from '../../constants/yamato';\nimport { YamatoV3 } from '../../infrastructures/abis/types';\n\ntype MethodName =\n | 'deposit'\n | 'withdraw'\n | 'borrow'\n | 'repay'\n | 'selfRedeem'\n | 'coreRedeem'\n | 'sweep';\n\nexport enum CallbackState {\n INVALID,\n LOADING,\n VALID,\n}\n\nexport const InvalidCallback = {\n state: CallbackState.INVALID,\n callback: null,\n error: 'Missing dependencies',\n};\n\n/**\n * This is hacking out the revert reason from the ethers provider thrown error however it can.\n * This object seems to be undocumented by ethers.\n * @param error an error from the ethers provider\n */\nfunction swapErrorToUserReadableMessage(error: any): string {\n let reason: string | undefined;\n while (Boolean(error)) {\n reason = error.reason ?? error.message ?? reason;\n error = error.error ?? error.data?.originalError;\n }\n\n if (reason?.indexOf('execution reverted: ') === 0)\n reason = reason.substr('execution reverted: '.length);\n\n const defaultMessage = `${REVERT_REASON_DESCRIPTION.default}${\n reason ? `: \"${reason}\"` : ''\n } `;\n\n switch (reason) {\n // Yamato.sol\n case \"FlashLock.blockHeight can't be more than currenct blockheight.\":\n case 'Invalid FlashLockTypes given.':\n case \"Those can't be called in the same block.\":\n return REVERT_REASON_DESCRIPTION.notFlashLoan;\n // YamatoDepositor.sol\n case 'transfer failed':\n return REVERT_REASON_DESCRIPTION.transferFailure;\n // YamatoWithdrawer.sol\n case 'Withdrawal amount must be less than equal to the target coll amount.':\n return REVERT_REASON_DESCRIPTION.depositShortage;\n case 'Withdrawal amount must be less than equal to the total coll amount.':\n return REVERT_REASON_DESCRIPTION.depositShortage;\n case 'Withdrawal is being locked for this sender.':\n return REVERT_REASON_DESCRIPTION.withdrawLock;\n case 'Withdrawal failure: ICR is not more than MCR.':\n return REVERT_REASON_DESCRIPTION.underMCR;\n case \"Withdrawal failure: ICR can't be less than MCR after withdrawal.\":\n return REVERT_REASON_DESCRIPTION.underMCR;\n // YamatoBorrower.sol\n case 'This pledge is not created yet.':\n return REVERT_REASON_DESCRIPTION.nonPledge;\n case 'This minting is invalid because of too large borrowing.':\n return REVERT_REASON_DESCRIPTION.underMCR;\n case 'fee must be more than zero.':\n return REVERT_REASON_DESCRIPTION.zeroFee;\n case '(borrow - fee) must be more than zero.':\n return REVERT_REASON_DESCRIPTION.insufficientBorrowing;\n // YamatoRepayer.sol\n case 'You are repaying no Currency':\n return REVERT_REASON_DESCRIPTION.zeroRepay;\n case \"You can't repay for a zero-debt pledge.\":\n case 'You are trying to repay more than your debt.':\n return REVERT_REASON_DESCRIPTION.overDebt;\n case 'You are trying to repay more than you have.':\n return REVERT_REASON_DESCRIPTION.overBalance;\n // YamatoRedeemer.sol\n case 'You are redeeming more than the bearer has.':\n return REVERT_REASON_DESCRIPTION.overBalance;\n case 'No pledges are redeemed.':\n return REVERT_REASON_DESCRIPTION.noRedeemablePledge;\n case \"Can't expense zero pledge.\":\n return REVERT_REASON_DESCRIPTION.depositShortage;\n // YamatoSweeper.sol\n case 'Sweep failure: sweep reserve is empty.':\n return REVERT_REASON_DESCRIPTION.noSweepReserve;\n case 'At least a pledge should be swept.':\n return REVERT_REASON_DESCRIPTION.noSweepablePledge;\n // authority\n case 'You are not the governer.':\n return REVERT_REASON_DESCRIPTION.notGoverner;\n case 'You are not the tester.':\n return REVERT_REASON_DESCRIPTION.notTester;\n // others\n case 'execution reverted': // incorrect contract address, incorrect ABIs, etc.\n return REVERT_REASON_DESCRIPTION.justReverted;\n default:\n return defaultMessage;\n }\n}\n\nexport function getErrorMessage(methodName: MethodName, error: any) {\n // if the user rejected the tx, pass this along\n if (error?.code === 4001) {\n return REVERT_REASON_DESCRIPTION.walletRejected;\n } else {\n // otherwise, the error was unexpected and we need to convey that\n console.error(`Yamato.${methodName} failed: `, error);\n\n return `Yamato.${methodName} failed: ${swapErrorToUserReadableMessage(\n error\n )}`;\n }\n}\n\n/**\n * @param value Set 0, if nothing.\n */\nexport function estimateGas(\n methodName: MethodName,\n value: BigNumber,\n option: PopulatedTransaction,\n signer: YamatoV3\n) {\n let method: Promise | null = null;\n switch (methodName) {\n case 'deposit':\n method = signer.estimateGas.deposit(option);\n break;\n case 'withdraw':\n method = signer.estimateGas.withdraw(value, option);\n break;\n case 'borrow':\n method = signer.estimateGas.borrow(value, option);\n break;\n case 'repay':\n method = signer.estimateGas.repay(value, option);\n break;\n case 'selfRedeem':\n method = signer.estimateGas.redeem(value, false, option);\n break;\n case 'coreRedeem':\n method = signer.estimateGas.redeem(value, true, option);\n break;\n case 'sweep':\n method = signer.estimateGas.sweep(option);\n break;\n }\n if (!method) {\n throw new Error('unexpected error');\n }\n\n return method\n .then((gasEstimate) => ({ gasEstimate: calculateGasMargin(gasEstimate) }))\n .catch((gasError) => {\n console.error(`Gas estimate failed in Yamato.${methodName}`);\n return { error: swapErrorToUserReadableMessage(gasError) };\n });\n}\n\n// add 50%\nexport function calculateGasMargin(value: BigNumber): BigNumber {\n return value.mul(BigNumber.from(10000 + 5000)).div(BigNumber.from(10000));\n}\n","import { createAction } from '@reduxjs/toolkit';\n\nexport const fetchWallet = createAction<{\n cjpy: number;\n eth: number;\n}>('wallet/fetchWallet');\n","import { useCallback } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { AppDispatch, AppState } from '../index';\nimport { fetchWallet } from './actions';\n\n/**\n * selector\n */\nexport function useWalletState() {\n return useSelector((state: AppState) => ({\n cjpy: state.wallet.cjpy,\n eth: state.wallet.eth,\n }));\n}\n\n/**\n * dispatcher\n */\nexport function useFetchWallet() {\n const dispatch = useDispatch();\n return useCallback(\n (cjpy: number, eth: number) => dispatch(fetchWallet({ cjpy, eth })),\n [dispatch]\n );\n}\n","import { createStandaloneToast } from '@chakra-ui/react';\nimport { ErrorToastConfig } from '../constants/yamato';\n\nexport function errorToast(error: any) {\n const toast = createStandaloneToast();\n const description =\n error instanceof Error ? error.message : JSON.stringify(error);\n const config = {\n ...ErrorToastConfig,\n description,\n };\n if (description === 'Transaction rejected.') {\n // Shorten Metamask errors\n config.duration = 3000;\n }\n toast(config);\n}\n","import {\n FormControl,\n FormErrorMessage,\n HStack,\n VStack,\n} from '@chakra-ui/react';\nimport { Formik, Form, Field, FormikHelpers, FieldProps } from 'formik';\nimport { useCallback, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { MIN_COLLATERAL, YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useDepositCallback } from '../../../hooks/yamato/useDepositCallback';\nimport { useWalletState } from '../../../state/wallet/hooks';\nimport { addToNum } from '../../../utils/bignumber';\nimport { errorToast } from '../../../utils/errorToast';\nimport {\n formatCollateralizationRatio,\n formatPrice,\n} from '../../../utils/prices';\nimport { CustomButton, CustomFormLabel, CustomInput } from '../../CommonItem';\n\ntype Props = { collateral: number; debt: number; rateOfEthJpy: number };\n\nexport default function DepositInput(props: Props) {\n const { collateral, debt, rateOfEthJpy } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useDepositCallback();\n const { eth } = useWalletState();\n\n const [deposit, setDeposit] = useState();\n\n const { t } = useTranslation();\n\n const validateDeposit = useCallback(\n async (value: number | '') => {\n if (!account || !callback) {\n return t('pledge.collateral.alert1');\n }\n\n if (!value) {\n setDeposit(value);\n return;\n }\n if (value > eth) {\n return t('pledge.collateral.alert2');\n }\n if (value < MIN_COLLATERAL - collateral) {\n return (\n t('pledge.collateral.alert3') +\n MIN_COLLATERAL +\n YAMATO_SYMBOL.COLLATERAL +\n t('pledge.collateral.alert4')\n );\n }\n\n // Value is correct\n setDeposit(value);\n return undefined;\n },\n [account, eth, collateral, t, callback]\n );\n\n const submitDeposit = useCallback(\n async (\n values: { deposit: number | '' },\n formikHelpers: FormikHelpers<{\n deposit: number | '';\n }>\n ) => {\n console.debug('submit deposit', values);\n\n if (!values.deposit) {\n return;\n }\n\n if (values.deposit <= 0) {\n errorToast(t('pledge.collateral.alert5'));\n return;\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(values.deposit);\n console.debug('deposit done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n setDeposit('');\n formikHelpers.resetForm();\n },\n [t, callback]\n );\n\n return (\n \n {(formikProps) => (\n
\n \n \n \n {({ field }: FieldProps) => (\n \n \n \n \n {formikProps.errors.deposit}\n \n \n )}\n \n \n {t('pledge.collateral.depositExecution')}\n \n \n \n \n \n {deposit && deposit > 0 && (\n \n \n \n \n )}\n \n
\n )}\n \n );\n}\n","import { useMemo } from 'react';\nimport { REVERT_REASON_DESCRIPTION } from '../../constants/yamato';\nimport { TransactionType } from '../../state/transactions/actions';\nimport { useTransactionAdder } from '../../state/transactions/hooks';\nimport { BIGNUMBER_ZERO } from '../../utils/web3';\nimport { parseEther } from '../../utils/web3';\nimport { useYamatoMainContract } from '../useContract';\nimport { useActiveWeb3React } from '../web3';\nimport {\n CallbackState,\n getErrorMessage,\n estimateGas,\n InvalidCallback,\n} from './helper';\n\nexport function useDepositCallback(): {\n // signatureData: SignatureData | undefined | null FIXME: EIP-2612\n state: CallbackState;\n callback: null | ((eth: number) => Promise);\n error: string | null;\n} {\n const { account, chainId, library } = useActiveWeb3React();\n\n const yamatoMainContract = useYamatoMainContract();\n const addTransaction = useTransactionAdder();\n\n return useMemo(() => {\n if (!library || !account || !chainId || !yamatoMainContract) {\n return InvalidCallback;\n }\n\n return {\n state: CallbackState.VALID,\n callback: async function onDeposit(eth: number): Promise {\n // payload\n const value = parseEther(eth.toString());\n if (value.eq(BIGNUMBER_ZERO)) {\n throw new Error(REVERT_REASON_DESCRIPTION.zeroInput);\n }\n const tx = {\n from: account,\n value,\n };\n\n const signer = yamatoMainContract.connect(library.getSigner());\n\n // estimate gas\n const call = await estimateGas('deposit', parseEther('0'), tx, signer);\n if ('error' in call) {\n throw new Error(call.error);\n }\n\n try {\n // send tx\n const params = { ...tx, gasLimit: call.gasEstimate };\n const response = await signer.deposit(params);\n\n // regist pending tx\n addTransaction(response, {\n type: TransactionType.DEPOSIT,\n value: eth,\n });\n\n return response.hash;\n } catch (error: any) {\n throw new Error(getErrorMessage('deposit', error));\n }\n },\n error: null,\n };\n }, [library, account, chainId, yamatoMainContract, addTransaction]);\n}\n","import {\n FormControl,\n FormErrorMessage,\n HStack,\n VStack,\n Button,\n} from '@chakra-ui/react';\nimport { Formik, Form, Field, FormikHelpers, FieldProps } from 'formik';\nimport { useCallback, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { MIN_COLLATERAL, YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useWithdrawCallback } from '../../../hooks/yamato/useWithdrawCallback';\nimport { subtractToNum } from '../../../utils/bignumber';\nimport { errorToast } from '../../../utils/errorToast';\nimport {\n formatCollateralizationRatio,\n formatPrice,\n} from '../../../utils/prices';\nimport { CustomButton, CustomFormLabel, CustomInput } from '../../CommonItem';\n\ntype Props = {\n collateral: number;\n debt: number;\n rateOfEthJpy: number;\n};\n\nexport default function WithdrawalInput(props: Props) {\n const { collateral, debt, rateOfEthJpy } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useWithdrawCallback();\n\n const [withdrawal, setWithdrawal] = useState();\n const { t } = useTranslation();\n const validateWithdrawal = useCallback(\n (value: number | '') => {\n if (!account || !callback) {\n return t('pledge.collateral.alert1');\n }\n\n if (!value) {\n setWithdrawal(value);\n return;\n }\n if (value > collateral) {\n return t('pledge.collateral.alert6');\n }\n if (value > collateral - MIN_COLLATERAL && value !== collateral) {\n return (\n t('pledge.collateral.alert3') +\n MIN_COLLATERAL +\n YAMATO_SYMBOL.COLLATERAL +\n t('pledge.collateral.alert4')\n );\n }\n // Value is correct\n setWithdrawal(value);\n return undefined;\n },\n [account, collateral, t, callback]\n );\n\n const submitWithdrawal = useCallback(\n async (\n values: { withdrawal: number | '' },\n formikHelpers: FormikHelpers<{\n withdrawal: number | '';\n }>\n ) => {\n console.debug('submit withdrawal', values);\n\n if (!values.withdrawal) {\n return;\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(values.withdrawal);\n console.debug('withdrawal done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n setWithdrawal('');\n formikHelpers.resetForm();\n },\n [callback]\n );\n\n return (\n \n {(formikProps) => (\n
\n \n \n {({ field, form }: FieldProps) => (\n \n \n \n \n\n {collateral > 0 && debt == 0 && (\n {\n form.setFieldValue('withdrawal', collateral);\n }}\n minWidth=\"40px\"\n >\n MAX\n \n )}\n \n {t('pledge.collateral.withdrawalExecution')}\n \n \n \n {formikProps.errors.withdrawal}\n \n \n )}\n \n {withdrawal && withdrawal > 0 && (\n \n \n \n \n )}\n \n
\n )}\n \n );\n}\n","import { useMemo } from 'react';\nimport { REVERT_REASON_DESCRIPTION } from '../../constants/yamato';\nimport { TransactionType } from '../../state/transactions/actions';\nimport { useTransactionAdder } from '../../state/transactions/hooks';\nimport { BIGNUMBER_ZERO } from '../../utils/web3';\nimport { parseEther } from '../../utils/web3';\nimport { useYamatoMainContract } from '../useContract';\nimport { useActiveWeb3React } from '../web3';\nimport {\n CallbackState,\n getErrorMessage,\n estimateGas,\n InvalidCallback,\n} from './helper';\n\nexport function useWithdrawCallback(): {\n // signatureData: SignatureData | undefined | null FIXME: EIP-2612\n state: CallbackState;\n callback: null | ((eth: number) => Promise);\n error: string | null;\n} {\n const { account, chainId, library } = useActiveWeb3React();\n\n const yamatoMainContract = useYamatoMainContract();\n const addTransaction = useTransactionAdder();\n\n return useMemo(() => {\n if (!library || !account || !chainId || !yamatoMainContract) {\n return InvalidCallback;\n }\n\n return {\n state: CallbackState.VALID,\n callback: async function onWithdraw(eth: number): Promise {\n // payload\n const value = parseEther(eth.toString());\n if (value.eq(BIGNUMBER_ZERO)) {\n throw new Error(REVERT_REASON_DESCRIPTION.zeroInput);\n }\n const option = {\n from: account,\n };\n\n const signer = yamatoMainContract.connect(library.getSigner());\n\n // estimate gas\n const call = await estimateGas('withdraw', value, option, signer);\n if ('error' in call) {\n throw new Error(call.error);\n }\n\n try {\n // send tx\n const params = { ...option, gasLimit: call.gasEstimate };\n const response = await signer.withdraw(value, params);\n\n // regist pending tx\n addTransaction(response, {\n type: TransactionType.WITHDRAW,\n value: eth,\n });\n\n return response.hash;\n } catch (error: any) {\n throw new Error(getErrorMessage('withdraw', error));\n }\n },\n error: null,\n };\n }, [library, account, chainId, yamatoMainContract, addTransaction]);\n}\n","import { Grid, GridItem, Skeleton, Box } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { usePledgeData } from '../../../state/pledge/hooks';\nimport { useYamatoStateForPledge } from '../../../state/yamato-entirety/hooks';\nimport { multiplyToNum } from '../../../utils/bignumber';\nimport { formatPrice } from '../../../utils/prices';\nimport { ItemTitleForPledge, ItemTitleValue } from '../../CommonItem';\nimport DepositInput from './DepositInput';\nimport WithdrawalInput from './WithdrawalInput';\n\nexport default function Collateral() {\n const { rateOfEthJpy, firstLoadCompleted } = useYamatoStateForPledge();\n const { collateral, debt } = usePledgeData();\n const { t } = useTranslation();\n\n return (\n <>\n \n \n \n \n \n \n {t('pledge.collateral.collateralBalance')}\n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatPrice(collateral, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL}\n \n ) : (\n \n )}\n \n \n \n\n \n \n \n {t('pledge.collateral.valuation')}\n \n \n \n \n {firstLoadCompleted ? (\n <>\n ¥\n {\n formatPrice(\n multiplyToNum(collateral, rateOfEthJpy),\n 'jpy'\n ).value\n }\n \n ) : (\n \n )}\n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n );\n}\n","import {\n FormControl,\n FormErrorMessage,\n HStack,\n VStack,\n} from '@chakra-ui/react';\nimport { Formik, Form, Field, FormikHelpers, FieldProps } from 'formik';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useBorrowCallback } from '../../../hooks/yamato/useBorrowCallback';\nimport { addToNum, divideToNum } from '../../../utils/bignumber';\nimport { calcFee } from '../../../utils/calcFee';\nimport { errorToast } from '../../../utils/errorToast';\nimport {\n formatCollateralizationRatio,\n formatPrice,\n} from '../../../utils/prices';\nimport { CustomButton, CustomFormLabel, CustomInput } from '../../CommonItem';\n\ntype Props = {\n collateral: number;\n debt: number;\n rateOfEthJpy: number;\n MCR: number;\n};\n\nexport default function BorrowingInput(props: Props) {\n const { collateral, debt, rateOfEthJpy, MCR } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useBorrowCallback();\n\n const { t } = useTranslation();\n\n const [borrowing, setBorrowing] = useState();\n\n const feeResult = useMemo(() => {\n if (borrowing) {\n if (debt + borrowing <= 0) {\n return { fee: 0, feeRate: 0 };\n }\n const ICR =\n divideToNum(collateral * rateOfEthJpy, debt + borrowing) * 100;\n return calcFee(borrowing, ICR);\n } else {\n return { fee: 0, feeRate: 0 };\n }\n }, [collateral, debt, borrowing, rateOfEthJpy]);\n\n const validateBorrowing = useCallback(\n async (value: number | '') => {\n if (!account || !callback) {\n return t('pledge.debt.alert1');\n }\n\n if (!value) {\n setBorrowing(value);\n return;\n }\n\n const sum = debt + value;\n if (sum <= 0) {\n return t('pledge.debt.alert2');\n }\n const collateralRate = ((collateral * rateOfEthJpy) / sum) * 100;\n if (MCR > collateralRate) {\n return `${t('pledge.debt.alert3')} ${MCR} ${t('pledge.debt.alert4')}`;\n }\n\n // Value is correct\n setBorrowing(value);\n return undefined;\n },\n [account, collateral, debt, rateOfEthJpy, MCR, t, callback]\n );\n\n const submitBorrowing = useCallback(\n async (\n values: { borrowing: number | '' },\n formikHelpers: FormikHelpers<{\n borrowing: number | '';\n }>\n ) => {\n console.debug('submit borrowing', values);\n\n if (!values.borrowing) {\n return;\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(values.borrowing);\n console.debug('borrowing done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n setBorrowing('');\n formikHelpers.resetForm();\n },\n [callback]\n );\n\n return (\n \n {(formikProps) => (\n
\n \n \n \n {({ field }: FieldProps) => (\n \n \n \n \n {formikProps.errors.borrowing}\n \n \n )}\n \n \n {t('pledge.debt.borrowExecution')}\n \n \n {borrowing && borrowing > 0 && (\n \n \n \n \n \n \n )}\n \n
\n )}\n \n );\n}\n","import { useMemo } from 'react';\nimport { REVERT_REASON_DESCRIPTION } from '../../constants/yamato';\nimport { TransactionType } from '../../state/transactions/actions';\nimport { useTransactionAdder } from '../../state/transactions/hooks';\nimport { BIGNUMBER_ZERO } from '../../utils/web3';\nimport { parseEther } from '../../utils/web3';\nimport { useYamatoMainContract } from '../useContract';\nimport { useActiveWeb3React } from '../web3';\nimport {\n CallbackState,\n getErrorMessage,\n estimateGas,\n InvalidCallback,\n} from './helper';\n\nexport function useBorrowCallback(): {\n // signatureData: SignatureData | undefined | null FIXME: EIP-2612\n state: CallbackState;\n callback: null | ((cjpy: number) => Promise);\n error: string | null;\n} {\n const { account, chainId, library } = useActiveWeb3React();\n\n const yamatoMainContract = useYamatoMainContract();\n const addTransaction = useTransactionAdder();\n\n return useMemo(() => {\n if (!library || !account || !chainId || !yamatoMainContract) {\n return InvalidCallback;\n }\n\n return {\n state: CallbackState.VALID,\n callback: async function onBorrow(cjpy: number): Promise {\n // payload\n const value = parseEther(cjpy.toString());\n if (value.eq(BIGNUMBER_ZERO)) {\n throw new Error(REVERT_REASON_DESCRIPTION.zeroInput);\n }\n const option = {\n from: account,\n };\n\n const signer = yamatoMainContract.connect(library.getSigner());\n\n // estimate gas\n const call = await estimateGas('borrow', value, option, signer);\n if ('error' in call) {\n throw new Error(call.error);\n }\n\n try {\n // send tx\n const params = { ...option, gasLimit: call.gasEstimate };\n const response = await signer.borrow(value, params);\n\n // regist pending tx\n addTransaction(response, {\n type: TransactionType.BORROW,\n value: cjpy,\n });\n\n return response.hash;\n } catch (error: any) {\n throw new Error(getErrorMessage('borrow', error));\n }\n },\n error: null,\n };\n }, [library, account, chainId, yamatoMainContract, addTransaction]);\n}\n","import { multiplyToNum } from './bignumber';\n\nexport function calcFee(\n borrowingAmount: number,\n ICR: number\n): { fee: number; feeRate: number } {\n const ICRperTenk = (ICR / 10) * 1000;\n const feeRate = getFeeRate(ICRperTenk);\n\n const fee = multiplyToNum(borrowingAmount, feeRate) / 10000;\n return { fee, feeRate: feeRate / 100 };\n}\n\n// Ported from FR in yamato/contracts/Dependencies/PledgeLib.sol\nexport function getFeeRate(ICRperTenk: number) {\n if (13000 <= ICRperTenk && ICRperTenk < 15000) {\n return 400 - ((ICRperTenk - 13000) * 10) / 100;\n } else if (15000 <= ICRperTenk && ICRperTenk < 20000) {\n return 200 - ((ICRperTenk - 15000) * 2) / 100;\n } else if (20000 <= ICRperTenk && ICRperTenk < 50000) {\n return 100 - ((ICRperTenk - 20000) * 3) / 10 / 100;\n } else {\n return 10;\n }\n}\n","import {\n Button,\n FormControl,\n FormErrorMessage,\n HStack,\n VStack,\n} from '@chakra-ui/react';\nimport { Formik, Form, Field, FormikHelpers, FieldProps } from 'formik';\nimport { useCallback, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useRepayCallback } from '../../../hooks/yamato/useRepayCallback';\nimport { subtractToNum } from '../../../utils/bignumber';\nimport { errorToast } from '../../../utils/errorToast';\nimport {\n formatCollateralizationRatio,\n formatPrice,\n} from '../../../utils/prices';\nimport { CustomButton, CustomFormLabel, CustomInput } from '../../CommonItem';\n\ntype Props = {\n collateral: number;\n debt: number;\n rateOfEthJpy: number;\n cjpy: number;\n};\n\nexport default function RepayInput(props: Props) {\n const { collateral, debt, rateOfEthJpy, cjpy } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useRepayCallback();\n\n const [repayment, setRepayment] = useState();\n\n const { t } = useTranslation();\n\n const validateRepayment = useCallback(\n (value: number | '') => {\n if (!account || !callback) {\n return t('pledge.debt.alert1');\n }\n\n if (!value) {\n setRepayment(value);\n return;\n }\n if (value > debt) {\n return t('pledge.debt.alert5');\n }\n if (value > cjpy) {\n return t('pledge.debt.alert6');\n }\n\n // Value is correct\n setRepayment(value);\n return undefined;\n },\n [account, debt, cjpy, t, callback]\n );\n\n const submitRepayment = useCallback(\n async (\n values: { repayment: number | '' },\n formikHelpers: FormikHelpers<{\n repayment: number | '';\n }>\n ) => {\n console.debug('submit repayment', values);\n\n if (!values.repayment) {\n return;\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(values.repayment);\n console.debug('repayment done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n setRepayment('');\n formikHelpers.resetForm();\n },\n [callback]\n );\n return (\n \n {(formikProps) => (\n
\n \n \n {({ field, form }: FieldProps) => (\n \n \n \n \n {debt > 0 && cjpy > 0 && (\n {\n const value = Math.min(debt, cjpy);\n form.setFieldValue('repayment', value);\n }}\n minWidth=\"40px\"\n >\n MAX\n \n )}\n \n {t('pledge.debt.repaymentExecution')}\n \n \n \n {formikProps.errors.repayment}\n \n \n )}\n \n {repayment && repayment > 0 && (\n \n \n \n \n )}\n \n
\n )}\n \n );\n}\n","import { useMemo } from 'react';\nimport { REVERT_REASON_DESCRIPTION } from '../../constants/yamato';\nimport { TransactionType } from '../../state/transactions/actions';\nimport { useTransactionAdder } from '../../state/transactions/hooks';\nimport { BIGNUMBER_ZERO } from '../../utils/web3';\nimport { parseEther } from '../../utils/web3';\nimport { useYamatoMainContract } from '../useContract';\nimport { useActiveWeb3React } from '../web3';\nimport {\n CallbackState,\n getErrorMessage,\n estimateGas,\n InvalidCallback,\n} from './helper';\n\nexport function useRepayCallback(): {\n // signatureData: SignatureData | undefined | null FIXME: EIP-2612\n state: CallbackState;\n callback: null | ((cjpy: number) => Promise);\n error: string | null;\n} {\n const { account, chainId, library } = useActiveWeb3React();\n\n const yamatoMainContract = useYamatoMainContract();\n const addTransaction = useTransactionAdder();\n\n return useMemo(() => {\n if (!library || !account || !chainId || !yamatoMainContract) {\n return InvalidCallback;\n }\n\n return {\n state: CallbackState.VALID,\n callback: async function onRepay(cjpy: number): Promise {\n // payload\n const value = parseEther(cjpy.toString());\n if (value.eq(BIGNUMBER_ZERO)) {\n throw new Error(REVERT_REASON_DESCRIPTION.zeroInput);\n }\n const option = {\n from: account,\n };\n\n const signer = yamatoMainContract.connect(library.getSigner());\n\n // estimate gas\n const call = await estimateGas('repay', value, option, signer);\n if ('error' in call) {\n throw new Error(call.error);\n }\n\n try {\n // send tx\n const params = { ...option, gasLimit: call.gasEstimate };\n const response = await signer.repay(value, params);\n\n // regist pending tx\n addTransaction(response, {\n type: TransactionType.REPAY,\n value: cjpy,\n });\n\n return response.hash;\n } catch (error: any) {\n throw new Error(getErrorMessage('repay', error));\n }\n },\n error: null,\n };\n }, [library, account, chainId, yamatoMainContract, addTransaction]);\n}\n","import { Grid, GridItem, Skeleton, Box } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { usePledgeData } from '../../../state/pledge/hooks';\nimport { useWalletState } from '../../../state/wallet/hooks';\nimport { useYamatoStateForPledge } from '../../../state/yamato-entirety/hooks';\nimport {\n formatCollateralizationRatio,\n formatPrice,\n} from '../../../utils/prices';\nimport { ItemTitleValue, ItemTitleForPledge } from '../../CommonItem';\nimport BorrowInput from './BorrowingInput';\nimport RepayInput from './RepayInput';\n\nfunction getBorrowableAmount(\n collateral: number,\n debt: number,\n rateOfEthJpy: number,\n MCR: number\n) {\n if (MCR <= 0) {\n return 0;\n }\n const collateralBasedJpy = collateral * rateOfEthJpy;\n const MCR2 = MCR / 100;\n if (debt > 0) {\n const ICR = collateralBasedJpy / debt;\n if (ICR - MCR2 <= 0) {\n return 0;\n }\n }\n\n // coll / (debt + x) = MCR -> x = (coll - debt * MCR) / MCR\n const borrowableAmount = (collateralBasedJpy - debt * MCR2) / MCR2;\n return borrowableAmount;\n}\n\nexport default function Debt() {\n const { rateOfEthJpy, MCR, firstLoadCompleted } = useYamatoStateForPledge();\n const { collateral, debt } = usePledgeData();\n const { cjpy } = useWalletState();\n const { t } = useTranslation();\n\n return (\n <>\n \n \n \n \n \n \n \n {t('pledge.debt.maximumBorrowableAmount')}\n \n \n \n \n {firstLoadCompleted ? (\n <>\n {\n formatPrice(\n getBorrowableAmount(\n collateral,\n debt,\n rateOfEthJpy,\n MCR\n ),\n 'jpy'\n ).value\n }\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n \n \n\n \n \n \n \n {t('pledge.debt.borrowBalance')}\n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatPrice(debt, 'jpy').value}\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n \n \n\n \n \n \n \n {t('pledge.debt.collateralRate')}\n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatCollateralizationRatio(\n collateral * rateOfEthJpy,\n debt\n )}\n %\n \n ) : (\n \n )}\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n );\n}\n","import { Box } from '@chakra-ui/react';\nimport { CategoryTitle, ConentBox, HeaderBox2 } from '../CommonItem';\nimport Collateral from './Collateral';\nimport Debt from './Debt';\n\nexport default function Pledge() {\n return (\n <>\n \n My Pledge\n \n \n \n \n \n \n \n );\n}\n","import { useMemo } from 'react';\nimport { REVERT_REASON_DESCRIPTION } from '../../constants/yamato';\nimport { TransactionType } from '../../state/transactions/actions';\nimport { useTransactionAdder } from '../../state/transactions/hooks';\nimport { BIGNUMBER_ZERO } from '../../utils/web3';\nimport { parseEther } from '../../utils/web3';\nimport { useYamatoMainContract } from '../useContract';\nimport { useActiveWeb3React } from '../web3';\nimport {\n CallbackState,\n getErrorMessage,\n estimateGas,\n InvalidCallback,\n} from './helper';\n\nexport function useRedeemCallback(): {\n // signatureData: SignatureData | undefined | null FIXME: EIP-2612\n state: CallbackState;\n callback:\n | null\n | ((\n sort: 'selfRedeem' | 'coreRedeem',\n cjpy: number,\n expected: number\n ) => Promise);\n error: string | null;\n} {\n const { account, chainId, library } = useActiveWeb3React();\n\n const yamatoMainContract = useYamatoMainContract();\n const addTransaction = useTransactionAdder();\n\n return useMemo(() => {\n if (!library || !account || !chainId || !yamatoMainContract) {\n return InvalidCallback;\n }\n\n return {\n state: CallbackState.VALID,\n callback: async function onRedeem(\n sort: 'selfRedeem' | 'coreRedeem',\n cjpy: number,\n expected: number\n ): Promise {\n // payload\n const value = parseEther(cjpy.toString());\n if (value.eq(BIGNUMBER_ZERO)) {\n throw new Error(REVERT_REASON_DESCRIPTION.zeroInput);\n }\n const option = {\n from: account,\n };\n\n const signer = yamatoMainContract.connect(library.getSigner());\n\n // estimate gas\n const call = await estimateGas(sort, value, option, signer);\n if ('error' in call) {\n throw new Error(call.error);\n }\n\n try {\n // send tx\n const params = { ...option, gasLimit: call.gasEstimate };\n const isCore = sort === 'coreRedeem';\n const response = await signer.redeem(value, isCore, params);\n\n // regist pending tx\n addTransaction(response, {\n type: isCore\n ? TransactionType.CORE_REDEEM\n : TransactionType.SELF_REDEEM,\n value: cjpy,\n expected,\n });\n\n return response.hash;\n } catch (error: any) {\n throw new Error(getErrorMessage(sort, error));\n }\n },\n error: null,\n };\n }, [library, account, chainId, yamatoMainContract, addTransaction]);\n}\n","export function getExpectedReward(\n candidateAmount: number,\n isCore: boolean,\n GRR: number,\n rateOfEthJpy: number\n) {\n if (candidateAmount <= 0 || !rateOfEthJpy) {\n return { eth: 0, cjpy: 0 };\n }\n\n if (isCore) {\n candidateAmount *= GRR / 100;\n }\n\n const eth = convertEthFromCjpy(candidateAmount, rateOfEthJpy);\n return { eth, cjpy: candidateAmount };\n}\n\nexport function getEthAmountFromCjpy(\n amountOfCjpy: number,\n rateOfEthJpy: number\n): { eth: number; cjpy: number } {\n if (!amountOfCjpy || !rateOfEthJpy) {\n return { eth: 0, cjpy: 0 };\n }\n\n const eth = convertEthFromCjpy(amountOfCjpy, rateOfEthJpy);\n return { eth, cjpy: amountOfCjpy };\n}\n\nexport function convertEthFromCjpy(amountOfJpy: number, rateOfEthJpy: number) {\n if (!rateOfEthJpy) {\n return 0;\n }\n const converted = amountOfJpy / rateOfEthJpy;\n return converted;\n}\n","import { Grid, GridItem, Skeleton, VStack } from '@chakra-ui/react';\nimport { Formik, Form, FormikHelpers } from 'formik';\nimport { useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useRedeemCallback } from '../../../hooks/yamato/useRedemption';\nimport { errorToast } from '../../../utils/errorToast';\nimport { formatPrice } from '../../../utils/prices';\nimport { Text, CustomButton, CustomFormLabel } from '../../CommonItem';\nimport { getExpectedReward, getEthAmountFromCjpy } from '../shared/function';\n\ntype Props = {\n rateOfEthJpy: number;\n redemptionReserve: number;\n redeemableCandidate: number;\n GRR: number;\n firstLoadCompleted: boolean;\n};\n\nexport default function RedemptionInput(props: Props) {\n const {\n rateOfEthJpy,\n redemptionReserve,\n redeemableCandidate,\n GRR,\n firstLoadCompleted,\n } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useRedeemCallback();\n\n const { t } = useTranslation();\n\n const isCore = true;\n\n const formattedRedeemableCandidate = useMemo(\n () => getEthAmountFromCjpy(redeemableCandidate, rateOfEthJpy),\n [redeemableCandidate, rateOfEthJpy]\n );\n const formattedRedemptionReserve = useMemo(\n () => getEthAmountFromCjpy(redemptionReserve, rateOfEthJpy),\n [redemptionReserve, rateOfEthJpy]\n );\n const expectedReward = useMemo(\n () =>\n getExpectedReward(\n Math.min(redemptionReserve, formattedRedeemableCandidate.cjpy),\n isCore,\n GRR,\n rateOfEthJpy\n ),\n [redemptionReserve, formattedRedeemableCandidate, isCore, GRR, rateOfEthJpy]\n );\n\n const submitRedemption = useCallback(\n async (\n values: { redemption: number },\n formikHelpers: FormikHelpers<{\n redemption: number;\n }>\n ) => {\n if (!account || !callback) {\n return t('redemption.coreRedemption.alert1');\n }\n\n console.debug('submit core redemption', values);\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(\n 'coreRedeem',\n expectedReward.cjpy,\n expectedReward.eth\n );\n console.debug('core redemption done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n formikHelpers.resetForm();\n },\n [account, expectedReward, t, callback]\n );\n\n return (\n \n {(formikProps) => (\n
\n \n \n \n \n \n \n {firstLoadCompleted ? (\n <>\n {\n formatPrice(formattedRedemptionReserve.cjpy, 'jpy')\n .value\n }\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n ({formatPrice(formattedRedemptionReserve.eth, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL})\n \n \n \n \n\n \n \n \n \n \n {firstLoadCompleted ? (\n <>\n {\n formatPrice(formattedRedeemableCandidate.cjpy, 'jpy')\n .value\n }\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n (\n {formatPrice(formattedRedeemableCandidate.eth, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL})\n \n \n \n \n\n \n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatPrice(expectedReward.eth, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL}\n \n ) : (\n \n )}\n \n \n \n \n\n \n \n {'Yamato' + t('redemption.coreRedemption.redemptionExecution')}\n \n \n \n \n )}\n
\n );\n}\n","import { Grid, GridItem } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { useYamatoStateForPledge } from '../../../state/yamato-entirety/hooks';\nimport { ItemTitleForPledge } from '../../CommonItem';\nimport RedemptionInput from './RedemptionInput';\n\nexport default function CoreRedemption() {\n const {\n rateOfEthJpy,\n redemptionReserve,\n redeemableCandidate,\n GRR,\n firstLoadCompleted,\n } = useYamatoStateForPledge();\n\n const { t } = useTranslation();\n\n return (\n \n \n \n Yamato{t('redemption.coreRedemption.redemption')}\n \n \n\n \n \n \n \n );\n}\n","import {\n FormControl,\n FormErrorMessage,\n Grid,\n GridItem,\n Skeleton,\n VStack,\n} from '@chakra-ui/react';\nimport { Formik, Form, Field, FieldProps, FormikHelpers } from 'formik';\nimport { useCallback, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useRedeemCallback } from '../../../hooks/yamato/useRedemption';\nimport { useWalletState } from '../../../state/wallet/hooks';\nimport { errorToast } from '../../../utils/errorToast';\nimport { formatPrice } from '../../../utils/prices';\nimport {\n Text,\n CustomButton,\n CustomFormLabel,\n CustomInput,\n} from '../../CommonItem';\nimport { getExpectedReward, getEthAmountFromCjpy } from '../shared/function';\n\ntype Props = {\n redeemableCandidate: number;\n rateOfEthJpy: number;\n GRR: number;\n firstLoadCompleted: boolean;\n};\n\nexport default function RedemptionInput(props: Props) {\n const { redeemableCandidate, rateOfEthJpy, GRR, firstLoadCompleted } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useRedeemCallback();\n const { cjpy } = useWalletState();\n\n const { t } = useTranslation();\n\n const isCore = false;\n\n const [redemption, setRedemption] = useState();\n const formattedRedeemableCandidate = useMemo(\n () => getEthAmountFromCjpy(redeemableCandidate, rateOfEthJpy),\n [redeemableCandidate, rateOfEthJpy]\n );\n const expectedReward = useMemo(\n () =>\n redemption\n ? getExpectedReward(\n Math.min(redemption, formattedRedeemableCandidate.cjpy),\n isCore,\n GRR,\n rateOfEthJpy\n )\n : getExpectedReward(0, isCore, GRR, rateOfEthJpy),\n [redemption, formattedRedeemableCandidate, isCore, GRR, rateOfEthJpy]\n );\n\n const validateRedemption = useCallback(\n async (value: number | '') => {\n if (!account || !callback) {\n return t('redemption.selfRedemption.alert1');\n }\n\n if (!value) {\n setRedemption(value);\n return;\n }\n if (value > cjpy) {\n return t('redemption.selfRedemption.alert2');\n }\n\n if (value > formattedRedeemableCandidate.cjpy) {\n return t('redemption.selfRedemption.alert3');\n }\n\n // Value is correct\n setRedemption(value);\n return undefined;\n },\n [account, cjpy, formattedRedeemableCandidate, t, callback]\n );\n\n const submitRedemption = useCallback(\n async (\n values: { redemption: number | '' },\n formikHelpers: FormikHelpers<{\n redemption: number | '';\n }>\n ) => {\n console.debug('submit self redemption', values);\n\n if (!values.redemption) {\n return;\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(\n 'selfRedeem',\n values.redemption,\n expectedReward.eth\n );\n console.debug('self redemption done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n setRedemption('');\n formikHelpers.resetForm();\n },\n [expectedReward, callback]\n );\n\n return (\n \n {(formikProps) => (\n
\n \n \n \n \n \n {({ field, form }: FieldProps) => (\n \n \n \n {form.errors.redemption}\n \n \n )}\n \n \n \n\n \n \n {typeof redemption === 'number' && redemption > 0 && (\n <>\n \n \n {formatPrice(expectedReward.eth, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL}\n \n \n )}\n \n \n\n \n \n \n \n \n {firstLoadCompleted ? (\n <>\n {\n formatPrice(formattedRedeemableCandidate.cjpy, 'jpy')\n .value\n }\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n (\n {formatPrice(formattedRedeemableCandidate.eth, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL})\n \n \n \n \n\n \n \n {t('redemption.selfRedemption.redemptionExecution')}\n \n \n \n \n )}\n \n );\n}\n","import { Grid, GridItem } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { useYamatoStateForPledge } from '../../../state/yamato-entirety/hooks';\nimport { ItemTitleForPledge } from '../../CommonItem';\nimport RedemptionInput from './RedemptionInput';\n\nexport default function SelfRedemption() {\n const { redeemableCandidate, rateOfEthJpy, GRR, firstLoadCompleted } =\n useYamatoStateForPledge();\n const { t } = useTranslation();\n\n return (\n \n \n \n {t('redemption.selfRedemption.redemption')}\n \n \n\n \n \n \n \n );\n}\n","import { Grid, GridItem, Skeleton, VStack } from '@chakra-ui/react';\nimport { Formik, Form, FormikHelpers } from 'formik';\nimport { useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { YAMATO_SYMBOL } from '../../../constants/yamato';\nimport { useActiveWeb3React } from '../../../hooks/web3';\nimport { useSweepCallback } from '../../../hooks/yamato/useSweep';\nimport { errorToast } from '../../../utils/errorToast';\nimport { formatPrice } from '../../../utils/prices';\nimport { Text, CustomButton, CustomFormLabel } from '../../CommonItem';\nimport { getExpectedReward } from '../shared/function';\n\ntype Props = {\n rateOfEthJpy: number;\n sweepReserve: number;\n sweepableCandiate: number;\n GRR: number;\n firstLoadCompleted: boolean;\n};\n\nexport default function SweepInput(props: Props) {\n const {\n rateOfEthJpy,\n sweepReserve,\n sweepableCandiate,\n GRR,\n firstLoadCompleted,\n } = props;\n\n const { account } = useActiveWeb3React();\n const { callback } = useSweepCallback();\n\n const { t } = useTranslation();\n\n const isCore = true;\n\n const expectedReward = useMemo(\n () =>\n getExpectedReward(\n Math.min(sweepReserve, sweepableCandiate),\n isCore,\n GRR,\n rateOfEthJpy\n ),\n [sweepReserve, sweepableCandiate, isCore, GRR, rateOfEthJpy]\n );\n\n const submitSweep = useCallback(\n async (\n values: { sweep: number },\n formikHelpers: FormikHelpers<{\n sweep: number;\n }>\n ) => {\n if (!account || !callback) {\n return t('redemption.sweep.alert1');\n }\n\n console.debug('submit sweep', values);\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const res = await callback!(expectedReward.cjpy);\n console.debug('sweep done', res);\n } catch (error) {\n errorToast(error);\n }\n\n // reset\n formikHelpers.resetForm();\n },\n [account, expectedReward, t, callback]\n );\n\n return (\n \n {(formikProps) => (\n
\n \n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatPrice(sweepReserve, 'jpy').value}\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n \n\n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatPrice(sweepableCandiate, 'jpy').value}{' '}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n \n \n\n \n \n \n \n {firstLoadCompleted ? (\n <>\n {formatPrice(expectedReward.cjpy, 'jpy').value}\n {` `}\n {YAMATO_SYMBOL.YEN}\n \n ) : (\n \n )}\n \n {/* \n ({formatPrice(expectedReward.eth, 'eth').value}\n {` `}\n {YAMATO_SYMBOL.COLLATERAL})\n */}\n \n \n\n \n \n {t('redemption.sweep.subrogationExecution')}\n \n \n \n \n )}\n
\n );\n}\n","import { useMemo } from 'react';\n\nimport { TransactionType } from '../../state/transactions/actions';\nimport { useTransactionAdder } from '../../state/transactions/hooks';\nimport { parseEther } from '../../utils/web3';\nimport { useYamatoMainContract } from '../useContract';\nimport { useActiveWeb3React } from '../web3';\nimport {\n CallbackState,\n getErrorMessage,\n estimateGas,\n InvalidCallback,\n} from './helper';\n\nexport function useSweepCallback(): {\n // signatureData: SignatureData | undefined | null FIXME: EIP-2612\n state: CallbackState;\n callback: null | ((expected: number) => Promise);\n error: string | null;\n} {\n const { account, chainId, library } = useActiveWeb3React();\n\n const yamatoMainContract = useYamatoMainContract();\n const addTransaction = useTransactionAdder();\n\n return useMemo(() => {\n if (!library || !account || !chainId || !yamatoMainContract) {\n return InvalidCallback;\n }\n\n return {\n state: CallbackState.VALID,\n callback: async function onSweep(expected: number): Promise {\n // payload\n const option = {\n from: account,\n };\n\n const signer = yamatoMainContract.connect(library.getSigner());\n\n // estimate gas\n const call = await estimateGas(\n 'sweep',\n parseEther('0'),\n option,\n signer\n );\n if ('error' in call) {\n throw new Error(call.error);\n }\n\n try {\n // send tx\n const params = { ...option, gasLimit: call.gasEstimate };\n const response = await signer.sweep(params);\n\n // regist pending tx\n addTransaction(response, {\n type: TransactionType.SWEEP,\n expected,\n });\n\n return response.hash;\n } catch (error: any) {\n throw new Error(getErrorMessage('sweep', error));\n }\n },\n error: null,\n };\n }, [library, account, chainId, yamatoMainContract, addTransaction]);\n}\n","import { Grid, GridItem } from '@chakra-ui/react';\nimport { useTranslation } from 'react-i18next';\nimport { useYamatoStateForPledge } from '../../../state/yamato-entirety/hooks';\nimport { ItemTitleForPledge } from '../../CommonItem';\nimport SweepInput from './SweepInput';\n\nexport default function Sweep() {\n const {\n rateOfEthJpy,\n sweepReserve,\n sweepableCandiate,\n GRR,\n firstLoadCompleted,\n } = useYamatoStateForPledge();\n\n const { t } = useTranslation();\n\n return (\n \n \n \n Yamato{t('redemption.sweep.subrogation')}\n \n \n\n \n \n \n \n );\n}\n","import { Divider } from '@chakra-ui/react';\nimport { CategoryTitle, ConentBox, HeaderBox2 } from '../CommonItem';\nimport CoreRedemption from './CoreRedemption';\nimport SelfRedemption from './SelfRedemption';\nimport Sweep from './Sweep';\n\nexport default function Redemption() {\n return (\n <>\n \n Functions\n \n \n \n \n \n \n \n \n \n );\n}\n","import { Skeleton } from '@chakra-ui/react';\nimport { useWeb3React } from '@web3-react/core';\nimport { useTranslation } from 'react-i18next';\nimport { TransitionGroup, CSSTransition } from 'react-transition-group';\n\nimport styled from 'styled-components';\nimport { useYamatoStateForWorld } from '../../../state/yamato-entirety/hooks';\nimport { LogEvent, LogEventType } from '../../../state/yamato-entirety/reducer';\nimport { formatPrice } from '../../../utils/prices';\nimport { shortenAddress } from '../../../utils/web3';\nimport { Text } from '../../CommonItem';\n\nfunction getDescriptor(event: LogEvent, t: any) {\n switch (event.category as LogEventType) {\n case 'deposit':\n return `${formatPrice(event.value, 'eth').value}ETH${t(\n 'world.logViewer.alert1'\n )}`;\n case 'withdrawal':\n return `${formatPrice(event.value, 'eth').value}ETH${t(\n 'world.logViewer.alert2'\n )}`;\n case 'borrowing':\n return `${formatPrice(event.value, 'jpy').value}CJPY${t(\n 'world.logViewer.alert3'\n )}`;\n case 'repay':\n return `${formatPrice(event.value, 'jpy').value}CJPY${t(\n 'world.logViewer.alert4'\n )}`;\n case 'self_redemption':\n return `${t('world.logViewer.alert5')}`;\n case 'core_redemption':\n return `${t('world.logViewer.alert5')}`;\n case 'sweep':\n return `${t('world.logViewer.alert5')}`;\n default:\n return `${event.value}${t('world.logViewer.alert6')}`;\n }\n}\n\nfunction getColor(category: LogEventType) {\n switch (category) {\n case 'deposit':\n return `red`;\n case 'withdrawal':\n return `red`;\n case 'borrowing':\n return `green`;\n case 'repay':\n return `green`;\n case 'self_redemption':\n return `blue`;\n case 'core_redemption':\n return `blue`;\n case 'sweep':\n return `blue`;\n default:\n return `black`;\n }\n}\n\nconst Animation = styled.div`\n // enter from\n &.fade-enter {\n opacity: 0;\n }\n\n // enter to\n &.fade-enter-active {\n opacity: 1;\n transition: opacity 1s;\n }\n\n // exit from\n &.fade-exit {\n opacity: 1;\n }\n\n // exit to\n &.fade-exit-active {\n opacity: 0;\n transition: opacity 1s;\n }\n`;\n\nexport default function LogViewer() {\n const { account } = useWeb3React();\n const { events, firstLoadCompleted } = useYamatoStateForWorld();\n const { t } = useTranslation();\n function renderLogEvents(events: LogEvent[]) {\n return events.map((event) => {\n const color = getColor(event.category as LogEventType);\n const descriptor = getDescriptor(event, t);\n return (\n \n \n \n \n {t('constants.LOG_EVENT_NAME.' + event.category)}\n \n \n : {shortenAddress(event.address)}\n {t('world.logViewer.alert7')}\n \n {descriptor}\n \n \n \n );\n });\n }\n\n return (\n \n {firstLoadCompleted ? (\n events.length > 0 ? (\n {renderLogEvents(events)}\n ) : (\n {t('world.logViewer.alert8')}\n )\n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n \n )}\n \n );\n}\n","import { ExternalLinkIcon } from '@chakra-ui/icons';\nimport { YAMATO_MAIN_ADDRESSES } from '../../constants/addresses';\nimport { useActiveWeb3React } from '../../hooks/web3';\nimport { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink';\nimport { CategoryTitle, ConentBox, HeaderBox1 } from '../CommonItem';\nimport { ExternalLink } from '../ExternalLink';\nimport LogViewer from './LogViewer';\n\nexport default function World() {\n const { chainId } = useActiveWeb3React();\n\n return (\n <>\n \n \n Real Time TX{' '}\n \n \n \n \n \n \n \n \n \n );\n}\n","import { createAction } from '@reduxjs/toolkit';\n\nexport type PopupContent = {\n txn: {\n hash: string;\n };\n};\n\nexport enum ApplicationModal {\n WALLET,\n SETTINGS,\n MENU,\n NETWORK_SELECTOR,\n}\n\nexport const updateChainId = createAction<{ chainId: number | null }>(\n 'application/updateChainId'\n);\nexport const updateBlockNumber = createAction<{\n chainId: number;\n blockNumber: number;\n}>('application/updateBlockNumber');\nexport const setOpenModal = createAction(\n 'application/setOpenModal'\n);\n\nexport const setImplements3085 = createAction<{ implements3085: boolean }>(\n 'application/setImplements3085'\n);\nexport const setChainConnectivityWarning = createAction<{ warn: boolean }>(\n 'application/setChainConnectivityWarning'\n);\n","export default __webpack_public_path__ + \"static/media/background_main.ebea8205.webp\";","export const Organizer = 'DeFiGeek Community JAPAN';\n\nexport const ReferenceList = {\n forum: 'https://gov.defigeek.xyz/',\n discord: 'https://discord.gg/FQYXqVBEnh',\n github: 'https://github.com/DeFiGeek-Community',\n document: 'https://docs.yamato.fi/',\n};\n","import { useCallback } from 'react';\nimport { useActiveWeb3React } from '../../hooks/web3';\nimport { useAppDispatch, useAppSelector } from '../hooks';\n\nimport { AppState } from '../index';\nimport { ApplicationModal, setOpenModal } from './actions';\n\nexport function useBlockNumber(): number | undefined {\n const { chainId } = useActiveWeb3React();\n\n return useAppSelector(\n (state: AppState) => state.application.blockNumber[chainId ?? -1]\n );\n}\n\nexport function useModalOpen(modal: ApplicationModal): boolean {\n const openModal = useAppSelector(\n (state: AppState) => state.application.openModal\n );\n return openModal === modal;\n}\n\nexport function useToggleModal(modal: ApplicationModal): () => void {\n const open = useModalOpen(modal);\n const dispatch = useAppDispatch();\n return useCallback(\n () => dispatch(setOpenModal(open ? null : modal)),\n [dispatch, modal, open]\n );\n}\n\nexport function useWalletModalToggle(): () => void {\n return useToggleModal(ApplicationModal.WALLET);\n}\n","import * as React from 'react';\n\nfunction SvgCommunityLogoBlack(props) {\n return (\n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgCommunityLogoBlack;\n","import { Box, HStack, VStack, Spacer } from '@chakra-ui/layout';\nimport { useState, useEffect } from 'react';\nimport styled from 'styled-components';\nimport { Organizer, ReferenceList } from '../../constants/about';\nimport { useActiveWeb3React } from '../../hooks/web3';\nimport { useBlockNumber } from '../../state/application/hooks';\nimport { Text } from '../CommonItem';\nimport CommunityLogoBlack from '../svgs/CommunityLogoBlack';\n\nconst FooterItem = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n grid-gap: 20px;\n`;\n\nconst StyledPollingNumber = styled.div<{\n breathe: boolean;\n}>`\n font-size: 1rem;\n color: #5bad92;\n transition: opacity 0.25s ease;\n opacity: ${({ breathe }) => (breathe ? 0.5 : 1)};\n`;\n\nexport default function Footer() {\n const { active, account } = useActiveWeb3React();\n const blockNumber = useBlockNumber();\n const [isMounting, setIsMounting] = useState(false);\n\n useEffect(() => {\n if (!blockNumber) {\n return;\n }\n\n setIsMounting(true);\n const mountingTimer = setTimeout(() => setIsMounting(false), 1000);\n\n return () => {\n clearTimeout(mountingTimer);\n };\n }, [blockNumber]);\n\n return (\n \n \n \n \n \n © {Organizer}\n \n \n Forum \n \n \n Discord \n \n \n GitHub \n \n \n Document \n \n \n \n \n \n \n {active && account && `block:${blockNumber}`}\n \n \n );\n}\n","import { createAction } from '@reduxjs/toolkit';\n\nimport { Call } from './utils';\n\nexport interface ListenerOptions {\n // how often this data should be fetched, by default 1\n readonly blocksPerFetch: number;\n}\n\nexport const addMulticallListeners = createAction<{\n chainId: number;\n calls: Call[];\n options: ListenerOptions;\n}>('multicall/addMulticallListeners');\nexport const removeMulticallListeners = createAction<{\n chainId: number;\n calls: Call[];\n options: ListenerOptions;\n}>('multicall/removeMulticallListeners');\nexport const fetchingMulticallResults = createAction<{\n chainId: number;\n calls: Call[];\n fetchingBlockNumber: number;\n}>('multicall/fetchingMulticallResults');\nexport const errorFetchingMulticallResults = createAction<{\n chainId: number;\n calls: Call[];\n fetchingBlockNumber: number;\n}>('multicall/errorFetchingMulticallResults');\nexport const updateMulticallResults = createAction<{\n chainId: number;\n blockNumber: number;\n results: {\n [callKey: string]: string | null;\n };\n}>('multicall/updateMulticallResults');\n","export interface Call {\n address: string;\n callData: string;\n gasRequired?: number;\n}\n\nexport function toCallKey(call: Call): string {\n let key = `${call.address}-${call.callData}`;\n if (call.gasRequired) {\n if (!Number.isSafeInteger(call.gasRequired)) {\n throw new Error(`Invalid number: ${call.gasRequired}`);\n }\n key += `-${call.gasRequired}`;\n }\n return key;\n}\n\nexport function parseCallKey(callKey: string): Call {\n const pcs = callKey.split('-');\n if (![2, 3].includes(pcs.length)) {\n throw new Error(`Invalid call key: ${callKey}`);\n }\n return {\n address: pcs[0],\n callData: pcs[1],\n ...(pcs[2] ? { gasRequired: Number.parseInt(pcs[2]) } : {}),\n };\n}\n","import { FunctionFragment, Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { useEffect, useMemo } from 'react';\n\nimport { useActiveWeb3React } from '../../hooks/web3';\nimport { useBlockNumber } from '../application/hooks';\nimport { useAppDispatch, useAppSelector } from '../hooks';\nimport {\n addMulticallListeners,\n ListenerOptions,\n removeMulticallListeners,\n} from './actions';\nimport { Call, parseCallKey, toCallKey } from './utils';\n\nexport interface Result extends ReadonlyArray {\n readonly [key: string]: any;\n}\n\ntype MethodArg = string | number | BigNumber;\ntype MethodArgs = Array;\n\ntype OptionalMethodInputs =\n | Array\n | undefined;\n\nfunction isMethodArg(x: unknown): x is MethodArg {\n return (\n BigNumber.isBigNumber(x) || ['string', 'number'].indexOf(typeof x) !== -1\n );\n}\n\nfunction isValidMethodArgs(x: unknown): x is MethodArgs | undefined {\n return (\n x === undefined ||\n (Array.isArray(x) &&\n x.every(\n (xi) => isMethodArg(xi) || (Array.isArray(xi) && xi.every(isMethodArg))\n ))\n );\n}\n\ninterface CallResult {\n readonly valid: boolean;\n readonly data: string | undefined;\n readonly blockNumber: number | undefined;\n}\n\nconst INVALID_RESULT: CallResult = {\n valid: false,\n blockNumber: undefined,\n data: undefined,\n};\n\n// use this options object\nexport const NEVER_RELOAD: ListenerOptions = {\n blocksPerFetch: Infinity,\n};\n\n// the lowest level call for subscribing to contract data\nfunction useCallsData(\n calls: (Call | undefined)[],\n { blocksPerFetch }: ListenerOptions = { blocksPerFetch: 1 }\n): CallResult[] {\n const { chainId } = useActiveWeb3React();\n const callResults = useAppSelector((state) => state.multicall.callResults);\n const dispatch = useAppDispatch();\n\n const serializedCallKeys: string = useMemo(\n () =>\n JSON.stringify(\n calls\n ?.filter((c): c is Call => Boolean(c))\n ?.map(toCallKey)\n ?.sort() ?? []\n ),\n [calls]\n );\n\n // update listeners when there is an actual change that persists for at least 100ms\n useEffect(() => {\n const callKeys: string[] = JSON.parse(serializedCallKeys);\n if (!chainId || callKeys.length === 0) return undefined;\n const calls = callKeys.map((key) => parseCallKey(key));\n dispatch(\n addMulticallListeners({\n chainId,\n calls,\n options: { blocksPerFetch },\n })\n );\n\n return () => {\n dispatch(\n removeMulticallListeners({\n chainId,\n calls,\n options: { blocksPerFetch },\n })\n );\n };\n }, [chainId, dispatch, blocksPerFetch, serializedCallKeys]);\n\n return useMemo(\n () =>\n calls.map((call) => {\n if (!chainId || !call) return INVALID_RESULT;\n\n const result = callResults[chainId]?.[toCallKey(call)];\n let data;\n if (result?.data && result?.data !== '0x') {\n data = result.data;\n }\n\n return { valid: true, data, blockNumber: result?.blockNumber };\n }),\n [callResults, calls, chainId]\n );\n}\n\ninterface CallState {\n readonly valid: boolean;\n // the result, or undefined if loading or errored/no data\n readonly result: Result | undefined;\n // true if the result has never been fetched\n readonly loading: boolean;\n // true if the result is not for the latest block\n readonly syncing: boolean;\n // true if the call was made and is synced, but the return data is invalid\n readonly error: boolean;\n}\n\nconst INVALID_CALL_STATE: CallState = {\n valid: false,\n result: undefined,\n loading: false,\n syncing: false,\n error: false,\n};\nconst LOADING_CALL_STATE: CallState = {\n valid: true,\n result: undefined,\n loading: true,\n syncing: true,\n error: false,\n};\n\nfunction toCallState(\n callResult: CallResult | undefined,\n contractInterface: Interface | undefined,\n fragment: FunctionFragment | undefined,\n latestBlockNumber: number | undefined\n): CallState {\n if (!callResult) return INVALID_CALL_STATE;\n const { valid, data, blockNumber } = callResult;\n if (!valid) return INVALID_CALL_STATE;\n if (valid && !blockNumber) return LOADING_CALL_STATE;\n if (!contractInterface || !fragment || !latestBlockNumber)\n return LOADING_CALL_STATE;\n const success = data && data.length > 2;\n const syncing = (blockNumber ?? 0) < latestBlockNumber;\n let result: Result | undefined = undefined;\n if (success && data) {\n try {\n result = contractInterface.decodeFunctionResult(fragment, data);\n } catch (error) {\n console.debug('Result data parsing failed', fragment, data);\n return {\n valid: true,\n loading: false,\n error: true,\n syncing,\n result,\n };\n }\n }\n return {\n valid: true,\n loading: false,\n syncing,\n result,\n error: !success,\n };\n}\n\n// formats many calls to a single function on a single contract, with the function name and inputs specified\nexport function useSingleContractMultipleData(\n contract: Contract | null | undefined,\n methodName: string,\n callInputs: OptionalMethodInputs[],\n options: Partial & { gasRequired?: number } = {}\n): CallState[] {\n const fragment = useMemo(\n () => contract?.interface?.getFunction(methodName),\n [contract, methodName]\n );\n\n // encode callDatas\n const callDatas = useMemo(\n () =>\n contract && fragment\n ? callInputs.map((callInput) =>\n isValidMethodArgs(callInput)\n ? contract.interface.encodeFunctionData(fragment, callInput)\n : undefined\n )\n : [],\n [callInputs, contract, fragment]\n );\n\n const gasRequired = options?.gasRequired;\n const blocksPerFetch = options?.blocksPerFetch;\n\n // encode calls\n const calls = useMemo(\n () =>\n contract\n ? callDatas.map((callData) =>\n callData\n ? {\n address: contract.address,\n callData,\n gasRequired,\n }\n : undefined\n )\n : [],\n [contract, callDatas, gasRequired]\n );\n\n const results = useCallsData(\n calls,\n blocksPerFetch ? { blocksPerFetch } : undefined\n );\n\n const latestBlockNumber = useBlockNumber();\n\n return useMemo(() => {\n return results.map((result) =>\n toCallState(result, contract?.interface, fragment, latestBlockNumber)\n );\n }, [results, contract, fragment, latestBlockNumber]);\n}\n\nexport function useMultipleContractSingleData(\n addresses: (string | undefined)[],\n contractInterface: Interface,\n methodName: string,\n callInputs?: OptionalMethodInputs,\n options: Partial & { gasRequired?: number } = {}\n): CallState[] {\n const fragment = useMemo(\n () => contractInterface.getFunction(methodName),\n [contractInterface, methodName]\n );\n\n // encode callData\n const callData: string | undefined = useMemo(\n () =>\n isValidMethodArgs(callInputs)\n ? contractInterface.encodeFunctionData(fragment, callInputs)\n : undefined,\n [callInputs, contractInterface, fragment]\n );\n\n const gasRequired = options?.gasRequired;\n const blocksPerFetch = options?.blocksPerFetch;\n\n // encode calls\n const calls = useMemo(\n () =>\n callData\n ? addresses.map((address) => {\n return address\n ? {\n address,\n callData,\n gasRequired,\n }\n : undefined;\n })\n : [],\n [addresses, callData, gasRequired]\n );\n\n const results = useCallsData(\n calls,\n blocksPerFetch ? { blocksPerFetch } : undefined\n );\n\n const latestBlockNumber = useBlockNumber();\n\n return useMemo(() => {\n return results.map((result) =>\n toCallState(result, contractInterface, fragment, latestBlockNumber)\n );\n }, [fragment, results, contractInterface, latestBlockNumber]);\n}\n\nexport function useSingleCallResult(\n contract: Contract | null | undefined,\n methodName: string,\n inputs?: OptionalMethodInputs,\n options: Partial & { gasRequired?: number } = {}\n): CallState {\n return (\n useSingleContractMultipleData(contract, methodName, [inputs], options)[0] ??\n INVALID_CALL_STATE\n );\n}\n\n// formats many calls to any number of functions on a single contract, with only the calldata specified\nexport function useSingleContractWithCallData(\n contract: Contract | null | undefined,\n callDatas: string[],\n options: Partial & { gasRequired?: number } = {}\n): CallState[] {\n const gasRequired = options?.gasRequired;\n const blocksPerFetch = options?.blocksPerFetch;\n\n // encode calls\n const calls = useMemo(\n () =>\n contract\n ? callDatas.map((callData) => {\n return {\n address: contract.address,\n callData,\n gasRequired,\n };\n })\n : [],\n [contract, callDatas, gasRequired]\n );\n\n const results = useCallsData(\n calls,\n blocksPerFetch ? { blocksPerFetch } : undefined\n );\n\n const latestBlockNumber = useBlockNumber();\n\n return useMemo(() => {\n return results.map((result, i) =>\n toCallState(\n result,\n contract?.interface,\n contract?.interface?.getFunction(callDatas[i].substring(0, 10)),\n latestBlockNumber\n )\n );\n }, [results, contract, callDatas, latestBlockNumber]);\n}\n","import { useEffect, useState } from 'react';\n\n// modified from https://usehooks.com/useDebounce/\nexport default function useDebounce(value: T, delay: number): T {\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}\n","import { namehash } from '@ethersproject/hash';\nimport { useMemo } from 'react';\n\nimport { useSingleCallResult } from '../../state/multicall/hooks';\nimport isZero from '../../utils/isZero';\nimport { isAddress } from '../../utils/web3';\nimport {\n useENSRegistrarContract,\n useENSResolverContract,\n} from '../useContract';\nimport useDebounce from '../useDebounce';\n\n/**\n * Does a reverse lookup for an address to find its ENS name.\n * Note this is not the same as looking up an ENS name to find an address.\n */\nexport default function useENSName(address?: string): {\n ENSName: string | null;\n loading: boolean;\n} {\n const debouncedAddress = useDebounce(address, 200);\n const ensNodeArgument = useMemo(() => {\n if (!debouncedAddress || !isAddress(debouncedAddress)) return [undefined];\n try {\n return debouncedAddress\n ? [namehash(`${debouncedAddress.toLowerCase().substr(2)}.addr.reverse`)]\n : [undefined];\n } catch (error) {\n return [undefined];\n }\n }, [debouncedAddress]);\n const registrarContract = useENSRegistrarContract(false);\n const resolverAddress = useSingleCallResult(\n registrarContract,\n 'resolver',\n ensNodeArgument\n );\n const resolverAddressResult = resolverAddress.result?.[0];\n const resolverContract = useENSResolverContract(\n resolverAddressResult && !isZero(resolverAddressResult)\n ? resolverAddressResult\n : undefined,\n false\n );\n const name = useSingleCallResult(resolverContract, 'name', ensNodeArgument);\n\n const changed = debouncedAddress !== address;\n return {\n ENSName: changed ? null : name.result?.[0] ?? null,\n loading: changed || resolverAddress.loading || name.loading,\n };\n}\n","/**\n * Returns true if the string value is zero in hex\n * @param hexNumberString\n */\nexport default function isZero(hexNumberString: string) {\n return /^0x0*$/.test(hexNumberString);\n}\n","import * as React from 'react';\n\nfunction SvgCjpyLogo(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgCjpyLogo;\n","import { useBreakpointValue } from '@chakra-ui/react';\nimport React from 'react';\nimport styled from 'styled-components';\nimport CJPYLogo from '../../components/svgs/CjpyLogo';\nimport { useWalletState } from '../../state/wallet/hooks';\nimport { formatPrice } from '../../utils/prices';\nimport { FlexText } from './index';\n\nconst CurrencyToggleButton = styled.div`\n display: flex;\n align-items: center;\n padding: 0rem 1rem;\n border-radius: 40px;\n border: 1px solid ${({ theme }) => theme.text3};\n background-color: transparent;\n transition: box-shadow 0.3s, background-color 0.3s;\n`;\n\nconst CurrencyToggle: React.FC = () => {\n const { cjpy } = useWalletState();\n const fontSize = useBreakpointValue({ base: '1.2rem', sm: '1.6rem' });\n const mainFontSize = useBreakpointValue({\n base: '1.4rem',\n sm: '2rem',\n });\n const flexDirection = useBreakpointValue<'row' | 'column'>({\n base: 'column',\n sm: 'row',\n });\n const padding = useBreakpointValue({\n base: '0.5rem 1rem',\n sm: '0rem 1rem',\n });\n const lineHeight = useBreakpointValue({\n base: '1.8rem',\n sm: '2.2rem',\n });\n\n return (\n <>\n \n \n \n \n Balance\n \n \n \n {formatPrice(cjpy, 'jpy').value}\n \n \n CJPY\n \n \n \n \n \n );\n};\n\nexport default CurrencyToggle;\n","import { useEffect, useRef } from 'react';\n\n// modified from https://usehooks.com/usePrevious/\nexport default function usePrevious(value: T) {\n // The ref object is a generic container whose current property is mutable ...\n // ... and can hold any value, similar to an instance property on a class\n const ref = useRef();\n\n // Store current value in ref\n useEffect(() => {\n ref.current = value;\n }, [value]); // Only re-run if value changes\n\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n","import styled from 'styled-components/macro';\nimport { ExternalLink } from '../../ExternalLink';\n\nconst InfoCard = styled.button<{ active?: boolean }>`\n background-color: ${({ theme, active }) =>\n active ? theme.bg0 : theme.text2};\n padding: 1rem;\n outline: none;\n border: 1px solid;\n border-radius: 12px;\n width: 100% !important;\n &:focus {\n box-shadow: 0 0 0 1px ${({ theme }) => theme.text0};\n }\n border-color: ${({ theme, active }) =>\n active ? 'transparent' : theme.text1};\n`;\n\nconst OptionCard = styled(InfoCard as any)`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-top: 2rem;\n padding: 1rem;\n`;\n\nconst OptionCardLeft = styled.div`\n ${({ theme }) => theme.flexColumnNoWrap};\n justify-content: center;\n height: 100%;\n`;\n\nconst OptionCardClickable: any = styled(OptionCard as any)<{\n clickable?: boolean;\n}>`\n margin-top: 0;\n border: ${({ theme }) => `1px solid ${theme.bg1}`};\n &:hover {\n cursor: ${({ clickable }) => (clickable ? 'pointer' : '')};\n border: ${({ clickable, theme }) =>\n clickable ? `1px solid ${theme.bg1}` : ``};\n }\n opacity: ${({ disabled }) => (disabled ? '0.5' : '1')};\n`;\n\nconst GreenCircle = styled.div`\n ${({ theme }) => theme.flexRowNoWrap}\n justify-content: center;\n align-items: center;\n &:first-child {\n height: 8px;\n width: 8px;\n margin-right: 8px;\n background-color: ${({ theme }) => theme.bg0};\n border-radius: 50%;\n }\n`;\n\nconst CircleWrapper = styled.div`\n color: ${({ theme }) => theme.text1};\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst HeaderText = styled.div`\n ${({ theme }) => theme.flexRowNoWrap};\n color: ${({ theme }) => theme.text1};\n font-size: 1.6rem;\n font-weight: 500;\n`;\n\nconst SubHeader = styled.div`\n color: ${({ theme }) => theme.text1};\n margin-top: 10px;\n font-size: 1.2rem;\n`;\n\nconst IconWrapper = styled.div<{ size?: number | null }>`\n ${({ theme }) => theme.flexColumnNoWrap};\n align-items: center;\n justify-content: center;\n & > img,\n span {\n height: ${({ size }) => (size ? size + 'px' : '24px')};\n width: ${({ size }) => (size ? size + 'px' : '24px')};\n }\n ${({ theme }) => theme.mediaWidth.upToMedium`\n align-items: flex-end;\n `};\n`;\n\nexport default function Option({\n link = null,\n clickable = true,\n size,\n onClick = null,\n color,\n header,\n subheader = null,\n icon,\n active = false,\n id,\n}: {\n link?: string | null;\n clickable?: boolean;\n size?: number | null;\n onClick?: null | (() => void);\n color: string;\n header: React.ReactNode;\n subheader: React.ReactNode | null;\n icon: string;\n active?: boolean;\n id: string;\n}) {\n const content = (\n \n \n \n {active ? (\n \n \n
\n \n \n ) : (\n ''\n )}\n {header}\n \n {subheader && {subheader}}\n \n \n {'Icon'}\n \n \n );\n if (link) {\n return {content};\n }\n\n return content;\n}\n","import { AbstractConnector } from '@web3-react/abstract-connector';\nimport { useTranslation } from 'react-i18next';\nimport styled from 'styled-components';\nimport { SUPPORTED_WALLETS } from '../../../constants/web3';\nimport { injected } from '../../../infrastructures/connectors';\nimport { Text } from '../../CommonItem';\nimport Loader from '../../Loader';\nimport Option from './Option';\n\nconst PendingSection = styled.div`\n ${({ theme }) => theme.flexColumnNoWrap};\n align-items: center;\n justify-content: center;\n width: 100%;\n & > * {\n width: 100%;\n }\n`;\n\nconst LoadingMessage = styled.div<{ error?: boolean }>`\n ${({ theme }) => theme.flexRowNoWrap};\n align-items: center;\n justify-content: flex-start;\n border-radius: 12px;\n margin-bottom: 20px;\n color: ${({ theme, error }) => (error ? theme.error : 'inherit')};\n border: 1px solid\n ${({ theme, error }) => (error ? theme.error : theme.success)};\n & > * {\n padding: 1rem;\n }\n`;\n\nconst ErrorGroup = styled.div`\n ${({ theme }) => theme.flexRowNoWrap};\n align-items: center;\n justify-content: flex-start;\n`;\n\nconst ErrorButton = styled.div`\n border-radius: 8px;\n font-size: 1.4rem;\n color: ${({ theme }) => theme.text1};\n background-color: ${({ theme }) => theme.bg0};\n margin-left: 1rem;\n padding: 0.5rem;\n font-weight: 600;\n user-select: none;\n &:hover {\n cursor: pointer;\n border: 1px solid;\n border-color: ${({ theme }) => theme.text0};\n }\n`;\n\nconst LoadingWrapper = styled.div`\n ${({ theme }) => theme.flexRowNoWrap};\n align-items: center;\n justify-content: center;\n`;\n\nexport default function PendingView({\n connector,\n error = false,\n setPendingError,\n tryActivation,\n}: {\n connector?: AbstractConnector;\n error?: boolean;\n setPendingError: (error: boolean) => void;\n tryActivation: (connector: AbstractConnector) => void;\n}) {\n const isMetamask = window?.ethereum?.isMetaMask;\n const { t } = useTranslation();\n\n return (\n \n \n \n {error ? (\n \n \n Error connecting.\n
\n
\n {\n setPendingError(false);\n connector && tryActivation(connector);\n }}\n >\n Try Again\n \n {connector === injected && (\n \n {t('walletConnectButton.walletModal.alert3')}\n \n )}\n
\n \n ) : (\n <>\n \n Initializing...\n \n )}\n \n \n {Object.keys(SUPPORTED_WALLETS).map((key) => {\n const option = SUPPORTED_WALLETS[key];\n if (option.connector === connector) {\n if (option.connector === injected) {\n if (isMetamask && option.name !== 'MetaMask') {\n return null;\n }\n if (!isMetamask && option.name === 'MetaMask') {\n return null;\n }\n }\n return (\n \n );\n }\n return null;\n })}\n \n );\n}\n","import { Modal, ModalOverlay, ModalContent } from '@chakra-ui/react';\nimport { AbstractConnector } from '@web3-react/abstract-connector';\nimport { UnsupportedChainIdError, useWeb3React } from '@web3-react/core';\nimport { WalletConnectConnector } from '@web3-react/walletconnect-connector';\nimport { useEffect, useState } from 'react';\nimport { isMobile } from 'react-device-detect';\nimport { useTranslation } from 'react-i18next';\nimport styled from 'styled-components';\nimport MetamaskIcon from '../../../assets/images/metamask_logo.png';\n// import { OVERLAY_READY } from '../../connectors/Fortmatic';\nimport { SUPPORTED_WALLETS } from '../../../constants/web3';\nimport usePrevious from '../../../hooks/usePrevious';\nimport { injected } from '../../../infrastructures/connectors';\nimport { ApplicationModal } from '../../../state/application/actions';\nimport {\n useModalOpen,\n useWalletModalToggle,\n} from '../../../state/application/hooks';\nimport { CategoryTitle, Text } from '../../CommonItem';\nimport AccountDetails from '../AccountDetails';\nimport { AutoRow } from '../Row';\nimport Option from './Option';\nimport PendingView from './PendingView';\n\nconst Wrapper = styled.div`\n ${({ theme }) => theme.flexColumnNoWrap}\n margin: 0;\n padding: 1.6rem;\n width: 45rem;\n font-size: 1.6rem;\n background-color: ${({ theme }) => theme.bg2};\n\n // スマホ幅でのスタイル調整\n ${({ theme }) => theme.mediaWidth.upToMedium`\n width: 100%;\n padding: 1rem;\n `};\n`;\n\nconst HeaderRow = styled.div`\n ${({ theme }) => theme.flexRowNoWrap};\n padding: 1rem 1rem;\n font-weight: 500;\n color: ${({ theme }) => theme.text2};\n ${({ theme }) => theme.mediaWidth.upToMedium`\n padding: 1rem;\n `};\n`;\n\nconst ContentWrapper = styled.div`\n background-color: ${({ theme }) => theme.bg0};\n padding: 2rem;\n border-radius: 20px;\n ${({ theme }) => theme.mediaWidth.upToMedium`\n padding: 1rem;\n `};\n`;\n\nconst UpperSection = styled.div`\n position: relative;\n h5 {\n margin: 0;\n margin-bottom: 0.5rem;\n font-size: 1.6rem;\n font-weight: 400;\n }\n h5:last-child {\n margin-bottom: 0px;\n }\n h4 {\n margin-top: 0;\n font-weight: 500;\n }\n`;\n\nconst OptionGrid = styled.div`\n display: grid;\n grid-gap: 10px;\n ${({ theme }) => theme.mediaWidth.upToMedium`\n grid-template-columns: 1fr;\n grid-gap: 10px;\n `};\n`;\n\nconst HoverText = styled.div`\n text-decoration: none;\n color: ${({ theme }) => theme.text2};\n font-size: 1.6rem;\n display: flex;\n align-items: center;\n :hover {\n cursor: pointer;\n }\n`;\n\nconst WALLET_VIEWS = {\n OPTIONS: 'options',\n OPTIONS_SECONDARY: 'options_secondary',\n ACCOUNT: 'account',\n PENDING: 'pending',\n};\n\nexport default function WalletModal({\n pendingTransactions,\n confirmedTransactions,\n ENSName,\n}: {\n pendingTransactions: string[]; // hashes of pending\n confirmedTransactions: string[]; // hashes of confirmeds\n ENSName?: string;\n}) {\n // important that these are destructed from the account-specific web3-react context\n const { active, account, connector, activate, error } = useWeb3React();\n\n const [walletView, setWalletView] = useState(WALLET_VIEWS.ACCOUNT);\n\n const [pendingWallet, setPendingWallet] = useState<\n AbstractConnector | undefined\n >();\n\n const [pendingError, setPendingError] = useState();\n\n const walletModalOpen = useModalOpen(ApplicationModal.WALLET);\n const toggleWalletModal = useWalletModalToggle();\n\n const previousAccount = usePrevious(account);\n\n const { t } = useTranslation();\n\n // close on connection, when logged out before\n useEffect(() => {\n if (account && !previousAccount && walletModalOpen) {\n toggleWalletModal();\n }\n }, [account, previousAccount, toggleWalletModal, walletModalOpen]);\n\n // always reset to account view\n useEffect(() => {\n if (walletModalOpen) {\n setPendingError(false);\n setWalletView(WALLET_VIEWS.ACCOUNT);\n }\n }, [walletModalOpen]);\n\n // close modal when a connection is successful\n const activePrevious = usePrevious(active);\n const connectorPrevious = usePrevious(connector);\n useEffect(() => {\n if (\n walletModalOpen &&\n ((active && !activePrevious) ||\n (connector && connector !== connectorPrevious && !error))\n ) {\n setWalletView(WALLET_VIEWS.ACCOUNT);\n }\n }, [\n setWalletView,\n active,\n error,\n connector,\n walletModalOpen,\n activePrevious,\n connectorPrevious,\n ]);\n\n const tryActivation = async (connector: AbstractConnector | undefined) => {\n let name = '';\n Object.keys(SUPPORTED_WALLETS).map((key) => {\n if (connector === SUPPORTED_WALLETS[key].connector) {\n // eslint-disable-next-line\n return (name = SUPPORTED_WALLETS[key].name);\n }\n return true;\n });\n setPendingWallet(connector); // set wallet for pending view\n setWalletView(WALLET_VIEWS.PENDING);\n\n // if the connector is walletconnect and the user has already tried to connect, manually reset the connector\n if (\n connector instanceof WalletConnectConnector &&\n connector.walletConnectProvider?.wc?.uri\n ) {\n connector.walletConnectProvider = undefined;\n }\n\n connector &&\n activate(connector, undefined, true).catch((error) => {\n if (error instanceof UnsupportedChainIdError) {\n activate(connector); // a little janky...can't use setError because the connector isn't set\n } else {\n setPendingError(true);\n }\n });\n };\n\n // close wallet modal if fortmatic modal is active\n // useEffect(() => {\n // fortmatic.on(OVERLAY_READY, () => {\n // toggleWalletModal();\n // });\n // }, [toggleWalletModal]);\n\n // get wallets user can switch too, depending on device/browser\n function getOptions() {\n const isMetamask = window.ethereum && window.ethereum.isMetaMask;\n return Object.keys(SUPPORTED_WALLETS).map((key) => {\n const option = SUPPORTED_WALLETS[key];\n // check for mobile options\n if (isMobile) {\n //disable portis on mobile for now\n // if (option.connector === portis) {\n // return null;\n // }\n\n if (!window.web3 && !window.ethereum && option.mobile) {\n return (\n {\n option.connector !== connector &&\n !option.href &&\n tryActivation(option.connector);\n }}\n id={`connect-${key}`}\n key={key}\n active={option.connector && option.connector === connector}\n color={option.color}\n link={option.href}\n header={option.name}\n subheader={null}\n icon={option.iconURL}\n />\n );\n }\n return null;\n }\n\n // overwrite injected when needed\n if (option.connector === injected) {\n // don't show injected if there's no injected provider\n if (!(window.web3 || window.ethereum)) {\n if (option.name === 'MetaMask') {\n return (\n \n );\n } else {\n return null; //dont want to return install twice\n }\n }\n // don't return metamask if injected provider isn't metamask\n else if (option.name === 'MetaMask' && !isMetamask) {\n return null;\n }\n // likewise for generic\n else if (option.name === 'Injected' && isMetamask) {\n return null;\n }\n }\n\n // return rest of options\n return (\n !isMobile &&\n !option.mobileOnly && (\n {\n option.connector === connector\n ? setWalletView(WALLET_VIEWS.ACCOUNT)\n : !option.href && tryActivation(option.connector);\n }}\n key={key}\n active={option.connector === connector}\n color={option.color}\n link={option.href}\n header={option.name}\n subheader={null} //use option.descriptio to bring back multi-line\n icon={option.iconURL}\n />\n )\n );\n });\n }\n\n function getModalContent() {\n if (error) {\n return (\n \n \n {error instanceof UnsupportedChainIdError\n ? 'Wrong Network'\n : 'Error connecting'}\n \n \n {error instanceof UnsupportedChainIdError ? (\n
{t('walletConnectButton.walletModal.alert1')}
\n ) : (\n 'Error connecting. Try refreshing the page.'\n )}\n
\n
\n );\n }\n // when wallet is selected\n if (account && walletView === WALLET_VIEWS.ACCOUNT) {\n return (\n setWalletView(WALLET_VIEWS.OPTIONS)}\n />\n );\n }\n // wallet selection view\n return (\n \n {walletView !== WALLET_VIEWS.ACCOUNT ? (\n \n {\n setPendingError(false);\n setWalletView(WALLET_VIEWS.ACCOUNT);\n }}\n >\n Back\n \n \n ) : (\n \n Connect to a wallet\n \n )}\n\n \n \n {t('walletConnectButton.walletModal.alert2')} \n \n {walletView === WALLET_VIEWS.PENDING ? (\n \n ) : (\n {getOptions()}\n )}\n \n \n );\n }\n\n return (\n \n \n \n {getModalContent()}\n \n \n );\n}\n","import { Box } from '@chakra-ui/react';\nimport { UnsupportedChainIdError, useWeb3React } from '@web3-react/core';\nimport { useMemo } from 'react';\nimport { Button as RebassButton } from 'rebass/styled-components';\nimport styled from 'styled-components';\nimport { CHAIN_INFO } from '../../constants/chains';\nimport { NetworkContextName } from '../../constants/misc';\nimport useENSName from '../../hooks/ens/useENSName';\nimport { useWalletModalToggle } from '../../state/application/hooks';\nimport {\n isTransactionRecent,\n useAllTransactions,\n} from '../../state/transactions/hooks';\nimport { TransactionDetails } from '../../state/transactions/reducer';\nimport { shortenAddress } from '../../utils/web3';\nimport { Text } from '../CommonItem';\nimport Loader from '../Loader';\nimport CurrencyToggle from './CurrencyToggle';\nimport Row from './Row';\nimport WalletModal from './WalletModal';\n\n// 先にWalletTextを宣言\nexport const WalletText = styled(Text)`\n font-weight: bold;\n font-size: 1.6rem;\n line-height: 1.8rem;\n color: ${({ theme }) => theme.text2};\n`;\n\nconst WalletButton = styled(RebassButton)`\n color: ${({ theme }) => theme.text0};\n background-color: ${({ theme }) => theme.text3};\n padding: 1.2rem 2.5rem;\n margin-right: 1rem;\n border-radius: 26px;\n transition: box-shadow 0.3s;\n min-width: 120px;\n\n &:hover {\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);\n }\n`;\n\nconst ResponsiveWalletText = styled(WalletText)`\n font-size: 1.6rem;\n line-height: 1.8rem;\n padding: 0.4rem 0;\n`;\n\nexport const FlexText = styled(WalletText)`\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0 0.5rem 0 0.25rem;\n width: fit-content;\n\n font-style: normal;\n font-weight: bold;\n font-size: 1.6rem;\n line-height: 1.8rem;\n color: ${({ theme }) => theme.text3};\n`;\n\nexport function ChainInfo() {\n const { chainId } = useWeb3React();\n\n if (!chainId || chainId === 1) return null;\n\n return (\n \n \n {CHAIN_INFO[chainId].label}\n \n \n );\n}\n\n// we want the latest one to come first, so return negative if a is after b\nfunction newTransactionsFirst(a: TransactionDetails, b: TransactionDetails) {\n return b.addedTime - a.addedTime;\n}\n\nfunction Web3StatusInner() {\n const { account, error } = useWeb3React();\n\n const { ENSName } = useENSName(account ?? undefined);\n\n const toggleWalletModal = useWalletModalToggle();\n const allTransactions = useAllTransactions();\n const sortedRecentTransactions = useMemo(() => {\n const txs = Object.values(allTransactions);\n return txs.filter(isTransactionRecent).sort(newTransactionsFirst);\n }, [allTransactions]);\n const pending = sortedRecentTransactions\n .filter((tx) => !tx.receipt)\n .map((tx) => tx.hash);\n const hasPendingTransactions = !!pending.length;\n\n if (account) {\n return (\n <>\n \n \n \n \n \n \n\n \n \n {hasPendingTransactions ? (\n \n \n {pending?.length} Pending...\n
\n \n
\n
\n
\n ) : (\n \n Connected As\n
\n {ENSName || shortenAddress(account)}\n \n )}\n \n
\n \n );\n } else if (error) {\n return (\n \n \n {error instanceof UnsupportedChainIdError ? 'Wrong Network' : 'Error'}\n \n \n );\n } else {\n return (\n \n \n Connect Wallet\n \n \n );\n }\n}\n\nexport default function Web3Status() {\n const { active, account } = useWeb3React();\n const contextNetwork = useWeb3React(NetworkContextName);\n\n const { ENSName } = useENSName(account ?? undefined);\n\n const allTransactions = useAllTransactions();\n\n const sortedRecentTransactions = useMemo(() => {\n const txs = Object.values(allTransactions);\n return txs.filter(isTransactionRecent).sort(newTransactionsFirst);\n }, [allTransactions]);\n\n const pending = sortedRecentTransactions\n .filter((tx) => !tx.receipt)\n .map((tx) => tx.hash);\n const confirmed = sortedRecentTransactions\n .filter((tx) => tx.receipt)\n .map((tx) => tx.hash);\n\n return (\n <>\n \n {(contextNetwork.active || active) && (\n \n )}\n \n );\n}\n","import * as React from 'react';\n\nfunction SvgYamatoLogoWithTitle(props) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default SvgYamatoLogoWithTitle;\n","import { HamburgerIcon } from '@chakra-ui/icons';\nimport { HStack, VStack } from '@chakra-ui/layout';\nimport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverArrow,\n PopoverBody,\n Link,\n Box,\n Container,\n Text,\n Flex,\n IconButton,\n Drawer,\n DrawerBody,\n DrawerHeader,\n DrawerFooter,\n DrawerOverlay,\n DrawerContent,\n DrawerCloseButton,\n useDisclosure,\n} from '@chakra-ui/react';\nimport i18next from 'i18next';\nimport { useTranslation } from 'react-i18next';\nimport { BsTranslate } from 'react-icons/bs';\nimport { useLocation, useHistory } from 'react-router-dom';\nimport styled from 'styled-components';\nimport Web3Status from '../WalletConnectButton';\nimport { ChainInfo } from '../WalletConnectButton';\nimport CurrencyToggle from '../WalletConnectButton/CurrencyToggle';\nimport SvgYamatoLogWithTitle from '../svgs/YamatoLogoWithTitle';\n\nconst LanguageButton = styled.button`\n margin: 0 1rem;\n`;\n\nconst TranslateIcon = styled(BsTranslate)`\n font-size: 3rem;\n color: ${({ theme }) => theme.bg1};\n`;\n\nconst LanguageListButton = styled.button`\n font-size: 1.6rem;\n font-weight: bold;\n color: ${({ theme }) => theme.text1};\n`;\n\nexport function LangugeChange() {\n const history = useHistory();\n\n const changeLanguage = (i18next: any, lang: any) => {\n i18next.changeLanguage(lang);\n\n const currentPath = window.location.pathname;\n\n if (lang === 'en') {\n history.replace(`${currentPath}?lang=en`);\n } else {\n history.replace(currentPath);\n }\n };\n\n return (\n \n \n \n \n \n \n \n \n \n <>\n \n changeLanguage(i18next, 'en')}>\n english\n \n changeLanguage(i18next, 'ja')}>\n 日本語\n \n \n \n \n \n \n );\n}\n\nfunction MobileNav({\n isOpen,\n onClose,\n}: {\n isOpen: boolean;\n onClose: () => void;\n}) {\n const location = useLocation();\n const { t } = useTranslation();\n const isActiveLink = (path: string) => location.pathname === path;\n\n return (\n \n \n \n \n \n \n \n \n \n \n {t('layout.home')}\n \n \n {t('layout.tool')}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default function Header() {\n const location = useLocation();\n const { t } = useTranslation();\n const { isOpen, onOpen, onClose } = useDisclosure();\n const isActiveLink = (path: string) => location.pathname === path;\n\n // 現在のクエリパラメータを取得\n const currentSearch = location.search;\n\n return (\n \n \n \n \n }\n variant=\"ghost\"\n onClick={onOpen}\n size=\"lg\"\n />\n \n \n \n \n \n \n \n \n {t('layout.home')}\n \n \n {t('layout.tool')}\n \n \n \n \n \n {' '}\n \n \n \n \n\n {/* Mobile Navigation */}\n \n \n );\n}\n","import { Box } from '@chakra-ui/react';\nimport { Helmet } from 'react-helmet';\nimport BackgroundImage from '../../assets/images/background_main.webp';\nimport Footer from './Footer';\nimport Header from './Header';\n\nexport default function Layout({\n title,\n children,\n}: {\n title?: string;\n children: React.ReactNode;\n}) {\n return (\n \n \n\n \n
\n \n\n \n {children}\n \n\n \n