From 2a6f5a462670d99e70f815692ce9f8b2ce07d879 Mon Sep 17 00:00:00 2001 From: dave | d1onys1us <13951458+d1onys1us@users.noreply.github.com> Date: Thu, 4 May 2023 13:09:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix(repo):=20fix=20release-please=20workflo?= =?UTF-8?q?w=20by=20removing=20tokenomics=20package=E2=80=A6=20(#13698)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: jeff <113397187+cyberhorsey@users.noreply.github.com> --- .release-please-manifest.json | 1 - release-please-config.json | 1 - 2 files changed, 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cb932cf88b4..d4608d5c6e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -6,7 +6,6 @@ "packages/protocol": "0.6.1", "packages/relayer": "0.4.1", "packages/status-page": "0.7.0", - "packages/tokenomics": "0.1.0", "packages/website": "0.6.0", "packages/whitepaper": "1.3.0" } diff --git a/release-please-config.json b/release-please-config.json index 49eb479e10d..4b9396bd309 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -7,7 +7,6 @@ "packages/protocol": {}, "packages/relayer": {}, "packages/status-page": {}, - "packages/tokenomics": {}, "packages/website": {}, "packages/whitepaper": {} } From 801162c90fd751ae88cd87ae90b36076f7b635e8 Mon Sep 17 00:00:00 2001 From: Francisco Ramos Date: Thu, 4 May 2023 08:26:07 +0200 Subject: [PATCH 2/3] chore(bridge-ui): update env vars (#13702) Co-authored-by: David --- packages/bridge-ui/.default.env | 25 ++++++------- packages/bridge-ui/README.md | 36 +++++++++---------- packages/bridge-ui/src/bridge/ERC20Bridge.ts | 11 +++--- packages/bridge-ui/src/bridge/ETHBridge.ts | 11 +++--- packages/bridge-ui/src/chain/chains.ts | 8 ++--- .../Transactions/Transaction.svelte | 2 +- .../src/components/modals/FaucetModal.svelte | 18 +++++----- .../src/constants/__mocks__/envVars.ts | 22 ++++++------ packages/bridge-ui/src/constants/envVars.ts | 32 ++++++++--------- packages/bridge-ui/src/domain/chain.ts | 2 +- packages/bridge-ui/src/domain/proof.ts | 6 ++-- .../bridge-ui/src/proof/ProofService.spec.ts | 18 +++++----- packages/bridge-ui/src/proof/ProofService.ts | 4 +-- .../checkIfTokenIsDeployedCrossChain.spec.ts | 4 +-- packages/bridge-ui/src/vite-env.d.ts | 27 +++++++------- 15 files changed, 110 insertions(+), 116 deletions(-) diff --git a/packages/bridge-ui/.default.env b/packages/bridge-ui/.default.env index 15311c8a397..ad04319c53f 100644 --- a/packages/bridge-ui/.default.env +++ b/packages/bridge-ui/.default.env @@ -1,4 +1,5 @@ VITE_NODE_ENV=dev + VITE_L1_RPC_URL="" VITE_L2_RPC_URL="" @@ -6,20 +7,20 @@ VITE_RELAYER_URL="" VITE_TEST_ERC20=[] -VITE_MAINNET_CHAIN_ID= -VITE_TAIKO_CHAIN_ID= +VITE_L1_CHAIN_ID= +VITE_L2_CHAIN_ID= -VITE_MAINNET_CHAIN_NAME="" -VITE_TAIKO_CHAIN_NAME="" +VITE_L1_CHAIN_NAME="" +VITE_L2_CHAIN_NAME="" -VITE_MAINNET_TOKEN_VAULT_ADDRESS="" -VITE_TAIKO_TOKEN_VAULT_ADDRESS="" +VITE_L1_TOKEN_VAULT_ADDRESS="" +VITE_L2_TOKEN_VAULT_ADDRESS="" -VITE_MAINNET_HEADER_SYNC_ADDRESS="" -VITE_TAIKO_HEADER_SYNC_ADDRESS="" +VITE_L1_CROSS_CHAIN_SYNC_ADDRESS="" +VITE_L2_CROSS_CHAIN_SYNC_ADDRESS="" -VITE_MAINNET_BRIDGE_ADDRESS="" -VITE_TAIKO_BRIDGE_ADDRESS="" +VITE_L1_BRIDGE_ADDRESS="" +VITE_L2_BRIDGE_ADDRESS="" -VITE_MAINNET_SIGNAL_SERVICE_ADDRESS="" -VITE_TAIKO_SIGNAL_SERVICE_ADDRESS="" +VITE_L1_SIGNAL_SERVICE_ADDRESS="" +VITE_L2_SIGNAL_SERVICE_ADDRESS="" diff --git a/packages/bridge-ui/README.md b/packages/bridge-ui/README.md index 1ed73cb7648..741b43db378 100644 --- a/packages/bridge-ui/README.md +++ b/packages/bridge-ui/README.md @@ -16,31 +16,31 @@ You can use the following values in the `.env` file to spin up the Bridge UI loc ``` VITE_NODE_ENV=dev -VITE_L1_RPC_URL= -VITE_L2_RPC_URL="https://rpc.a2.taiko.xyz/" +VITE_L1_RPC_URL=https://l1rpc.internal.taiko.xyz +VITE_L2_RPC_URL="https://l2rpc.internal.taiko.xyz" -VITE_L1_EXPLORER_URL="https://sepolia.etherscan.io/" -VITE_L2_EXPLORER_URL="https://explorer.a2.taiko.xyz/" +VITE_L1_EXPLORER_URL="https://l1explorer.internal.taiko.xyz" +VITE_L2_EXPLORER_URL="https://l2explorer.internal.taiko.xyz" -VITE_RELAYER_URL="https://relayer.a2.taiko.xyz/" +VITE_RELAYER_URL="https://relayer.internal.taiko.xyz/" -VITE_MAINNET_CHAIN_ID=11155111 -VITE_TAIKO_CHAIN_ID=167004 +VITE_L1_CHAIN_ID=31336 +VITE_L2_CHAIN_ID=167001 -VITE_MAINNET_CHAIN_NAME="Sepolia" -VITE_TAIKO_CHAIN_NAME="Taiko A2" +VITE_L1_CHAIN_NAME="Ethereum A3" +VITE_L2_CHAIN_NAME="Taiko A3" -VITE_MAINNET_TOKEN_VAULT_ADDRESS="0x4284890d4AcD0bcb017eCE481B96fD4Cb457CAc8" -VITE_TAIKO_TOKEN_VAULT_ADDRESS="0x0000777700000000000000000000000000000002" +VITE_L1_TOKEN_VAULT_ADDRESS="0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f" +VITE_L2_TOKEN_VAULT_ADDRESS="0x0000777700000000000000000000000000000002" -VITE_MAINNET_HEADER_SYNC_ADDRESS="0xAC9251ee97Ed8beF31706354310C6b020C35d87b" -VITE_TAIKO_HEADER_SYNC_ADDRESS="0x0000777700000000000000000000000000000001" +VITE_L1_CROSS_CHAIN_SYNC_ADDRESS="0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE" +VITE_L2_CROSS_CHAIN_SYNC_ADDRESS="0x0000777700000000000000000000000000000001" -VITE_MAINNET_BRIDGE_ADDRESS="0x2aB7C0ab9AB47fcF370d13058BfEE28f2Ec0940c" -VITE_TAIKO_BRIDGE_ADDRESS="0x0000777700000000000000000000000000000004" +VITE_L1_BRIDGE_ADDRESS="0x59b670e9fA9D0A427751Af201D676719a970857b" +VITE_L2_BRIDGE_ADDRESS="0x0000777700000000000000000000000000000004" -VITE_MAINNET_SIGNAL_SERVICE_ADDRESS="0x07130410064Ab5C32486CC36904fb219ae97156F" -VITE_TAIKO_SIGNAL_SERVICE_ADDRESS="0xbB203a6f73F805E44E97dcC0c894eFe0fAf72498" +VITE_L1_SIGNAL_SERVICE_ADDRESS="0x09635F643e140090A9A8Dcd712eD6285858ceBef" +VITE_L2_SIGNAL_SERVICE_ADDRESS="0x0000777700000000000000000000000000000007" -VITE_TEST_ERC20=[{"address": "0x5B9fEDd37f0B92E7E282B19cEbCF06F57B77C604", "symbol": "BLL", "name": "Bull Token"}, {"address": "0x1E8C104D068F22D351859cdBfE41A697A98E6EA2", "symbol": "HORSE", "name": "Horse Token"}] +VITE_TEST_ERC20=[{"address": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1", "symbol": "BLL", "name": "Bull Token"}, {"address": "0x0B306BF915C4d645ff596e518fAf3F9669b97016", "symbol": "HORSE", "name": "Horse Token"}] ``` diff --git a/packages/bridge-ui/src/bridge/ERC20Bridge.ts b/packages/bridge-ui/src/bridge/ERC20Bridge.ts index 691521cd763..51288d722b8 100644 --- a/packages/bridge-ui/src/bridge/ERC20Bridge.ts +++ b/packages/bridge-ui/src/bridge/ERC20Bridge.ts @@ -179,8 +179,8 @@ export class ERC20Bridge implements Bridge { sender: opts.srcBridgeAddress, srcBridgeAddress: opts.srcBridgeAddress, destChain: opts.message.destChainId, - destHeaderSyncAddress: - chains[opts.message.destChainId].headerSyncAddress, + destCrossChainSyncAddress: + chains[opts.message.destChainId].crossChainSyncAddress, srcSignalServiceAddress: chains[opts.message.srcChainId].signalServiceAddress, }); @@ -240,9 +240,10 @@ export class ERC20Bridge implements Bridge { sender: opts.srcBridgeAddress, destBridgeAddress: opts.destBridgeAddress, destChain: opts.message.destChainId, - destHeaderSyncAddress: - chains[opts.message.destChainId].headerSyncAddress, - srcHeaderSyncAddress: chains[opts.message.srcChainId].headerSyncAddress, + destCrossChainSyncAddress: + chains[opts.message.destChainId].crossChainSyncAddress, + srcCrossChainSyncAddress: + chains[opts.message.srcChainId].crossChainSyncAddress, }; const proof = await this.prover.generateReleaseProof(proofOpts); diff --git a/packages/bridge-ui/src/bridge/ETHBridge.ts b/packages/bridge-ui/src/bridge/ETHBridge.ts index 258b08087f5..a33580dfa70 100644 --- a/packages/bridge-ui/src/bridge/ETHBridge.ts +++ b/packages/bridge-ui/src/bridge/ETHBridge.ts @@ -123,8 +123,8 @@ export class ETHBridge implements Bridge { sender: opts.srcBridgeAddress, srcBridgeAddress: opts.srcBridgeAddress, destChain: opts.message.destChainId, - destHeaderSyncAddress: - chains[opts.message.destChainId].headerSyncAddress, + destCrossChainSyncAddress: + chains[opts.message.destChainId].crossChainSyncAddress, srcSignalServiceAddress: chains[opts.message.srcChainId].signalServiceAddress, }; @@ -179,9 +179,10 @@ export class ETHBridge implements Bridge { sender: opts.srcBridgeAddress, destBridgeAddress: opts.destBridgeAddress, destChain: opts.message.destChainId, - destHeaderSyncAddress: - chains[opts.message.destChainId].headerSyncAddress, - srcHeaderSyncAddress: chains[opts.message.srcChainId].headerSyncAddress, + destCrossChainSyncAddress: + chains[opts.message.destChainId].crossChainSyncAddress, + srcCrossChainSyncAddress: + chains[opts.message.srcChainId].crossChainSyncAddress, }; const proof = await this.prover.generateReleaseProof(proofOpts); diff --git a/packages/bridge-ui/src/chain/chains.ts b/packages/bridge-ui/src/chain/chains.ts index 16b893d42df..a8cd7c12b51 100644 --- a/packages/bridge-ui/src/chain/chains.ts +++ b/packages/bridge-ui/src/chain/chains.ts @@ -4,14 +4,14 @@ import { L1_CHAIN_ID, L1_CHAIN_NAME, L1_EXPLORER_URL, - L1_HEADER_SYNC_ADDRESS, + L1_CROSS_CHAIN_SYNC_ADDRESS, L1_RPC, L1_SIGNAL_SERVICE_ADDRESS, L2_BRIDGE_ADDRESS, L2_CHAIN_ID, L2_CHAIN_NAME, L2_EXPLORER_URL, - L2_HEADER_SYNC_ADDRESS, + L2_CROSS_CHAIN_SYNC_ADDRESS, L2_RPC, L2_SIGNAL_SERVICE_ADDRESS, } from '../constants/envVars'; @@ -26,7 +26,7 @@ export const mainnetChain: Chain = { enabled: true, icon: Eth, bridgeAddress: L1_BRIDGE_ADDRESS, - headerSyncAddress: L1_HEADER_SYNC_ADDRESS, + crossChainSyncAddress: L1_CROSS_CHAIN_SYNC_ADDRESS, explorerUrl: L1_EXPLORER_URL, signalServiceAddress: L1_SIGNAL_SERVICE_ADDRESS, }; @@ -38,7 +38,7 @@ export const taikoChain: Chain = { enabled: true, icon: Taiko, bridgeAddress: L2_BRIDGE_ADDRESS, - headerSyncAddress: L2_HEADER_SYNC_ADDRESS, + crossChainSyncAddress: L2_CROSS_CHAIN_SYNC_ADDRESS, explorerUrl: L2_EXPLORER_URL, signalServiceAddress: L2_SIGNAL_SERVICE_ADDRESS, }; diff --git a/packages/bridge-ui/src/components/Transactions/Transaction.svelte b/packages/bridge-ui/src/components/Transactions/Transaction.svelte index 6c9b25d579a..a0934780c53 100644 --- a/packages/bridge-ui/src/components/Transactions/Transaction.svelte +++ b/packages/bridge-ui/src/components/Transactions/Transaction.svelte @@ -175,7 +175,7 @@ if (transaction.status !== MessageStatus.New) return true; const contract = new Contract( - chains[transaction.toChainId].headerSyncAddress, + chains[transaction.toChainId].crossChainSyncAddress, HeaderSyncABI, providers[chains[transaction.toChainId].id], ); diff --git a/packages/bridge-ui/src/components/modals/FaucetModal.svelte b/packages/bridge-ui/src/components/modals/FaucetModal.svelte index a82f5c384b3..9b922ee8e8a 100644 --- a/packages/bridge-ui/src/components/modals/FaucetModal.svelte +++ b/packages/bridge-ui/src/components/modals/FaucetModal.svelte @@ -9,7 +9,11 @@ import Modal from './Modal.svelte'; import { onMount } from 'svelte'; import { token } from '../../store/token'; - import { L1_CHAIN_ID } from '../../constants/envVars'; + import { + L1_CHAIN_ID, + L1_CHAIN_NAME, + L2_CHAIN_NAME, + } from '../../constants/envVars'; import { errorToast, successToast } from '../Toast.svelte'; export let isOpen: boolean = false; @@ -90,12 +94,6 @@ } $: shouldEnableButton().catch((e) => console.error(e)); - $: mainnetName = import.meta.env - ? import.meta.env.VITE_MAINNET_CHAIN_NAME - : 'Ethereum A2'; - $: taikonetName = import.meta.env - ? import.meta.env.VITE_TAIKO_CHAIN_NAME - : 'Taiko A2'; onMount(() => { shouldEnableButton(); @@ -104,9 +102,9 @@ You can request 50 {$token.symbol}. {$token.symbol} is only available to be minted - on {mainnetName}. If you are on {taikonetName}, your network will be changed - first. You must have a small amount of ETH in your {mainnetName} wallet to send - the transaction. + on {L1_CHAIN_NAME}. If you are on {L2_CHAIN_NAME}, your network will be + changed first. You must have a small amount of ETH in your {L1_CHAIN_NAME} wallet + to send the transaction.