├── .env.example ├── .env.production ├── .env.test ├── .eslintignore ├── .eslintrc.js ├── .git-blame-ignore-revs ├── .github └── workflows │ ├── cypress.yml │ ├── dashboard-ci.yml │ ├── dashboard-mainnet.yml │ └── reusable-build-and-publish.yml ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── .lintstagedrc ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── .storybook ├── main.js └── preview.js ├── CODEOWNERS ├── Dockerfile.dev ├── README.md ├── SECURITY.md ├── craco.config.js ├── cypress.json ├── cypress ├── integration │ └── App.spec.ts ├── support │ ├── index.d.ts │ └── index.ts └── tsconfig.json ├── docker-compose.yml ├── manifest-ledger-live-app.json ├── multicall ├── .gitignore ├── README.md ├── contracts │ └── Multicall.sol ├── deploy │ └── 01_deploy_multicall.ts ├── hardhat.config.ts ├── package.json ├── tsconfig.json └── yarn.lock ├── package.json ├── public ├── Metabanner_grid.jpg ├── favicon-T.png ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── scripts ├── rebuild_components_package.sh └── start_dashboard.sh ├── src ├── App.tsx ├── __mocks__ │ ├── @ledgerhq │ │ └── connect-kit-loader.js │ ├── @starknet-react │ │ ├── chains.js │ │ └── core.js │ ├── axios.js │ ├── multiformats.js │ ├── starknet.js │ ├── starknetkit.js │ ├── threshold-ts │ │ └── index.ts │ └── uint8arrays.js ├── __tests__ │ ├── compatibility │ │ └── backwards-compatibility.test.tsx │ └── setup │ │ └── dependencies.test.ts ├── blocked-wallets │ ├── README.md │ └── blocklist.json ├── components │ ├── AddToMetamaskButton │ │ └── index.tsx │ ├── AnnouncementBanner │ │ ├── SecondaryAnnouncementBanner.tsx │ │ └── index.tsx │ ├── BundledRewardsAlert │ │ └── index.tsx │ ├── ButtonLink │ │ └── index.tsx │ ├── CopyToClipboard │ │ └── index.tsx │ ├── DetailedLinkListItem │ │ └── index.tsx │ ├── DotsLoadingIndicator │ │ └── index.tsx │ ├── FeedbackAnalyticsInfo.tsx │ ├── FeedbackRoutesButton.tsx │ ├── Forms │ │ ├── Form.tsx │ │ ├── FormikInput.tsx │ │ ├── FormikTokenBalanceInput.tsx │ │ ├── HelperErrorText.tsx │ │ ├── TokenAmountForm.tsx │ │ └── index.ts │ ├── Identicon.tsx │ ├── InfoBox │ │ └── index.tsx │ ├── Link │ │ ├── SharedLinks.tsx │ │ └── index.tsx │ ├── MintDurationTiers │ │ ├── MintDurationTiers.tsx │ │ └── index.ts │ ├── MintDurationWidget │ │ ├── MintDurationWidget.tsx │ │ └── index.ts │ ├── Modal │ │ ├── AnalyticsModal │ │ │ └── index.tsx │ │ ├── ClaimingRewards │ │ │ ├── SuccessModal.tsx │ │ │ └── index.tsx │ │ ├── ConfirmStakingParams │ │ │ ├── AdvancedParamsForm.tsx │ │ │ └── index.tsx │ │ ├── DeauthorizeApplicationModal │ │ │ ├── InititateDeauthorization.tsx │ │ │ └── index.tsx │ │ ├── FeedbackSubmissionModal │ │ │ └── index.tsx │ │ ├── MapOperatorToStakingProviderConfirmationModal │ │ │ └── index.tsx │ │ ├── MapOperatorToStakingProviderModal │ │ │ ├── MapOperatorToStakingProviderForm.tsx │ │ │ └── index.tsx │ │ ├── MapOperatorToStakingProviderSuccessModal │ │ │ └── index.tsx │ │ ├── ModalCloseButton.tsx │ │ ├── ModalRoot.tsx │ │ ├── NewAppsToAuthorizeModal │ │ │ └── index.tsx │ │ ├── NewStakerAuthorizeStakingApplicationModal │ │ │ ├── NewStakerAuthorizationCard.tsx │ │ │ ├── NewStakerAuthorizationForm.tsx │ │ │ └── index.tsx │ │ ├── SelectWalletModal │ │ │ ├── ConnectCoinbase.tsx │ │ │ ├── ConnectLedgerLive.tsx │ │ │ ├── ConnectMetamask.tsx │ │ │ ├── ConnectStarknet.tsx │ │ │ ├── ConnectStarknetDirect.tsx │ │ │ ├── ConnectSui.tsx │ │ │ ├── ConnectTaho.tsx │ │ │ ├── ConnectWalletConnect.tsx │ │ │ ├── InitialSelection.tsx │ │ │ ├── SuiWalletList.tsx │ │ │ ├── __tests__ │ │ │ │ └── ConnectStarknet.test.tsx │ │ │ ├── components │ │ │ │ ├── AccountSuccessAlert.tsx │ │ │ │ ├── CoinbaseStatusAlert.tsx │ │ │ │ ├── IncorrectNetwork.tsx │ │ │ │ ├── MetamaskNotInstalledAlert.tsx │ │ │ │ ├── MetamaskStatusAlert.tsx │ │ │ │ ├── WalletConnectStatusAlert.tsx │ │ │ │ ├── WalletConnectionModalBase.tsx │ │ │ │ ├── WalletInitializeAlert.tsx │ │ │ │ ├── WalletRejectedAlert.tsx │ │ │ │ └── index.ts │ │ │ └── index.tsx │ │ ├── StakingApplications │ │ │ ├── AuthorizeStakingApps.tsx │ │ │ ├── ConfirmDeauthorization.tsx │ │ │ ├── DeauthorizationCompleted.tsx │ │ │ ├── DeauthorizationInitiated.tsx │ │ │ ├── IncreaseAuthorization.tsx │ │ │ ├── IncreaseAuthorizationSuccess.tsx │ │ │ ├── StakingApplicationsAuthorized.tsx │ │ │ └── index.ts │ │ ├── StakingChecklistModal │ │ │ └── index.tsx │ │ ├── StakingSuccessModal │ │ │ ├── StakeSuccessOld.tsx │ │ │ └── index.tsx │ │ ├── SubmitStake │ │ │ └── index.tsx │ │ ├── TACoCommitmentModal │ │ │ ├── SuccessModal.tsx │ │ │ └── index.tsx │ │ ├── TopupTModal │ │ │ ├── LegacyTopUpModal.tsx │ │ │ ├── TopUpTModal.tsx │ │ │ └── index.tsx │ │ ├── TopupTSuccessModal │ │ │ └── index.tsx │ │ ├── TransactionModal │ │ │ ├── TransactionFailed.tsx │ │ │ ├── TransactionIsPending.tsx │ │ │ ├── TransactionIsWaitingForConfirmation.tsx │ │ │ └── index.ts │ │ ├── TransactionSuccessModal │ │ │ └── index.tsx │ │ ├── UnstakeSuccessModal │ │ │ └── index.tsx │ │ ├── UnstakeTModal │ │ │ ├── DeauthorizeInfo.tsx │ │ │ ├── Step1.tsx │ │ │ ├── Step2.tsx │ │ │ └── index.tsx │ │ ├── UpgradeToTModal │ │ │ ├── TransactionIdle.tsx │ │ │ ├── UpgradeStats.tsx │ │ │ ├── UpgradeSuccess.tsx │ │ │ └── index.tsx │ │ ├── index.ts │ │ ├── tBTC │ │ │ ├── GenerateNewDepositAddress.tsx │ │ │ ├── InitiateUnminting.tsx │ │ │ ├── NewTBTCApp.tsx │ │ │ └── index.ts │ │ └── withBaseModal.tsx │ ├── Navbar │ │ ├── AccountButton.tsx │ │ ├── DarkModeSwitcher.tsx │ │ ├── HamburgerButton.tsx │ │ ├── NavbarComponent.tsx │ │ ├── NetworkButton.tsx │ │ ├── StarkNetNetworkButton.tsx │ │ ├── SuiNetworkAlert.tsx │ │ ├── TrmWalletScreeningAlert.tsx │ │ ├── WalletConnectionAlert.tsx │ │ ├── __tests__ │ │ │ ├── NavbarComponent.test.tsx │ │ │ └── NavbarStarknetIntegration.test.tsx │ │ └── index.tsx │ ├── NotificationPill │ │ └── index.tsx │ ├── OutlineListItem.tsx │ ├── QRCode │ │ └── index.tsx │ ├── Sidebar │ │ ├── BrandIcon.tsx │ │ ├── DesktopSidebar.tsx │ │ ├── ExpanderIcon.tsx │ │ ├── MobileSidebar.tsx │ │ ├── NavItem.tsx │ │ ├── SidebarFooter.tsx │ │ └── index.tsx │ ├── Spinner.tsx │ ├── StakingApplicationForms │ │ └── index.tsx │ ├── StakingApplicationOperationIcon │ │ └── index.tsx │ ├── StakingProvidersList │ │ └── index.tsx │ ├── StakingStats │ │ └── index.tsx │ ├── StakingTimeline │ │ └── index.tsx │ ├── StarknetWalletStatus.tsx │ ├── StatHighlightCard.tsx │ ├── Step │ │ └── index.tsx │ ├── SubNavigationPills │ │ └── index.tsx │ ├── SubmitTxButton.tsx │ ├── ThresholdSpinner │ │ └── ThresholdSpinner.tsx │ ├── Timeline │ │ ├── Timeline.tsx │ │ └── index.ts │ ├── Toast │ │ ├── Toast.tsx │ │ └── index.ts │ ├── TokenBalance.tsx │ ├── TokenBalanceCard │ │ ├── TokenBalanceCardTemplate.tsx │ │ └── index.tsx │ ├── TokenBalanceInput │ │ └── index.tsx │ ├── TooltipIcon.tsx │ ├── TransactionDetails │ │ └── index.tsx │ ├── TransactionInfoTable │ │ └── index.tsx │ ├── Tree │ │ ├── Tree.tsx │ │ └── index.ts │ ├── UnstakingFormLabel │ │ └── index.tsx │ ├── UpgradeCard │ │ ├── UpgradeCardTemplate.tsx │ │ └── index.tsx │ ├── UpgradeIconGroup.tsx │ ├── ViewInBlockExplorer.tsx │ ├── __tests__ │ │ └── StarknetWalletStatus.test.tsx │ ├── tBTC │ │ ├── BridgeActivity.tsx │ │ ├── BridgeProcessIndicator.tsx │ │ ├── ExternalPool.tsx │ │ ├── Links.tsx │ │ ├── RecentDeposits.tsx │ │ ├── SendBitcoinsToDepositAddressForm.tsx │ │ ├── Stats.tsx │ │ ├── TakeNoteList.tsx │ │ ├── index.ts │ │ └── tBTCText.tsx │ ├── withOnlyConnectedWallet.tsx │ └── withWalletConnection.tsx ├── config │ ├── starknet.ts │ └── starknetRetry.ts ├── constants │ ├── featureFlags.ts │ ├── index.ts │ ├── stakingBonus.ts │ ├── vendingMachine.ts │ └── web3.ts ├── contexts │ ├── LedgerLiveAppContext.tsx │ ├── StakeCardContext.tsx │ ├── StarknetWalletProvider.tsx │ ├── SuiWalletProvider.tsx │ ├── ThresholdContext.tsx │ ├── TokenContext.tsx │ ├── TransportProvider.tsx │ └── __tests__ │ │ └── StarknetWalletProvider.test.tsx ├── declaration.d.ts ├── enums │ ├── __tests__ │ │ └── web3.test.ts │ ├── api.ts │ ├── env.ts │ ├── externalHref.ts │ ├── index.ts │ ├── modal.ts │ ├── pool.ts │ ├── staking.ts │ ├── token.ts │ ├── transactionType.ts │ └── web3.ts ├── hooks │ ├── __mocks__ │ │ └── useStarknetConnection.ts │ ├── __tests__ │ │ ├── useFetchTvl.test.tsx │ │ ├── useLocalStorage.test.ts │ │ ├── useNonEVMConnection.test.ts │ │ ├── useStarknetConnection.test.ts │ │ ├── useTConvertedAmount.test.ts │ │ └── useTExchangeRate.test.ts │ ├── google-tag-manager │ │ ├── index.ts │ │ └── useGoogleTagManager.ts │ ├── ledger-live-app │ │ ├── index.ts │ │ ├── useRequestBitcoinAccount.ts │ │ ├── useRequestEthereumAccount.ts │ │ └── useSendBitcoinTransaction.ts │ ├── posthog │ │ ├── index.ts │ │ ├── useCapture.ts │ │ ├── useCapturePageview.ts │ │ ├── useCaptureWalletConnectedEvent.ts │ │ ├── useIdentify.ts │ │ └── usePosthog.ts │ ├── sentry │ │ ├── index.ts │ │ ├── useCaptureMessage.ts │ │ └── useSentry.ts │ ├── staking-applications │ │ ├── index.ts │ │ ├── useAuthorizeMultipleAppsTransaction.ts │ │ ├── useBondOperatorTransaction.ts │ │ ├── useConfirmDeauthorizationTransaction.ts │ │ ├── useIncreaseAuthorizationTransaction.ts │ │ ├── useInitiateDeauthorization.ts │ │ ├── useRegisterMultipleOperatorsTransaction.ts │ │ ├── useRegisterOperatorTransaction.ts │ │ ├── useStakingAppContract.ts │ │ ├── useStakingAppDataByStakingProvider.ts │ │ ├── useStakingAppMinAuthorizationAmount.ts │ │ ├── useStakingAppParameters.ts │ │ ├── useStakingApplicationAddress.ts │ │ ├── useStakingApplicationDecreaseDelay.ts │ │ ├── useStakingApplicationState.ts │ │ ├── useSubscribeToAuthorizationDecreaseApprovedEvent.ts │ │ ├── useSubscribeToAuthorizationDecreaseRequestedEvent.ts │ │ ├── useSubscribeToAuthorizationIncreasedEvent.ts │ │ ├── useSubscribeToOperatorRegisteredEvent.ts │ │ ├── useSubscribeToOperatorStatusUpdatedEvent.ts │ │ └── useUpdateOperatorStatus.tsx │ ├── store │ │ ├── index.ts │ │ ├── useAppDispatch.ts │ │ └── useAppSelector.ts │ ├── tbtc │ │ ├── __tests__ │ │ │ └── useStarknetTBTCBalance.test.ts │ │ ├── index.ts │ │ ├── useBridgeContract.ts │ │ ├── useCheckDepositExpirationTime.ts │ │ ├── useDepositTelemetry.ts │ │ ├── useFetchDepositDetails.ts │ │ ├── useFetchRecentDeposits.ts │ │ ├── useFetchRedemptionDetails.ts │ │ ├── useFetchTBTCFees.ts │ │ ├── useFetchTBTCMetrics.ts │ │ ├── useFindRedemptionInBitcoinTx.ts │ │ ├── useRedemptionEstimatedFees.ts │ │ ├── useRemoveDepositData.ts │ │ ├── useRequestRedemption.ts │ │ ├── useRevealDepositTransaction.ts │ │ ├── useStarknetTBTCBalance.ts │ │ ├── useSubscribeToOptimisticMintingFinalizedEvent.ts │ │ ├── useSubscribeToOptimisticMintingRequestedEvent.ts │ │ ├── useSubscribeToRedemptionRequestedEvent.ts │ │ ├── useSubscribeToRedemptionsCompletedEvent.ts │ │ ├── useSubsribeToDepositRevealedEvent.ts │ │ ├── useTBTCDepositDataFromLocalStorage.ts │ │ └── useTBTCVaultContract.ts │ ├── useAddErc20ToMetamask.ts │ ├── useAnalytics.ts │ ├── useChakraBreakpoint.ts │ ├── useCheckBonusEligibility.ts │ ├── useConnectWallet.ts │ ├── useDetectIfEmbed.ts │ ├── useDocumentTitle.ts │ ├── useETHData.ts │ ├── useFetchExternalPoolData.ts │ ├── useFetchOwnerStakes.ts │ ├── useFetchStakingRewards.ts │ ├── useFetchTvl.ts │ ├── useIsActive.ts │ ├── useIsEmbed.ts │ ├── useLocalStorage.ts │ ├── useMinStakeAmount.ts │ ├── useModal.ts │ ├── useNextRewardsDropDate.ts │ ├── useNonEVMConnection.ts │ ├── useSaveConnectedAddressToStore.ts │ ├── useSidebar.ts │ ├── useStakeCardContext.ts │ ├── useStakingState.ts │ ├── useStarknetConnection.ts │ ├── useSubscribeToStakedEvent.ts │ ├── useSubscribeToToppedUpEvent.ts │ ├── useSubscribeToUnstakedEvent.ts │ ├── useTBTCBridgeContractAddress.ts │ ├── useTBTCTerms.ts │ ├── useTBTCTokenAddress.ts │ ├── useTConvertedAmount.ts │ ├── useTExchangeRate.ts │ ├── useTbtcState.ts │ ├── useToken.ts │ ├── useTokenBalance.ts │ ├── useTokenState.ts │ ├── useTokensBalanceCall.ts │ ├── useTransaction.ts │ └── useUpgradeHref.ts ├── index.tsx ├── merkle-drop │ └── rewards.json ├── networks │ ├── README.md │ ├── constants │ │ └── networks.ts │ ├── enums │ │ └── networks.ts │ ├── hooks │ │ └── useConnectedOrDefaultEthereumChainId.ts │ ├── types │ │ └── networks.ts │ └── utils │ │ ├── __tests__ │ │ └── getChainIdToNetworkName.test.ts │ │ ├── chainId.ts │ │ ├── connectedNetwork.ts │ │ ├── createExplorerLink.ts │ │ ├── getEthereumNetworkNameFromChainId.ts │ │ ├── getMainnetOrTestnetChainId.ts │ │ ├── getRpcUrl.ts │ │ ├── index.ts │ │ ├── mappings.ts │ │ ├── networks.ts │ │ └── networksAlchemyConfig.ts ├── pages │ ├── Feedback │ │ ├── BugReport │ │ │ └── index.tsx │ │ ├── Settings │ │ │ └── index.tsx │ │ ├── Suggestions │ │ │ └── index.tsx │ │ ├── UsabilitySurvey │ │ │ └── index.tsx │ │ └── index.tsx │ ├── Overview │ │ ├── AnalyticsBanner.tsx │ │ ├── Network │ │ │ ├── CardTemplate.tsx │ │ │ ├── StakingOverview.tsx │ │ │ ├── index.tsx │ │ │ ├── tBTCBridgeStats.tsx │ │ │ └── tBTCUserStats.tsx │ │ └── index.tsx │ ├── PageLayout.tsx │ ├── Staking │ │ ├── AuthorizeStakingApps │ │ │ ├── AuthorizeApplicationsCardCheckbox │ │ │ │ ├── AppAuthorizationInfo.tsx │ │ │ │ └── index.tsx │ │ │ └── index.tsx │ │ ├── HowItWorks │ │ │ ├── StakingOverview │ │ │ │ ├── AboutAddressesCard.tsx │ │ │ │ ├── AuthorizingApplicationsCard.tsx │ │ │ │ ├── LegacyStakesCard.tsx │ │ │ │ ├── NewTStakesCard.tsx │ │ │ │ ├── StakingActionsCard.tsx │ │ │ │ ├── ThresholdStakesCard.tsx │ │ │ │ └── index.tsx │ │ │ └── index.tsx │ │ ├── NewStakeCard.tsx │ │ ├── OperatorAddressMappingCard.tsx │ │ ├── RewardsCard.tsx │ │ ├── StakeCard │ │ │ ├── Header │ │ │ │ ├── HeaderTitle.tsx │ │ │ │ └── index.tsx │ │ │ ├── StakeAddressInfo │ │ │ │ └── index.tsx │ │ │ ├── StakeApplications │ │ │ │ ├── AuthorizeApplicationRow.tsx │ │ │ │ └── index.tsx │ │ │ ├── StakeBalance │ │ │ │ ├── LegacyStakeBalances │ │ │ │ │ ├── BalanceTreeItem.tsx │ │ │ │ │ └── index.tsx │ │ │ │ └── index.tsx │ │ │ ├── StakeRewards │ │ │ │ └── index.tsx │ │ │ └── index.tsx │ │ ├── StakeDetailsPage │ │ │ ├── NodeStatusLabel.tsx │ │ │ ├── StakeDetailRow.tsx │ │ │ └── index.tsx │ │ ├── StakedPortfolioCard.tsx │ │ └── index.tsx │ ├── Upgrade │ │ ├── UpgradeKEEP.tsx │ │ ├── UpgradeNU.tsx │ │ ├── UpgradeToken.tsx │ │ └── index.tsx │ ├── index.ts │ └── tBTC │ │ ├── Bridge │ │ ├── BridgeActivityCard │ │ │ └── index.tsx │ │ ├── BridgeLayout.tsx │ │ ├── DepositDetails.tsx │ │ ├── Mint.tsx │ │ ├── MintUnmintNav.tsx │ │ ├── Minting │ │ │ ├── InitiateMinting.tsx │ │ │ ├── MakeDeposit.tsx │ │ │ ├── MintingFlowRouter.tsx │ │ │ ├── MintingSuccess.tsx │ │ │ ├── MintingTimeline.tsx │ │ │ ├── ProvideData.tsx │ │ │ └── __tests__ │ │ │ │ ├── InitiateMinting.StarkNet.test.tsx │ │ │ │ ├── InitiateMinting.test.tsx │ │ │ │ └── ProvideData.test.tsx │ │ ├── ResumeDeposit.tsx │ │ ├── TbtcBalanceCard.tsx │ │ ├── Unmint.tsx │ │ ├── UnmintDetails.tsx │ │ ├── UnmintingCard │ │ │ └── index.tsx │ │ ├── __tests__ │ │ │ ├── DepositDetails.StarkNet.test.tsx │ │ │ ├── DepositDetails.test.tsx │ │ │ └── TbtcBalanceCard.test.tsx │ │ ├── components │ │ │ ├── BridgeProcessCardSubTitle.tsx │ │ │ ├── BridgeProcessCardTitle.tsx │ │ │ ├── BridgeProcessDetailsCard.tsx │ │ │ ├── BridgeProcessDetailsIcons.tsx │ │ │ ├── BridgeProcessDetailsPageSkeleton.tsx │ │ │ ├── BridgeProcessEmptyState.tsx │ │ │ ├── BridgeProcessResource.tsx │ │ │ ├── BridgeProcessStep.tsx │ │ │ ├── DepositDetailsStep.tsx │ │ │ ├── DepositDetailsStepIcons.tsx │ │ │ ├── MintingTransactionDetails.tsx │ │ │ ├── StarkNetErrorState.tsx │ │ │ ├── StarkNetLoadingState.tsx │ │ │ ├── TbtcFees.tsx │ │ │ ├── TimelineItem.tsx │ │ │ └── __tests__ │ │ │ │ └── MintingTransactionDetails.test.tsx │ │ └── index.tsx │ │ ├── Explorer │ │ └── index.tsx │ │ ├── HowItWorks │ │ ├── AuditsCard.tsx │ │ ├── Banner.tsx │ │ ├── ContractsCard.tsx │ │ ├── JSONFileCard.tsx │ │ ├── MintingTimelineCard.tsx │ │ ├── TbtcBridgeCard.tsx │ │ └── index.tsx │ │ └── index.tsx ├── posthog │ └── index.ts ├── react-app-env.d.ts ├── sentry │ └── index.ts ├── setupTests.js ├── static │ ├── icons │ │ ├── Arbitrum.tsx │ │ ├── Argent.tsx │ │ ├── Base.tsx │ │ ├── CoinbaseWallet.tsx │ │ ├── EthereumDark.tsx │ │ ├── EthereumLight.tsx │ │ ├── IoHomeOutlineSharp.tsx │ │ ├── KeepCircleBrand.tsx │ │ ├── KeepLight.tsx │ │ ├── LedgerDark.tsx │ │ ├── LedgerLight.tsx │ │ ├── MetaMask.tsx │ │ ├── NuCircleBrand.tsx │ │ ├── NuLight.tsx │ │ ├── Starknet.tsx │ │ ├── Sui.tsx │ │ ├── Taho.tsx │ │ ├── ThresholdCircleBrand.tsx │ │ ├── ThresholdPurple.tsx │ │ ├── ThresholdWhite.tsx │ │ ├── TransactionError.tsx │ │ ├── Ttoken.tsx │ │ ├── WalletConect.tsx │ │ ├── __tests__ │ │ │ └── StarknetIcons.test.tsx │ │ ├── tBTCFill.tsx │ │ ├── tBTCFillBlack.tsx │ │ ├── tBTCOutline.tsx │ │ └── tokenIconMap.ts │ └── images │ │ ├── AnalyticsIllustration.png │ │ ├── AnalyticsIllustrationDark.png │ │ ├── AuthorizingApplicationsIllustrationDark.png │ │ ├── AuthorizingApplicationsIllustrationLight.png │ │ ├── DiagonalArrowDark.png │ │ ├── DiagonalArrowLight.png │ │ ├── DiagonalPillDark.png │ │ ├── DiagonalPillLight.png │ │ ├── LearnAboutStakingIllustration.png │ │ ├── ListIconArrowsDark.png │ │ ├── ListIconArrowsLight.png │ │ ├── ListIconStarDark.png │ │ ├── ListIconStarLight.png │ │ ├── ListIconStockDark.png │ │ ├── ListIconStockLight.png │ │ ├── MetaMask-Fox.png │ │ ├── RandomBeaconDecrease.png │ │ ├── RandomBeaconIncrease.png │ │ ├── StakingApplicationsIllustrationDark.png │ │ ├── StakingApplicationsIllustrationLight.png │ │ ├── StakingHowItWorksIllustrationDark.png │ │ ├── StakingHowItWorksIllustrationLight.png │ │ ├── SunglassesDark.png │ │ ├── SunglassesLight.png │ │ ├── TACoDecrease.png │ │ ├── TACoIncrease.png │ │ ├── TBTCCurvePool.svg │ │ ├── TBTC_WBTC_SBTC_pool.svg │ │ ├── TbtcDecrease.png │ │ ├── TbtcIncrease.png │ │ ├── ThresholdBrandFull.svg │ │ ├── ThresholdBrandFullWhite.svg │ │ ├── bitcoin.svg │ │ ├── code-slash.svg │ │ ├── deauthorize-tbtc.svg │ │ ├── increase-auth.svg │ │ ├── minting-completed-card-bg.png │ │ ├── minting-step-2.svg │ │ ├── minting-step-3.svg │ │ ├── preAppIllustrationDark.png │ │ ├── preAppIllustrationLight.png │ │ ├── randomBeaconAppIllustrationDark.png │ │ ├── randomBeaconAppIllustrationLight.png │ │ ├── stakingProviders │ │ ├── BoarLogo.png │ │ ├── ColossusLogo.png │ │ ├── DelightLogo.svg │ │ ├── InfStonesLogo.png │ │ ├── P2PValidatorLogo.png │ │ └── StakedLogo.png │ │ ├── tBTC-bridge-no-history-dark.svg │ │ ├── tBTC-bridge-no-history-light.svg │ │ ├── tBTC-explorer-bg.svg │ │ ├── tBTC.svg │ │ ├── tBTCAppBanner.svg │ │ ├── tBTCAppBannerWithGrid.svg │ │ ├── tbtc-json-file.png │ │ ├── tbtc-success.png │ │ ├── tbtcAppIllustrationDark.svg │ │ ├── tbtcAppIllustrationLight.svg │ │ ├── tbtcMintingStep1.svg │ │ ├── thresholdWordMark.svg │ │ ├── unminting-empty-state-dark.svg │ │ ├── unminting-empty-state.svg │ │ └── upgrade-to-t.svg ├── store │ ├── account │ │ ├── effects.ts │ │ ├── index.ts │ │ ├── selectors.ts │ │ └── slice.ts │ ├── eth │ │ ├── ethSlice.ts │ │ └── index.ts │ ├── index.ts │ ├── listener.ts │ ├── modal │ │ ├── index.ts │ │ └── modalSlice.ts │ ├── rewards │ │ ├── index.ts │ │ ├── rewardsSlice.ts │ │ └── selectors.ts │ ├── sidebar │ │ ├── index.ts │ │ └── sidebarSlice.ts │ ├── staking-applications │ │ ├── effects.ts │ │ ├── index.ts │ │ ├── selectors.ts │ │ └── slice.ts │ ├── staking │ │ ├── effects.ts │ │ ├── index.ts │ │ ├── selectors.ts │ │ └── stakingSlice.ts │ ├── tbtc │ │ ├── effects.ts │ │ ├── index.ts │ │ ├── selectors.ts │ │ └── tbtcSlice.ts │ ├── tokens │ │ ├── index.ts │ │ └── tokenSlice.ts │ └── transactions │ │ ├── index.ts │ │ └── transactionSlice.ts ├── tbtc │ └── mock-bitcoin-client.ts ├── test-helpers │ ├── renderWithProviders.tsx │ ├── renderWithRedux.tsx │ └── renderWithRouter.tsx ├── test │ ├── __tests__ │ │ └── starknet-test-utils.test.tsx │ └── starknet-test-utils.tsx ├── theme │ ├── AnnouncementBanner.ts │ ├── Badge.ts │ ├── Checkbox.ts │ ├── DetailedLinkListItem.ts │ ├── DotsLoadingIndicator.ts │ ├── InfoBox.ts │ ├── NotificationPill.ts │ ├── Radio.ts │ ├── SecondaryAnnouncementBanner.ts │ ├── Tabs.ts │ ├── Timeline.ts │ ├── Tooltip.ts │ ├── Tree.ts │ ├── fonts.ts │ └── index.ts ├── threshold-ts │ ├── __tests__ │ │ └── starknet-integration.test.ts │ ├── applications │ │ ├── __tests__ │ │ │ └── application.test.ts │ │ └── index.ts │ ├── index.ts │ ├── mas │ │ ├── __test__ │ │ │ └── mas.test.ts │ │ └── index.ts │ ├── multicall │ │ ├── __test__ │ │ │ └── multicall.test.ts │ │ └── index.ts │ ├── staking │ │ ├── __test__ │ │ │ └── staking.test.ts │ │ ├── dapp-development-sepolia-artifacts │ │ │ ├── LegacyKeepStaking.json │ │ │ ├── NuCypherStakingEscrow.json │ │ │ └── TokenStaking.json │ │ ├── index.ts │ │ ├── mainnet-artifacts │ │ │ ├── LegacyKeepStaking.json │ │ │ ├── NuCypherStakingEscrow.json │ │ │ └── TokenStaking.json │ │ └── sepolia-artifacts │ │ │ ├── LegacyKeepStaking.json │ │ │ ├── NuCypherStakingEscrow.json │ │ │ └── TokenStaking.json │ ├── tbtc │ │ ├── __test__ │ │ │ └── tbtc.test.ts │ │ ├── dapp-development-sepolia-artifacts │ │ │ ├── Bridge.json │ │ │ ├── RandomBeacon.json │ │ │ ├── TBTC.json │ │ │ ├── TBTCVault.json │ │ │ └── WalletRegistry.json │ │ ├── index.ts │ │ ├── mainnet-artifacts │ │ │ ├── ArbitrumL1BitcoinDepositor.json │ │ │ ├── BaseL1BitcoinDepositor.json │ │ │ ├── RandomBeacon.json │ │ │ └── StarkNetBitcoinDepositor.json │ │ └── sepolia-artifacts │ │ │ ├── ArbitrumL1BitcoinDepositor.json │ │ │ ├── BaseL1BitcoinDepositor.json │ │ │ ├── RandomBeacon.json │ │ │ └── StarkNetBitcoinDepositor.json │ ├── tokens │ │ ├── dapp-development-sepolia-artifacts │ │ │ └── NuCypherToken.json │ │ ├── mainnet-artifacts │ │ │ └── NuCypherToken.json │ │ └── sepolia-artifacts │ │ │ └── NuCypherToken.json │ ├── types │ │ ├── __tests__ │ │ │ └── types.test.ts │ │ └── index.ts │ ├── utils │ │ ├── address.ts │ │ ├── bitcoin.ts │ │ ├── chain.ts │ │ ├── constants.ts │ │ ├── contract.ts │ │ ├── index.ts │ │ ├── math.ts │ │ └── transaction.ts │ └── vending-machine │ │ ├── __tests__ │ │ └── vending-machine.test.ts │ │ ├── dapp-development-sepolia-artifacts │ │ ├── VendingMachineKeep.json │ │ └── VendingMachineNuCypher.json │ │ ├── index.ts │ │ ├── mainnet-artifacts │ │ ├── VendingMachineKeep.json │ │ └── VendingMachineNuCypher.json │ │ └── sepolia-artifacts │ │ ├── VendingMachineKeep.json │ │ └── VendingMachineNuCypher.json ├── types │ ├── array.ts │ ├── chain.ts │ ├── eth.ts │ ├── index.ts │ ├── modal.ts │ ├── page.ts │ ├── posthog.ts │ ├── rewards.ts │ ├── sidebar.ts │ ├── staking-applications.ts │ ├── staking.ts │ ├── starknet.ts │ ├── state.ts │ ├── tbtc.ts │ ├── token.ts │ ├── transaction.ts │ ├── trm.ts │ └── wallet.ts ├── utils │ ├── __tests__ │ │ ├── formatTokenAmount.test.ts │ │ ├── getStakingAppLabel.test.ts │ │ ├── shortenAddress.test.ts │ │ ├── tbtcStarknetHelpers.test.ts │ │ └── validateUserWalletAddress.test.ts │ ├── crypto.ts │ ├── curveAPI.ts │ ├── date.ts │ ├── exchangeAPI.ts │ ├── formatAmount.ts │ ├── forms.ts │ ├── getContract.ts │ ├── getDefaultBitcoinCredentials.ts │ ├── getEnvVariable.ts │ ├── getLedgerLiveAppEthereumSigner.ts │ ├── getRangeSign.ts │ ├── getStakeTitle.ts │ ├── getStakingAppLabel.ts │ ├── getThresholdLib.ts │ ├── getUsdBalance.ts │ ├── helpers.ts │ ├── index.ts │ ├── isWalletRejectionError.ts │ ├── ledger.ts │ ├── percentage.ts │ ├── safeBigNumber.ts │ ├── setTimeout.ts │ ├── shortenAddress.ts │ ├── stakingBonus.ts │ ├── starknetErrorHandler.ts │ ├── subgraphAPI.ts │ ├── tBTC.ts │ ├── tbtcLocalStorageData.ts │ ├── tbtcStarknetHelpers.ts │ ├── trmAPI.ts │ └── verifyDepositAddress.ts └── web3 │ ├── abi │ ├── CumulativeMerkleDrop.json │ ├── ERC20.json │ ├── SimplePreApplication.json │ └── TokenStaking.json │ ├── connectors │ ├── coinbaseWallet.ts │ ├── index.ts │ ├── ledgerLive.ts │ ├── metamask.ts │ ├── taho.ts │ └── walletConnect.ts │ ├── hooks │ ├── __tests__ │ │ ├── useContract.test.ts │ │ ├── useSendTransaction.test.tsx │ │ ├── useSubscribeToContractEvent.test.ts │ │ ├── useSubscribeToERC20TransferEvent.test.ts │ │ ├── useUpgradeToT.test.ts │ │ ├── useVendingMachineContract.test.ts │ │ └── useVendingMachineRatio.test.ts │ ├── index.ts │ ├── useApproval.ts │ ├── useApproveTStaking.ts │ ├── useCheckDuplicateProviderAddress.ts │ ├── useClaimMerkleRewardsTransaction.ts │ ├── useContract.ts │ ├── useERC20.ts │ ├── useGetBlock.ts │ ├── useKeep.ts │ ├── useKeepBondingContract.ts │ ├── useKeepTokenStakingContract.ts │ ├── useMerkleDropContract.ts │ ├── useMulticall.ts │ ├── useMulticallContract.ts │ ├── useNu.ts │ ├── useNuStakingEscrowContract.ts │ ├── usePREContract.ts │ ├── useSendTransaction.ts │ ├── useStakeTransaction.ts │ ├── useSubscribeToContractEvent.ts │ ├── useSubscribeToERC20TransferEvent.ts │ ├── useT.ts │ ├── useTBTCTokenContract.ts │ ├── useTBTCv2TokenContract.ts │ ├── useTStakingAllowance.ts │ ├── useTStakingContract.ts │ ├── useTokenAllowance.ts │ ├── useTopupTransaction.ts │ ├── useUnstakeTransaction.ts │ ├── useUpgradeToT.ts │ ├── useVendingMachineContract.ts │ └── useVendingMachineRatio.ts │ ├── library.ts │ └── utils │ ├── __tests__ │ └── address.test.ts │ ├── address.ts │ ├── connectors.ts │ ├── doesErrorInclude.ts │ ├── events.ts │ ├── files.ts │ ├── index.ts │ └── multicall.ts ├── tsconfig.json └── yarn.lock /.env.example: -------------------------------------------------------------------------------- 1 | REACT_APP_DEFAULT_PROVIDER_CHAIN_ID=1337 2 | REACT_APP_ALCHEMY_API_KEY=$ALCHEMY_API_KEY 3 | REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS 4 | REACT_APP_DAPP_DEVELOPMENT_TESTNET_CONTRACTS=$DAPP_DEVELOPMENT_TESTNET_CONTRACTS 5 | 6 | REACT_APP_FEATURE_FLAG_TBTC_V2=true 7 | REACT_APP_FEATURE_FLAG_TBTC_V2_REDEMPTION=true 8 | REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true 9 | REACT_APP_FEATURE_FLAG_FEEDBACK_MODULE=false 10 | REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true 11 | 12 | REACT_APP_FEATURE_FLAG_GOOGLE_TAG_MANAGER=false 13 | REACT_APP_GOOGLE_TAG_MANAGER_ID=$GOOGLE_TAG_MANAGER_ID 14 | 15 | REACT_APP_FEATURE_FLAG_POSTHOG=false 16 | 17 | REACT_APP_FEATURE_FLAG_SENTRY=false 18 | REACT_APP_SENTRY_DSN=$SENTRY_DSN 19 | REACT_APP_FEATURE_FLAG_TRM=false 20 | 21 | REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL 22 | REACT_APP_ELECTRUM_HOST=$ELECTRUM_HOST 23 | REACT_APP_ELECTRUM_PORT=$ELECTRUM_PORT 24 | REACT_APP_MOCK_BITCOIN_CLIENT=true 25 | 26 | REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_PROJECT_ID 27 | 28 | REACT_APP_TBTC_SUBGRAPH_API_KEY=$TBTC_SUBGRAPH_API_KEY 29 | 30 | REACT_APP_TACO_DOMAIN=dashboard 31 | -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | REACT_APP_DEFAULT_PROVIDER_CHAIN_ID=$CHAIN_ID 2 | REACT_APP_ALCHEMY_API_KEY=$ALCHEMY_API_KEY 3 | REACT_APP_DAPP_DEVELOPMENT_TESTNET_CONTRACTS=$DAPP_DEVELOPMENT_TESTNET_CONTRACTS 4 | 5 | REACT_APP_FEATURE_FLAG_TBTC_V2=true 6 | REACT_APP_FEATURE_FLAG_TBTC_V2_REDEMPTION=true 7 | REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true 8 | REACT_APP_FEATURE_FLAG_FEEDBACK_MODULE=false 9 | REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true 10 | 11 | REACT_APP_FEATURE_FLAG_GOOGLE_TAG_MANAGER=$GOOGLE_TAG_MANAGER_SUPPORT 12 | REACT_APP_GOOGLE_TAG_MANAGER_ID=$GOOGLE_TAG_MANAGER_ID 13 | 14 | REACT_APP_FEATURE_FLAG_POSTHOG=$POSTHOG_SUPPORT 15 | REACT_APP_POSTHOG_API_KEY=$POSTHOG_API_KEY 16 | REACT_APP_POSTHOG_HOSTNAME_HTTP=$POSTHOG_HOSTNAME_HTTP 17 | 18 | REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT 19 | REACT_APP_SENTRY_DSN=$SENTRY_DSN 20 | REACT_APP_FEATURE_FLAG_TRM=$TRM_SUPPORT 21 | 22 | REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL 23 | REACT_APP_ELECTRUM_HOST=$ELECTRUM_HOST 24 | REACT_APP_ELECTRUM_PORT=$ELECTRUM_PORT 25 | REACT_APP_MOCK_BITCOIN_CLIENT=false 26 | 27 | REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_PROJECT_ID 28 | 29 | REACT_APP_TBTC_SUBGRAPH_API_KEY=$TBTC_SUBGRAPH_API_KEY 30 | 31 | REACT_APP_TACO_DOMAIN=mainnet -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | REACT_APP_DEFAULT_PROVIDER_CHAIN_ID=1337 2 | REACT_APP_MULTICALL_ADDRESS=0xcA11bde05977b3631167028862bE2a173976CA11 3 | REACT_APP_TACO_DOMAIN=dashboard -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | storybook-static 2 | cypress/fixtures 3 | cypress/plugins 4 | external/ 5 | build 6 | dist -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: "@typescript-eslint/parser", 4 | parserOptions: { 5 | ecmaVersion: 2020, 6 | sourceType: "module", 7 | ecmaFeatures: { 8 | jsx: true, 9 | }, 10 | }, 11 | env: { 12 | browser: true, 13 | es6: true, 14 | }, 15 | extends: "eslint-config-keep", 16 | plugins: ["react"], 17 | rules: { 18 | "react/prop-types": 0, 19 | "react/display-name": 0, 20 | "no-invalid-this": 0, 21 | "spaced-comment": 0, 22 | "react/jsx-uses-react": "off", 23 | "react/react-in-jsx-scope": "off", 24 | "no-unused-vars": 0, 25 | }, 26 | settings: { 27 | react: { 28 | version: "detect", 29 | }, 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Auto-formatted dashboard code via `yarn format:fix` command. 2 | 3 | 50c6d966435451b12691611784aa0dd6ad0927fa 4 | 1911b2106aada277cb49835f9983e4ba04a1affa 5 | b89fbc32ba93e921df994499f3c29512ab59a71e 6 | 0b3d20bbba7a706603c91aef512a5f18d5c8ff17 7 | -------------------------------------------------------------------------------- /.github/workflows/cypress.yml: -------------------------------------------------------------------------------- 1 | name: Cypress E2E Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | schedule: 8 | - cron: "0 0 * * *" 9 | workflow_dispatch: 10 | 11 | jobs: 12 | cypress-run: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v3 17 | - name: Cypress run 18 | uses: cypress-io/github-action@v2 19 | with: 20 | build: yarn build 21 | start: yarn start 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Local 2 | .DS_Store 3 | .idea 4 | .eslintcache 5 | 6 | # IDEs 7 | .vscode/ 8 | .idea/ 9 | 10 | # Generated 11 | build/ 12 | dist/ 13 | external/ 14 | 15 | # Storybook 16 | storybook-static 17 | build-storybook.log 18 | cypress/fixtures 19 | cypress/plugins 20 | 21 | # Yarn 22 | node_modules/ 23 | yarn-error.log 24 | .env 25 | 26 | .cosine/ 27 | 28 | .claude/ 29 | CLAUDE.md 30 | coverage/ 31 | .do/app.yaml 32 | .env.testnet 33 | .env.mainnet 34 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn run pre-commit 5 | -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*.{js,ts,tsx}": "yarn format:fix" 3 | } 4 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | storybook-static 2 | cypress/fixtures 3 | cypress/plugins 4 | external 5 | build 6 | dist -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require("@keep-network/prettier-config-keep"), 3 | } 4 | -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | stories: ["../src/stories/*.stories.tsx"], 3 | addons: [ 4 | "@storybook/addon-links", 5 | "@storybook/addon-essentials", 6 | "@storybook/preset-create-react-app", 7 | "@snek-at/storybook-addon-chakra-ui", 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /.storybook/preview.js: -------------------------------------------------------------------------------- 1 | import theme from "../src/theme" 2 | import { addDecorator } from "@storybook/react" 3 | import { MemoryRouter } from "react-router" 4 | 5 | addDecorator((story) => ( 6 | {story()} 7 | )) 8 | 9 | export const parameters = { 10 | actions: { argTypesRegex: "^on[A-Z].*" }, 11 | controls: { 12 | matchers: { 13 | color: /(background|color)$/i, 14 | date: /Date$/, 15 | }, 16 | }, 17 | chakra: { theme }, 18 | } 19 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | .github/workflows/dashboard-mainnet.yml @pdyraga @lukasz-zimnoch @cygnusv 2 | -------------------------------------------------------------------------------- /Dockerfile.dev: -------------------------------------------------------------------------------- 1 | # Use the specified image 2 | FROM node:18-buster-slim 3 | 4 | # Set the working directory 5 | WORKDIR /app 6 | 7 | # Install dependencies 8 | RUN apt-get update && apt-get install -y python3 make g++ git openssh-client ca-certificates && \ 9 | git config --global url."https://".insteadOf git:// && \ 10 | rm -rf /var/lib/apt/lists/* && \ 11 | apt-get clean 12 | 13 | # Set the environment variables 14 | ENV PYTHON=/usr/bin/python3 15 | ENV NODE_OPTIONS=--max_old_space_size=3072 16 | 17 | # Copy package files and install node modules 18 | COPY package*.json yarn.lock ./ 19 | RUN npm install -g node-gyp 20 | RUN yarn install --ignore-scripts 21 | RUN yarn upgrade @keep-network/ecdsa@sepolia \ 22 | @keep-network/keep-core@sepolia \ 23 | @keep-network/keep-ecdsa@sepolia \ 24 | @keep-network/random-beacon@sepolia \ 25 | @keep-network/tbtc@sepolia \ 26 | @keep-network/tbtc-v2@sepolia \ 27 | @threshold-network/solidity-contracts@sepolia 28 | RUN yarn run postinstall 29 | 30 | # Expose port 3000 31 | EXPOSE 3000 32 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:3000" 3 | } 4 | -------------------------------------------------------------------------------- /cypress/integration/App.spec.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | describe("My First Test", () => { 4 | it("Opens the app", () => { 5 | cy.visit("/") 6 | cy.dataCy("app-container") 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /cypress/support/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | /// 3 | 4 | declare namespace Cypress { 5 | /** 6 | * A helper method provided by the cypress documentation: 7 | * https://docs.cypress.io/guides/tooling/typescript-support#Types-for-custom-commands 8 | * Custom command to select DOM element by data-cy attribute. 9 | * @example cy.dataCy('greeting') 10 | */ 11 | interface Chainable { 12 | dataCy(value: string): Chainable 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cypress/support/index.ts: -------------------------------------------------------------------------------- 1 | function dataCy(identifier: string) { 2 | return cy.get(`[data-cy=${identifier}]`) 3 | } 4 | 5 | Cypress.Commands.add("dataCy", dataCy) 6 | -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"], 6 | "isolatedModules": false 7 | }, 8 | "include": ["**/*.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | threshold-dashboard: 5 | container_name: threshold-dashboard 6 | working_dir: /app 7 | environment: 8 | - PYTHON=/usr/bin/python3 9 | - NODE_OPTIONS=--max_old_space_size=3072 10 | ports: 11 | - "3000:3000" 12 | volumes: 13 | - .:/app # Bind mount the current directory to /app in the container 14 | - /app/node_modules # This will prevent node_modules from being overwritten by the local volume 15 | command: bash -c "yarn format:fix && yarn start" 16 | build: 17 | context: . 18 | dockerfile: Dockerfile.dev 19 | -------------------------------------------------------------------------------- /multicall/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | artifacts/ 4 | build/ 5 | cache/ 6 | deployments/ 7 | export/ 8 | export.json 9 | 10 | typechain/ 11 | 12 | yarn-error.log 13 | 14 | .vscode/ 15 | 16 | .hardhat/* 17 | !.hardhat/networks_TEMPLATE.ts 18 | -------------------------------------------------------------------------------- /multicall/README.md: -------------------------------------------------------------------------------- 1 | # Deploying `Multicall` via hardhat 2 | 3 | Deploying the 4 | [`Multicall`](https://github.com/makerdao/multicall/blob/master/src/Multicall.sol) 5 | contract to local network via `hardhat` to test integration with 6 | [`Multicall`](https://github.com/makerdao/multicall/blob/master/src/Multicall.sol) 7 | contract in T dapp locally. There is no need to deploy this contract to 8 | `Ropsten` or `Mainnet` network- you can find contract addresses at 9 | https://github.com/makerdao/multicall#multicall-contract-addresses. 10 | 11 | # Prerequisites 12 | 13 | - Make sure your local chain is running (eg. Ganache). 14 | - Verfiy `development` network config in `hardhat.config.ts` file- set the correct `chainId` and `url`. 15 | 16 | # Usage 17 | 18 | ## Setup 19 | 20 | `yarn` 21 | 22 | ## Deploy `Multicall` contract 23 | 24 | `yarn deploy:development` 25 | -------------------------------------------------------------------------------- /multicall/deploy/01_deploy_multicall.ts: -------------------------------------------------------------------------------- 1 | import { HardhatRuntimeEnvironment } from "hardhat/types" 2 | import { DeployFunction } from "hardhat-deploy/types" 3 | 4 | const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { 5 | const { getNamedAccounts, deployments } = hre 6 | const { deployer } = await getNamedAccounts() 7 | 8 | const Multicall = await deployments.deploy("Multicall", { 9 | from: deployer, 10 | }) 11 | 12 | deployments.log(Multicall.address) 13 | } 14 | 15 | export default func 16 | 17 | func.tags = ["Multicall"] 18 | -------------------------------------------------------------------------------- /multicall/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config" 2 | 3 | import "@keep-network/hardhat-helpers" 4 | import "hardhat-deploy" 5 | 6 | const config: HardhatUserConfig = { 7 | solidity: { 8 | compilers: [ 9 | { 10 | version: "0.8.9", 11 | settings: { 12 | optimizer: { 13 | enabled: true, 14 | runs: 100, 15 | }, 16 | }, 17 | }, 18 | ], 19 | }, 20 | paths: { 21 | artifacts: "./build", 22 | }, 23 | networks: { 24 | development: { 25 | url: "http://localhost:8545", 26 | chainId: 1337, 27 | tags: ["local"], 28 | }, 29 | }, 30 | // // Define local networks configuration file path to load networks from the file. 31 | // localNetworksConfig: "./.hardhat/networks.ts", 32 | namedAccounts: { 33 | deployer: { 34 | default: 0, // take the first account as deployer 35 | }, 36 | }, 37 | } 38 | 39 | export default config 40 | -------------------------------------------------------------------------------- /multicall/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multicall", 3 | "description": "Multicall contract deployment via hardhat", 4 | "version": "1.0.0", 5 | "license": "MIT", 6 | "scripts": { 7 | "build": "hardhat compile", 8 | "deploy": "hardhat deploy --export export.json", 9 | "deploy:development": "yarn deploy --network development --reset", 10 | "format": "npm run lint && prettier --check .", 11 | "format:fix": "npm run lint:fix && prettier --write .", 12 | "lint:fix": "eslint . --fix", 13 | "lint": "eslint . " 14 | }, 15 | "devDependencies": { 16 | "@keep-network/hardhat-helpers": "^0.2.0-pre.4", 17 | "@keep-network/prettier-config-keep": "github:keep-network/prettier-config-keep#d6ec02e", 18 | "@nomiclabs/hardhat-ethers": "^2.0.2", 19 | "eslint": "^7.27.0", 20 | "eslint-config-keep": "github:keep-network/eslint-config-keep#0c27ade", 21 | "ethers": "^5.4.1", 22 | "hardhat-deploy": "^0.9.4", 23 | "hardhat": "^2.6.8", 24 | "prettier": "^2.3.2", 25 | "prettier-plugin-sh": "^0.7.1", 26 | "ts-node": "^10.4.0", 27 | "typescript": "^4.4.4" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /multicall/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": ["./hardhat.config.ts"], 3 | "include": ["./deploy"] 4 | } 5 | -------------------------------------------------------------------------------- /public/Metabanner_grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threshold-network/token-dashboard/05c8be0939a7b868ce3a78f65354d13f71f8f1fc/public/Metabanner_grid.jpg -------------------------------------------------------------------------------- /public/favicon-T.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threshold-network/token-dashboard/05c8be0939a7b868ce3a78f65354d13f71f8f1fc/public/favicon-T.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threshold-network/token-dashboard/05c8be0939a7b868ce3a78f65354d13f71f8f1fc/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threshold-network/token-dashboard/05c8be0939a7b868ce3a78f65354d13f71f8f1fc/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/threshold-network/token-dashboard/05c8be0939a7b868ce3a78f65354d13f71f8f1fc/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /scripts/rebuild_components_package.sh: -------------------------------------------------------------------------------- 1 | LOG_START='\n\e[1;36m' # new line + bold + color 2 | LOG_END='\n\e[0m' # new line + reset color 3 | 4 | set -e -x 5 | 6 | TIMESTAMP=`date "+%s"` 7 | printf "${LOG_START}Removing components from node_modules folder...${LOG_END}" 8 | rm -rf node_modules/components 9 | printf "${LOG_START}Building components...${LOG_END}" 10 | yarn --cwd ../components/ build 11 | printf "${LOG_START}Packing components...${LOG_END}" 12 | yarn --cwd ../components/ pack --filename components-$TIMESTAMP.tgz 13 | printf "${LOG_START}Installing the lib${LOG_END}" 14 | yarn add file:components-$TIMESTAMP.tgz 15 | printf "${LOG_START}Removing packed file...${LOG_END}" 16 | rm components-$TIMESTAMP.tgz 17 | 18 | printf "${LOG_START}Done!.${LOG_END}" 19 | -------------------------------------------------------------------------------- /src/__mocks__/@starknet-react/chains.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mainnet: { 3 | id: BigInt("0x534e5f4d41494e"), 4 | name: "Starknet Mainnet", 5 | }, 6 | sepolia: { 7 | id: BigInt("0x534e5f5345504f4c4941"), 8 | name: "Starknet Sepolia", 9 | }, 10 | goerli: { 11 | id: BigInt("0x534e5f474f45524c49"), 12 | name: "Starknet Goerli (Deprecated)", 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /src/__mocks__/@starknet-react/core.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | StarknetConfig: jest.fn(), 3 | useAccount: jest.fn(), 4 | useProvider: jest.fn(), 5 | useConnect: jest.fn(), 6 | useDisconnect: jest.fn(), 7 | useNetwork: jest.fn(), 8 | useStarknet: jest.fn(), 9 | } 10 | -------------------------------------------------------------------------------- /src/__mocks__/axios.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | default: { 3 | get: jest.fn(() => Promise.resolve({ data: {} })), 4 | post: jest.fn(() => Promise.resolve({ data: {} })), 5 | put: jest.fn(() => Promise.resolve({ data: {} })), 6 | delete: jest.fn(() => Promise.resolve({ data: {} })), 7 | create: jest.fn(() => ({ 8 | get: jest.fn(() => Promise.resolve({ data: {} })), 9 | post: jest.fn(() => Promise.resolve({ data: {} })), 10 | put: jest.fn(() => Promise.resolve({ data: {} })), 11 | delete: jest.fn(() => Promise.resolve({ data: {} })), 12 | })), 13 | }, 14 | get: jest.fn(() => Promise.resolve({ data: {} })), 15 | post: jest.fn(() => Promise.resolve({ data: {} })), 16 | put: jest.fn(() => Promise.resolve({ data: {} })), 17 | delete: jest.fn(() => Promise.resolve({ data: {} })), 18 | create: jest.fn(() => ({ 19 | get: jest.fn(() => Promise.resolve({ data: {} })), 20 | post: jest.fn(() => Promise.resolve({ data: {} })), 21 | put: jest.fn(() => Promise.resolve({ data: {} })), 22 | delete: jest.fn(() => Promise.resolve({ data: {} })), 23 | })), 24 | } 25 | -------------------------------------------------------------------------------- /src/__mocks__/multiformats.js: -------------------------------------------------------------------------------- 1 | // Mock for multiformats to fix dependency issues 2 | module.exports = { 3 | bases: { 4 | base16: { 5 | encode: jest.fn((data) => data.toString("hex")), 6 | decode: jest.fn((str) => Buffer.from(str, "hex")), 7 | }, 8 | base32: { 9 | encode: jest.fn((data) => data.toString("base64")), 10 | decode: jest.fn((str) => Buffer.from(str, "base64")), 11 | }, 12 | base64: { 13 | encode: jest.fn((data) => data.toString("base64")), 14 | decode: jest.fn((str) => Buffer.from(str, "base64")), 15 | }, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /src/__mocks__/starknet.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | Account: jest.fn(), 3 | Provider: jest.fn(), 4 | constants: { 5 | StarknetChainId: { 6 | MAINNET: "0x534e5f4d41494e", 7 | TESTNET: "0x534e5f5345504f4c4941", 8 | }, 9 | }, 10 | RpcProvider: jest.fn(), 11 | } 12 | -------------------------------------------------------------------------------- /src/__mocks__/starknetkit.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | connect: jest.fn(), 3 | disconnect: jest.fn(), 4 | getAvailableWallets: jest.fn().mockReturnValue([]), 5 | } 6 | -------------------------------------------------------------------------------- /src/__mocks__/threshold-ts/index.ts: -------------------------------------------------------------------------------- 1 | export class TBTC { 2 | getEstimatedDepositFees = jest.fn() 3 | revealDeposit = jest.fn() 4 | bridgeContract = true 5 | } 6 | 7 | export class Threshold { 8 | tbtc: TBTC 9 | 10 | constructor() { 11 | this.tbtc = new TBTC() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/__mocks__/uint8arrays.js: -------------------------------------------------------------------------------- 1 | // Mock for uint8arrays to fix WalletConnect import issues in tests 2 | module.exports = { 3 | fromString: jest.fn((str) => Buffer.from(str)), 4 | toString: jest.fn((arr) => Buffer.from(arr).toString()), 5 | concat: jest.fn((arrays) => Buffer.concat(arrays)), 6 | equals: jest.fn((a, b) => Buffer.from(a).equals(Buffer.from(b))), 7 | } 8 | -------------------------------------------------------------------------------- /src/components/BundledRewardsAlert/index.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react" 2 | import { 3 | Alert, 4 | AlertIcon, 5 | AlertDescription, 6 | AlertProps, 7 | BodyXs, 8 | } from "@threshold-network/components" 9 | 10 | const defaultText = 11 | "tBTC + Random Beacon earn bundled rewards. Authorize both apps to earn rewards." 12 | 13 | const BundledRewardsAlert: FC<{ text?: string } & AlertProps> = ({ 14 | text = defaultText, 15 | ...restProps 16 | }) => { 17 | return ( 18 | 19 | 20 | {text} 21 | 22 | ) 23 | } 24 | 25 | export default BundledRewardsAlert 26 | -------------------------------------------------------------------------------- /src/components/ButtonLink/index.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react" 2 | import { Button, ButtonProps, forwardRef } from "@threshold-network/components" 3 | import Link, { LinkProps } from "../Link" 4 | 5 | const style = { 6 | textDecoration: "none", 7 | } 8 | 9 | const ButtonLink: FC = forwardRef( 10 | ({ ...props }, ref) => { 11 | return ( 12 |