From 54832bc6e873a64deef31fe060e3bc3e6547ec0a Mon Sep 17 00:00:00 2001 From: bobabot-enya-ai <101345210+bobabot-enya-ai@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:01:55 +0200 Subject: [PATCH] New release V0.9.0 (#1183) --- .github/workflows/boba-publish-develop.yml | 4 +- .github/workflows/boba-publish-master.yml | 6 +- .github/workflows/gateway-deploy-stage.yml | 2 +- .github/workflows/release.yml | 5 +- .../boba-node/docker-compose-bobaavax.yml | 4 +- .../boba-node/docker-compose-bobabase.yml | 78 - .../boba-node/docker-compose-bobabeam.yml | 78 - .../docker-compose-bobabnb-testnet.yml | 8 +- .../boba-node/docker-compose-bobabnb.yml | 4 +- .../boba-node/docker-compose-bobafuji.yml | 4 +- .../docker-compose-bobaopera-testnet.yml | 78 - .../boba-node/docker-compose-bobaopera.yml | 78 - .../state-dumps/bobabnbtestnet/boba-addr.json | 8 +- .../state-dumps/goerli/boba-addr.json | 8 +- integration-tests/README.md | 1 + .../test/alt-l2/teleportation.spec.ts | 22 +- .../test/eth-l2/teleportation.spec.ts | 22 +- l2geth/cmd/utils/flags.go | 2 +- ops_boba/monitor/.env.sample | 5 + ops_boba/monitor/services/utils/globalEnv.js | 1 + packages/boba/contracts/.gitignore | 1 + .../contracts/contracts/Teleportation.sol | 29 +- .../deploy/020-Teleportation.deploy.ts | 267 ++- .../teleportation_deploy_logs/.gitkeep} | 0 .../test/endToEndTests/teleportation.spec.ts | 85 +- packages/boba/gateway/package.json | 3 +- packages/boba/gateway/public/favicon.png | Bin 5954 -> 653 bytes packages/boba/gateway/public/favicon.svg | 17 +- packages/boba/gateway/public/favicon_3x.png | Bin 5954 -> 0 bytes packages/boba/gateway/public/favison_2x.png | Bin 5954 -> 0 bytes packages/boba/gateway/public/index.html | 1 - .../boba/gateway/src/actions/bridgeAction.js | 5 + .../boba/gateway/src/actions/networkAction.js | 20 +- .../boba/gateway/src/actions/nftAction.js | 67 - packages/boba/gateway/src/actions/uiAction.js | 4 +- .../src/assets/images/icons/actions.svg | 8 +- .../src/assets/images/icons/arrowright.svg | 6 +- .../src/assets/images/icons/no-data.svg | 4 +- .../src/components/PulseBadge/index.tsx | 61 - .../components/Table/TransactionTableRow.js | 232 --- .../gateway/src/components/Table/index.js | 85 - .../src/components/Table/table.styles.js | 74 - .../bridge/NetworkPickerList/index.tsx | 11 +- .../src/components/common/common.styles.js | 10 - .../components/dao/LinearProgress/style.ts | 2 + .../gateway/src/components/filter/styles.ts | 3 + .../__snapshots__/index.test.tsx.snap | 4 +- .../src/components/global/InputMax/styles.ts | 33 +- .../components/global/background/styles.ts | 14 +- .../src/components/global/dropdown/index.tsx | 3 +- .../src/components/global/dropdown/styles.ts | 5 +- .../global/inputWithButton/styles.ts | 5 +- .../src/components/global/menu/index.tsx | 5 +- .../src/components/global/menu/styles.ts | 15 +- .../__snapshots__/index.test.tsx.snap | 12 +- .../global/placeholderConnect/index.tsx | 14 +- .../global/placeholderConnect/styles.ts | 2 + .../components/global/searchInput/styles.ts | 2 +- .../src/components/global/table/index.tsx | 5 +- .../src/components/global/tabs/styles.ts | 3 +- .../__snapshots__/index.test.tsx.snap | 14 +- .../src/components/global/typography/style.ts | 1 - .../src/components/icons/ArrowRightIcon.js | 21 - .../gateway/src/components/icons/BobaIcon.js | 49 - .../gateway/src/components/icons/ClaimIcon.js | 40 - .../gateway/src/components/icons/DAOIcon.js | 25 - .../src/components/icons/DirectionIcon.js | 11 - .../gateway/src/components/icons/Discord.js | 52 - .../gateway/src/components/icons/DownIcon.js | 25 - .../gateway/src/components/icons/EarnIcon.js | 22 - .../gateway/src/components/icons/EditIcon.js | 29 - .../src/components/icons/EthereumIcon.js | 35 - .../gateway/src/components/icons/ExitIcon.js | 24 - .../gateway/src/components/icons/HideIcon.js | 27 - .../src/components/icons/HistoryIcon.js | 53 - .../gateway/src/components/icons/L1Icon.js | 42 - .../gateway/src/components/icons/L2Icon.js | 25 - .../src/components/icons/L2ToL1Icon.js | 48 - .../gateway/src/components/icons/LayerIcon.js | 27 - .../gateway/src/components/icons/LearnIcon.js | 32 - .../gateway/src/components/icons/LinkIcon.js | 24 - .../gateway/src/components/icons/LockIcon.js | 32 - .../gateway/src/components/icons/MinusIcon.js | 24 - .../gateway/src/components/icons/NFTIcon.js | 22 - .../src/components/icons/NetworkIcon.js | 28 - .../components/icons/NetworkSwitcherIcon.js | 52 - .../gateway/src/components/icons/PlusIcon.js | 23 - .../gateway/src/components/icons/PoolIcon.js | 27 - .../gateway/src/components/icons/SafeIcon.js | 7 - .../src/components/icons/SettingsIcon.js | 47 - .../gateway/src/components/icons/SortIcon.js | 30 - .../gateway/src/components/icons/SwapIcon.js | 25 - .../src/components/icons/TelegramIcon.js | 17 - .../src/components/icons/TwitterIcon.js | 15 - .../gateway/src/components/icons/UpIcon.js | 24 - .../layout/Footer/FooterLinks/constant.ts | 4 +- .../layout/Footer/FooterLinks/index.tsx | 2 +- .../layout/Footer/SocialLinks/index.tsx | 3 +- .../layout/Header/WalletAddress/index.tsx | 14 +- .../layout/Header/WalletAddress/style.ts | 8 + .../Header/__snapshots__/index.test.tsx.snap | 13 +- .../layout/Header/feeSwitcher/index.tsx | 21 +- .../layout/Header/feeSwitcher/styles.ts | 20 +- .../src/components/layout/Header/index.tsx | 7 +- .../src/components/layout/Header/styles.ts | 18 +- .../src/components/listEarn/ListEarn.js | 10 +- .../gateway/src/components/listEarn/styles.ts | 11 +- .../components/listProposal/listProposal.js | 11 +- .../listProposal/listProposal.styles.js | 21 +- .../mainMenu/layerSwitcher/LayerSwitcher.js | 2 +- .../networkSwitcher/NetworkListItem.js | 4 +- .../networkSwitcher/NetworkSwitcher.js | 6 +- .../gateway/src/components/modal/styles.ts | 15 +- .../notificationBanner/bannerConfig.ts | 7 +- .../components/notificationBanner/index.tsx | 11 +- .../tests/__snapshots__/index.test.tsx.snap | 24 +- .../notificationBanner/tests/index.test.tsx | 10 +- .../gateway/src/components/select/Select.js | 19 +- .../gateway/src/components/seven/FastExit.js | 61 +- .../gateway/src/components/seven/Seven.js | 83 +- .../components/seven/Transaction.module.scss | 251 --- .../components/seven/Transaction.styles.js | 53 - .../gateway/src/components/seven/styles.ts | 16 +- .../stake/transactionList/index.tsx | 39 +- .../Bridging/BridgeHeader/index.tsx | 44 +- .../Bridging/BridgeInput/Fee/index.tsx | 14 +- .../Bridging/BridgeInput/TokenInput/index.tsx | 2 +- .../containers/Bridging/BridgeInput/index.tsx | 6 +- .../containers/Bridging/BridgeInput/styles.ts | 21 +- .../Bridging/BridgeTypeSelector/index.tsx | 22 +- .../Bridging/BridgeTypeSelector/style.ts | 11 +- .../src/containers/Bridging/chain/index.tsx | 22 +- .../src/containers/Bridging/chain/styles.ts | 12 +- .../gateway/src/containers/Bridging/index.tsx | 2 + .../gateway/src/containers/Bridging/styles.ts | 3 +- .../src/containers/bobaScope/FastExits.js | 92 +- .../src/containers/bobaScope/Sevens.js | 25 +- .../bobaScope/Transactions.module.scss | 154 -- .../src/containers/bobaScope/styles.ts | 39 +- .../gateway/src/containers/bridge/Bridge.js | 17 - .../src/containers/bridge/Bridge.styles.js | 123 -- .../bridge/bobaBridge/bobaBridge.js | 231 --- .../bridge/bobaBridge/bobaBridge.styles.js | 148 -- .../bridgeTransfer/bridgeTransfer.js | 124 -- .../bridgeTransfer/bridgeTransfer.styles.js | 24 - .../bridgeTransfer/tokenInput/TokenInput.js | 63 - .../tokenInput/TokenInput.styles.js | 107 -- .../gateway/src/containers/connect/Connect.js | 4 +- .../boba/gateway/src/containers/dao/OldDao.js | 6 +- .../boba/gateway/src/containers/earn/Earn.js | 24 +- .../gateway/src/containers/earn/styles.ts | 10 +- .../src/containers/history/History.tsx | 12 +- .../history/TransactionsResolver.tsx | 38 +- .../tests/__snapshots__/history.test.tsx.snap | 1439 ++++++++++++++++- .../containers/history/tests/history.test.tsx | 33 +- .../gateway/src/containers/history/types.ts | 4 + .../gateway/src/containers/home/styles.ts | 2 +- .../modals/BridgeConfirmModal/index.tsx | 11 +- .../BlockConfirmation.tsx | 4 +- .../modals/BridgeInProgressModal/index.tsx | 6 +- .../modals/TransactionSuccessModal/index.tsx | 5 +- .../containers/modals/dao/DelegateDaoModal.js | 30 +- .../containers/modals/dao/NewProposalModal.js | 68 +- .../modals/earn/EarnDepositModal.js | 16 +- .../modals/earn/EarnWithdrawModal.js | 11 +- .../src/containers/modals/earn/styles.ts | 2 +- .../gateway/src/containers/modals/index.tsx | 2 +- .../containers/modals/networkPicker/index.tsx | 10 +- .../modals/tokenPicker/TokenPickerModal.tsx | 25 +- .../containers/modals/tokenPicker/styles.ts | 4 +- .../walletSelector/WalletSelectorModal.js | 12 +- .../boba/gateway/src/containers/save/Save.tsx | 90 +- .../gateway/src/hooks/useAmountToReceive.ts | 10 +- packages/boba/gateway/src/hooks/useBridge.ts | 64 +- .../boba/gateway/src/hooks/useBridgeAlerts.ts | 97 +- .../boba/gateway/src/hooks/useBridgeSetup.ts | 7 +- packages/boba/gateway/src/hooks/useNetwork.ts | 3 +- .../gateway/src/layout/routes/routeList.js | 2 +- .../gateway/src/reducers/bridgeReducer.js | 17 +- .../gateway/src/reducers/networkReducer.js | 2 + .../gateway/src/selectors/bridgeSelector.js | 5 + .../boba/gateway/src/services/app.service.js | 240 ++- .../gateway/src/services/graphql.service.js | 235 ++- .../gateway/src/services/networkService.js | 1276 +++++++-------- .../src/services/transaction.service.js | 136 +- .../boba/gateway/src/util/amountConvert.js | 4 +- packages/boba/gateway/src/util/chainConfig.ts | 106 ++ packages/boba/gateway/src/util/constant.ts | 3 +- .../gateway/src/util/network/network.util.js | 211 --- .../gateway/src/util/network/network.util.ts | 253 +++ packages/boba/gateway/tsconfig.json | 1 + ...20f8ce1c4be8436574e575fE38558d85e2E6b.json | 4 +- ...1fb3f4353a9060aEC3943fE932b6Efe35CdAa.json | 6 +- ...89B25597259cfa51Bd396cE1d4B085EC4c753.json | 4 +- ...8de95b85212BC348452e91e0e74c17cf37c79.json | 4 +- ...9c8FF8F0B6a0763a3030540c21aFC721A9148.json | 6 +- ...6ac6C3f73a25Dd994E0b0669ca7ee0C02F089.json | 4 +- .../boba/subgraph/L2/abis/Teleportation.json | 791 +++++++++ packages/boba/subgraph/L2/config/goerli.json | 3 + packages/boba/subgraph/L2/config/local.json | 26 + packages/boba/subgraph/L2/config/mainnet.json | 3 + packages/boba/subgraph/L2/package.json | 15 +- packages/boba/subgraph/L2/schema.graphql | 47 + .../subgraph/L2/src/TeleportationMapping.ts | 63 + .../boba/subgraph/L2/subgraph.template.yaml | 26 + packages/boba/subgraph/L2/subgraph.yaml | 28 +- packages/boba/subgraph/README.md | 10 + packages/boba/teleportation/.env.example | 2 + packages/boba/teleportation/README.md | 18 +- packages/boba/teleportation/package.json | 3 +- packages/boba/teleportation/src/service.ts | 111 +- .../boba/teleportation/src/utils/chains.ts | 71 +- .../teleportation/src/utils/kms-signing.ts | 134 +- yarn.lock | 180 ++- 214 files changed, 5500 insertions(+), 5203 deletions(-) delete mode 100644 boba_community/boba-node/docker-compose-bobabase.yml delete mode 100644 boba_community/boba-node/docker-compose-bobabeam.yml delete mode 100644 boba_community/boba-node/docker-compose-bobaopera-testnet.yml delete mode 100644 boba_community/boba-node/docker-compose-bobaopera.yml rename packages/boba/{gateway/src/components/Table/TableRow.js => contracts/teleportation_deploy_logs/.gitkeep} (100%) delete mode 100644 packages/boba/gateway/public/favicon_3x.png delete mode 100644 packages/boba/gateway/public/favison_2x.png delete mode 100644 packages/boba/gateway/src/actions/nftAction.js delete mode 100644 packages/boba/gateway/src/components/PulseBadge/index.tsx delete mode 100644 packages/boba/gateway/src/components/Table/TransactionTableRow.js delete mode 100644 packages/boba/gateway/src/components/Table/index.js delete mode 100644 packages/boba/gateway/src/components/Table/table.styles.js delete mode 100644 packages/boba/gateway/src/components/common/common.styles.js delete mode 100644 packages/boba/gateway/src/components/icons/ArrowRightIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/BobaIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/ClaimIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/DAOIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/DirectionIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/Discord.js delete mode 100644 packages/boba/gateway/src/components/icons/DownIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/EarnIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/EditIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/EthereumIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/ExitIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/HideIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/HistoryIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/L1Icon.js delete mode 100644 packages/boba/gateway/src/components/icons/L2Icon.js delete mode 100644 packages/boba/gateway/src/components/icons/L2ToL1Icon.js delete mode 100644 packages/boba/gateway/src/components/icons/LayerIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/LearnIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/LinkIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/LockIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/MinusIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/NFTIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/NetworkIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/NetworkSwitcherIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/PlusIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/PoolIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/SafeIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/SettingsIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/SortIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/SwapIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/TelegramIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/TwitterIcon.js delete mode 100644 packages/boba/gateway/src/components/icons/UpIcon.js delete mode 100644 packages/boba/gateway/src/components/seven/Transaction.module.scss delete mode 100644 packages/boba/gateway/src/components/seven/Transaction.styles.js delete mode 100644 packages/boba/gateway/src/containers/bobaScope/Transactions.module.scss delete mode 100644 packages/boba/gateway/src/containers/bridge/Bridge.js delete mode 100644 packages/boba/gateway/src/containers/bridge/Bridge.styles.js delete mode 100644 packages/boba/gateway/src/containers/bridge/bobaBridge/bobaBridge.js delete mode 100644 packages/boba/gateway/src/containers/bridge/bobaBridge/bobaBridge.styles.js delete mode 100644 packages/boba/gateway/src/containers/bridge/bobaBridge/bridgeTransfer/bridgeTransfer.js delete mode 100644 packages/boba/gateway/src/containers/bridge/bobaBridge/bridgeTransfer/bridgeTransfer.styles.js delete mode 100644 packages/boba/gateway/src/containers/bridge/bobaBridge/bridgeTransfer/tokenInput/TokenInput.js delete mode 100644 packages/boba/gateway/src/containers/bridge/bobaBridge/bridgeTransfer/tokenInput/TokenInput.styles.js create mode 100644 packages/boba/gateway/src/util/chainConfig.ts delete mode 100644 packages/boba/gateway/src/util/network/network.util.js create mode 100644 packages/boba/gateway/src/util/network/network.util.ts create mode 100644 packages/boba/subgraph/L2/abis/Teleportation.json create mode 100644 packages/boba/subgraph/L2/config/local.json create mode 100644 packages/boba/subgraph/L2/src/TeleportationMapping.ts diff --git a/.github/workflows/boba-publish-develop.yml b/.github/workflows/boba-publish-develop.yml index 7804e51516..aecac00413 100644 --- a/.github/workflows/boba-publish-develop.yml +++ b/.github/workflows/boba-publish-develop.yml @@ -19,7 +19,7 @@ jobs: contents: read steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE }} aws-region: ${{ secrets.AWS_REGION }} @@ -168,7 +168,7 @@ jobs: contents: read steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE }} aws-region: ${{ secrets.AWS_REGION }} diff --git a/.github/workflows/boba-publish-master.yml b/.github/workflows/boba-publish-master.yml index 54e05e5714..33c6993c61 100644 --- a/.github/workflows/boba-publish-master.yml +++ b/.github/workflows/boba-publish-master.yml @@ -18,7 +18,7 @@ jobs: contents: read steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE }} aws-region: ${{ secrets.AWS_REGION }} @@ -70,7 +70,7 @@ jobs: password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE }} aws-region: ${{ secrets.AWS_REGION }} @@ -189,7 +189,7 @@ jobs: contents: read steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE }} aws-region: ${{ secrets.AWS_REGION }} diff --git a/.github/workflows/gateway-deploy-stage.yml b/.github/workflows/gateway-deploy-stage.yml index d4d2f001e0..772675ca68 100644 --- a/.github/workflows/gateway-deploy-stage.yml +++ b/.github/workflows/gateway-deploy-stage.yml @@ -48,7 +48,7 @@ jobs: REACT_APP_GA4_MEASUREMENT_ID: ${{ env.REACT_APP_GA4_MEASUREMENT_ID }} REACT_APP_SENTRY_DSN: ${{ env.REACT_APP_SENTRY_DSN }} - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: ${{ secrets.AWS_ROLE }} aws-region: ${{ secrets.AWS_REGION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 418ee232c7..34d9362661 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup git user run: | git config --global user.name noreply@github.com @@ -23,7 +25,8 @@ jobs: - name: Run run: | git fetch - LAST_COMMIT=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/bobanetwork/boba/pulls/${{ github.event.inputs.last_release_pr }}/commits | jq '.[-1].commit.message' | grep -o -E -e "[0-9a-f]{40}") + #this might break if there's more then 400 commits in a PR + LAST_COMMIT=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/bobanetwork/boba/pulls/${{ github.event.inputs.last_release_pr }}/commits?per_page=400 | jq '.[-1].commit.message' | grep -o -E -e "[0-9a-f]{40}") echo 'LAST_COMMIT' echo $LAST_COMMIT TIP_OF_DEVELOP=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/bobanetwork/boba/commits?per_page=1 | jq '.[-1].sha' | tr -d '"') diff --git a/boba_community/boba-node/docker-compose-bobaavax.yml b/boba_community/boba-node/docker-compose-bobaavax.yml index acd7f9085b..1441c77694 100644 --- a/boba_community/boba-node/docker-compose-bobaavax.yml +++ b/boba_community/boba-node/docker-compose-bobaavax.yml @@ -10,7 +10,7 @@ version: "3.9" services: dtl: container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} + image: bobanetwork/data-transport-layer:${RELEASE_VERSION} env_file: - ../../ops/envs/dtl.env environment: @@ -40,7 +40,7 @@ services: container_name: replica depends_on: - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} + image: bobanetwork/l2geth:${RELEASE_VERSION} deploy: replicas: 1 entrypoint: sh ./geth.sh diff --git a/boba_community/boba-node/docker-compose-bobabase.yml b/boba_community/boba-node/docker-compose-bobabase.yml deleted file mode 100644 index fb779c78f8..0000000000 --- a/boba_community/boba-node/docker-compose-bobabase.yml +++ /dev/null @@ -1,78 +0,0 @@ - -x-l1_rpc_dtl: &l1_rpc_dtl - DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: 'https://rpc.api.moonbase.moonbeam.network' - -x-l1_rpc_geth: &l1_rpc_geth - ETH1_HTTP: 'https://rpc.api.moonbase.moonbeam.network' - -version: "3.9" - -services: - dtl: - container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} - env_file: - - ../../ops/envs/dtl.env - environment: - << : *l1_rpc_dtl - DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: 'https://replica.bobabase.boba.network' - DATA_TRANSPORT_LAYER__SYNC_FROM_L1: 'false' - DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' - DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 1297 - DATA_TRANSPORT_LAYER__ETH1_CTC_DEPLOYMENT_HEIGHT: 2798105 - DATA_TRANSPORT_LAYER__POLLING_INTERVAL: 10000 - DATA_TRANSPORT_LAYER__ADDRESS_MANAGER: '0xF8d0bF3a1411AC973A606f90B2d1ee0840e5979B' - DATA_TRANSPORT_LAYER__BSS_HARDFORK_1_INDEX: 0 - DATA_TRANSPORT_LAYER__TURING_V0_HEIGHT: 0 - DATA_TRANSPORT_LAYER__TURING_V1_HEIGHT: 0 - volumes: - - ./state-dumps/bobabase:/opt/optimism/packages/data-transport-layer/state-dumps/ - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${DTL_PORT:-7878}:7878 - - ${REGISTRY_PORT:-8080}:8081 - - replica: - container_name: replica - depends_on: - - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} - deploy: - replicas: 1 - entrypoint: sh ./geth.sh - env_file: - - ../../ops/envs/geth.env - #volumes: - # - ./:/root/.ethereum/ - environment: - << : *l1_rpc_geth - ROLLUP_TIMESTAMP_REFRESH: 5s - ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json - ROLLUP_CLIENT_HTTP: http://dtl:7878 - ROLLUP_BACKEND: 'l2' - ROLLUP_VERIFIER_ENABLE: 'true' - RETRIES: 60 - # no need to keep this secret, only used internally to sign blocks - BLOCK_SIGNER_KEY: "6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27" - BLOCK_SIGNER_ADDRESS: "0x00000398232E2064F896018496b4b44b3D62751F" - ROLLUP_POLL_INTERVAL_FLAG: "10s" - ROLLUP_ENFORCE_FEES: 'true' - # turing - TURING_CREDIT_ADDRESS: "0x4200000000000000000000000000000000000020" - # fee token - L2_BOBA_TOKEN_ADDRESS: "0x4200000000000000000000000000000000000023" - BOBA_GAS_PRICE_ORACLE_ADDRESS: "0x4200000000000000000000000000000000000024" - # sequencer http endpoint - SEQUENCER_CLIENT_HTTP: https://bobabase.boba.network - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${L2GETH_HTTP_PORT:-8549}:8545 - - ${L2GETH_WS_PORT:-8550}:8546 diff --git a/boba_community/boba-node/docker-compose-bobabeam.yml b/boba_community/boba-node/docker-compose-bobabeam.yml deleted file mode 100644 index b3c253c5ab..0000000000 --- a/boba_community/boba-node/docker-compose-bobabeam.yml +++ /dev/null @@ -1,78 +0,0 @@ - -x-l1_rpc_dtl: &l1_rpc_dtl - DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: 'https://rpc.api.moonbeam.network' - -x-l1_rpc_geth: &l1_rpc_geth - ETH1_HTTP: 'https://rpc.api.moonbeam.network' - -version: "3.9" - -services: - dtl: - container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} - env_file: - - ../../ops/envs/dtl.env - environment: - << : *l1_rpc_dtl - DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: 'https://replica.bobabeam.boba.network' - DATA_TRANSPORT_LAYER__SYNC_FROM_L1: 'false' - DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' - DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 1294 - DATA_TRANSPORT_LAYER__ETH1_CTC_DEPLOYMENT_HEIGHT: 1687903 - DATA_TRANSPORT_LAYER__POLLING_INTERVAL: 10000 - DATA_TRANSPORT_LAYER__ADDRESS_MANAGER: '0x564c10A60af35a07f0EA8Be3106a4D81014b21a0' - DATA_TRANSPORT_LAYER__BSS_HARDFORK_1_INDEX: 0 - DATA_TRANSPORT_LAYER__TURING_V0_HEIGHT: 0 - DATA_TRANSPORT_LAYER__TURING_V1_HEIGHT: 0 - volumes: - - ./state-dumps/bobabeam:/opt/optimism/packages/data-transport-layer/state-dumps/ - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${DTL_PORT:-7878}:7878 - - ${REGISTRY_PORT:-8080}:8081 - - replica: - container_name: replica - depends_on: - - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} - deploy: - replicas: 1 - entrypoint: sh ./geth.sh - env_file: - - ../../ops/envs/geth.env - #volumes: - # - ./:/root/.ethereum/ - environment: - << : *l1_rpc_geth - ROLLUP_TIMESTAMP_REFRESH: 5s - ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json - ROLLUP_CLIENT_HTTP: http://dtl:7878 - ROLLUP_BACKEND: 'l2' - ROLLUP_VERIFIER_ENABLE: 'true' - RETRIES: 60 - # no need to keep this secret, only used internally to sign blocks - BLOCK_SIGNER_KEY: "6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27" - BLOCK_SIGNER_ADDRESS: "0x00000398232E2064F896018496b4b44b3D62751F" - ROLLUP_POLL_INTERVAL_FLAG: "10s" - ROLLUP_ENFORCE_FEES: 'true' - # turing - TURING_CREDIT_ADDRESS: "0x4200000000000000000000000000000000000020" - # fee token - L2_BOBA_TOKEN_ADDRESS: "0x4200000000000000000000000000000000000023" - BOBA_GAS_PRICE_ORACLE_ADDRESS: "0x4200000000000000000000000000000000000024" - # sequencer http endpoint - SEQUENCER_CLIENT_HTTP: https://bobabeam.boba.network - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${L2GETH_HTTP_PORT:-8549}:8545 - - ${L2GETH_WS_PORT:-8550}:8546 diff --git a/boba_community/boba-node/docker-compose-bobabnb-testnet.yml b/boba_community/boba-node/docker-compose-bobabnb-testnet.yml index dacb503de4..2b27c9bbcc 100644 --- a/boba_community/boba-node/docker-compose-bobabnb-testnet.yml +++ b/boba_community/boba-node/docker-compose-bobabnb-testnet.yml @@ -10,12 +10,12 @@ version: "3.9" services: dtl: container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} + image: bobanetwork/data-transport-layer:${RELEASE_VERSION} env_file: - ../../ops/envs/dtl.env environment: << : *l1_rpc_dtl - DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: 'https://replica.testnet.bnb.boba.network/' + DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: 'https://testnet.bnb.boba.network' DATA_TRANSPORT_LAYER__SYNC_FROM_L1: 'false' DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 9728 @@ -27,7 +27,7 @@ services: DATA_TRANSPORT_LAYER__TURING_V1_HEIGHT: 0 volumes: - - ./state-dumps/bobabnb:/opt/optimism/packages/data-transport-layer/state-dumps/ + - ./state-dumps/bobabnbtestnet:/opt/optimism/packages/data-transport-layer/state-dumps/ logging: driver: "json-file" options: @@ -41,7 +41,7 @@ services: container_name: replica depends_on: - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} + image: bobanetwork/l2geth:${RELEASE_VERSION} deploy: replicas: 1 entrypoint: sh ./geth.sh diff --git a/boba_community/boba-node/docker-compose-bobabnb.yml b/boba_community/boba-node/docker-compose-bobabnb.yml index 261eebe9bf..c04c13c177 100644 --- a/boba_community/boba-node/docker-compose-bobabnb.yml +++ b/boba_community/boba-node/docker-compose-bobabnb.yml @@ -10,7 +10,7 @@ version: "3.9" services: dtl: container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} + image: bobanetwork/data-transport-layer:${RELEASE_VERSION} env_file: - ../../ops/envs/dtl.env environment: @@ -41,7 +41,7 @@ services: container_name: replica depends_on: - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} + image: bobanetwork/l2geth:${RELEASE_VERSION} deploy: replicas: 1 entrypoint: sh ./geth.sh diff --git a/boba_community/boba-node/docker-compose-bobafuji.yml b/boba_community/boba-node/docker-compose-bobafuji.yml index 32e89c003d..02ca5a5c98 100644 --- a/boba_community/boba-node/docker-compose-bobafuji.yml +++ b/boba_community/boba-node/docker-compose-bobafuji.yml @@ -10,7 +10,7 @@ version: "3.9" services: dtl: container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} + image: bobanetwork/data-transport-layer:${RELEASE_VERSION} env_file: - ../../ops/envs/dtl.env environment: @@ -40,7 +40,7 @@ services: container_name: replica depends_on: - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} + image: bobanetwork/l2geth:${RELEASE_VERSION} deploy: replicas: 1 entrypoint: sh ./geth.sh diff --git a/boba_community/boba-node/docker-compose-bobaopera-testnet.yml b/boba_community/boba-node/docker-compose-bobaopera-testnet.yml deleted file mode 100644 index 7e90adda0a..0000000000 --- a/boba_community/boba-node/docker-compose-bobaopera-testnet.yml +++ /dev/null @@ -1,78 +0,0 @@ - -x-l1_rpc_dtl: &l1_rpc_dtl - DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: 'https://rpc.testnet.fantom.network' - -x-l1_rpc_geth: &l1_rpc_geth - ETH1_HTTP: 'https://rpc.testnet.fantom.network' - -version: "3.9" - -services: - dtl: - container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} - env_file: - - ../../ops/envs/dtl.env - environment: - << : *l1_rpc_dtl - DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: 'https://replica.testnet.bobaopera.boba.network' - DATA_TRANSPORT_LAYER__SYNC_FROM_L1: 'false' - DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' - DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 4051 - DATA_TRANSPORT_LAYER__ETH1_CTC_DEPLOYMENT_HEIGHT: 9371668 - DATA_TRANSPORT_LAYER__POLLING_INTERVAL: 10000 - DATA_TRANSPORT_LAYER__ADDRESS_MANAGER: '0x12ad9f501149D3FDd703cC10c567F416B7F0af8b' - DATA_TRANSPORT_LAYER__BSS_HARDFORK_1_INDEX: 0 - DATA_TRANSPORT_LAYER__TURING_V0_HEIGHT: 0 - DATA_TRANSPORT_LAYER__TURING_V1_HEIGHT: 0 - volumes: - - ./state-dumps/bobaopera-testnet:/opt/optimism/packages/data-transport-layer/state-dumps/ - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${DTL_PORT:-7878}:7878 - - ${REGISTRY_PORT:-8080}:8081 - - replica: - container_name: replica - depends_on: - - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} - deploy: - replicas: 1 - entrypoint: sh ./geth.sh - env_file: - - ../../ops/envs/geth.env - #volumes: - # - ./:/root/.ethereum/ - environment: - << : *l1_rpc_geth - ROLLUP_TIMESTAMP_REFRESH: 5s - ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json - ROLLUP_CLIENT_HTTP: http://dtl:7878 - ROLLUP_BACKEND: 'l2' - ROLLUP_VERIFIER_ENABLE: 'true' - RETRIES: 60 - # no need to keep this secret, only used internally to sign blocks - BLOCK_SIGNER_KEY: "6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27" - BLOCK_SIGNER_ADDRESS: "0x00000398232E2064F896018496b4b44b3D62751F" - ROLLUP_POLL_INTERVAL_FLAG: "10s" - ROLLUP_ENFORCE_FEES: 'true' - # turing - TURING_CREDIT_ADDRESS: "0x4200000000000000000000000000000000000020" - # fee token - L2_BOBA_TOKEN_ADDRESS: "0x4200000000000000000000000000000000000023" - BOBA_GAS_PRICE_ORACLE_ADDRESS: "0x4200000000000000000000000000000000000024" - # sequencer http endpoint - SEQUENCER_CLIENT_HTTP: https://testnet.bobaopera.boba.network - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${L2GETH_HTTP_PORT:-8549}:8545 - - ${L2GETH_WS_PORT:-8550}:8546 diff --git a/boba_community/boba-node/docker-compose-bobaopera.yml b/boba_community/boba-node/docker-compose-bobaopera.yml deleted file mode 100644 index 8c514d092b..0000000000 --- a/boba_community/boba-node/docker-compose-bobaopera.yml +++ /dev/null @@ -1,78 +0,0 @@ - -x-l1_rpc_dtl: &l1_rpc_dtl - DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: 'https://rpc.fantom.network' - -x-l1_rpc_geth: &l1_rpc_geth - ETH1_HTTP: 'https://rpc.fantom.network' - -version: "3.9" - -services: - dtl: - container_name: dtl - image: bobanetwork/data-transport-layer:alt-l1-${RELEASE_VERSION} - env_file: - - ../../ops/envs/dtl.env - environment: - << : *l1_rpc_dtl - DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: 'https://replica.bobaopera.boba.network' - DATA_TRANSPORT_LAYER__SYNC_FROM_L1: 'false' - DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' - DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 301 - DATA_TRANSPORT_LAYER__ETH1_CTC_DEPLOYMENT_HEIGHT: 47969961 - DATA_TRANSPORT_LAYER__POLLING_INTERVAL: 10000 - DATA_TRANSPORT_LAYER__ADDRESS_MANAGER: '0x4e7325bcf09e091Bb8119258B885D4ef687B7386' - DATA_TRANSPORT_LAYER__BSS_HARDFORK_1_INDEX: 0 - DATA_TRANSPORT_LAYER__TURING_V0_HEIGHT: 0 - DATA_TRANSPORT_LAYER__TURING_V1_HEIGHT: 0 - volumes: - - ./state-dumps/bobaopera:/opt/optimism/packages/data-transport-layer/state-dumps/ - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${DTL_PORT:-7878}:7878 - - ${REGISTRY_PORT:-8080}:8081 - - replica: - container_name: replica - depends_on: - - dtl - image: bobanetwork/l2geth:alt-l1-${RELEASE_VERSION} - deploy: - replicas: 1 - entrypoint: sh ./geth.sh - env_file: - - ../../ops/envs/geth.env - #volumes: - # - ./:/root/.ethereum/ - environment: - << : *l1_rpc_geth - ROLLUP_TIMESTAMP_REFRESH: 5s - ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json - ROLLUP_CLIENT_HTTP: http://dtl:7878 - ROLLUP_BACKEND: 'l2' - ROLLUP_VERIFIER_ENABLE: 'true' - RETRIES: 60 - # no need to keep this secret, only used internally to sign blocks - BLOCK_SIGNER_KEY: "6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27" - BLOCK_SIGNER_ADDRESS: "0x00000398232E2064F896018496b4b44b3D62751F" - ROLLUP_POLL_INTERVAL_FLAG: "10s" - ROLLUP_ENFORCE_FEES: 'true' - # turing - TURING_CREDIT_ADDRESS: "0x4200000000000000000000000000000000000020" - # fee token - L2_BOBA_TOKEN_ADDRESS: "0x4200000000000000000000000000000000000023" - BOBA_GAS_PRICE_ORACLE_ADDRESS: "0x4200000000000000000000000000000000000024" - # sequencer http endpoint - SEQUENCER_CLIENT_HTTP: https://bobaopera.boba.network - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "10m" - ports: - - ${L2GETH_HTTP_PORT:-8549}:8545 - - ${L2GETH_WS_PORT:-8550}:8546 diff --git a/boba_community/boba-node/state-dumps/bobabnbtestnet/boba-addr.json b/boba_community/boba-node/state-dumps/bobabnbtestnet/boba-addr.json index 31be8db5f4..b87ea1a34b 100644 --- a/boba_community/boba-node/state-dumps/bobabnbtestnet/boba-addr.json +++ b/boba_community/boba-node/state-dumps/bobabnbtestnet/boba-addr.json @@ -28,7 +28,7 @@ "Proxy__L1NFTBridge": "0x4c3f621d01c22658F711c70a12662ECDfCA5916A", "Proxy__L2NFTBridge": "0x6fA80303E479Ea2d705F4f241Ef162aA2F793e71", "L1MultiMessageRelayerFast": "0x0F01394F5fc19bA1B9F669bA79b76c9EaAe37987", - "DiscretionaryExitFee": "0x587fA2e1d797Ff79Bf86a24E156A559b6551b2B3", + "DiscretionaryExitFee": "0x455Fe7b363dcf0Ca00228157068131DfBaff125c", "FeedRegistry": "0xBf0939120b4F5E3196b9E12cAC291e03dD058e9a", "BOBAUSD_Aggregator": "0xeb92a5d7d92F5Af18DAdf6c6D7f02be55F3ff355", "BobaBillingContract": "0x72a3d638C4d022abED8A941aE856da28dB2faB7f", @@ -44,6 +44,8 @@ "L2ERC1155Bridge": "0x06de75EF5d9ea3B3D0A3E48F5D093b1A22331709", "Proxy__L1ERC1155Bridge": "0x1dF39152AC0e81aB100341cACC4dE4c372A550cb", "Proxy__L2ERC1155Bridge": "0x1dF39152AC0e81aB100341cACC4dE4c372A550cb", - "Teleportation": "0x14cD766f245e804A0D7CFC6FC85796491d5B709E", - "Proxy__Teleportation": "0xd68809330075C792C171C450B983F4D18128e9BF" + "Proxy__L1Teleportation": "0x7f6a32bCaA70c65E08F2f221737612F6fC18347A", + "Proxy__L2Teleportation": "0xf4d179d3a083Fa3Eede935FaF4C679D32d514186", + "L1Teleportation": "0xD151c8F0dc69618e6180a2dC74B05cCE3E08e0aC", + "L2Teleportation": "0x46FA6144C61d2bb9aCDc3Ca90C8673dd9B6caEB2" } diff --git a/boba_community/boba-node/state-dumps/goerli/boba-addr.json b/boba_community/boba-node/state-dumps/goerli/boba-addr.json index 6a23311dad..796dc691e8 100644 --- a/boba_community/boba-node/state-dumps/goerli/boba-addr.json +++ b/boba_community/boba-node/state-dumps/goerli/boba-addr.json @@ -37,7 +37,7 @@ "Proxy__L1NFTBridge": "0xa2232D3c81EFd46815c1adf48Ed86C5C377cb6e2", "Proxy__L2NFTBridge": "0xF84979ADeb8D2Dd25f54cF8cBbB05C08eC188e11", "L1MultiMessageRelayerFast": "0xf3b489cCC93A9B74F17113E323E4Db2b1FdE2Cb8", - "DiscretionaryExitFee": "0x999933FF5284038197602a80173F4f4ECb634866", + "DiscretionaryExitFee": "0xF39fC83ccd7D01c3F276Ab35d1F80bdB34F40c89", "BobaFixedSavings": "0x6105B7cF3b227e78b8792EfcE9ac75bC1b72D2cE", "Proxy__BobaFixedSavings": "0xDBD71249Fe60c9f9bF581b3594734E295EAfA9b2", "FeedRegistry": "0xE84AAb853C4FBaafd3eD795F67494d4Da1539492", @@ -53,8 +53,10 @@ "L1ERC1155Bridge": "0x95C41a85d3aA7dB78D80d288f05Cd49D12c549DD", "Proxy__L2ERC1155Bridge": "0x1dF39152AC0e81aB100341cACC4dE4c372A550cb", "L2ERC1155Bridge": "0xB8870075005C26FBf01246f89816d1190702BC18", - "Proxy__Teleportation": "0xd68809330075C792C171C450B983F4D18128e9BF", - "Teleportation": "0x3505A8759D0210Fb32C2C21b7898772a349aD84B", + "Proxy__L1Teleportation": "0x84b22166366a6f7E0cD0c3ce9998f2913Bf17A13", + "Proxy__L2Teleportation": "0xB43EE846Aa266228FeABaD1191D6cB2eD9808894", + "L1Teleportation": "0xB93d9748808A5cC7dC6b61b31F15b87F50BfcAd0", + "L2Teleportation": "0x95ec63aE2573bD5e70C223E075D9483573968699", "BobaMonsters": "0x240D31b369B4F5494fF6F04237B3E93bE52fAcb8", "Timelock": "0x66C893019bC366eB497f49c8Df79e63AF73124eA", "GovernorBravoDelegate": "0x22FDcc02fBBF24d829F7A0A69329d8d27477b0Df", diff --git a/integration-tests/README.md b/integration-tests/README.md index 8f9e5198be..192e9f51ec 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -48,6 +48,7 @@ export PRIVATE_KEY='0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4 export PRIVATE_KEY_2='0xc526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa' export PRIVATE_KEY_3='0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61' export BOBALINK_PRIVATE_KEY='0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e' +export TELEPORTATION_POSTGRES_DB_HOST=localhost cd integration-tests npx hardhat test --network boba --no-compile --config ./hardhat.config.ts test/eth-l2/boba_aa_fee_boba.spec ``` diff --git a/integration-tests/test/alt-l2/teleportation.spec.ts b/integration-tests/test/alt-l2/teleportation.spec.ts index 001b4d1b0e..a2c4125887 100644 --- a/integration-tests/test/alt-l2/teleportation.spec.ts +++ b/integration-tests/test/alt-l2/teleportation.spec.ts @@ -127,8 +127,8 @@ describe('teleportation', () => { teleportationAddress: Teleportation.address, height: 0, supportedAssets: { - [L2BOBA.address]: 'BOBA', - [ethers.constants.AddressZero]: 'ETH', + [L2BOBA.address?.toLowerCase()]: 'BOBA', + [ethers.constants.AddressZero?.toLowerCase()]: 'ETH', }, }, // bnb will be added in routing tests to have cleaner before hooks @@ -649,8 +649,8 @@ describe('teleportation', () => { teleportationAddress: TeleportationBNB.address, height: 0, supportedAssets: { - [L2BobaOnBobaBnb.address]: 'BOBA', - [ethers.constants.AddressZero]: 'BNB', // simulate BNB for native to token teleport + [L2BobaOnBobaBnb.address?.toLowerCase()]: 'BOBA', + [ethers.constants.AddressZero?.toLowerCase()]: 'BNB', // simulate BNB for native to token teleport }, }, ] @@ -664,9 +664,9 @@ describe('teleportation', () => { teleportationAddress: Teleportation.address, height: 0, supportedAssets: { - [L2BOBA.address]: 'BOBA', - [ethers.constants.AddressZero]: 'ETH', - [L2BNBOnBobaEth.address]: 'BNB', + [L2BOBA.address?.toLowerCase()]: 'BOBA', + [ethers.constants.AddressZero?.toLowerCase()]: 'ETH', + [L2BNBOnBobaEth.address?.toLowerCase()]: 'BNB', }, }, ] @@ -714,8 +714,8 @@ describe('teleportation', () => { token, sourceChainId ) - expect(receivingChainTokenAddr).to.be.eq( - L2BOBA.address, + expect(receivingChainTokenAddr.toLowerCase()).to.be.eq( + L2BOBA.address.toLowerCase(), 'BOBA token address on BNB not correctly routed' ) @@ -794,8 +794,8 @@ describe('teleportation', () => { token, sourceChainId ) - expect(receivingChainTokenAddr).to.be.eq( - L2BNBOnBobaEth.address, + expect(receivingChainTokenAddr.toLowerCase()).to.be.eq( + L2BNBOnBobaEth.address.toLowerCase(), 'BNB token address on Boba ETH not correctly routed' ) diff --git a/integration-tests/test/eth-l2/teleportation.spec.ts b/integration-tests/test/eth-l2/teleportation.spec.ts index 001b4d1b0e..a2c4125887 100644 --- a/integration-tests/test/eth-l2/teleportation.spec.ts +++ b/integration-tests/test/eth-l2/teleportation.spec.ts @@ -127,8 +127,8 @@ describe('teleportation', () => { teleportationAddress: Teleportation.address, height: 0, supportedAssets: { - [L2BOBA.address]: 'BOBA', - [ethers.constants.AddressZero]: 'ETH', + [L2BOBA.address?.toLowerCase()]: 'BOBA', + [ethers.constants.AddressZero?.toLowerCase()]: 'ETH', }, }, // bnb will be added in routing tests to have cleaner before hooks @@ -649,8 +649,8 @@ describe('teleportation', () => { teleportationAddress: TeleportationBNB.address, height: 0, supportedAssets: { - [L2BobaOnBobaBnb.address]: 'BOBA', - [ethers.constants.AddressZero]: 'BNB', // simulate BNB for native to token teleport + [L2BobaOnBobaBnb.address?.toLowerCase()]: 'BOBA', + [ethers.constants.AddressZero?.toLowerCase()]: 'BNB', // simulate BNB for native to token teleport }, }, ] @@ -664,9 +664,9 @@ describe('teleportation', () => { teleportationAddress: Teleportation.address, height: 0, supportedAssets: { - [L2BOBA.address]: 'BOBA', - [ethers.constants.AddressZero]: 'ETH', - [L2BNBOnBobaEth.address]: 'BNB', + [L2BOBA.address?.toLowerCase()]: 'BOBA', + [ethers.constants.AddressZero?.toLowerCase()]: 'ETH', + [L2BNBOnBobaEth.address?.toLowerCase()]: 'BNB', }, }, ] @@ -714,8 +714,8 @@ describe('teleportation', () => { token, sourceChainId ) - expect(receivingChainTokenAddr).to.be.eq( - L2BOBA.address, + expect(receivingChainTokenAddr.toLowerCase()).to.be.eq( + L2BOBA.address.toLowerCase(), 'BOBA token address on BNB not correctly routed' ) @@ -794,8 +794,8 @@ describe('teleportation', () => { token, sourceChainId ) - expect(receivingChainTokenAddr).to.be.eq( - L2BNBOnBobaEth.address, + expect(receivingChainTokenAddr.toLowerCase()).to.be.eq( + L2BNBOnBobaEth.address.toLowerCase(), 'BNB token address on Boba ETH not correctly routed' ) diff --git a/l2geth/cmd/utils/flags.go b/l2geth/cmd/utils/flags.go index ff69e019a5..26d4ceebbc 100644 --- a/l2geth/cmd/utils/flags.go +++ b/l2geth/cmd/utils/flags.go @@ -1112,7 +1112,7 @@ func setEth1(ctx *cli.Context, cfg *rollup.Config) { // setRollup configures the rollup func setRollup(ctx *cli.Context, cfg *rollup.Config) { if ctx.GlobalIsSet(RollupEnableVerifierFlag.Name) { - cfg.IsVerifier = true + cfg.IsVerifier = ctx.GlobalBool(RollupEnableVerifierFlag.Name) } if ctx.GlobalIsSet(RollupMaxCalldataSizeFlag.Name) { cfg.MaxCallDataSize = ctx.GlobalInt(RollupMaxCalldataSizeFlag.Name) diff --git a/ops_boba/monitor/.env.sample b/ops_boba/monitor/.env.sample index cac7b28ecb..c0139304ca 100644 --- a/ops_boba/monitor/.env.sample +++ b/ops_boba/monitor/.env.sample @@ -7,7 +7,12 @@ MYSQL_DBNAME_TX=omg_tx MYSQL_DBNAME_RECEIPT=omg_receipts ADDRESS_MANAGER_ADDRESS= L1_NODE_WEB3_URL= +L2_NODE_WEB3_URL= LAYER_ZERO_ENABLE_TEST=true LAYER_ZERO_CHAIN=Testnet LAYER_ZERO_BRIDGES=EthBridgeToAvalanche,EthBridgeToFantom LAYER_ZERO_LATEST_BLOCK=1000 +PROXY__L1_LIQUIDITY_POOL_ADDRESS= +PROXY__L2_LIQUIDITY_POOL_ADDRESS= +BOBA_DEPLOYER_URL= +FILTER_ENDPOINT= diff --git a/ops_boba/monitor/services/utils/globalEnv.js b/ops_boba/monitor/services/utils/globalEnv.js index df61a8f919..ca8c632b55 100644 --- a/ops_boba/monitor/services/utils/globalEnv.js +++ b/ops_boba/monitor/services/utils/globalEnv.js @@ -70,6 +70,7 @@ const BOBASTRAW_MONITOR_INTERVAL = env.BOBASTRAW_MONITOR_INTERVAL || 10 * minute const L1_BALANCE_MONITOR_ADDRESSES = env.L1_BALANCE_MONITOR_ADDRESSES || '' const L2_BALANCE_MONITOR_ADDRESSES = env.L2_BALANCE_MONITOR_ADDRESSES || '' const BALANCE_MONITOR_INTERVAL = env.BALANCE_MONITOR_INTERVAL || 10 * minute + /* eslint-enable */ class GlobalEnv { diff --git a/packages/boba/contracts/.gitignore b/packages/boba/contracts/.gitignore index ad3e513ac4..b5a849596b 100644 --- a/packages/boba/contracts/.gitignore +++ b/packages/boba/contracts/.gitignore @@ -1 +1,2 @@ src/contract-artifacts.ts +teleportation_deploy_logs/*.txt diff --git a/packages/boba/contracts/contracts/Teleportation.sol b/packages/boba/contracts/contracts/Teleportation.sol index 6837b83a75..a374c707aa 100644 --- a/packages/boba/contracts/contracts/Teleportation.sol +++ b/packages/boba/contracts/contracts/Teleportation.sol @@ -190,14 +190,14 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { __Pausable_init_unchained(); __Multicall_init_unchained(); - emit DisburserTransferred(owner); - emit OwnershipTransferred(owner); + emit DisburserTransferred(msg.sender); + emit OwnershipTransferred(msg.sender); } /** * @dev Add support of a specific ERC20 token on this network. * - * @param _token Token address to support or ZeroAddress for native + * @param _token Token address to support or ZeroAddress for native asset. */ function addSupportedToken(address _token, uint32 _toChainId, uint256 _minDepositAmount, uint256 _maxDepositAmount, uint256 _maxTransferAmountPerDay) public onlyOwner() onlyInitialized() { require(supportedTokens[_token][_toChainId].supported == false, "Already supported"); @@ -224,11 +224,7 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { */ function removeSupportedToken(address _token, uint32 _toChainId) external onlyOwner() onlyInitialized() { require(supportedTokens[_token][_toChainId].supported == true, "Already not supported"); - delete supportedTokens[_token][_toChainId].supported; - delete supportedTokens[_token][_toChainId].minDepositAmount; - delete supportedTokens[_token][_toChainId].maxDepositAmount; - delete supportedTokens[_token][_toChainId].maxTransferAmountPerDay; - // we might want to keep transferredAmount & lastTimestamp in case it is being added (shortly) after again + delete supportedTokens[_token][_toChainId]; emit TokenSupported(_token, _toChainId, false); } @@ -239,7 +235,7 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { * minDepositAmount, the amount is greater than the current * maxDepositAmount. * - * @param _token ERC20 address of the token to deposit. + * @param _token ERC20 address of the token to deposit. Zero-Address indicates native asset. * @param _amount The amount of token or native asset to deposit (must be the same as msg.value if native asset) * @param _toChainId The destination chain ID. */ @@ -257,7 +253,7 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { // check if the total amount transferred is smaller than the maximum amount of tokens can be transferred in 24 hours // if it's out of 24 hours, reset the transferred amount to 0 and set the transferTimestampCheckPoint to the current time - if (block.timestamp < supToken.transferTimestampCheckPoint + 86400) { + if (block.timestamp < supToken.transferTimestampCheckPoint + 1 days) { supToken.transferredAmount += _amount; require(supToken.transferredAmount <= supToken.maxTransferAmountPerDay, "max amount per day exceeded"); } else { @@ -267,12 +263,12 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { } supportedTokens[_token][_toChainId] = supToken; + totalDeposits[_toChainId] += 1; if (_token != address(0)) { IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount); } - emit AssetReceived(_token, uint32(block.chainid), _toChainId, totalDeposits[_toChainId], msg.sender, _amount); - totalDeposits[_toChainId] += 1; + emit AssetReceived(_token, uint32(block.chainid), _toChainId, totalDeposits[_toChainId] - 1, msg.sender, _amount); } /** @@ -296,7 +292,7 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { require(_numDisbursements > 0, "No disbursements"); // Process disbursements. - uint remainingValue = msg.value; + uint256 remainingValue = msg.value; for (uint256 i = 0; i < _numDisbursements; i++) { uint256 _amount = _disbursements[i].amount; @@ -336,8 +332,8 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { } else { // slither-disable-next-line calls-loop,reentrancy-events IERC20(_token).safeTransfer(_addr, _amount); + emit DisbursementSuccess(_depositId, _addr, _token, _amount, _sourceChainId); } - emit DisbursementSuccess(_depositId, _addr, _token, _amount, _sourceChainId); } } @@ -369,7 +365,7 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { // slither-disable-next-line calls-loop,reentrancy-events (bool success,) = _addr.call{gas: 3000, value: _amount}(""); if (success) { - failedNativeDisbursements[_depositIds[i]].failed = false; + delete failedNativeDisbursements[_depositIds[i]]; emit DisbursementRetrySuccess(_depositIds[i], _addr, _amount, _sourceChainId); } } @@ -403,12 +399,14 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { { if (address(0) == _token) { uint256 _balance = address(this).balance; + require(_balance > 0, "Nothing to send"); (bool sent,) = owner.call{gas: 2300, value: _balance}(""); require(sent, "Failed to send Ether"); emit AssetBalanceWithdrawn(_token, owner, _balance); } else { // no supportedToken check in case of generally lost tokens uint256 _balance = IERC20(_token).balanceOf(address(this)); + require(_balance > 0, "Nothing to send"); IERC20(_token).safeTransfer(owner, _balance); emit AssetBalanceWithdrawn(_token, owner, _balance); } @@ -450,6 +448,7 @@ contract Teleportation is PausableUpgradeable, MulticallUpgradeable { * @notice Sets the minimum amount that can be deposited in a receive. * * @param _token configure for which token or ZeroAddress for native + * @param _toChainId The destination network associated with the minimum deposit amount. * @param _minDepositAmount The new minimum deposit amount. */ function setMinAmount(address _token, uint32 _toChainId, uint256 _minDepositAmount) external onlyOwner() { diff --git a/packages/boba/contracts/deploy/020-Teleportation.deploy.ts b/packages/boba/contracts/deploy/020-Teleportation.deploy.ts index 02e0ac75a3..5a1433d45f 100644 --- a/packages/boba/contracts/deploy/020-Teleportation.deploy.ts +++ b/packages/boba/contracts/deploy/020-Teleportation.deploy.ts @@ -1,5 +1,5 @@ /* Imports: External */ -import { Contract, utils } from 'ethers' +import { Contract, ethers, providers } from 'ethers' import { DeployFunction } from 'hardhat-deploy/dist/types' import { getContractFactory } from '@eth-optimism/contracts' import { @@ -8,10 +8,36 @@ import { registerBobaAddress, getBobaContractAt, } from '../src/hardhat-deploy-ethers' +import fs from 'fs' let Proxy__Teleportation: Contract let Teleportation: Contract +const file = { + log: (network: string, text: string) => { + const fileName = `./teleportation_deploy_logs/teleportation-${network}.txt` + console.log(`${network}: ${text}`) + + if (fs.existsSync(fileName)) { + fs.appendFileSync(fileName, text + '\n') + } else { + fs.writeFileSync(fileName, text + '\n') + } + }, +} + +enum ChainIds { + ETH_MAINNET = 1, + BOBA_ETH_MAINNET = 288, + BOBA_BNB_MAINNET = 56288, + BNB_MAINNET = 56, + + GOERLI_TESTNET = 5, + BOBA_GOERLI_TESTNET = 2888, + BOBA_BNB_TESTNET = 9728, + BNB_TESTNET = 97, +} + const deployFn: DeployFunction = async (hre) => { const addressManager = getContractFactory('Lib_AddressManager') .connect((hre as any).deployConfig.deployer_l1) @@ -19,58 +45,193 @@ const deployFn: DeployFunction = async (hre) => { console.log(`'Deploying Teleportation contract...`) - Teleportation = await deployBobaContract( - hre, - 'Teleportation', - [], - (hre as any).deployConfig.deployer_l2 - ) - const TeleportationDeploymentSubmission = - getDeploymentSubmission(Teleportation) - await hre.deployments.save('Teleportation', TeleportationDeploymentSubmission) - console.log(`Teleportation deployed to: ${Teleportation.address}`) - - Proxy__Teleportation = await deployBobaContract( - hre, - 'Lib_ResolvedDelegateProxy', - [Teleportation.address], - (hre as any).deployConfig.deployer_l2 - ) - const Proxy__TeleportationDeploymentSubmission = - getDeploymentSubmission(Proxy__Teleportation) - await hre.deployments.save( - 'Proxy__Teleportation', - Proxy__TeleportationDeploymentSubmission - ) - console.log( - `Proxy__Teleportation deployed to: ${Proxy__Teleportation.address}` - ) - - // Initialize the Proxy__Teleportation contract - const L2BOBA = await hre.deployments.getOrNull('TK_L2BOBA') - Proxy__Teleportation = await getBobaContractAt( - 'Teleportation', - Proxy__Teleportation.address, - (hre as any).deployConfig.deployer_l2 - ) - await Proxy__Teleportation.initialize() - await Teleportation.initialize() - console.log(`Proxy__Teleportation initialized`) - - await registerBobaAddress( - addressManager, - 'Proxy__Teleportation', - Proxy__Teleportation.address - ) - await registerBobaAddress( - addressManager, - 'Teleportation', - Teleportation.address - ) - - console.log( - `Proxy__Teleportation (${Proxy__Teleportation.address}) & Teleportation (${Teleportation.address}) registered.` - ) + const l2Provider = new providers.JsonRpcProvider(process.env.L2_NODE_WEB3_URL) + const network = await l2Provider.getNetwork() + + console.log('Network name=', network?.name) + console.log('Network chain id=', network?.chainId) + const currChainId = network.chainId as ChainIds // (await hre.getChainId()) as any as ChainIds + let fileName + + let isL2 = true; + for (const deployer of [(hre as any).deployConfig.deployer_l2, (hre as any).deployConfig.deployer_l1]) { + const redeploy = true + if (redeploy) { + Teleportation = await deployBobaContract( + hre, + 'Teleportation', + [], + deployer + ) + const TeleportationDeploymentSubmission = + getDeploymentSubmission(Teleportation) + await hre.deployments.save( + 'Teleportation', + TeleportationDeploymentSubmission + ) + console.log(`Teleportation deployed to: ${Teleportation.address}`) + + Proxy__Teleportation = await deployBobaContract( + hre, + 'Lib_ResolvedDelegateProxy', + [Teleportation.address], + deployer + ) + const Proxy__TeleportationDeploymentSubmission = + getDeploymentSubmission(Proxy__Teleportation) + await hre.deployments.save( + isL2 ? 'Proxy__L2Teleportation' : 'Proxy__L1Teleportation', + Proxy__TeleportationDeploymentSubmission + ) + fileName = `${Proxy__Teleportation.address}-${currChainId}` + file.log(fileName, `${isL2 ? 'L2' : 'L1'} Teleportation deployed to: ${Teleportation.address}`) + file.log( + fileName, + `${isL2 ? 'L2' : 'L1'} Proxy__Teleportation deployed to: ${Proxy__Teleportation.address}` + ) + } else { + Proxy__Teleportation = await getBobaContractAt( + `${isL2 ? 'L2' : 'L1'}Teleportation`, + '0x...................', // TODO: Adapt your address here + deployer + ) + } + + // change abi for proxy + Proxy__Teleportation = await getBobaContractAt( + 'Teleportation', + Proxy__Teleportation.address, + deployer + ) + + const defMinAmount = ethers.utils.parseEther('1') + const defMaxAmount = ethers.utils.parseEther('100000') + const defMaxDailyAmount = ethers.utils.parseEther('100000') + + // Initialize the Proxy__Teleportation contract + let res = await Proxy__Teleportation.initialize() + file.log(fileName, `Initialized proxy: ${await res.wait()}`) + res = await Teleportation.initialize() + file.log(fileName, `Teleportation initialized: ${await res.wait()}`) + + // TODO: Add Mainnet routes + const desiredRoutes = [ + // ETH: ETH <-> ETH BOBA + { + fromChainId: ChainIds.GOERLI_TESTNET, + toChainId: ChainIds.BOBA_GOERLI_TESTNET, + fromTokenAddr: '0x0000000000000000000000000000000000000000', // eth + }, + { + fromChainId: ChainIds.BOBA_GOERLI_TESTNET, + toChainId: ChainIds.GOERLI_TESTNET, + fromTokenAddr: '0x0000000000000000000000000000000000000000', // eth + }, + // ETH: BNB <-> BNB BOBA + { + fromChainId: ChainIds.BNB_TESTNET, + toChainId: ChainIds.BOBA_BNB_TESTNET, + fromTokenAddr: '0xd66c6B4F0be8CE5b39D52E0Fd1344c389929B378', // eth + }, + { + fromChainId: ChainIds.BOBA_BNB_TESTNET, + toChainId: ChainIds.BNB_TESTNET, + fromTokenAddr: '0xc614A66f82e71758Fa7735C91dAD1088c8362f15', // eth + }, + // BOBA: ETH <-> ETH Boba + { + fromChainId: ChainIds.GOERLI_TESTNET, + toChainId: ChainIds.BOBA_GOERLI_TESTNET, + fromTokenAddr: '0xeCCD355862591CBB4bB7E7dD55072070ee3d0fC1', // boba + }, + { + fromChainId: ChainIds.BOBA_GOERLI_TESTNET, + toChainId: ChainIds.GOERLI_TESTNET, + fromTokenAddr: '0x4200000000000000000000000000000000000023', // boba + }, + // BOBA: ETH <-> BNB + { + fromChainId: ChainIds.GOERLI_TESTNET, + toChainId: ChainIds.BNB_TESTNET, + fromTokenAddr: '0xeCCD355862591CBB4bB7E7dD55072070ee3d0fC1', // boba + }, + { + fromChainId: ChainIds.BNB_TESTNET, + toChainId: ChainIds.GOERLI_TESTNET, + fromTokenAddr: '0x875cD11fDf085e0E11B0EE6b814b6d0b38fA554C', // boba + }, + // BOBA: BNB <-> Boba BNB + { + fromChainId: ChainIds.BNB_TESTNET, + toChainId: ChainIds.BOBA_BNB_TESTNET, + fromTokenAddr: '0x875cD11fDf085e0E11B0EE6b814b6d0b38fA554C', // boba + }, + { + fromChainId: ChainIds.BOBA_BNB_TESTNET, + toChainId: ChainIds.BNB_TESTNET, + fromTokenAddr: '0x0000000000000000000000000000000000000000', // boba + }, + // BOBA: ETH BOBA <-> Boba BNB + { + fromChainId: ChainIds.BOBA_GOERLI_TESTNET, + toChainId: ChainIds.BOBA_BNB_TESTNET, + fromTokenAddr: '0x4200000000000000000000000000000000000023', // boba + }, + { + fromChainId: ChainIds.BOBA_BNB_TESTNET, + toChainId: ChainIds.BOBA_GOERLI_TESTNET, + fromTokenAddr: '0x0000000000000000000000000000000000000000', // boba + }, + // BOBA: ETH BOBA <-> BNB + { + fromChainId: ChainIds.BOBA_GOERLI_TESTNET, + toChainId: ChainIds.BNB_TESTNET, + fromTokenAddr: '0x4200000000000000000000000000000000000023', // boba + }, + { + fromChainId: ChainIds.BNB_TESTNET, + toChainId: ChainIds.BOBA_GOERLI_TESTNET, + fromTokenAddr: '0x875cD11fDf085e0E11B0EE6b814b6d0b38fA554C', // boba + }, + ] + + const addRoute = async (toChainId: ChainIds, tokenAddr: string) => { + const routeRres = await Proxy__Teleportation.addSupportedToken( + tokenAddr, + toChainId, + defMinAmount, + defMaxAmount, + defMaxDailyAmount + ) + file.log( + fileName, + `Added route for ${toChainId} chain, and token: ${tokenAddr}, receipt: ${await routeRres.wait()}` + ) + } + + for (const route of desiredRoutes) { + if (currChainId === route.fromChainId) { + await addRoute(route.toChainId, route.fromTokenAddr) + } + } + + await registerBobaAddress( + addressManager, + isL2 ? 'Proxy__L2Teleportation' : 'Proxy__L1Teleportation', + Proxy__Teleportation.address + ) + await registerBobaAddress( + addressManager, + isL2 ? 'L2Teleportation' : 'L1Teleportation', + Teleportation.address + ) + + isL2 = false; + file.log(fileName, 'Network iteration done') + } + + + file.log(fileName, 'DONE') } deployFn.tags = ['Proxy__Teleportation', 'Teleportation', 'required'] diff --git a/packages/boba/gateway/src/components/Table/TableRow.js b/packages/boba/contracts/teleportation_deploy_logs/.gitkeep similarity index 100% rename from packages/boba/gateway/src/components/Table/TableRow.js rename to packages/boba/contracts/teleportation_deploy_logs/.gitkeep diff --git a/packages/boba/contracts/test/endToEndTests/teleportation.spec.ts b/packages/boba/contracts/test/endToEndTests/teleportation.spec.ts index c3be5fe566..75609c4cbe 100644 --- a/packages/boba/contracts/test/endToEndTests/teleportation.spec.ts +++ b/packages/boba/contracts/test/endToEndTests/teleportation.spec.ts @@ -1032,7 +1032,7 @@ describe('Asset Teleportation Tests', async () => { ethers.constants.AddressZero, _minAmount, chainId4, - {value: _minAmount} + { value: _minAmount } ) const _amount = ethers.utils.parseEther('0.9') await Proxy__Teleportation.setMaxAmount( @@ -1349,14 +1349,25 @@ describe('Asset Teleportation Tests', async () => { Proxy__Teleportation.teleportAsset(L2Boba.address, _amount, chainId4) ) .to.emit(Proxy__Teleportation, 'AssetReceived') - .withArgs(L2Boba.address, chainId31337, chainId4, 4, signerAddress, _amount) + .withArgs( + L2Boba.address, + chainId31337, + chainId4, + 4, + signerAddress, + _amount + ) expect( (await Proxy__Teleportation.totalDeposits(chainId4)).toString() ).to.be.eq('5') expect( BigNumber.from( - (await Proxy__Teleportation.supportedTokens(L2Boba.address, chainId4)) - .transferredAmount + ( + await Proxy__Teleportation.supportedTokens( + L2Boba.address, + chainId4 + ) + ).transferredAmount ) .sub(prevTransferredAmount) .toString() @@ -1367,14 +1378,22 @@ describe('Asset Teleportation Tests', async () => { it('should teleport random tokens and emit event for alt l2', async () => { const prevTransferredAmount = BigNumber.from( - (await Proxy__Teleportation.supportedTokens(RandomERC20.address, chainId4)) - .transferredAmount + ( + await Proxy__Teleportation.supportedTokens( + RandomERC20.address, + chainId4 + ) + ).transferredAmount ) const _amount = ethers.utils.parseEther('100') const preBalance = await RandomERC20.balanceOf(signerAddress) await RandomERC20.approve(Proxy__Teleportation.address, _amount) await expect( - Proxy__Teleportation.teleportAsset(RandomERC20.address, _amount, chainId4) + Proxy__Teleportation.teleportAsset( + RandomERC20.address, + _amount, + chainId4 + ) ) .to.emit(Proxy__Teleportation, 'AssetReceived') .withArgs( @@ -1390,8 +1409,12 @@ describe('Asset Teleportation Tests', async () => { ).to.be.eq('6') expect( BigNumber.from( - (await Proxy__Teleportation.supportedTokens(RandomERC20.address, chainId4)) - .transferredAmount + ( + await Proxy__Teleportation.supportedTokens( + RandomERC20.address, + chainId4 + ) + ).transferredAmount ) .sub(prevTransferredAmount) .toString() @@ -1497,11 +1520,11 @@ describe('Asset Teleportation Tests', async () => { const failedDisbursement = await Proxy__Teleportation.failedNativeDisbursements(0) expect(failedDisbursement.failed).to.be.eq(false) - expect(failedDisbursement.disbursement.amount).to.be.eq(_amount) + expect(failedDisbursement.disbursement.amount).to.be.eq('0') expect(failedDisbursement.disbursement.addr).to.be.eq( - PausedReceiver.address + ethers.constants.AddressZero ) - expect(failedDisbursement.disbursement.sourceChainId).to.be.eq(4) + expect(failedDisbursement.disbursement.sourceChainId).to.be.eq(0) expect(failedDisbursement.disbursement.depositId).to.be.eq(0) expect( await ethers.provider.getBalance(Proxy__Teleportation.address) @@ -1591,28 +1614,28 @@ describe('Asset Teleportation Tests', async () => { const failedDisbursementRetried1 = await Proxy__Teleportation.failedNativeDisbursements(2) expect(failedDisbursementRetried1.failed).to.be.eq(false) - expect(failedDisbursementRetried1.disbursement.amount).to.be.eq(_amount) + expect(failedDisbursementRetried1.disbursement.amount).to.be.eq('0') expect(failedDisbursementRetried1.disbursement.addr).to.be.eq( - PausedReceiver.address + ethers.constants.AddressZero ) expect(failedDisbursementRetried1.disbursement.sourceChainId).to.be.eq( - 4 + 0 ) - expect(failedDisbursementRetried1.disbursement.depositId).to.be.eq(2) + expect(failedDisbursementRetried1.disbursement.depositId).to.be.eq(0) const failedDisbursementRetried2 = await Proxy__Teleportation.failedNativeDisbursements(3) expect(failedDisbursementRetried2.failed).to.be.eq(false) expect(failedDisbursementRetried2.disbursement.amount).to.be.eq( - ethers.utils.parseEther('1') + '0' ) expect(failedDisbursementRetried2.disbursement.addr).to.be.eq( - PausedReceiver.address + ethers.constants.AddressZero ) expect(failedDisbursementRetried2.disbursement.sourceChainId).to.be.eq( - 4 + 0 ) - expect(failedDisbursementRetried2.disbursement.depositId).to.be.eq(3) + expect(failedDisbursementRetried2.disbursement.depositId).to.be.eq(0) expect( await ethers.provider.getBalance(Proxy__Teleportation.address) ).to.be.eq(0) @@ -1663,7 +1686,9 @@ describe('Asset Teleportation Tests', async () => { it('should not transferOwnership if caller is not owner', async () => { await expect( - Proxy__Teleportation.connect(signer2).transferOwnership(signer2Address) + Proxy__Teleportation.connect(signer2).transferOwnership( + signer2Address + ) ).to.be.revertedWith('Caller is not the owner') }) @@ -1687,7 +1712,6 @@ describe('Asset Teleportation Tests', async () => { }) it('should set minimum amount', async () => { - await Proxy__Teleportation.setMinAmount( L2Boba.address, chainId4, @@ -1707,7 +1731,6 @@ describe('Asset Teleportation Tests', async () => { }) it('should set minimum amount native', async () => { - await Proxy__Teleportation.setMinAmount( ethers.constants.AddressZero, chainId4, @@ -1716,7 +1739,8 @@ describe('Asset Teleportation Tests', async () => { expect( ( await Proxy__Teleportation.supportedTokens( - ethers.constants.AddressZero, chainId4 + ethers.constants.AddressZero, + chainId4 ) ).minDepositAmount.toString() ).to.be.eq(ethers.utils.parseEther('1')) @@ -1725,17 +1749,18 @@ describe('Asset Teleportation Tests', async () => { it('should not set minimum amount if caller is not owner', async () => { await expect( Proxy__Teleportation.connect(signer2).setMinAmount( - L2Boba.address, chainId4, + L2Boba.address, + chainId4, ethers.utils.parseEther('1') ) ).to.be.revertedWith('Caller is not the owner') }) it('should not set maximum amount if smaller than min amount', async () => { - await expect( Proxy__Teleportation.setMaxAmount( - ethers.constants.AddressZero, chainId4, + ethers.constants.AddressZero, + chainId4, defaultMinDepositAmount.sub(1) ) ).to.be.revertedWith('incorrect max deposit amount') @@ -1750,7 +1775,8 @@ describe('Asset Teleportation Tests', async () => { expect( ( await Proxy__Teleportation.supportedTokens( - ethers.constants.AddressZero, chainId4 + ethers.constants.AddressZero, + chainId4 ) ).maxDepositAmount.toString() ).to.be.eq(defaultMaxDepositAmount.sub(2)) @@ -1771,7 +1797,8 @@ describe('Asset Teleportation Tests', async () => { expect( ( await Proxy__Teleportation.supportedTokens( - ethers.constants.AddressZero, chainId4 + ethers.constants.AddressZero, + chainId4 ) ).maxDepositAmount.toString() ).to.be.eq(defaultMaxDepositAmount.sub(2)) diff --git a/packages/boba/gateway/package.json b/packages/boba/gateway/package.json index d24da6ae19..26a890ff21 100644 --- a/packages/boba/gateway/package.json +++ b/packages/boba/gateway/package.json @@ -14,7 +14,7 @@ "pre-commit": "lint-staged --allow-empty", "prebuild": "./bin/release.sh", "start": "GENERATE_SOURCEMAP=false react-app-rewired start", - "test": "react-scripts test --watchAll=false", + "test": "TZ=utc react-scripts test --watchAll=false", "test:coverage": "yarn test --coverage", "test:u": "yarn test -u", "test:w": "yarn test --watchAll=true", @@ -23,6 +23,7 @@ }, "dependencies": { "@apollo/client": "^3.5.10", + "@cfx-kit/wallet-avatar": "^0.0.5", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.6.0", "@eth-optimism/contracts": "0.5.11", diff --git a/packages/boba/gateway/public/favicon.png b/packages/boba/gateway/public/favicon.png index ca39246a8bf014c80bad6ec2e6e215339c4ae138..b5cb31b577cf91069d8e5b58055a014353fca715 100644 GIT binary patch literal 653 zcmV;80&@L{P)$78(yyQ+wA;YO zb`*`RA$~+dV~u2!AA2wo&CuA60{cyhU*FRBvpnJn^okG}zxy9ou5F6D1;(8DODGbr ze7){ToR{?FjQy}snki3I-nOp=?t$emWBC3#BPF>YZltns-TCUm`x%4@h~%PjnV5-D zZ`3t1-7e80u>LnGJ-J}SJiezVQGHho6j=H+4%ysD=U~K=Eps~6=S~Uy`70E9RkDeLBpZQ{oz~+Vl z8HqDjbGS8@_c{hODMkfNw%eslXoGS!Dve z`uWMyq%F?nyzY8SZ}aM3`=18h0oQR}`PB;s*?~Im{nJY2`QpjRL3O}t!YP!?&lcMk nE~*3K4{42oS%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$swM`~TrO%3%9aS7t3FA-DSvWZysU6BP5)DY= z7y~jmRDndBhzSeLZu!H*1gysl_MgUNNAjtK4QgIfV+-*+_2Dao;Cl9~r(OB-26XXj zo&8j};DBjf`4p}p)8%-y7%)^!8=fW?hh%<@;1oW6raKVk=5Ld3*g_!bGLYtxU>v%^ z*`%fIS@f3ocl@)$@JS-QG!fAyT(ff5Cv`^5;9XiK!{S#pm8e}LNA>&HVw*=W zPn|CqaKrAN%@2<)^A9$3J7$dXBuVfwqvO-&G=4Z+W)NKF?bV7m|K3Iji0}+ViI&U@ zW=dlf4P;^#O*eZG09M$LNw=+-&}PO@o`^OkRoDD z4{VH2^={b8ARA+x(_Lmi9cjIn_25UZ|6PNXH`WFiiiFiXlG1RotBHBOnEQwik6Ec7 zFOFmAI$m*@>mGSanwWNHuC3OVGf4(=Tc>8y8bS+%8JQWZ_6PV)gRj(=ANz-Y6wk9f by&`gM`xm>yQ1ZK diff --git a/packages/boba/gateway/public/favicon.svg b/packages/boba/gateway/public/favicon.svg index 556fec408f..b09c42e80b 100644 --- a/packages/boba/gateway/public/favicon.svg +++ b/packages/boba/gateway/public/favicon.svg @@ -1,14 +1,5 @@ - - - - - - - - - - - - - + + + + diff --git a/packages/boba/gateway/public/favicon_3x.png b/packages/boba/gateway/public/favicon_3x.png deleted file mode 100644 index ca39246a8bf014c80bad6ec2e6e215339c4ae138..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5954 zcmZ`+by!sE_TF^YQCg4`0T~!lU}z+yrSnjO3^BxvbfXed(j_G#NF&|dLwA>iw8$VO zKRoB$bMEgx_wMJ}-}mmd-gm|R)*pL^X{sxd5YiC>06?OwB>(Johy1$nac@_#t65h7 zAcn)__w@69AUDL=!Zq=cGIbiM9RiwP*X>^~biLpAvirJrlm z3DlhdS?7V=Z#Qy`fQ>Ms++z!wi1Gp$@tAf1@Io4Esx@UGPT8QmTnp%5xjy`M@SyUw zD@wWTbol&+OUx%Q0uSJ4TqACd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w*=W zPn|CqaKrAN%@2<)^A9$3J7$dXBuVfwqvO-&G=4Z+W)NKF?bV7m|K3Iji0}+ViI&U@ zW=dlf4P;^#O*eZG09M$LNw=+-&}PO@o`^OkRoDD z4{VH2^={b8ARA+x(_Lmi9cjIn_25UZ|6PNXH`WFiiiFiXlG1RotBHBOnEQwik6Ec7 zFOFmAI$m*@>mGSanwWNHuC3OVGf4(=Tc>8y8bS+%8JQWZ_6PV)gRj(=ANz-Y6wk9f by&`gM`xm>yQ1ZK diff --git a/packages/boba/gateway/public/favison_2x.png b/packages/boba/gateway/public/favison_2x.png deleted file mode 100644 index ca39246a8bf014c80bad6ec2e6e215339c4ae138..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5954 zcmZ`+by!sE_TF^YQCg4`0T~!lU}z+yrSnjO3^BxvbfXed(j_G#NF&|dLwA>iw8$VO zKRoB$bMEgx_wMJ}-}mmd-gm|R)*pL^X{sxd5YiC>06?OwB>(Johy1$nac@_#t65h7 zAcn)__w@69AUDL=!Zq=cGIbiM9RiwP*X>^~biLpAvirJrlm z3DlhdS?7V=Z#Qy`fQ>Ms++z!wi1Gp$@tAf1@Io4Esx@UGPT8QmTnp%5xjy`M@SyUw zD@wWTbol&+OUx%Q0uSJ4TqACdNWwcN0FGWj!YTnEN7hO7gLFSNvd0GvT`ObJZno0JF=0g;!Q!w)y0GK`VKnW`-G0X%KWWr?7%y;f8wUUidl)zNC?S2 zooqpf*;}ci)&2A42z~av34+!$|5T#%A~(X zP!8_QUR&6Hm>|ijeYZc5=70+MDL)_%zZ|3U4R%Egb^_`F%&)PZ+9;C~`dR1V#AGMn z_gAGM-_qFH>M1aea}1yB{RnEMyXw=i9v1%+<~=Q2GstE2j;is?X3Oe0OIh}(-dD?Kr{I6~sj`CJx*T1keA9N zaemU@8bM=rN1EaX77IoUNih*!GG%~l{tbVwuGu^3%~pri*6@2rch?}~1g@)2=dE1F zF*Vjl*mm+aM?>S-&(|5sn$hB5S{9 z61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^=c}yqcbZlKZ6i(M z*{GloV^2m8R@)7geYZ^O-E_xNcZ z9gV^gE{1p9D7nded3|{Bv^=H-$zaKQ4X)) zqhsk(Gj0RlYY=N`?(qxO{=83V!a|rdpNKEJa7OGHb!BjjLVSauGbdjkND&5i1WBU~ zqki)~(!8S?{f%UVPTSJj;FNS{UYx#Wp0QW=6rdHxSrMDzm3pz=P@3LYXXLK)#*-HI zwB4*TUu!u@AuG$e!#nX~Kf~{r%q%pD);J0Y3-u+g=bW2v>@V!wzkRKl%~Q~!bK(05 zCKbXKki!}cY%eE$8E3IY@v;(5RdgU(i*E8GEM2}S%na!fsZ$^gajBN;K5Vl|TgJzF zwT}0`LuN5Ap&`gi4$Il%Y0#qIPnTL-TU!FWhYHle`jLQw<4p00zL=@FN)WkrRrOh! z+Hi5D2VF(J*~!RP(M{t3-66u$swM`~TrO%3%9aS7t3FA-DSvWZysU6BP5)DY= z7y~jmRDndBhzSeLZu!H*1gysl_MgUNNAjtK4QgIfV+-*+_2Dao;Cl9~r(OB-26XXj zo&8j};DBjf`4p}p)8%-y7%)^!8=fW?hh%<@;1oW6raKVk=5Ld3*g_!bGLYtxU>v%^ z*`%fIS@f3ocl@)$@JS-QG!fAyT(ff5Cv`^5;9XiK!{S#pm8e}LNA>&HVw*=W zPn|CqaKrAN%@2<)^A9$3J7$dXBuVfwqvO-&G=4Z+W)NKF?bV7m|K3Iji0}+ViI&U@ zW=dlf4P;^#O*eZG09M$LNw=+-&}PO@o`^OkRoDD z4{VH2^={b8ARA+x(_Lmi9cjIn_25UZ|6PNXH`WFiiiFiXlG1RotBHBOnEQwik6Ec7 zFOFmAI$m*@>mGSanwWNHuC3OVGf4(=Tc>8y8bS+%8JQWZ_6PV)gRj(=ANz-Y6wk9f by&`gM`xm>yQ1ZK diff --git a/packages/boba/gateway/public/index.html b/packages/boba/gateway/public/index.html index 3845d601dd..0ca40b69aa 100644 --- a/packages/boba/gateway/public/index.html +++ b/packages/boba/gateway/public/index.html @@ -17,7 +17,6 @@ Boba Gateway - diff --git a/packages/boba/gateway/src/actions/bridgeAction.js b/packages/boba/gateway/src/actions/bridgeAction.js index c2a0b58bb9..a440b67531 100644 --- a/packages/boba/gateway/src/actions/bridgeAction.js +++ b/packages/boba/gateway/src/actions/bridgeAction.js @@ -93,6 +93,11 @@ export function resetBridgeAmount() { } } +export function setTeleportationOfAssetSupported(payload) { + return function (dispatch) { + return dispatch({ type: 'BRIDGE/TELEPORTER/TOKEN_SUPPORTED', payload}) + } +} export function setFetchDepositTxBlock(payload) { store.dispatch({ type: 'BRIDGE/DEPOSIT_TX/BLOCK', payload}) diff --git a/packages/boba/gateway/src/actions/networkAction.js b/packages/boba/gateway/src/actions/networkAction.js index 955c9a9e8d..d6d577bdaa 100644 --- a/packages/boba/gateway/src/actions/networkAction.js +++ b/packages/boba/gateway/src/actions/networkAction.js @@ -15,7 +15,7 @@ limitations under the License. */ import gasService from 'services/gas.service' import networkService from 'services/networkService' -import transctionService from 'services/transaction.service' +import transactionService from 'services/transaction.service' import { createAction } from './createAction' export function fetchBalances() { @@ -32,19 +32,19 @@ export function addTokenList() { export function fetchTransactions() { return createAction('TRANSACTION/GETALL', () => - transctionService.getTransactions() + transactionService.getTransactions() ) } export function fetchSevens() { return createAction('SEVENS/GETALL', () => - transctionService.getSevens() + transactionService.getSevens() ) } export function fetchFastExits() { return createAction('FASTEXITS/GETALL', () => - transctionService.getFastExits() + transactionService.getFastExits() ) } @@ -61,6 +61,18 @@ export function depositL1LP(currency, value, decimals) { ) } +export function isTeleportationOfAssetSupported(layer, asset, destChainId) { + return createAction('DEPOSIT/TELEPORTATION/TOKEN_SUPPORTED', () => + networkService.isTeleportationOfAssetSupported(layer, asset, destChainId) + ) +} + +export function depositWithTeleporter(layer, currency, value, destChainId) { + return createAction('DEPOSIT/CREATE', () => + networkService.depositWithTeleporter(layer, currency, value, destChainId) + ) +} + export function depositL1LPBatch(payload) { return createAction('DEPOSIT/CREATE', () => networkService.depositL1LPBatch(payload) diff --git a/packages/boba/gateway/src/actions/nftAction.js b/packages/boba/gateway/src/actions/nftAction.js deleted file mode 100644 index d412e3feeb..0000000000 --- a/packages/boba/gateway/src/actions/nftAction.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2021-present Boba Network. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. */ - -import { createAction } from './createAction' -import networkService from 'services/networkService' - -import store from 'store' - -export function getNFTs () { - const state = store.getState() - return state.nft.list -} - -export async function addNFT ( NFT ) { - - const info = { - UUID: NFT.UUID, - address: NFT.address, - name: NFT.name, - tokenID: NFT.tokenID, - symbol: NFT.symbol, - url: NFT.url, - meta: NFT.meta, - account: NFT.account, - network: NFT.network, - layer: NFT.layer - } - - store.dispatch({ - type: 'NFT/ADD/SUCCESS', - payload: info - }) - - return info - -} - -export async function addMonster ( monster ) { - store.dispatch({ - type: 'MONSTER/INFO/SUCCESS', - payload: monster - }) -} - -export function getMonsterInfo() { - return createAction('MONSTER/NUMBER', () => - networkService.checkMonster() - ) -} - -export function removeNFT( UUID ) { - return createAction('NFT/REMOVE', ()=>{ - return UUID - }) -} diff --git a/packages/boba/gateway/src/actions/uiAction.js b/packages/boba/gateway/src/actions/uiAction.js index a0c240a5e2..e6d92653ad 100644 --- a/packages/boba/gateway/src/actions/uiAction.js +++ b/packages/boba/gateway/src/actions/uiAction.js @@ -19,9 +19,9 @@ export function setTheme (theme) { } } -export function openModal (modal, token, fast, tokenIndex, lock, proposalId, selectionLayer) { +export function openModal (modal, token, fast, tokenIndex, lock, proposalId, selectionLayer, destNetworkSelection) { return function (dispatch) { - return dispatch({ type: 'UI/MODAL/OPEN', payload: modal, token, fast, tokenIndex, lock, proposalId, selectionLayer }); + return dispatch({ type: 'UI/MODAL/OPEN', payload: modal, token, fast, tokenIndex, lock, proposalId, selectionLayer, destNetworkSelection }); } } diff --git a/packages/boba/gateway/src/assets/images/icons/actions.svg b/packages/boba/gateway/src/assets/images/icons/actions.svg index a3e8201efa..9e5446be31 100644 --- a/packages/boba/gateway/src/assets/images/icons/actions.svg +++ b/packages/boba/gateway/src/assets/images/icons/actions.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/packages/boba/gateway/src/assets/images/icons/arrowright.svg b/packages/boba/gateway/src/assets/images/icons/arrowright.svg index 0187259f81..6038f03c93 100644 --- a/packages/boba/gateway/src/assets/images/icons/arrowright.svg +++ b/packages/boba/gateway/src/assets/images/icons/arrowright.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/packages/boba/gateway/src/assets/images/icons/no-data.svg b/packages/boba/gateway/src/assets/images/icons/no-data.svg index 1bd23ecb47..86dc019738 100644 --- a/packages/boba/gateway/src/assets/images/icons/no-data.svg +++ b/packages/boba/gateway/src/assets/images/icons/no-data.svg @@ -1,3 +1,3 @@ - - + + diff --git a/packages/boba/gateway/src/components/PulseBadge/index.tsx b/packages/boba/gateway/src/components/PulseBadge/index.tsx deleted file mode 100644 index 022a113bca..0000000000 --- a/packages/boba/gateway/src/components/PulseBadge/index.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React, { ReactNode } from 'react' -import styled from 'styled-components' - -type VariantType = 'info' | 'success' | 'danger' | 'warning' - -const Badge = styled.span<{ variant: VariantType }>(({ theme, variant }) => ({ - display: 'inline-block', - color: `${theme.colors[variant]}`, - borderRadius: '100%', - margin: '0 10px', - border: `1px solid ${theme.colors[variant]}`, -})) - -const Circle = styled.span<{ variant: VariantType }>(({ theme, variant }) => ({ - margin: 5, - display: 'block', - width: 8, - height: 8, - borderRadius: '50%', - backgroundColor: `${theme.colors[variant]}`, - boxShadow: `0 0 0 ${theme.colors[variant]}`, - animation: `pulsing 1500ms ease-in-out infinite`, - '@keyframes pulsing': { - '0%': { - boxShadow: `0 0 0 0 ${theme.colors[variant]}`, - }, - '70%': { - boxShadow: `0 0 0 4px ${theme.colors[variant]}`, - }, - '100%': { - boxShadow: `0 0 0 0 ${theme.colors[variant]}`, - }, - }, -})) - -const PulseContainer = styled.span` - display: flex; - justify-content: center; - align-items: center; -` - -interface PulseBadgeProps { - children: ReactNode - variant: VariantType -} - -export const PulseBadge: React.FC = ({ - children, - variant = 'info', -}) => { - return ( - - - - - {children} - - ) -} - -export default PulseBadge diff --git a/packages/boba/gateway/src/components/Table/TransactionTableRow.js b/packages/boba/gateway/src/components/Table/TransactionTableRow.js deleted file mode 100644 index 2dc6090a00..0000000000 --- a/packages/boba/gateway/src/components/Table/TransactionTableRow.js +++ /dev/null @@ -1,232 +0,0 @@ -import React, { useState } from 'react'; -import { - Box, Button, Collapse, - Grid, Typography -} from '@mui/material'; - -import DownIcon from 'components/icons/DownIcon'; -import L2ToL1Icon from 'components/icons/L2ToL1Icon'; -import LinkIcon from 'components/icons/LinkIcon'; -import UpIcon from 'components/icons/UpIcon'; - -import {formatDate} from 'util/dates'; -import truncate from 'truncate-middle'; - -import { - CellSubTitle, CellTitle, - StyledTableCell, - StyledTableRow -} from './table.styles'; - - -function TransactionTableRow({ chainLink, index, ...data }) { - - const [expandRow, setExpandRow] = useState(false); - - return - - - - - - L2 - L1 Exit - Fast Offramp - - - - - - - Swapped - {formatDate(data.timeStamp,'lll' )} - - - - - - - {truncate(data.hash, 8, 6, '...')} - Block {data.blockNumber} - - - - - - } - variant="outlined" - color="primary"> - Advanced Details - - - - - setExpandRow(!expandRow)} - > - - {data.l1Hash ? - !!expandRow ? - : : null - } - - - - { - data.l1Hash ? - - - - - - - - - - {truncate(data.l1Hash, 8, 6, '...')} - - - - - - - L1 Block - - - - - {data.l1BlockNumber} - - - - - - - Block Has - - - - - {data.l1BlockHash} - - - - - - - L1 From - - - - - {data.l1From} - - - - - - - L1 To - - - - - {data.l1To} - - - - - - - : null} - - -} - -export default TransactionTableRow; - - -/* -blockHash: "0xacae9c9e92199ece44055bca7340c6df267b5aaa51c0b88eaa14b163667ef24c" -blockNumber: "9128892" -chain: "L1" -confirmations: "1186" -contractAddress: "" -cumulativeGasUsed: "140780" -from: "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" -gas: "21000" -gasPrice: "5147441866" -gasUsed: "21000" -hash: "0x45bea808dac6618405d5161e7ea0d3611ac8f5ee535355059c6e46a259174276" -input: "0x" -isError: "0" -nonce: "2211" -timeStamp: "1629174050" -to: "0x52270d8234b864dcac9947f510ce9275a8a116db" -transactionIndex: "2" -txreceipt_status: "1" -typeTX: "0x52270d8234b864dcac9947f510ce9275a8a116db" - */ diff --git a/packages/boba/gateway/src/components/Table/index.js b/packages/boba/gateway/src/components/Table/index.js deleted file mode 100644 index 3324f81f0e..0000000000 --- a/packages/boba/gateway/src/components/Table/index.js +++ /dev/null @@ -1,85 +0,0 @@ -import { - Grid, - Table, - TableBody, - TableContainer, - TableHead -} from '@mui/material'; -import SortIcon from 'components/icons/SortIcon'; -import React from 'react'; -import { - StyledTableCell, - StyledTableRow -} from './table.styles'; -import TransactionTableRow from './TransactionTableRow'; - - -function StyledTable({ - tableHeadList, - isTransaction, - tableData, - chainLink, -}) { - - return ( - - - - - {tableHeadList && tableHeadList.length > 0 ? - tableHeadList.map((head) => { - return ( - - - {head.label} - {head.isSort ? : null} - - ) - }) - : null - } - - - - {tableData && tableData.length > 0 ? - tableData.map((item,index) => { - if (isTransaction) { - return - } - }) - : null} - - -
- - ) -} - -export default StyledTable; diff --git a/packages/boba/gateway/src/components/Table/table.styles.js b/packages/boba/gateway/src/components/Table/table.styles.js deleted file mode 100644 index 04d50ab470..0000000000 --- a/packages/boba/gateway/src/components/Table/table.styles.js +++ /dev/null @@ -1,74 +0,0 @@ -import styled from '@emotion/styled'; -import { TableCell, TableRow } from '@mui/material'; - -export const CellTitle = styled.div` -font-weight: normal; -font-size: 24px; -line-height: 24px; -color: ${props => props.color ? props.color : '#fff'}; -opacity: 0.9; -margin-bottom: 7px; -` -export const CellSubTitle = styled.div` -font-weight: normal; -font-size: 18px; -line-height: 112%; -color: rgba(255, 255, 255, 0.7); -opacity: 0.9; -` - -export const StyledTableRow = styled(TableRow)` - padding: 0px 30px; - &.expand{ - background: rgba(255, 255, 255, 0.03); - td:first-of-type { border-top-left-radius: 16px; } - td:last-of-type { border-top-right-radius: 16px; } - td { - box-shadow: none; - } - } - &:nth-last-of-type(2) { - td { - box-shadow: none; - } - } - &.header{ - - th { - box-shadow: none; - } - } - &.divider { - height: 0px; - td { - padding: 0px; - } - } - &.hidden { - height: 0px; - td { - padding: 0px; - } - .value { - marginLeft: 10px; - color: rgba(255, 255, 255, 0.7); - } - } - &.detail { - background: rgba(255, 255, 255, 0.03); - - td:first-of-type { border-bottom-left-radius: 16px; } - td:last-of-type { border-bottom-right-radius: 16px; } - - .value { - marginLeft: 10px; - color: rgba(255, 255, 255, 0.7); - } - } -` -export const StyledTableCell = styled(TableCell)` - border: none; - padding-top: 20px; - color: ${props => props.color ? props.color : '#fff'}; - box-shadow: 0px 1px 0px rgb(255 255 255 / 5%) -` diff --git a/packages/boba/gateway/src/components/bridge/NetworkPickerList/index.tsx b/packages/boba/gateway/src/components/bridge/NetworkPickerList/index.tsx index 2414fa1b8e..43bc5f3d57 100644 --- a/packages/boba/gateway/src/components/bridge/NetworkPickerList/index.tsx +++ b/packages/boba/gateway/src/components/bridge/NetworkPickerList/index.tsx @@ -2,6 +2,7 @@ import React, { ElementType, FC } from 'react' import { useDispatch, useSelector } from 'react-redux' import { + INetwork, L1_ICONS, L2_ICONS, NetworkList as NetworkLists, @@ -39,12 +40,13 @@ export const NetworkList: FC = ({ close = () => {} }) => { const networks = (NetworkLists as Record)[networkType] const currentLayer = selectionLayer || (layer as string).toLowerCase() - const onChainChange = (chainDetail: any) => { + const onChainChange = (chainDetail: INetwork) => { dispatch( setNetwork({ network: chainDetail.chain, name: chainDetail.name, networkIcon: chainDetail.icon, + chainIds: chainDetail.chainId, networkType, }) ) @@ -53,11 +55,12 @@ export const NetworkList: FC = ({ close = () => {} }) => { return ( - {networks.map((chainDetail: any) => { - const Icon = + {networks.map((chainDetail: INetwork) => { + const CurrentIcon = currentLayer === 'l1' ? l1Icon[chainDetail.icon] : l2Icon[chainDetail.icon] + return ( = ({ close = () => {} }) => { onClick={() => onChainChange(chainDetail)} > - + {chainDetail.name[currentLayer]} diff --git a/packages/boba/gateway/src/components/common/common.styles.js b/packages/boba/gateway/src/components/common/common.styles.js deleted file mode 100644 index 67af24a2f7..0000000000 --- a/packages/boba/gateway/src/components/common/common.styles.js +++ /dev/null @@ -1,10 +0,0 @@ -import { styled } from '@mui/material/styles'; -import { Divider } from '@mui/material'; - - -export const DividerLine = styled(Divider)(({ theme }) => ({ - background: `${theme.palette.mode === 'dark' ? 'rgba(255, 255, 255, 0.04)' : 'rgba(3, 19, 19, 0.04)'}`, - boxSizing: 'border-box', - boxShadow: `${theme.palette.mode === 'dark' ? '0px 4px 4px rgba(0, 0, 0, 0.25)' : 'none'}`, - width: '100%' -})) diff --git a/packages/boba/gateway/src/components/dao/LinearProgress/style.ts b/packages/boba/gateway/src/components/dao/LinearProgress/style.ts index 916392e541..272bf41e7f 100644 --- a/packages/boba/gateway/src/components/dao/LinearProgress/style.ts +++ b/packages/boba/gateway/src/components/dao/LinearProgress/style.ts @@ -35,8 +35,10 @@ export const Circle = styled.span` export const LabelContainer = styled.div` display: flex; + justify-content: space-between; padding: 10px 0px; gap: 0px 25px; + width: 100%; ` export const Label = styled.p` diff --git a/packages/boba/gateway/src/components/filter/styles.ts b/packages/boba/gateway/src/components/filter/styles.ts index e51774ba06..c026238e02 100644 --- a/packages/boba/gateway/src/components/filter/styles.ts +++ b/packages/boba/gateway/src/components/filter/styles.ts @@ -131,6 +131,9 @@ export const Icon = styled(Svg)` align-items: center; justify-content: center; + div { + display: flex; + } svg { max-width: 32px; min-width: 10px; diff --git a/packages/boba/gateway/src/components/global/InputMax/__snapshots__/index.test.tsx.snap b/packages/boba/gateway/src/components/global/InputMax/__snapshots__/index.test.tsx.snap index 1263d0023c..338e884adb 100644 --- a/packages/boba/gateway/src/components/global/InputMax/__snapshots__/index.test.tsx.snap +++ b/packages/boba/gateway/src/components/global/InputMax/__snapshots__/index.test.tsx.snap @@ -15,7 +15,7 @@ exports[`MaxInput Max Input Component with Initial Value 1`] = ` value="5" /> @@ -38,7 +38,7 @@ exports[`MaxInput Max Input Component without Initial Value 1`] = ` value="" /> diff --git a/packages/boba/gateway/src/components/global/InputMax/styles.ts b/packages/boba/gateway/src/components/global/InputMax/styles.ts index e9f0479f0a..dc716159ba 100644 --- a/packages/boba/gateway/src/components/global/InputMax/styles.ts +++ b/packages/boba/gateway/src/components/global/InputMax/styles.ts @@ -15,21 +15,24 @@ export const MaxButton = styled.button` padding: 4px 6px; border-radius: 6px; font-family: inherit; - - ${(props) => - props.theme.name === 'light' && - css` - background: ${props.theme.colors.gray[100]}; - border: 1px solid ${props.theme.colors.gray[600]}; - color: ${props.theme.colors.gray[600]}; - `} - ${(props) => - props.theme.name === 'dark' && - css` - background: ${props.theme.colors.gray[500]}; - border: 1px solid ${props.theme.colors.gray[300]}; - color: ${props.theme.colors.green[300]}; - `} + ${({ theme: { colors, name } }) => + name === 'light' + ? css` + color: ${colors.gray[600]}; + border: 1px solid ${colors.gray[600]}; + background: ${colors.gray[100]}; + &:hover { + background: transparent; + } + ` + : css` + color: ${colors.green[300]}; + border: 1px solid ${colors.gray[400]}; + background: transparent; + &:hover { + border: 1px solid ${colors.gray[100]}; + } + `} ` export const Input = styled.input` diff --git a/packages/boba/gateway/src/components/global/background/styles.ts b/packages/boba/gateway/src/components/global/background/styles.ts index 082955e4d4..4fe611f3bc 100644 --- a/packages/boba/gateway/src/components/global/background/styles.ts +++ b/packages/boba/gateway/src/components/global/background/styles.ts @@ -12,7 +12,7 @@ const linesColor = (theme: string) => { const gradientColor = (theme: string) => { if (theme === 'light') { - return 'radial-gradient(45% 45% at 50% 50%, rgba(174, 219, 1, 0.4) 19.79%, rgba(174, 219, 1, 0.125) 50%, rgba(174, 219, 1, 0) 70%);' + return 'radial-gradient(60% 90% at 50% 50%,rgba(174,219,1,0.1) 19.79%,rgba(174,219,1,0.125) 50%,rgba(174,219,1,0) 50%);' } else { return 'radial-gradient(55.87% 55.87% at 50.00% 50.00%, rgba(174, 219, 1, 0.24) 19.79%, rgba(174, 219, 1, 0.08) 62.50%, rgba(174, 219, 1, 0.00) 91.67%);' } @@ -57,15 +57,6 @@ export const GridFade = styled.div` `}; ` -const playAnimation = keyframes` - 0% { - transform: rotateX(45deg) translateY(-50%); - } - 100% { - transform: rotateX(45deg) translateY(0%); - } -` - export const GridLines = styled.div` width: 100%; height: 200%; @@ -79,9 +70,8 @@ export const GridLines = styled.div` ${(props) => linesColor(props.theme.name)} 1px, transparent 0 ); - background-size: 45px 30px; + background-size: 50px 50px; background-repeat: repeat; transform-origin: 100% 0 0; will-change: transform; - animation: ${playAnimation} 15s linear infinite; ` diff --git a/packages/boba/gateway/src/components/global/dropdown/index.tsx b/packages/boba/gateway/src/components/global/dropdown/index.tsx index 7400515e66..012fc60516 100644 --- a/packages/boba/gateway/src/components/global/dropdown/index.tsx +++ b/packages/boba/gateway/src/components/global/dropdown/index.tsx @@ -22,6 +22,7 @@ import { } from './styles' import { ModalTypography } from 'components/global/modalTypography' +import { Typography } from '../typography' export interface IDropdownItem { value?: string label: string | ReactNode @@ -137,7 +138,7 @@ export const Dropdown: React.FC = ({ {selectedItem.imgSrc === 'default' && } )} -
{selectedItem.label}
+ {selectedItem.label} diff --git a/packages/boba/gateway/src/components/global/dropdown/styles.ts b/packages/boba/gateway/src/components/global/dropdown/styles.ts index 561c290afd..0e746028d8 100644 --- a/packages/boba/gateway/src/components/global/dropdown/styles.ts +++ b/packages/boba/gateway/src/components/global/dropdown/styles.ts @@ -27,7 +27,7 @@ export const Header = styled.div<{ error: boolean; isOpen: boolean }>` color: inherit; border-radius: 12px; min-width: 290px; - padding: 15px; + padding: 8px 15px; transition: 0.25s all; ${(props) => props.theme.name === 'light' && @@ -143,6 +143,9 @@ export const DefaultIcon = styled.div` ` export const Icon = styled(Svg)` margin-right: 8px; + div { + display: flex; + } svg { max-width: 32px; height: auto; diff --git a/packages/boba/gateway/src/components/global/inputWithButton/styles.ts b/packages/boba/gateway/src/components/global/inputWithButton/styles.ts index 74f480b670..f834f9ef54 100644 --- a/packages/boba/gateway/src/components/global/inputWithButton/styles.ts +++ b/packages/boba/gateway/src/components/global/inputWithButton/styles.ts @@ -3,6 +3,7 @@ import { mobile } from 'themes/screens' export const InputContainer = styled.div<{ error?: boolean }>` width: 100%; + min-height: 56px; display: flex; padding: 5px 16px; justify-content: space-around; @@ -12,7 +13,6 @@ export const InputContainer = styled.div<{ error?: boolean }>` border: 1px solid ${({ theme, error }) => error ? theme.colors.red[300] : theme.colors.box.border}; - background: ${(props) => props.theme.colors.box.background}; ${mobile(css` padding: 5px; @@ -23,7 +23,8 @@ export const Input = styled.input` flex: 1; padding: 10px; cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')}; - color: ${(props) => props.theme.color}; + color: ${({ theme }) => + theme.name === 'light' ? theme.colors.gray[600] : theme.color}; font-size: 16px; font-style: normal; font-weight: 500; diff --git a/packages/boba/gateway/src/components/global/menu/index.tsx b/packages/boba/gateway/src/components/global/menu/index.tsx index 39c829a4a1..20a04da4c6 100644 --- a/packages/boba/gateway/src/components/global/menu/index.tsx +++ b/packages/boba/gateway/src/components/global/menu/index.tsx @@ -1,8 +1,9 @@ -import React, { FC, ReactNode, createElement } from 'react' import MUIMenu from '@mui/material/Menu' import MUIMenuItem from '@mui/material/MenuItem' +import React, { FC } from 'react' import { StyleMenuButton } from './styles' import { MenuProps } from './types' +import { useTheme } from 'styled-components' const Menu: FC = ({ label, name, children, options }) => { const [anchorEl, setAnchorEl] = React.useState(null) @@ -14,6 +15,8 @@ const Menu: FC = ({ label, name, children, options }) => { setAnchorEl(null) } + const theme: any = useTheme() + return ( <> diff --git a/packages/boba/gateway/src/components/global/menu/styles.ts b/packages/boba/gateway/src/components/global/menu/styles.ts index 2e552e2fc2..10640a71d7 100644 --- a/packages/boba/gateway/src/components/global/menu/styles.ts +++ b/packages/boba/gateway/src/components/global/menu/styles.ts @@ -6,17 +6,8 @@ export const StyleMenuButton = styled.div` align-items: center; padding: 8px 24px; border-radius: 33px; - gap: 10px; - ${(props) => - props.theme.name === 'light' && - css` - background: #fff; - `} - ${(props) => - props.theme.name === 'dark' && - css` - background: props.theme.colors.gray[400]; - `} - cursor: pointer; + gap: 10px; + background: ${({ theme }) => + theme.name === 'light' ? theme.colors.gray[50] : theme.colors.gray[400]}; ` diff --git a/packages/boba/gateway/src/components/global/placeholderConnect/__snapshots__/index.test.tsx.snap b/packages/boba/gateway/src/components/global/placeholderConnect/__snapshots__/index.test.tsx.snap index 4cc7c1d4ea..6eb2f64715 100644 --- a/packages/boba/gateway/src/components/global/placeholderConnect/__snapshots__/index.test.tsx.snap +++ b/packages/boba/gateway/src/components/global/placeholderConnect/__snapshots__/index.test.tsx.snap @@ -6,7 +6,9 @@ exports[`PlaceholderConnect PlaceholderConnect is loading 1`] = ` class="sc-fFGjHI eWYtNO" > loading -
+

No

@@ -35,7 +37,9 @@ exports[`PlaceholderConnect PlaceholderConnect is not loading 1`] = `
-
+

No

diff --git a/packages/boba/gateway/src/components/global/placeholderConnect/index.tsx b/packages/boba/gateway/src/components/global/placeholderConnect/index.tsx index f04372bb70..acf493ed5e 100644 --- a/packages/boba/gateway/src/components/global/placeholderConnect/index.tsx +++ b/packages/boba/gateway/src/components/global/placeholderConnect/index.tsx @@ -11,6 +11,18 @@ import { PlaceholderContainer, Label } from './styles' import placehoderIcon from 'assets/images/icons/no-data.svg' import { LAYER } from 'util/constant' import { PlaceholderConnectInterface } from './types' +import styled from 'styled-components' + +export const StyledSvg = styled(Svg)` + div { + display: flex; + } + + svg { + fill: ${({ theme }) => + theme.name === 'light' ? theme.colors.gray[600] : theme.colors.gray[100]}; + } +` export const PlaceholderConnect = ({ isLoading = false, @@ -29,7 +41,7 @@ export const PlaceholderConnect = ({ const DefaultLabel = () => { return ( <> - + ) diff --git a/packages/boba/gateway/src/components/global/placeholderConnect/styles.ts b/packages/boba/gateway/src/components/global/placeholderConnect/styles.ts index 8488f587c9..13466d9086 100644 --- a/packages/boba/gateway/src/components/global/placeholderConnect/styles.ts +++ b/packages/boba/gateway/src/components/global/placeholderConnect/styles.ts @@ -15,4 +15,6 @@ export const PlaceholderContainer = styled.div` export const Label = styled(Typography)` text-transform: capitalize; padding-bottom: 15px; + color: ${({ theme }) => + theme.name === 'light' ? theme.colors.gray[600] : theme.colors.gray[100]}; ` diff --git a/packages/boba/gateway/src/components/global/searchInput/styles.ts b/packages/boba/gateway/src/components/global/searchInput/styles.ts index fc6f5318e8..1d533cf983 100644 --- a/packages/boba/gateway/src/components/global/searchInput/styles.ts +++ b/packages/boba/gateway/src/components/global/searchInput/styles.ts @@ -66,7 +66,7 @@ export const Input = styled.input` ${(props) => props.theme.name === 'dark' && css` - color: ${props.theme.colors.gray[200]}; + color: ${props.theme.colors.gray[100]}; `} @media ${screen.mobile} { width: 120px; diff --git a/packages/boba/gateway/src/components/global/table/index.tsx b/packages/boba/gateway/src/components/global/table/index.tsx index 45b1ec5edf..e2c2346ced 100644 --- a/packages/boba/gateway/src/components/global/table/index.tsx +++ b/packages/boba/gateway/src/components/global/table/index.tsx @@ -30,7 +30,10 @@ export const TableHeader = ({ options, className }: TableHeaderType) => { {option.name} {option.tooltip && ( - + )} diff --git a/packages/boba/gateway/src/components/global/tabs/styles.ts b/packages/boba/gateway/src/components/global/tabs/styles.ts index 7e9a6a5252..410323c952 100644 --- a/packages/boba/gateway/src/components/global/tabs/styles.ts +++ b/packages/boba/gateway/src/components/global/tabs/styles.ts @@ -3,7 +3,8 @@ import styled from 'styled-components' export const TabHeader = styled.div` display: flex; justify-content: space-between; - background: ${(props) => props.theme.colors.gray[400]}; + background: ${({ theme }) => + theme.name === 'light' ? theme.colors.gray[100] : theme.colors.gray[600]}; border-radius: 8px; padding: 5px; ` diff --git a/packages/boba/gateway/src/components/global/typography/__snapshots__/index.test.tsx.snap b/packages/boba/gateway/src/components/global/typography/__snapshots__/index.test.tsx.snap index 3692bb68f3..0d42da2512 100644 --- a/packages/boba/gateway/src/components/global/typography/__snapshots__/index.test.tsx.snap +++ b/packages/boba/gateway/src/components/global/typography/__snapshots__/index.test.tsx.snap @@ -3,7 +3,7 @@ exports[`Typography should match snapshots body1 1`] = `

Text goes here

@@ -13,7 +13,7 @@ exports[`Typography should match snapshots body1 1`] = ` exports[`Typography should match snapshots body2 1`] = `

Text goes here

@@ -23,7 +23,7 @@ exports[`Typography should match snapshots body2 1`] = ` exports[`Typography should match snapshots body3 1`] = `

Text goes here

@@ -33,7 +33,7 @@ exports[`Typography should match snapshots body3 1`] = ` exports[`Typography should match snapshots h1 1`] = `

Text goes here

@@ -43,7 +43,7 @@ exports[`Typography should match snapshots h1 1`] = ` exports[`Typography should match snapshots head 1`] = `

Text goes here

@@ -53,7 +53,7 @@ exports[`Typography should match snapshots head 1`] = ` exports[`Typography should match snapshots subtitle 1`] = `

Text goes here

@@ -63,7 +63,7 @@ exports[`Typography should match snapshots subtitle 1`] = ` exports[`Typography should match snapshots title 1`] = `

Text goes here

diff --git a/packages/boba/gateway/src/components/global/typography/style.ts b/packages/boba/gateway/src/components/global/typography/style.ts index 5d5cd5b39a..47213f1bd7 100644 --- a/packages/boba/gateway/src/components/global/typography/style.ts +++ b/packages/boba/gateway/src/components/global/typography/style.ts @@ -41,7 +41,6 @@ const options: Record = { export const StyledText = styled.p<{ variant?: VariantType }>` font-style: normal; - font-weight: 500; ${({ variant }) => variant && diff --git a/packages/boba/gateway/src/components/icons/ArrowRightIcon.js b/packages/boba/gateway/src/components/icons/ArrowRightIcon.js deleted file mode 100644 index 7b1066d551..0000000000 --- a/packages/boba/gateway/src/components/icons/ArrowRightIcon.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function ArrowRightIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - ); -} - -export default ArrowRightIcon; diff --git a/packages/boba/gateway/src/components/icons/BobaIcon.js b/packages/boba/gateway/src/components/icons/BobaIcon.js deleted file mode 100644 index e5de06aa7a..0000000000 --- a/packages/boba/gateway/src/components/icons/BobaIcon.js +++ /dev/null @@ -1,49 +0,0 @@ -import * as React from "react" -import { useTheme } from '@mui/material'; - -function BobaIcon({ dark = false, selected = true }) { - - const theme = useTheme(); - - const recColor = theme.palette.mode === 'light' ? '#031313' : '#ffffff' - - if (!selected) { - return - - - - } - - if (!!dark) { - return ( - - - - - - - - - - - - ) - } - - return ( - - - - - - - - - - - - - ) -} - -export default BobaIcon diff --git a/packages/boba/gateway/src/components/icons/ClaimIcon.js b/packages/boba/gateway/src/components/icons/ClaimIcon.js deleted file mode 100644 index 57e9b5f2b9..0000000000 --- a/packages/boba/gateway/src/components/icons/ClaimIcon.js +++ /dev/null @@ -1,40 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function ClaimIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - - ); -} - -export default ClaimIcon; diff --git a/packages/boba/gateway/src/components/icons/DAOIcon.js b/packages/boba/gateway/src/components/icons/DAOIcon.js deleted file mode 100644 index 6e2272212c..0000000000 --- a/packages/boba/gateway/src/components/icons/DAOIcon.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -function DAOIcon({ color }) { - return ( - - - - - - - - - - - - - - ); -} - -export default DAOIcon \ No newline at end of file diff --git a/packages/boba/gateway/src/components/icons/DirectionIcon.js b/packages/boba/gateway/src/components/icons/DirectionIcon.js deleted file mode 100644 index 769b635063..0000000000 --- a/packages/boba/gateway/src/components/icons/DirectionIcon.js +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from 'react'; - -function DirectionIcon() { - return ( - - - - ) -} - -export default DirectionIcon; diff --git a/packages/boba/gateway/src/components/icons/Discord.js b/packages/boba/gateway/src/components/icons/Discord.js deleted file mode 100644 index 48e4089b51..0000000000 --- a/packages/boba/gateway/src/components/icons/Discord.js +++ /dev/null @@ -1,52 +0,0 @@ -import * as React from "react" - -function DiscordIcon({ color }) { - return ( - - - - - - - - - - - ) -} - -export default DiscordIcon diff --git a/packages/boba/gateway/src/components/icons/DownIcon.js b/packages/boba/gateway/src/components/icons/DownIcon.js deleted file mode 100644 index 993cbe0baf..0000000000 --- a/packages/boba/gateway/src/components/icons/DownIcon.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function DownIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - ) -} - -export default DownIcon; diff --git a/packages/boba/gateway/src/components/icons/EarnIcon.js b/packages/boba/gateway/src/components/icons/EarnIcon.js deleted file mode 100644 index eedee7258b..0000000000 --- a/packages/boba/gateway/src/components/icons/EarnIcon.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from "react" - -function EarnIcon({ color }) { - return ( - - - - ) -} - -export default EarnIcon diff --git a/packages/boba/gateway/src/components/icons/EditIcon.js b/packages/boba/gateway/src/components/icons/EditIcon.js deleted file mode 100644 index 998cc35b63..0000000000 --- a/packages/boba/gateway/src/components/icons/EditIcon.js +++ /dev/null @@ -1,29 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function EditIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - ); -} - -export default EditIcon; diff --git a/packages/boba/gateway/src/components/icons/EthereumIcon.js b/packages/boba/gateway/src/components/icons/EthereumIcon.js deleted file mode 100644 index d847d72f22..0000000000 --- a/packages/boba/gateway/src/components/icons/EthereumIcon.js +++ /dev/null @@ -1,35 +0,0 @@ -import * as React from "react" -import { useTheme } from '@mui/material' - -function EthereumIcon({ selected = true }) { - - const theme = useTheme(); - - const recColor = theme.palette.mode === 'light' ? '#031313' : '#ffffff' - - if (!selected) { - return - - - - - - - - - } - - return ( - - - - - - - - - - ) -} - -export default EthereumIcon diff --git a/packages/boba/gateway/src/components/icons/ExitIcon.js b/packages/boba/gateway/src/components/icons/ExitIcon.js deleted file mode 100644 index 352859a02d..0000000000 --- a/packages/boba/gateway/src/components/icons/ExitIcon.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function ExitIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - ); -} - -export default ExitIcon; diff --git a/packages/boba/gateway/src/components/icons/HideIcon.js b/packages/boba/gateway/src/components/icons/HideIcon.js deleted file mode 100644 index f5b84149ee..0000000000 --- a/packages/boba/gateway/src/components/icons/HideIcon.js +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function HideIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - ); -} - -export default HideIcon; diff --git a/packages/boba/gateway/src/components/icons/HistoryIcon.js b/packages/boba/gateway/src/components/icons/HistoryIcon.js deleted file mode 100644 index 9d9c8ff8d3..0000000000 --- a/packages/boba/gateway/src/components/icons/HistoryIcon.js +++ /dev/null @@ -1,53 +0,0 @@ -import * as React from "react" - -function HistoryIcon({ color }) { - - return ( - - - - - - - - ) -} - -export default HistoryIcon diff --git a/packages/boba/gateway/src/components/icons/L1Icon.js b/packages/boba/gateway/src/components/icons/L1Icon.js deleted file mode 100644 index 23fc90f136..0000000000 --- a/packages/boba/gateway/src/components/icons/L1Icon.js +++ /dev/null @@ -1,42 +0,0 @@ -import * as React from "react"; -// import { useTheme } from "@mui/material/styles"; -// TODO: Make use of color base on the provided theme. -function L1Icon() { - // const theme = useTheme(); - // const isLight = theme.palette.mode === 'light'; - // const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -} - -export default L1Icon; diff --git a/packages/boba/gateway/src/components/icons/L2Icon.js b/packages/boba/gateway/src/components/icons/L2Icon.js deleted file mode 100644 index d492dd1b61..0000000000 --- a/packages/boba/gateway/src/components/icons/L2Icon.js +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -// import { useTheme } from "@mui/material/styles"; -// TODO: Make use of color base on the provided theme. -function L1Icon() { - // const theme = useTheme(); - // const isLight = theme.palette.mode === 'light'; - // const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - - - - - - - - - - ); -} - -export default L1Icon; diff --git a/packages/boba/gateway/src/components/icons/L2ToL1Icon.js b/packages/boba/gateway/src/components/icons/L2ToL1Icon.js deleted file mode 100644 index 6a833eacb0..0000000000 --- a/packages/boba/gateway/src/components/icons/L2ToL1Icon.js +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; - -export const L2ToL1Icon = ({ color }) => { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) -} - -export default L2ToL1Icon diff --git a/packages/boba/gateway/src/components/icons/LayerIcon.js b/packages/boba/gateway/src/components/icons/LayerIcon.js deleted file mode 100644 index e5f16458dd..0000000000 --- a/packages/boba/gateway/src/components/icons/LayerIcon.js +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function LayerIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - ) -} - -export default LayerIcon; diff --git a/packages/boba/gateway/src/components/icons/LearnIcon.js b/packages/boba/gateway/src/components/icons/LearnIcon.js deleted file mode 100644 index 084cec10f5..0000000000 --- a/packages/boba/gateway/src/components/icons/LearnIcon.js +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from "react" - -function LearnIcon({ color }) { - return ( - - - - - - ) -} - -export default LearnIcon diff --git a/packages/boba/gateway/src/components/icons/LinkIcon.js b/packages/boba/gateway/src/components/icons/LinkIcon.js deleted file mode 100644 index 46bb9d5484..0000000000 --- a/packages/boba/gateway/src/components/icons/LinkIcon.js +++ /dev/null @@ -1,24 +0,0 @@ -import { useTheme } from "@mui/material"; -import * as React from "react"; - -function LinkIcon() { - - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - - return ( - - - ) -} - -export default LinkIcon; diff --git a/packages/boba/gateway/src/components/icons/LockIcon.js b/packages/boba/gateway/src/components/icons/LockIcon.js deleted file mode 100644 index c2c1903405..0000000000 --- a/packages/boba/gateway/src/components/icons/LockIcon.js +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function LockIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - ); -} - -export default LockIcon; diff --git a/packages/boba/gateway/src/components/icons/MinusIcon.js b/packages/boba/gateway/src/components/icons/MinusIcon.js deleted file mode 100644 index a628a53e87..0000000000 --- a/packages/boba/gateway/src/components/icons/MinusIcon.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function MinusIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - ); -} - -export default MinusIcon; diff --git a/packages/boba/gateway/src/components/icons/NFTIcon.js b/packages/boba/gateway/src/components/icons/NFTIcon.js deleted file mode 100644 index 6201799b4a..0000000000 --- a/packages/boba/gateway/src/components/icons/NFTIcon.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from "react"; -// import { useTheme } from "@mui/material/styles"; -// TODO: Make use of color base on the provided theme. -function NFTIcon({ color }) { - // const theme = useTheme(); - // const isLight = theme.palette.mode === 'light'; - // const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - ); -} - -export default NFTIcon; diff --git a/packages/boba/gateway/src/components/icons/NetworkIcon.js b/packages/boba/gateway/src/components/icons/NetworkIcon.js deleted file mode 100644 index 9dfa299b04..0000000000 --- a/packages/boba/gateway/src/components/icons/NetworkIcon.js +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from "react" -import { useTheme } from "@mui/material"; - -function NetworkIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = isLight ? 'black' : 'white'; - - return ( - - - - ) -} - -export default NetworkIcon; diff --git a/packages/boba/gateway/src/components/icons/NetworkSwitcherIcon.js b/packages/boba/gateway/src/components/icons/NetworkSwitcherIcon.js deleted file mode 100644 index de8cddb63a..0000000000 --- a/packages/boba/gateway/src/components/icons/NetworkSwitcherIcon.js +++ /dev/null @@ -1,52 +0,0 @@ -import * as React from "react" -import { useTheme } from "@mui/material"; - -function NetworkSwitcherIcon({ active }) { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = !active ? '#506DFA' : isLight ? 'black' : '#506DFA'; - - return ( - - - - - - - - - - - - ) -} - -export default NetworkSwitcherIcon; diff --git a/packages/boba/gateway/src/components/icons/PlusIcon.js b/packages/boba/gateway/src/components/icons/PlusIcon.js deleted file mode 100644 index 189c1c6163..0000000000 --- a/packages/boba/gateway/src/components/icons/PlusIcon.js +++ /dev/null @@ -1,23 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function PlusIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - ); -} - -export default PlusIcon; diff --git a/packages/boba/gateway/src/components/icons/PoolIcon.js b/packages/boba/gateway/src/components/icons/PoolIcon.js deleted file mode 100644 index f67830d42d..0000000000 --- a/packages/boba/gateway/src/components/icons/PoolIcon.js +++ /dev/null @@ -1,27 +0,0 @@ -import * as React from "react" - -function PoolIcon({ color }) { - return ( - - - - - ) -} - -export default PoolIcon diff --git a/packages/boba/gateway/src/components/icons/SafeIcon.js b/packages/boba/gateway/src/components/icons/SafeIcon.js deleted file mode 100644 index 8dc723d421..0000000000 --- a/packages/boba/gateway/src/components/icons/SafeIcon.js +++ /dev/null @@ -1,7 +0,0 @@ -import * as React from "react" - -function SafeIcon({ color }) { - return (< svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" > ) -} - -export default SafeIcon diff --git a/packages/boba/gateway/src/components/icons/SettingsIcon.js b/packages/boba/gateway/src/components/icons/SettingsIcon.js deleted file mode 100644 index eb270e33a4..0000000000 --- a/packages/boba/gateway/src/components/icons/SettingsIcon.js +++ /dev/null @@ -1,47 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function SettingsIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - - - - - - - - - ); -} - -export default SettingsIcon; diff --git a/packages/boba/gateway/src/components/icons/SortIcon.js b/packages/boba/gateway/src/components/icons/SortIcon.js deleted file mode 100644 index ecc460606b..0000000000 --- a/packages/boba/gateway/src/components/icons/SortIcon.js +++ /dev/null @@ -1,30 +0,0 @@ -import * as React from "react" -import { useTheme } from "@mui/material/styles"; - -function SortIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - - ) - -} - -export default SortIcon diff --git a/packages/boba/gateway/src/components/icons/SwapIcon.js b/packages/boba/gateway/src/components/icons/SwapIcon.js deleted file mode 100644 index 35c3df60e7..0000000000 --- a/packages/boba/gateway/src/components/icons/SwapIcon.js +++ /dev/null @@ -1,25 +0,0 @@ -import { useTheme } from "@mui/material"; -import * as React from "react" - -function SwapIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - - return ( - - - - ) -} - -export default SwapIcon diff --git a/packages/boba/gateway/src/components/icons/TelegramIcon.js b/packages/boba/gateway/src/components/icons/TelegramIcon.js deleted file mode 100644 index 2bef6d7487..0000000000 --- a/packages/boba/gateway/src/components/icons/TelegramIcon.js +++ /dev/null @@ -1,17 +0,0 @@ -import { useTheme } from "@mui/material"; -import * as React from "react"; - -function TwitterIcon() { - - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - - - return ( - - - ) -} - -export default TwitterIcon; diff --git a/packages/boba/gateway/src/components/icons/TwitterIcon.js b/packages/boba/gateway/src/components/icons/TwitterIcon.js deleted file mode 100644 index 248720e9ef..0000000000 --- a/packages/boba/gateway/src/components/icons/TwitterIcon.js +++ /dev/null @@ -1,15 +0,0 @@ -import { useTheme } from "@mui/material"; -import * as React from "react"; - -function TwitterIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - - return ( - - - ) -} - -export default TwitterIcon; diff --git a/packages/boba/gateway/src/components/icons/UpIcon.js b/packages/boba/gateway/src/components/icons/UpIcon.js deleted file mode 100644 index 931a19f828..0000000000 --- a/packages/boba/gateway/src/components/icons/UpIcon.js +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from "react"; -import { useTheme } from "@mui/material/styles"; - -function UpIcon() { - const theme = useTheme(); - const isLight = theme.palette.mode === 'light'; - const color = theme.palette.common[isLight ? 'black' : 'white']; - return ( - - - - ); -} - -export default UpIcon; diff --git a/packages/boba/gateway/src/components/layout/Footer/FooterLinks/constant.ts b/packages/boba/gateway/src/components/layout/Footer/FooterLinks/constant.ts index 708e083b4d..dfc0afc826 100644 --- a/packages/boba/gateway/src/components/layout/Footer/FooterLinks/constant.ts +++ b/packages/boba/gateway/src/components/layout/Footer/FooterLinks/constant.ts @@ -29,7 +29,7 @@ export const FOOTERLINKS_RIGHT: Array = [ path: 'https://boba.network', }, { - label: 'Terms of Service', - path: '', + label: 'Terms of Use', + path: 'https://boba.network/terms-of-use/', }, ] diff --git a/packages/boba/gateway/src/components/layout/Footer/FooterLinks/index.tsx b/packages/boba/gateway/src/components/layout/Footer/FooterLinks/index.tsx index 80d83a3b76..664cd76a95 100644 --- a/packages/boba/gateway/src/components/layout/Footer/FooterLinks/index.tsx +++ b/packages/boba/gateway/src/components/layout/Footer/FooterLinks/index.tsx @@ -50,7 +50,7 @@ const FooterLinks = () => {
{FOOTERLINKS_RIGHT.map((link) => ( - + {link.label} ))} diff --git a/packages/boba/gateway/src/components/layout/Footer/SocialLinks/index.tsx b/packages/boba/gateway/src/components/layout/Footer/SocialLinks/index.tsx index 7650c61b43..2aff0f974f 100644 --- a/packages/boba/gateway/src/components/layout/Footer/SocialLinks/index.tsx +++ b/packages/boba/gateway/src/components/layout/Footer/SocialLinks/index.tsx @@ -9,6 +9,7 @@ import DocsIcon from './icons/docs' import DiscordIcon from './icons/discord' import TwitterIcon from './icons/twitter' import TelegramIcon from './icons/telegram' +import { WALLET_VERSION } from 'util/constant' interface Props {} @@ -45,7 +46,7 @@ const SocialLinks = (props: Props) => { - v0.7.2 + v{WALLET_VERSION} ) } diff --git a/packages/boba/gateway/src/components/layout/Header/WalletAddress/index.tsx b/packages/boba/gateway/src/components/layout/Header/WalletAddress/index.tsx index e0e7bd6f74..8d4b6c959a 100644 --- a/packages/boba/gateway/src/components/layout/Header/WalletAddress/index.tsx +++ b/packages/boba/gateway/src/components/layout/Header/WalletAddress/index.tsx @@ -1,12 +1,14 @@ +import { generateAvatarURL } from '@cfx-kit/wallet-avatar' import React from 'react' -import networkService from 'services/networkService' -import { CircleIndicator, MenuItemStyle } from './style' -import truncate from 'truncate-middle' + import { Heading } from 'components/global' import Menu from 'components/global/menu' +import useDisconnect from 'hooks/useDisconnect' +import networkService from 'services/networkService' +import truncate from 'truncate-middle' import CopyIcon from './icons/copy' import DisconnectIcon from './icons/disconnect' -import useDisconnect from 'hooks/useDisconnect' +import { MenuItemStyle, ProfileIndicator } from './style' interface Props {} @@ -37,6 +39,8 @@ export const WalletAddress = ({}: Props) => { disconnect() } + const profile = generateAvatarURL(networkService.account as string) + return ( { ]} > <> - + {truncate(networkService.account, 6, 4, '...')} diff --git a/packages/boba/gateway/src/components/layout/Header/WalletAddress/style.ts b/packages/boba/gateway/src/components/layout/Header/WalletAddress/style.ts index 7ff73b0e6c..5d23b41783 100644 --- a/packages/boba/gateway/src/components/layout/Header/WalletAddress/style.ts +++ b/packages/boba/gateway/src/components/layout/Header/WalletAddress/style.ts @@ -17,3 +17,11 @@ export const MenuItemStyle = styled(Typography).attrs({ align-items: center; justify-content: space-around; ` + +export const ProfileIndicator = styled.img.attrs({ + alt: 'profile image', +})` + height: 24px; + width: 24px; + border-radius: 50%; +` diff --git a/packages/boba/gateway/src/components/layout/Header/__snapshots__/index.test.tsx.snap b/packages/boba/gateway/src/components/layout/Header/__snapshots__/index.test.tsx.snap index 669750a14b..0c4d35b95d 100644 --- a/packages/boba/gateway/src/components/layout/Header/__snapshots__/index.test.tsx.snap +++ b/packages/boba/gateway/src/components/layout/Header/__snapshots__/index.test.tsx.snap @@ -3,11 +3,16 @@ exports[`Layout => Header should match the snapshot 1`] = `
-
+ +
+
diff --git a/packages/boba/gateway/src/components/layout/Header/feeSwitcher/index.tsx b/packages/boba/gateway/src/components/layout/Header/feeSwitcher/index.tsx index c31913652f..1550010286 100644 --- a/packages/boba/gateway/src/components/layout/Header/feeSwitcher/index.tsx +++ b/packages/boba/gateway/src/components/layout/Header/feeSwitcher/index.tsx @@ -30,7 +30,13 @@ import networkService from 'services/networkService.js' import useFeeSwitcher from 'hooks/useFeeSwitcher' import { getCoinImage } from 'util/coinImage' -import { FeeSwitcherIcon, FeeSwitcherLabel, FeeSwitcherWrapper } from './styles' +import { + FeeLabel, + FeeSwitcherIcon, + FeeSwitcherLabel, + FeeSwitcherLabelWrapper, + FeeSwitcherWrapper, +} from './styles' import BobaLogo from 'assets/images/Boba_Logo_White_Circle.png' @@ -69,11 +75,14 @@ const FeeSwitcher: FC = () => { return ( - - - + + Fee + + + + @@ -43,7 +29,7 @@ exports[`Testing history page Test History Page 1`] = ` class="sc-dyTUbJ hUdBAf" >

Date Range From

@@ -53,11 +39,11 @@ exports[`Testing history page Test History Page 1`] = `
- 02/21/2023 + 02/24/2023

To

@@ -67,7 +53,7 @@ exports[`Testing history page Test History Page 1`] = `
- 08/21/2023 + 08/24/2023
@@ -75,7 +61,7 @@ exports[`Testing history page Test History Page 1`] = ` class="sc-kJpdyg gLZWIR" >

Date Range

@@ -85,7 +71,7 @@ exports[`Testing history page Test History Page 1`] = `
- 02/21/2023 - 08/21/2023 + 02/24/2023 - 08/24/2023
@@ -104,7 +90,7 @@ exports[`Testing history page Test History Page 1`] = ` class="sc-kJwmPe ctcryJ" >

From

@@ -112,7 +98,7 @@ exports[`Testing history page Test History Page 1`] = ` class="sc-fABZjn eemHrn dropdown sc-gCkVGe Mbgmo" >