= {
- [L1_CHAIN_ID]: mainnetChain,
-};
-
-export const mainnetWagmiChain: WagmiChain = {
- id: L1_CHAIN_ID,
- name: L1_CHAIN_NAME,
- network: '',
- nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
- rpcUrls: {
- default: { http: [L1_RPC] },
- public: { http: [L1_RPC] },
- },
- blockExplorers: {
- default: {
- name: 'Main',
- url: L1_EXPLORER_URL,
- },
- },
-};
diff --git a/packages/pos-dashboard/src/components/AddressDropdown.svelte b/packages/pos-dashboard/src/components/AddressDropdown.svelte
deleted file mode 100644
index 9689aa433a9..00000000000
--- a/packages/pos-dashboard/src/components/AddressDropdown.svelte
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-{#if $signer}
-
-
-
- {#if pendingTx}
-
-
-
- {:else}
-
-
-
- {addressSubsection(address)}
-
- {/if}
-
-
-
-
-
- {#if $srcChain && $signer}
-
-
- {tokenBalance.length > 10
- ? `${truncateString(tokenBalance)}…`
- : tokenBalance} ETH
-
- {:else}
-
-- ETH
- {/if}
-
-
-
-
- {addressSubsection(address)}
-
- await copyToClipboard(address)}>
-
- Copy Address
-
- await disconnect()}>
- Disconnect
-
-
-
-{/if}
diff --git a/packages/pos-dashboard/src/components/Button.svelte b/packages/pos-dashboard/src/components/Button.svelte
deleted file mode 100644
index bc3ff8f75c8..00000000000
--- a/packages/pos-dashboard/src/components/Button.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/ButtonWithTooltip.svelte b/packages/pos-dashboard/src/components/ButtonWithTooltip.svelte
deleted file mode 100644
index dbfc1b154c7..00000000000
--- a/packages/pos-dashboard/src/components/ButtonWithTooltip.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/ChainDropdown.svelte b/packages/pos-dashboard/src/components/ChainDropdown.svelte
deleted file mode 100644
index de1a78bc419..00000000000
--- a/packages/pos-dashboard/src/components/ChainDropdown.svelte
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
- {#if $srcChain}
-
- {$srcChain.name}
- {:else}
-
-
- Invalid Chain
-
- {/if}
-
-
-
-
-
- switchChains(mainnetChain)}>
-
- {mainnetChain.name}
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/ConnectWallet.svelte b/packages/pos-dashboard/src/components/ConnectWallet.svelte
deleted file mode 100644
index d2d0dc64956..00000000000
--- a/packages/pos-dashboard/src/components/ConnectWallet.svelte
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
- (isConnectWalletModalOpen = true)}>
- {$_('nav.connect')}
-
-
- (isConnectWalletModalOpen = false)}>
-
- {#each wagmiClient.connectors as connector}
-
connectWithConnector(connector)}>
-
-
-
- {connector.name}
-
- {/each}
-
-
diff --git a/packages/pos-dashboard/src/components/CurrentProvers/CurrentProvers.svelte b/packages/pos-dashboard/src/components/CurrentProvers/CurrentProvers.svelte
deleted file mode 100644
index cef9ff614df..00000000000
--- a/packages/pos-dashboard/src/components/CurrentProvers/CurrentProvers.svelte
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
Address
- Amount
- Capacity
- RewardPerGas
- {#each provers as prover}
-
-
- window.open(
- `https://explorer.test.taiko.xyz/address/${prover.address}`,
- '_blank',
- )}>{truncateString(prover.address, 8)}...
- {ethers.utils.formatUnits(prover.amountStaked.toString(), 8)}
- {prover.currentCapacity}
- {prover.rewardPerGas}
-
- {/each}
-
diff --git a/packages/pos-dashboard/src/components/CurrentProvers/index.ts b/packages/pos-dashboard/src/components/CurrentProvers/index.ts
deleted file mode 100644
index f78513c64a6..00000000000
--- a/packages/pos-dashboard/src/components/CurrentProvers/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './CurrentProvers.svelte';
diff --git a/packages/pos-dashboard/src/components/Events/Event.svelte b/packages/pos-dashboard/src/components/Events/Event.svelte
deleted file mode 100644
index dbfd0e8bbd8..00000000000
--- a/packages/pos-dashboard/src/components/Events/Event.svelte
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- {event.event}
-
-
- {event.data.Raw.transactionHash}
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Events/EventDetail.svelte b/packages/pos-dashboard/src/components/Events/EventDetail.svelte
deleted file mode 100644
index bd4ac4cdc0f..00000000000
--- a/packages/pos-dashboard/src/components/Events/EventDetail.svelte
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
- Tx hash
-
-
- {addressSubsection(transaction.hash)}
-
-
-
-
- {#if transaction.message}
-
- Sender
-
- {addressSubsection(transaction.message.sender)}
-
-
-
- Owner
-
- {addressSubsection(transaction.message.owner)}
-
-
-
- Refund address
-
- {addressSubsection(transaction.message.refundAddress)}
-
-
- {#if transaction.message.callValue}
-
- Call value
-
- {ethers.utils.formatEther(transaction.message.callValue.toString())}
- ETH
-
-
- {/if}
- {#if transaction.message.processingFee}
-
- Processing fee
-
- {ethers.utils.formatEther(transaction.message.processingFee)} ETH
-
-
- {/if}
-
- Gas limit
-
- {transaction.message.gasLimit}
-
-
-
- Memo
-
-
-
-
- {/if}
-
-
diff --git a/packages/pos-dashboard/src/components/Events/History.svelte b/packages/pos-dashboard/src/components/Events/History.svelte
deleted file mode 100644
index a9a4d22aabb..00000000000
--- a/packages/pos-dashboard/src/components/Events/History.svelte
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
- {#each tabs as tab}
-
{
- eventsToShow = [];
- activeTab = tab.name;
- }}>{tab.name}
- {/each}
-
- {#each tabs as tab}
-
- {#if eventsToShow && eventsToShow.length && !loading}
-
-
-
- Event
- {#if tab.name === tabs[0].name}
- Amount
- {:else if tab.name === tabs[1].name}
- Block ID
- {:else if tab.name === tabs[2].name}
- Amount
- {:else if tab.name === tabs[3].name}{:else if tab.name === tabs[4].name}
- Block ID
- {:else if tab.name === tabs[5].name}
- Amount
- {/if}
-
-
-
- {#each eventsToShow as event}
-
-
-
- window.open(
- `https://explorer.test.taiko.xyz/tx/${event.data.Raw.transactionHash}`,
- '_blank',
- )}
- class="cursor-pointer ml-2 hidden md:inline-block"
- >{event.event}
-
- {#if activeTab === tabs[0].name}
- {ethers.utils.formatUnits(event.amount, 8)} TTKOe
- {:else if activeTab === tabs[1].name}
- {event.blockID.Int64}
- {:else if activeTab === tabs[2].name}{:else if activeTab === tabs[3].name}{:else if activeTab === tabs[4].name}
- {event.blockID.Int64}
- {:else if activeTab === tabs[5].name}
- {ethers.utils.formatUnits(event.amount, 8)} TTKOe {/if}
-
- {/each}
-
-
-
-
-
(currentPage = detail)} />
-
- {:else if loading && $signer}
-
-
- Loading event history...
-
- {:else}
- No history. When you have a {tab.name} event, those events will show here.
- {/if}
-
- {/each}
-
-
diff --git a/packages/pos-dashboard/src/components/Events/InsufficientBalanceTooltip.svelte b/packages/pos-dashboard/src/components/Events/InsufficientBalanceTooltip.svelte
deleted file mode 100644
index 05d5e7e7f44..00000000000
--- a/packages/pos-dashboard/src/components/Events/InsufficientBalanceTooltip.svelte
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- Please wait for the relayer to claim the transaction for you.
-
-
- This will happen automatically. Depending on network congestion, this can
- take up to several hours.
-
-
-
diff --git a/packages/pos-dashboard/src/components/Events/index.ts b/packages/pos-dashboard/src/components/Events/index.ts
deleted file mode 100644
index f586760cd9c..00000000000
--- a/packages/pos-dashboard/src/components/Events/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './History.svelte';
diff --git a/packages/pos-dashboard/src/components/HeaderAnnouncement.svelte b/packages/pos-dashboard/src/components/HeaderAnnouncement.svelte
deleted file mode 100644
index f82b4e6659f..00000000000
--- a/packages/pos-dashboard/src/components/HeaderAnnouncement.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Receive some tokens for bridging with our faucet .
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Loading.svelte b/packages/pos-dashboard/src/components/Loading.svelte
deleted file mode 100644
index 038aef3cdb3..00000000000
--- a/packages/pos-dashboard/src/components/Loading.svelte
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
- {#if text}
- {text}
- {/if}
-
diff --git a/packages/pos-dashboard/src/components/Modal.svelte b/packages/pos-dashboard/src/components/Modal.svelte
deleted file mode 100644
index ec1630eafa6..00000000000
--- a/packages/pos-dashboard/src/components/Modal.svelte
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
{title}
- {#if showXButton}
-
-
- ×
-
-
- {/if}
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Navbar.svelte b/packages/pos-dashboard/src/components/Navbar.svelte
deleted file mode 100644
index 6b9f88d909a..00000000000
--- a/packages/pos-dashboard/src/components/Navbar.svelte
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
- {#if $signer}
-
-
- {:else}
-
- {/if}
-
-
- {#if isDarkMode}
-
-
-
- {:else}
-
-
-
- {/if}
-
-
-
diff --git a/packages/pos-dashboard/src/components/NoticeModal.svelte b/packages/pos-dashboard/src/components/NoticeModal.svelte
deleted file mode 100644
index b41b13a76f8..00000000000
--- a/packages/pos-dashboard/src/components/NoticeModal.svelte
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
-
-
-
-
- Do not show this message again
-
-
-
- Confirm
-
-
-
diff --git a/packages/pos-dashboard/src/components/NotificationToast.svelte b/packages/pos-dashboard/src/components/NotificationToast.svelte
deleted file mode 100644
index 39fd8720b83..00000000000
--- a/packages/pos-dashboard/src/components/NotificationToast.svelte
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Paginator.svelte b/packages/pos-dashboard/src/components/Paginator.svelte
deleted file mode 100644
index 06efe431e6a..00000000000
--- a/packages/pos-dashboard/src/components/Paginator.svelte
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/ProverInfo/ProverInfo.svelte b/packages/pos-dashboard/src/components/ProverInfo/ProverInfo.svelte
deleted file mode 100644
index 074acbc1a2b..00000000000
--- a/packages/pos-dashboard/src/components/ProverInfo/ProverInfo.svelte
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- {#if proverInfo}
-
Address: {proverInfo.address}
-
- Amount Staked: {ethers.utils.formatUnits(
- proverInfo.prover.stakedAmount.toString(),
- 8,
- )}
-
-
Max Capacity: {proverInfo.staker.maxCapacity}
-
Current Capacity: {proverInfo.prover.currentCapacity}
-
Prover ID: {proverInfo.staker.proverId}
-
- Exit Amount: {ethers.utils.formatUnits(proverInfo.staker.exitAmount, 8)} TTKO
-
-
Exit Requested At: {proverInfo.staker.exitRequestedAt}
- {:else}
- Connect wallet to view your current prover information
- {/if}
-
diff --git a/packages/pos-dashboard/src/components/ProverInfo/index.ts b/packages/pos-dashboard/src/components/ProverInfo/index.ts
deleted file mode 100644
index 45f065fd8cc..00000000000
--- a/packages/pos-dashboard/src/components/ProverInfo/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './ProverInfo.svelte';
diff --git a/packages/pos-dashboard/src/components/Rewards/Rewards.svelte b/packages/pos-dashboard/src/components/Rewards/Rewards.svelte
deleted file mode 100644
index 0ec283c1b07..00000000000
--- a/packages/pos-dashboard/src/components/Rewards/Rewards.svelte
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
- {#if balance}
- TaikoL1 Contract Balance: {ethers.utils.formatUnits(balance, 8)} TTKOe
-
- Wallet Balance: {ethers.utils.formatUnits(ttkoBalanceInWei, 8)} TTKOe
-
-
-
-
Withdraw
-
-
Deposit
- {:else}
- Connect Wallet
- {/if}
-
diff --git a/packages/pos-dashboard/src/components/Rewards/index.ts b/packages/pos-dashboard/src/components/Rewards/index.ts
deleted file mode 100644
index 367b28a401e..00000000000
--- a/packages/pos-dashboard/src/components/Rewards/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './Rewards.svelte';
diff --git a/packages/pos-dashboard/src/components/Router.svelte b/packages/pos-dashboard/src/components/Router.svelte
deleted file mode 100644
index 9d56792ba54..00000000000
--- a/packages/pos-dashboard/src/components/Router.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
diff --git a/packages/pos-dashboard/src/components/StakeForm.svelte/StakeForm.svelte b/packages/pos-dashboard/src/components/StakeForm.svelte/StakeForm.svelte
deleted file mode 100644
index 458403df4b6..00000000000
--- a/packages/pos-dashboard/src/components/StakeForm.svelte/StakeForm.svelte
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
- {#if $signer}
-
-
- Staking to be a prover on Eldfell L3 requires you to provide some
- paramaters: the capacity (how many blocks you can prove simultaneously
- within the proof window), the amount you want to stake per capacity, and
- the reward you want to receive per gas. These parameters will influence
- your position on the top provers. 32 provers can be assigned blocks. You
- can click the "Current Provers" tab to see the current top 32 provers,
- and what staking amount you will require to override the bottom existing
- prover and enter the top 32.
-
-
-
Your TTKOe Balance:
- {ethers.utils.formatUnits(ttkoBalanceInWei, 8)}
-
-
-
Min Stake per Capacity:
- {ethers.utils.formatUnits(minStakePerCapacity, 8)} TTKOe
-
-
-
Min Capacity:
- {minCapacity.toString()}
-
-
-
-
Amount per Capacity:
-
-
-
-
-
-
-
-
RewardPerGas (in wei):
-
-
-
-
-
-
-
-
- {#if errorMessage}
-
{errorMessage}
- {/if}
-
Stake
- {:else}
- Connect Wallet
- {/if}
-
diff --git a/packages/pos-dashboard/src/components/StakeForm.svelte/index.ts b/packages/pos-dashboard/src/components/StakeForm.svelte/index.ts
deleted file mode 100644
index e8e7f51f5be..00000000000
--- a/packages/pos-dashboard/src/components/StakeForm.svelte/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './StakeForm.svelte';
diff --git a/packages/pos-dashboard/src/components/SwitchChainModal.svelte b/packages/pos-dashboard/src/components/SwitchChainModal.svelte
deleted file mode 100644
index dbe642eb9b6..00000000000
--- a/packages/pos-dashboard/src/components/SwitchChainModal.svelte
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
{$_('switchChainModal.subtitle')}
-
- {
- await switchChain(mainnetChain);
- }}>
- {mainnetChain.name}
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Tabs/Tab.svelte b/packages/pos-dashboard/src/components/Tabs/Tab.svelte
deleted file mode 100644
index 0a10b9d7351..00000000000
--- a/packages/pos-dashboard/src/components/Tabs/Tab.svelte
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- ($activeTab = name)}
- {href}
- use:link>
-
-
diff --git a/packages/pos-dashboard/src/components/Tabs/TabList.svelte b/packages/pos-dashboard/src/components/Tabs/TabList.svelte
deleted file mode 100644
index 7de82d69039..00000000000
--- a/packages/pos-dashboard/src/components/Tabs/TabList.svelte
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/packages/pos-dashboard/src/components/Tabs/TabPanel.svelte b/packages/pos-dashboard/src/components/Tabs/TabPanel.svelte
deleted file mode 100644
index b5e68a87f7f..00000000000
--- a/packages/pos-dashboard/src/components/Tabs/TabPanel.svelte
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Tabs/Tabs.svelte b/packages/pos-dashboard/src/components/Tabs/Tabs.svelte
deleted file mode 100644
index 8708878e32c..00000000000
--- a/packages/pos-dashboard/src/components/Tabs/Tabs.svelte
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/Tabs/index.ts b/packages/pos-dashboard/src/components/Tabs/index.ts
deleted file mode 100644
index 56c89788259..00000000000
--- a/packages/pos-dashboard/src/components/Tabs/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export { default as Tab } from './Tab.svelte';
-export { default as TabList } from './TabList.svelte';
-export { default as TabPanel } from './TabPanel.svelte';
-export { default as Tabs } from './Tabs.svelte';
diff --git a/packages/pos-dashboard/src/components/Tooltip.svelte b/packages/pos-dashboard/src/components/Tooltip.svelte
deleted file mode 100644
index be1595072a1..00000000000
--- a/packages/pos-dashboard/src/components/Tooltip.svelte
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- (isOpen = true)}
- size="18"
- variation="outline" />
diff --git a/packages/pos-dashboard/src/components/TooltipModal.svelte b/packages/pos-dashboard/src/components/TooltipModal.svelte
deleted file mode 100644
index 29b9f8e7747..00000000000
--- a/packages/pos-dashboard/src/components/TooltipModal.svelte
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/Bull.svelte b/packages/pos-dashboard/src/components/icons/Bull.svelte
deleted file mode 100644
index 73fdee2b6ed..00000000000
--- a/packages/pos-dashboard/src/components/icons/Bull.svelte
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/CoinbaseWallet.svelte b/packages/pos-dashboard/src/components/icons/CoinbaseWallet.svelte
deleted file mode 100644
index 3d8908e4123..00000000000
--- a/packages/pos-dashboard/src/components/icons/CoinbaseWallet.svelte
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/packages/pos-dashboard/src/components/icons/ERC20.svelte b/packages/pos-dashboard/src/components/icons/ERC20.svelte
deleted file mode 100644
index 81d07139080..00000000000
--- a/packages/pos-dashboard/src/components/icons/ERC20.svelte
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/ETH.svelte b/packages/pos-dashboard/src/components/icons/ETH.svelte
deleted file mode 100644
index b46a77d6404..00000000000
--- a/packages/pos-dashboard/src/components/icons/ETH.svelte
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/Horse.svelte b/packages/pos-dashboard/src/components/icons/Horse.svelte
deleted file mode 100644
index 002faf78a96..00000000000
--- a/packages/pos-dashboard/src/components/icons/Horse.svelte
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/Loader.svelte b/packages/pos-dashboard/src/components/icons/Loader.svelte
deleted file mode 100644
index 1cb86121550..00000000000
--- a/packages/pos-dashboard/src/components/icons/Loader.svelte
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/MetaMask.svelte b/packages/pos-dashboard/src/components/icons/MetaMask.svelte
deleted file mode 100644
index 5abe9e4cb58..00000000000
--- a/packages/pos-dashboard/src/components/icons/MetaMask.svelte
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/TKO.svelte b/packages/pos-dashboard/src/components/icons/TKO.svelte
deleted file mode 100644
index e4ff2316279..00000000000
--- a/packages/pos-dashboard/src/components/icons/TKO.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/TaikoLight.svelte b/packages/pos-dashboard/src/components/icons/TaikoLight.svelte
deleted file mode 100644
index 6d651550f03..00000000000
--- a/packages/pos-dashboard/src/components/icons/TaikoLight.svelte
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/TaikoLogo.svelte b/packages/pos-dashboard/src/components/icons/TaikoLogo.svelte
deleted file mode 100644
index d476247c027..00000000000
--- a/packages/pos-dashboard/src/components/icons/TaikoLogo.svelte
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/Unknown.svelte b/packages/pos-dashboard/src/components/icons/Unknown.svelte
deleted file mode 100644
index 5f97559c146..00000000000
--- a/packages/pos-dashboard/src/components/icons/Unknown.svelte
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/components/icons/WalletConnect.svelte b/packages/pos-dashboard/src/components/icons/WalletConnect.svelte
deleted file mode 100644
index ad116cec436..00000000000
--- a/packages/pos-dashboard/src/components/icons/WalletConnect.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/packages/pos-dashboard/src/constants/__mocks__/envVars.ts b/packages/pos-dashboard/src/constants/__mocks__/envVars.ts
deleted file mode 100644
index 0713baa86af..00000000000
--- a/packages/pos-dashboard/src/constants/__mocks__/envVars.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-export const L1_RPC = 'https://l1rpc.internal.taiko.xyz';
-
-export const L1_TOKEN_VAULT_ADDRESS =
- '0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f';
-
-export const L1_BRIDGE_ADDRESS = '0xc6e7df5e7b4f2a278906862b61205850344d4e7d';
-
-export const L1_CROSS_CHAIN_SYNC_ADDRESS =
- '0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE';
-
-export const L1_SIGNAL_SERVICE_ADDRESS =
- '0x09635F643e140090A9A8Dcd712eD6285858ceBef';
-
-export const L1_CHAIN_ID = 31336;
-
-export const L1_CHAIN_NAME = 'Ethereum';
-
-export const L1_EXPLORER_URL = 'https://l1explorer.internal.taiko.xyz';
-
-export const L2_RPC = 'https://l2rpc.internal.taiko.xyz';
-
-export const L2_TOKEN_VAULT_ADDRESS =
- '0x1000777700000000000000000000000000000002';
-
-export const L2_BRIDGE_ADDRESS =
- import.meta.env?.VITE_L2_BRIDGE_ADDRESS ??
- '0x1000777700000000000000000000000000000004';
-
-export const L2_CROSS_CHAIN_SYNC_ADDRESS =
- '0x1000777700000000000000000000000000000001';
-
-export const L2_SIGNAL_SERVICE_ADDRESS =
- '0x1000777700000000000000000000000000000007';
-
-export const L2_CHAIN_ID = 167001;
-
-export const L2_CHAIN_NAME = 'Taiko';
-
-export const L2_EXPLORER_URL = 'https://l2explorer.internal.taiko.xyz';
-
-export const RELAYER_URL = 'https://relayer.internal.taiko.xyz/';
-
-export const TEST_ERC20 = [
- {
- address: '0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1',
- symbol: 'BLL',
- name: 'Bull Token',
- logoUrl: 'https://internet.com/bll',
- },
- {
- address: '0x0B306BF915C4d645ff596e518fAf3F9669b97016',
- symbol: 'HORSE',
- name: 'Horse Token',
- logoUrl: 'https://internet.com/horse',
- },
-];
-
-export const SENTRY_DSN = 'https://sentry.io/1234567890';
-
-export const WALLETCONNECT_PROJECT_ID = '1234567890';
diff --git a/packages/pos-dashboard/src/constants/abi/ERC20.ts b/packages/pos-dashboard/src/constants/abi/ERC20.ts
deleted file mode 100644
index a7db22eb197..00000000000
--- a/packages/pos-dashboard/src/constants/abi/ERC20.ts
+++ /dev/null
@@ -1,288 +0,0 @@
-export default [
- {
- inputs: [
- {
- internalType: 'string',
- name: 'name_',
- type: 'string',
- },
- {
- internalType: 'string',
- name: 'symbol_',
- type: 'string',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'constructor',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'owner',
- type: 'address',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'spender',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'value',
- type: 'uint256',
- },
- ],
- name: 'Approval',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'from',
- type: 'address',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'to',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint256',
- name: 'value',
- type: 'uint256',
- },
- ],
- name: 'Transfer',
- type: 'event',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'owner',
- type: 'address',
- },
- {
- internalType: 'address',
- name: 'spender',
- type: 'address',
- },
- ],
- name: 'allowance',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'spender',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'approve',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'account',
- type: 'address',
- },
- ],
- name: 'balanceOf',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'decimals',
- outputs: [
- {
- internalType: 'uint8',
- name: '',
- type: 'uint8',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'spender',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'subtractedValue',
- type: 'uint256',
- },
- ],
- name: 'decreaseAllowance',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'spender',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'addedValue',
- type: 'uint256',
- },
- ],
- name: 'increaseAllowance',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'name',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'symbol',
- outputs: [
- {
- internalType: 'string',
- name: '',
- type: 'string',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'totalSupply',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'to',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'transfer',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'from',
- type: 'address',
- },
- {
- internalType: 'address',
- name: 'to',
- type: 'address',
- },
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'transferFrom',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
-];
diff --git a/packages/pos-dashboard/src/constants/abi/ProverPool.ts b/packages/pos-dashboard/src/constants/abi/ProverPool.ts
deleted file mode 100644
index bc77e511097..00000000000
--- a/packages/pos-dashboard/src/constants/abi/ProverPool.ts
+++ /dev/null
@@ -1,716 +0,0 @@
-export default [
- {
- inputs: [],
- name: 'CHANGE_TOO_FREQUENT',
- type: 'error',
- },
- {
- inputs: [],
- name: 'INVALID_PARAMS',
- type: 'error',
- },
- {
- inputs: [],
- name: 'NO_MATURE_EXIT',
- type: 'error',
- },
- {
- inputs: [],
- name: 'PROVER_NOT_GOOD_ENOUGH',
- type: 'error',
- },
- {
- inputs: [],
- name: 'RESOLVER_DENIED',
- type: 'error',
- },
- {
- inputs: [],
- name: 'RESOLVER_INVALID_ADDR',
- type: 'error',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'chainId',
- type: 'uint256',
- },
- {
- internalType: 'bytes32',
- name: 'name',
- type: 'bytes32',
- },
- ],
- name: 'RESOLVER_ZERO_ADDR',
- type: 'error',
- },
- {
- inputs: [],
- name: 'UNAUTHORIZED',
- type: 'error',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'address',
- name: 'addressManager',
- type: 'address',
- },
- ],
- name: 'AddressManagerChanged',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'amount',
- type: 'uint64',
- },
- ],
- name: 'Exited',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint8',
- name: 'version',
- type: 'uint8',
- },
- ],
- name: 'Initialized',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'previousOwner',
- type: 'address',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'newOwner',
- type: 'address',
- },
- ],
- name: 'OwnershipTransferred',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'amount',
- type: 'uint64',
- },
- ],
- name: 'Slashed',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'amount',
- type: 'uint64',
- },
- {
- indexed: false,
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- indexed: false,
- internalType: 'uint32',
- name: 'currentCapacity',
- type: 'uint32',
- },
- ],
- name: 'Staked',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'amount',
- type: 'uint64',
- },
- ],
- name: 'Withdrawn',
- type: 'event',
- },
- {
- inputs: [],
- name: 'EXIT_PERIOD',
- outputs: [
- {
- internalType: 'uint64',
- name: '',
- type: 'uint64',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'MAX_NUM_PROVERS',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'MIN_CAPACITY',
- outputs: [
- {
- internalType: 'uint32',
- name: '',
- type: 'uint32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'MIN_CHANGE_DELAY',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'MIN_STAKE_PER_CAPACITY',
- outputs: [
- {
- internalType: 'uint64',
- name: '',
- type: 'uint64',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'SLASH_MULTIPLIER',
- outputs: [
- {
- internalType: 'uint64',
- name: '',
- type: 'uint64',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'SLASH_POINTS',
- outputs: [
- {
- internalType: 'uint64',
- name: '',
- type: 'uint64',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'addressManager',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint64',
- name: 'blockId',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'feePerGas',
- type: 'uint32',
- },
- ],
- name: 'assignProver',
- outputs: [
- {
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- {
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'exit',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'getCapacity',
- outputs: [
- {
- internalType: 'uint256',
- name: 'capacity',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint32',
- name: 'feePerGas',
- type: 'uint32',
- },
- ],
- name: 'getProverWeights',
- outputs: [
- {
- internalType: 'uint256[32]',
- name: 'weights',
- type: 'uint256[32]',
- },
- {
- internalType: 'uint32[32]',
- name: 'erpg',
- type: 'uint32[32]',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'getProvers',
- outputs: [
- {
- components: [
- {
- internalType: 'uint64',
- name: 'stakedAmount',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'currentCapacity',
- type: 'uint32',
- },
- ],
- internalType: 'struct ProverPool.Prover[]',
- name: '_provers',
- type: 'tuple[]',
- },
- {
- internalType: 'address[]',
- name: '_stakers',
- type: 'address[]',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- ],
- name: 'getStaker',
- outputs: [
- {
- components: [
- {
- internalType: 'uint64',
- name: 'exitRequestedAt',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'exitAmount',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'maxCapacity',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'proverId',
- type: 'uint32',
- },
- ],
- internalType: 'struct ProverPool.Staker',
- name: 'staker',
- type: 'tuple',
- },
- {
- components: [
- {
- internalType: 'uint64',
- name: 'stakedAmount',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'currentCapacity',
- type: 'uint32',
- },
- ],
- internalType: 'struct ProverPool.Prover',
- name: 'prover',
- type: 'tuple',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: '_addressManager',
- type: 'address',
- },
- ],
- name: 'init',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'owner',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'id',
- type: 'uint256',
- },
- ],
- name: 'proverIdToAddress',
- outputs: [
- {
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- name: 'provers',
- outputs: [
- {
- internalType: 'uint64',
- name: 'stakedAmount',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'currentCapacity',
- type: 'uint32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- ],
- name: 'releaseProver',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'renounceOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'chainId',
- type: 'uint256',
- },
- {
- internalType: 'bytes32',
- name: 'name',
- type: 'bytes32',
- },
- {
- internalType: 'bool',
- name: 'allowZeroAddress',
- type: 'bool',
- },
- ],
- name: 'resolve',
- outputs: [
- {
- internalType: 'address payable',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'bytes32',
- name: 'name',
- type: 'bytes32',
- },
- {
- internalType: 'bool',
- name: 'allowZeroAddress',
- type: 'bool',
- },
- ],
- name: 'resolve',
- outputs: [
- {
- internalType: 'address payable',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'newAddressManager',
- type: 'address',
- },
- ],
- name: 'setAddressManager',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- {
- internalType: 'uint64',
- name: 'proofReward',
- type: 'uint64',
- },
- ],
- name: 'slashProver',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint64',
- name: 'amount',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'maxCapacity',
- type: 'uint32',
- },
- ],
- name: 'stake',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'staker',
- type: 'address',
- },
- ],
- name: 'stakers',
- outputs: [
- {
- internalType: 'uint64',
- name: 'exitRequestedAt',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'exitAmount',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'maxCapacity',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'proverId',
- type: 'uint32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'newOwner',
- type: 'address',
- },
- ],
- name: 'transferOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'withdraw',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
-];
diff --git a/packages/pos-dashboard/src/constants/abi/TaikoL1.ts b/packages/pos-dashboard/src/constants/abi/TaikoL1.ts
deleted file mode 100644
index 24897e0ea69..00000000000
--- a/packages/pos-dashboard/src/constants/abi/TaikoL1.ts
+++ /dev/null
@@ -1,1636 +0,0 @@
-export default [
- {
- inputs: [],
- name: 'L1_ALREADY_PROVEN',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_ALREADY_PROVEN',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_BATCH_NOT_AUCTIONABLE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_BLOCK_ID',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_BLOCK_ID',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_BLOCK_ID',
- type: 'error',
- },
- {
- inputs: [
- {
- internalType: 'bytes32',
- name: 'expected',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'actual',
- type: 'bytes32',
- },
- ],
- name: 'L1_EVIDENCE_MISMATCH',
- type: 'error',
- },
- {
- inputs: [
- {
- internalType: 'bytes32',
- name: 'expected',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'actual',
- type: 'bytes32',
- },
- ],
- name: 'L1_EVIDENCE_MISMATCH',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_FORK_CHOICE_NOT_FOUND',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_FORK_CHOICE_NOT_FOUND',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INSUFFICIENT_TOKEN',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INSUFFICIENT_TOKEN',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INSUFFICIENT_TOKEN',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_BID',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_CONFIG',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_CONFIG',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_ETH_DEPOSIT',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_ETH_DEPOSIT',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_EVIDENCE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_EVIDENCE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_METADATA',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_METADATA',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_PARAM',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_PROOF',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_INVALID_PROOF',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_NOT_BETTER_BID',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_NOT_PROVEABLE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_NOT_PROVEABLE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_NOT_SPECIAL_PROVER',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_SAME_PROOF',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_SAME_PROOF',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TOO_MANY_BLOCKS',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TOO_MANY_BLOCKS',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TOO_MANY_OPEN_BLOCKS',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TOO_MANY_OPEN_BLOCKS',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST_HASH',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST_HASH',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST_NOT_EXIST',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST_NOT_EXIST',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST_RANGE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_TX_LIST_RANGE',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_UNAUTHORIZED',
- type: 'error',
- },
- {
- inputs: [],
- name: 'L1_UNAUTHORIZED',
- type: 'error',
- },
- {
- inputs: [],
- name: 'RESOLVER_DENIED',
- type: 'error',
- },
- {
- inputs: [],
- name: 'RESOLVER_INVALID_ADDR',
- type: 'error',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'chainId',
- type: 'uint256',
- },
- {
- internalType: 'bytes32',
- name: 'name',
- type: 'bytes32',
- },
- ],
- name: 'RESOLVER_ZERO_ADDR',
- type: 'error',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'address',
- name: 'addressManager',
- type: 'address',
- },
- ],
- name: 'AddressManagerChanged',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'assignedProver',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'feePerGas',
- type: 'uint64',
- },
- {
- components: [
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'timestamp',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'l1Height',
- type: 'uint64',
- },
- {
- internalType: 'bytes32',
- name: 'l1Hash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'mixHash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'txListHash',
- type: 'bytes32',
- },
- {
- internalType: 'uint24',
- name: 'txListByteStart',
- type: 'uint24',
- },
- {
- internalType: 'uint24',
- name: 'txListByteEnd',
- type: 'uint24',
- },
- {
- internalType: 'uint32',
- name: 'gasLimit',
- type: 'uint32',
- },
- {
- internalType: 'address',
- name: 'beneficiary',
- type: 'address',
- },
- {
- internalType: 'address',
- name: 'treasury',
- type: 'address',
- },
- {
- components: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address',
- },
- {
- internalType: 'uint96',
- name: 'amount',
- type: 'uint96',
- },
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- ],
- internalType: 'struct TaikoData.EthDeposit[]',
- name: 'depositsProcessed',
- type: 'tuple[]',
- },
- ],
- indexed: false,
- internalType: 'struct TaikoData.BlockMetadata',
- name: 'meta',
- type: 'tuple',
- },
- ],
- name: 'BlockProposed',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'assignedProver',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint32',
- name: 'rewardPerGas',
- type: 'uint32',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'feePerGas',
- type: 'uint64',
- },
- {
- components: [
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'timestamp',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'l1Height',
- type: 'uint64',
- },
- {
- internalType: 'bytes32',
- name: 'l1Hash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'mixHash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'txListHash',
- type: 'bytes32',
- },
- {
- internalType: 'uint24',
- name: 'txListByteStart',
- type: 'uint24',
- },
- {
- internalType: 'uint24',
- name: 'txListByteEnd',
- type: 'uint24',
- },
- {
- internalType: 'uint32',
- name: 'gasLimit',
- type: 'uint32',
- },
- {
- internalType: 'address',
- name: 'beneficiary',
- type: 'address',
- },
- {
- internalType: 'address',
- name: 'treasury',
- type: 'address',
- },
- {
- components: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address',
- },
- {
- internalType: 'uint96',
- name: 'amount',
- type: 'uint96',
- },
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- ],
- internalType: 'struct TaikoData.EthDeposit[]',
- name: 'depositsProcessed',
- type: 'tuple[]',
- },
- ],
- indexed: false,
- internalType: 'struct TaikoData.BlockMetadata',
- name: 'meta',
- type: 'tuple',
- },
- ],
- name: 'BlockProposed',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'parentHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'signalRoot',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint32',
- name: 'parentGasUsed',
- type: 'uint32',
- },
- ],
- name: 'BlockProven',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'parentHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'signalRoot',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint32',
- name: 'parentGasUsed',
- type: 'uint32',
- },
- ],
- name: 'BlockProven',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'blockFee',
- type: 'uint64',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'proofReward',
- type: 'uint64',
- },
- ],
- name: 'BlockVerified',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'blockFee',
- type: 'uint64',
- },
- {
- indexed: false,
- internalType: 'uint64',
- name: 'proofReward',
- type: 'uint64',
- },
- ],
- name: 'BlockVerified',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'srcHeight',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'signalRoot',
- type: 'bytes32',
- },
- ],
- name: 'CrossChainSynced',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'uint256',
- name: 'srcHeight',
- type: 'uint256',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- indexed: false,
- internalType: 'bytes32',
- name: 'signalRoot',
- type: 'bytes32',
- },
- ],
- name: 'CrossChainSynced',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- components: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address',
- },
- {
- internalType: 'uint96',
- name: 'amount',
- type: 'uint96',
- },
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- ],
- indexed: false,
- internalType: 'struct TaikoData.EthDeposit',
- name: 'deposit',
- type: 'tuple',
- },
- ],
- name: 'EthDeposited',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- components: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address',
- },
- {
- internalType: 'uint96',
- name: 'amount',
- type: 'uint96',
- },
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- ],
- indexed: false,
- internalType: 'struct TaikoData.EthDeposit',
- name: 'deposit',
- type: 'tuple',
- },
- ],
- name: 'EthDeposited',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: 'uint8',
- name: 'version',
- type: 'uint8',
- },
- ],
- name: 'Initialized',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: 'address',
- name: 'previousOwner',
- type: 'address',
- },
- {
- indexed: true,
- internalType: 'address',
- name: 'newOwner',
- type: 'address',
- },
- ],
- name: 'OwnershipTransferred',
- type: 'event',
- },
- {
- inputs: [],
- name: 'addressManager',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'canDepositEthToL2',
- outputs: [
- {
- internalType: 'bool',
- name: '',
- type: 'bool',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address',
- },
- ],
- name: 'depositEtherToL2',
- outputs: [],
- stateMutability: 'payable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'depositTaikoToken',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- ],
- name: 'getBlock',
- outputs: [
- {
- internalType: 'bytes32',
- name: '_metaHash',
- type: 'bytes32',
- },
- {
- internalType: 'uint32',
- name: '_gasLimit',
- type: 'uint32',
- },
- {
- internalType: 'uint24',
- name: '_nextForkChoiceId',
- type: 'uint24',
- },
- {
- internalType: 'uint24',
- name: '_verifiedForkChoiceId',
- type: 'uint24',
- },
- {
- internalType: 'bool',
- name: '_proverReleased',
- type: 'bool',
- },
- {
- internalType: 'address',
- name: '_proposer',
- type: 'address',
- },
- {
- internalType: 'uint32',
- name: '_feePerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint64',
- name: '_proposedAt',
- type: 'uint64',
- },
- {
- internalType: 'address',
- name: '_assignedProver',
- type: 'address',
- },
- {
- internalType: 'uint32',
- name: '_rewardPerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint64',
- name: '_proofWindow',
- type: 'uint64',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint32',
- name: 'gasLimit',
- type: 'uint32',
- },
- ],
- name: 'getBlockFee',
- outputs: [
- {
- internalType: 'uint64',
- name: '',
- type: 'uint64',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'getConfig',
- outputs: [
- {
- components: [
- {
- internalType: 'uint256',
- name: 'chainId',
- type: 'uint256',
- },
- {
- internalType: 'bool',
- name: 'relaySignalRoot',
- type: 'bool',
- },
- {
- internalType: 'uint256',
- name: 'blockMaxProposals',
- type: 'uint256',
- },
- {
- internalType: 'uint256',
- name: 'blockRingBufferSize',
- type: 'uint256',
- },
- {
- internalType: 'uint256',
- name: 'blockMaxVerificationsPerTx',
- type: 'uint256',
- },
- {
- internalType: 'uint32',
- name: 'blockMaxGasLimit',
- type: 'uint32',
- },
- {
- internalType: 'uint32',
- name: 'blockFeeBaseGas',
- type: 'uint32',
- },
- {
- internalType: 'uint64',
- name: 'blockMaxTransactions',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'blockMaxTxListBytes',
- type: 'uint64',
- },
- {
- internalType: 'uint256',
- name: 'blockTxListExpiry',
- type: 'uint256',
- },
- {
- internalType: 'uint256',
- name: 'proofRegularCooldown',
- type: 'uint256',
- },
- {
- internalType: 'uint256',
- name: 'proofOracleCooldown',
- type: 'uint256',
- },
- {
- internalType: 'uint16',
- name: 'proofMinWindow',
- type: 'uint16',
- },
- {
- internalType: 'uint16',
- name: 'proofMaxWindow',
- type: 'uint16',
- },
- {
- internalType: 'uint256',
- name: 'ethDepositRingBufferSize',
- type: 'uint256',
- },
- {
- internalType: 'uint64',
- name: 'ethDepositMinCountPerBlock',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'ethDepositMaxCountPerBlock',
- type: 'uint64',
- },
- {
- internalType: 'uint96',
- name: 'ethDepositMinAmount',
- type: 'uint96',
- },
- {
- internalType: 'uint96',
- name: 'ethDepositMaxAmount',
- type: 'uint96',
- },
- {
- internalType: 'uint256',
- name: 'ethDepositGas',
- type: 'uint256',
- },
- {
- internalType: 'uint256',
- name: 'ethDepositMaxFee',
- type: 'uint256',
- },
- {
- internalType: 'uint8',
- name: 'rewardOpenMultipler',
- type: 'uint8',
- },
- {
- internalType: 'uint256',
- name: 'rewardOpenMaxCount',
- type: 'uint256',
- },
- ],
- internalType: 'struct TaikoData.Config',
- name: '',
- type: 'tuple',
- },
- ],
- stateMutability: 'pure',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- ],
- name: 'getCrossChainBlockHash',
- outputs: [
- {
- internalType: 'bytes32',
- name: '',
- type: 'bytes32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- ],
- name: 'getCrossChainSignalRoot',
- outputs: [
- {
- internalType: 'bytes32',
- name: '',
- type: 'bytes32',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- internalType: 'bytes32',
- name: 'parentHash',
- type: 'bytes32',
- },
- {
- internalType: 'uint32',
- name: 'parentGasUsed',
- type: 'uint32',
- },
- ],
- name: 'getForkChoice',
- outputs: [
- {
- components: [
- {
- internalType: 'bytes32',
- name: 'key',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'blockHash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'signalRoot',
- type: 'bytes32',
- },
- {
- internalType: 'address',
- name: 'prover',
- type: 'address',
- },
- {
- internalType: 'uint64',
- name: 'provenAt',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'gasUsed',
- type: 'uint32',
- },
- ],
- internalType: 'struct TaikoData.ForkChoice',
- name: '',
- type: 'tuple',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [],
- name: 'getStateVariables',
- outputs: [
- {
- components: [
- {
- internalType: 'uint32',
- name: 'feePerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint64',
- name: 'genesisHeight',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'genesisTimestamp',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'numBlocks',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'lastVerifiedBlockId',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'nextEthDepositToProcess',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'numEthDeposits',
- type: 'uint64',
- },
- ],
- internalType: 'struct TaikoData.StateVariables',
- name: '',
- type: 'tuple',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'addr',
- type: 'address',
- },
- ],
- name: 'getTaikoTokenBalance',
- outputs: [
- {
- internalType: 'uint256',
- name: '',
- type: 'uint256',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint16',
- name: 'id',
- type: 'uint16',
- },
- ],
- name: 'getVerifierName',
- outputs: [
- {
- internalType: 'bytes32',
- name: '',
- type: 'bytes32',
- },
- ],
- stateMutability: 'pure',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: '_addressManager',
- type: 'address',
- },
- {
- internalType: 'bytes32',
- name: '_genesisBlockHash',
- type: 'bytes32',
- },
- {
- internalType: 'uint32',
- name: '_initFeePerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint16',
- name: '_initAvgProofDelay',
- type: 'uint16',
- },
- ],
- name: 'init',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'owner',
- outputs: [
- {
- internalType: 'address',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'bytes',
- name: 'input',
- type: 'bytes',
- },
- {
- internalType: 'bytes',
- name: 'txList',
- type: 'bytes',
- },
- ],
- name: 'proposeBlock',
- outputs: [
- {
- components: [
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'timestamp',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'l1Height',
- type: 'uint64',
- },
- {
- internalType: 'bytes32',
- name: 'l1Hash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'mixHash',
- type: 'bytes32',
- },
- {
- internalType: 'bytes32',
- name: 'txListHash',
- type: 'bytes32',
- },
- {
- internalType: 'uint24',
- name: 'txListByteStart',
- type: 'uint24',
- },
- {
- internalType: 'uint24',
- name: 'txListByteEnd',
- type: 'uint24',
- },
- {
- internalType: 'uint32',
- name: 'gasLimit',
- type: 'uint32',
- },
- {
- internalType: 'address',
- name: 'beneficiary',
- type: 'address',
- },
- {
- internalType: 'address',
- name: 'treasury',
- type: 'address',
- },
- {
- components: [
- {
- internalType: 'address',
- name: 'recipient',
- type: 'address',
- },
- {
- internalType: 'uint96',
- name: 'amount',
- type: 'uint96',
- },
- {
- internalType: 'uint64',
- name: 'id',
- type: 'uint64',
- },
- ],
- internalType: 'struct TaikoData.EthDeposit[]',
- name: 'depositsProcessed',
- type: 'tuple[]',
- },
- ],
- internalType: 'struct TaikoData.BlockMetadata',
- name: 'meta',
- type: 'tuple',
- },
- ],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'blockId',
- type: 'uint256',
- },
- {
- internalType: 'bytes',
- name: 'input',
- type: 'bytes',
- },
- ],
- name: 'proveBlock',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'renounceOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'chainId',
- type: 'uint256',
- },
- {
- internalType: 'bytes32',
- name: 'name',
- type: 'bytes32',
- },
- {
- internalType: 'bool',
- name: 'allowZeroAddress',
- type: 'bool',
- },
- ],
- name: 'resolve',
- outputs: [
- {
- internalType: 'address payable',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'bytes32',
- name: 'name',
- type: 'bytes32',
- },
- {
- internalType: 'bool',
- name: 'allowZeroAddress',
- type: 'bool',
- },
- ],
- name: 'resolve',
- outputs: [
- {
- internalType: 'address payable',
- name: '',
- type: 'address',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'newAddressManager',
- type: 'address',
- },
- ],
- name: 'setAddressManager',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [],
- name: 'state',
- outputs: [
- {
- internalType: 'uint64',
- name: 'genesisHeight',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'genesisTimestamp',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: '__reserved70',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: '__reserved71',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'numOpenBlocks',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'numEthDeposits',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'numBlocks',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'nextEthDepositToProcess',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'lastVerifiedAt',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: 'lastVerifiedBlockId',
- type: 'uint64',
- },
- {
- internalType: 'uint64',
- name: '__reserved90',
- type: 'uint64',
- },
- {
- internalType: 'uint32',
- name: 'feePerGas',
- type: 'uint32',
- },
- {
- internalType: 'uint16',
- name: 'avgProofDelay',
- type: 'uint16',
- },
- ],
- stateMutability: 'view',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'address',
- name: 'newOwner',
- type: 'address',
- },
- ],
- name: 'transferOwnership',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'maxBlocks',
- type: 'uint256',
- },
- ],
- name: 'verifyBlocks',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- internalType: 'uint256',
- name: 'amount',
- type: 'uint256',
- },
- ],
- name: 'withdrawTaikoToken',
- outputs: [],
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- stateMutability: 'payable',
- type: 'receive',
- },
-];
diff --git a/packages/pos-dashboard/src/constants/envVars.ts b/packages/pos-dashboard/src/constants/envVars.ts
deleted file mode 100644
index 1c54530dc91..00000000000
--- a/packages/pos-dashboard/src/constants/envVars.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import type { ChainID } from '../domain/chain';
-
-export const L1_CHAIN_ID: ChainID = parseInt(import.meta.env?.VITE_L1_CHAIN_ID);
-
-export const L1_CHAIN_NAME: string = import.meta.env?.VITE_L1_CHAIN_NAME;
-
-export const L1_RPC: string = import.meta.env?.VITE_L1_RPC_URL;
-
-export const L1_EXPLORER_URL: string = import.meta.env?.VITE_L1_EXPLORER_URL;
-
-export const WALLETCONNECT_PROJECT_ID: string = import.meta.env
- ?.VITE_WALLETCONNECT_PROJECT_ID;
-
-export const EVENT_INDEXER_API_URL: string = import.meta.env
- ?.VITE_EVENT_INDEXER_URL;
-
-export const PROVER_POOL_ADDRESS: string = import.meta.env
- ?.VITE_PROVER_POOL_ADDRESS;
-
-export const TAIKO_L1_ADDRESS: string = import.meta.env?.VITE_TAIKO_L1_ADDRESS;
-
-export const TTKO_ADDRESS: string = import.meta.env?.VITE_TTKO_ADDRESS;
diff --git a/packages/pos-dashboard/src/domain/api.ts b/packages/pos-dashboard/src/domain/api.ts
deleted file mode 100644
index 4e19548a78a..00000000000
--- a/packages/pos-dashboard/src/domain/api.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import type { BigNumber } from 'ethers';
-import type { ChainID } from './chain';
-
-export type PaginationInfo = {
- page: number;
- size: number;
- max_page: number;
- total_pages: number;
- total: number;
- last: boolean;
- first: boolean;
-};
-
-export type TransactionData = {
- Raw: {
- address: string;
- transactionHash: string;
- transactionIndex: string;
- };
-};
-
-export type APIResponseEvent = {
- id: number;
- name: string;
- data: TransactionData;
- status: number;
- eventType: number;
- chainID: number;
- canonicalTokenAddress: string;
- canonicalTokenSymbol: string;
- canonicalTokenName: string;
- canonicalTokenDecimals: number;
- amount: string;
- msgHash: string;
- messageOwner: string;
- event: string;
- assignedProver: string;
- blockID: { Int64: number; Valid: boolean };
-};
-
-export type APIResponse = PaginationInfo & {
- items: APIResponseEvent[];
- visible: number;
-};
diff --git a/packages/pos-dashboard/src/domain/block.ts b/packages/pos-dashboard/src/domain/block.ts
deleted file mode 100644
index 662fdffd666..00000000000
--- a/packages/pos-dashboard/src/domain/block.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-export type Block = {
- number: number;
- hash: string;
- parentHash: string;
- nonce: number;
- sha3Uncles: string;
- logsBloom: string[] | string;
- transactionsRoot: string;
- stateRoot: string;
- receiptsRoot: string;
- miner: string;
- difficulty: number;
- totalDifficulty: number;
- extraData: string;
- size: number;
- gasLimit: number;
- gasUsed: number;
- timestamp: number;
- transactions: string[];
- uncles: string[];
- baseFeePerGas?: string;
- mixHash: string;
- withdrawalsRoot?: string;
-};
diff --git a/packages/pos-dashboard/src/domain/button.ts b/packages/pos-dashboard/src/domain/button.ts
deleted file mode 100644
index 3d9456c3726..00000000000
--- a/packages/pos-dashboard/src/domain/button.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// TODO: still to figure out after design
-
-export type TypeButton = 'primary' | 'secondary' | 'accent' | ''; // TODO: daisyUI?
-
-export type SizeButton = 'sm' | 'md' | 'lg';
diff --git a/packages/pos-dashboard/src/domain/chain.ts b/packages/pos-dashboard/src/domain/chain.ts
deleted file mode 100644
index e807340df34..00000000000
--- a/packages/pos-dashboard/src/domain/chain.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { ComponentType } from 'svelte';
-
-export type ChainID = number;
-
-export type Chain = {
- id: ChainID;
- name: string;
- rpc: string;
- enabled?: boolean;
- icon?: ComponentType;
- explorerUrl: string;
-};
diff --git a/packages/pos-dashboard/src/domain/modal.ts b/packages/pos-dashboard/src/domain/modal.ts
deleted file mode 100644
index b92130ca937..00000000000
--- a/packages/pos-dashboard/src/domain/modal.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export type NoticeOpenArgs = {
- name?: string;
- title?: string;
- onConfirm?: (informed: boolean) => void;
-};
-
-export type NoticeModalOpenMethod = (args: NoticeOpenArgs) => void;
diff --git a/packages/pos-dashboard/src/domain/prover.ts b/packages/pos-dashboard/src/domain/prover.ts
deleted file mode 100644
index 4b0bf8829bd..00000000000
--- a/packages/pos-dashboard/src/domain/prover.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import type { BigNumber } from 'ethers';
-
-export type Prover = {
- currentCapacity: number;
- address: string;
- stakedAmount: BigNumber;
- amountStaked: BigNumber; // stupid hack
- rewardPerGas: number;
-};
-
-export type ProversResp = {
- provers: Array;
-};
diff --git a/packages/pos-dashboard/src/domain/provider.ts b/packages/pos-dashboard/src/domain/provider.ts
deleted file mode 100644
index 791351625a8..00000000000
--- a/packages/pos-dashboard/src/domain/provider.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import type { providers } from 'ethers';
-
-import type { ChainID } from './chain';
-
-export type ProvidersRecord = Record;
diff --git a/packages/pos-dashboard/src/domain/staker.ts b/packages/pos-dashboard/src/domain/staker.ts
deleted file mode 100644
index 3b71bf638ee..00000000000
--- a/packages/pos-dashboard/src/domain/staker.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { BigNumber } from 'ethers';
-
-type Staker = {
- exitRequestedAt: BigNumber;
- exitAmount: BigNumber;
- maxCapacity: BigNumber;
- proverId: number;
-};
-
-export { Staker };
diff --git a/packages/pos-dashboard/src/domain/transaction.ts b/packages/pos-dashboard/src/domain/transaction.ts
deleted file mode 100644
index d23747e7723..00000000000
--- a/packages/pos-dashboard/src/domain/transaction.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { BigNumber, ethers } from 'ethers';
-
-import type { ChainID } from './chain';
-import type { Message, MessageStatus } from './message';
-
-// We need this enums for the UI
-export enum TxExtendedStatus {
- Pending = 'Pending',
- Claiming = 'Claiming',
- Releasing = 'Releasing',
- Released = 'Released',
-}
-
-export type TxUIStatus = MessageStatus | TxExtendedStatus;
-
-export type TransactionReceipt = ethers.providers.TransactionReceipt;
-
-export type BridgeTransaction = {
- hash: string;
- from: string;
- receipt?: TransactionReceipt;
- status: TxUIStatus;
- msgHash?: string;
- message?: Message;
- interval?: NodeJS.Timer;
- amount?: BigNumber;
- symbol?: string;
- decimals?: number;
- srcChainId: ChainID;
- destChainId: ChainID;
-};
-
-export interface Transactioner {
- getAllByAddress(
- address: string,
- chainID?: number,
- ): Promise;
-
- getTransactionByHash(
- address: string,
- hash: string,
- ): Promise;
-
- updateStorageByAddress(address: string, txs: BridgeTransaction[]): void;
-}
-
-export enum ReceiptStatus {
- Failed = 0,
- Successful = 1,
-}
diff --git a/packages/pos-dashboard/src/globals.d.ts b/packages/pos-dashboard/src/globals.d.ts
deleted file mode 100644
index 1c230e6b869..00000000000
--- a/packages/pos-dashboard/src/globals.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-declare module '@lottiefiles/svelte-lottie-player';
-declare module 'identicon.js';
diff --git a/packages/pos-dashboard/src/i18n.ts b/packages/pos-dashboard/src/i18n.ts
deleted file mode 100644
index a1c873601f1..00000000000
--- a/packages/pos-dashboard/src/i18n.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { _, dictionary, locale } from 'svelte-i18n';
-
-function setupI18n({ withLocale: _locale } = { withLocale: 'en' }) {
- dictionary.set({
- en: {
- home: {
- title: 'Taiko Bridge',
- selectToken: 'Select Token',
- to: 'To',
- bridge: 'Bridge',
- approve: 'Approve',
- },
- bridgeForm: {
- fieldLabel: 'Amount',
- maxLabel: 'Max',
- balance: 'Balance',
- processingFeeLabel: 'Processing Fee',
- bridge: 'Bridge',
- approve: 'Approve',
- },
- nav: {
- connect: 'Connect Wallet',
- },
- transaction: {
- pending: 'Pending',
- claim: 'Claim',
- retry: 'Retry',
- release: 'Release',
- claimed: 'Claimed',
- released: 'Released',
- failed: 'Failed',
- },
- toast: {
- transactionSent: 'Transaction sent',
- transactionCompleted: 'Transaction completed!',
- errorWrongNetwork:
- 'You are connected to the wrong chain in your wallet',
- errorSendingTransaction: 'Error sending transaction',
- errorDisconnecting: 'Could not disconnect',
- errorInsufficientBalance: 'Insufficient ETH balance',
- errorCheckingAllowance: 'Error checking allowance',
- fundsClaimed: 'Funds claimed successfully!',
- fundsReleased: 'Funds released successfully!',
- },
- switchChainModal: {
- title: 'Not on the right network',
- subtitle: 'Your current network is not supported. Please select one:',
- },
- connectModal: {
- title: 'Connect Wallet',
- },
- },
- });
-
- locale.set(_locale);
-}
-
-export { _, setupI18n };
diff --git a/packages/pos-dashboard/src/pages/home/Home.svelte b/packages/pos-dashboard/src/pages/home/Home.svelte
deleted file mode 100644
index f2371117f2f..00000000000
--- a/packages/pos-dashboard/src/pages/home/Home.svelte
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
- {@const tab1 = tabsRoute[0]}
- {@const tab2 = tabsRoute[1]}
- {@const tab3 = tabsRoute[2]}
- {@const tab4 = tabsRoute[3]}
- {@const tab5 = tabsRoute[4]}
-
-
- Stake
- History
- Prover Info
- Current Provers
- Taiko Token
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/pos-dashboard/src/provider/providers.ts b/packages/pos-dashboard/src/provider/providers.ts
deleted file mode 100644
index 37dd24aee3b..00000000000
--- a/packages/pos-dashboard/src/provider/providers.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { ethers } from 'ethers';
-
-import { L1_CHAIN_ID, L1_RPC } from '../constants/envVars';
-import type { ChainID } from '../domain/chain';
-
-export const providers: Record<
- ChainID,
- ethers.providers.StaticJsonRpcProvider
-> = {
- [L1_CHAIN_ID]: new ethers.providers.StaticJsonRpcProvider(
- L1_RPC,
- L1_CHAIN_ID,
- ),
-};
diff --git a/packages/pos-dashboard/src/storage/services.ts b/packages/pos-dashboard/src/storage/services.ts
deleted file mode 100644
index d6db9949817..00000000000
--- a/packages/pos-dashboard/src/storage/services.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { providers } from '../provider/providers';
-import { StorageService } from './StorageService';
-
-export const storageService = new StorageService(localStorage, providers);
diff --git a/packages/pos-dashboard/src/store/chain.ts b/packages/pos-dashboard/src/store/chain.ts
deleted file mode 100644
index 60aca5c1076..00000000000
--- a/packages/pos-dashboard/src/store/chain.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { writable } from 'svelte/store';
-
-import type { Chain } from '../domain/chain';
-
-export const srcChain = writable();
diff --git a/packages/pos-dashboard/src/store/modal.ts b/packages/pos-dashboard/src/store/modal.ts
deleted file mode 100644
index 74302cf0a46..00000000000
--- a/packages/pos-dashboard/src/store/modal.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { writable } from 'svelte/store';
-
-export const isSwitchChainModalOpen = writable();
diff --git a/packages/pos-dashboard/src/store/signer.ts b/packages/pos-dashboard/src/store/signer.ts
deleted file mode 100644
index 788e7f5abd8..00000000000
--- a/packages/pos-dashboard/src/store/signer.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import type { Signer } from 'ethers';
-import { writable } from 'svelte/store';
-
-export const signer = writable();
diff --git a/packages/pos-dashboard/src/store/transaction.ts b/packages/pos-dashboard/src/store/transaction.ts
deleted file mode 100644
index 27f852c33d3..00000000000
--- a/packages/pos-dashboard/src/store/transaction.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { ethers, type Signer, type Transaction } from 'ethers';
-import { writable } from 'svelte/store';
-
-import type { TransactionReceipt } from '../domain/transaction';
-import { Deferred } from '../utils/Deferred';
-import { getLogger } from '../utils/logger';
-
-const log = getLogger('store:transactions');
-
-export const transactions = writable([]);
-
-// Custom store: pendingTransactions
-const { subscribe, set, update } = writable([]);
-export const pendingTransactions = {
- /**
- * We're creating here a custom store, which is a writable store.
- * We must stick to the store contract, which is:
- */
- set,
- subscribe,
- // update, // this method is optional.
-
- /**
- * Custom method, which will help us add a new transaction to the store
- * and get it removed onces the transaction is mined.
- */
- add: (tx: Transaction, signer: Signer) => {
- const deferred = new Deferred();
-
- update((txs: Transaction[]) => {
- // New array with the new transaction appended
- const newPendingTransactions = [...txs, tx];
-
- // Next step is to wait for the transaction to be mined
- // before removing it from the store.
-
- /**
- * Returns a Promise which will not resolve until transactionHash is mined.
- * If confirms is 0, this method is non-blocking and if the transaction
- * has not been mined returns null. Otherwise, this method will block until
- * the transaction has confirms blocks mined on top of the block in which
- * is was mined.
- * See https://docs.ethers.org/v5/api/providers/provider/#Provider-waitForTransaction
- */
- signer.provider
- .waitForTransaction(tx.hash, 1, 5 * 60 * 1000) // 5 min timeout. TODO: config?
- .then((receipt) => {
- log('Transaction mined with receipt', receipt);
-
- log(`Removing transaction "${tx.hash}" from store`);
- update((txs: Transaction[]) =>
- // Filter out the transaction with the given hash
- txs.filter((_tx) => _tx.hash !== tx.hash),
- );
-
- // Resolves or rejects the promise depending on the transaction status.
- if (receipt.status === 1) {
- log('Transaction successful');
- deferred.resolve(receipt);
- } else {
- deferred.reject(
- new Error('transaction failed', { cause: receipt }),
- );
- }
- })
- .catch((error) => {
- if (error?.code === ethers.errors.TIMEOUT) {
- deferred.reject(
- new Error('timeout while waiting for transaction to be mined', {
- cause: error,
- }),
- );
- } else {
- deferred.reject(
- new Error('transaction failed', {
- cause: error,
- }),
- );
- }
- });
-
- return newPendingTransactions;
- });
-
- // TODO: return deferred object instead, so we can cancel the promise
- // in case we need it, e.g.: poller picks up already claimed transaction
- // by the relayer, in which case we don't need to wait for this transaction
- // to finish
- return deferred.promise;
- },
-};
diff --git a/packages/pos-dashboard/src/styles/app.css b/packages/pos-dashboard/src/styles/app.css
deleted file mode 100644
index 68a72ee33e6..00000000000
--- a/packages/pos-dashboard/src/styles/app.css
+++ /dev/null
@@ -1,14 +0,0 @@
-@import './base.css';
-@import './components.css';
-@import './utilities.css';
-
-@import './override.css';
-@import './logo.css';
-
-[data-theme='dark'] .switch-to-dark-mode {
- display: none;
-}
-
-[data-theme='light'] .switch-to-light-mode {
- display: none;
-}
diff --git a/packages/pos-dashboard/src/styles/base.css b/packages/pos-dashboard/src/styles/base.css
deleted file mode 100644
index 40a867745aa..00000000000
--- a/packages/pos-dashboard/src/styles/base.css
+++ /dev/null
@@ -1,7 +0,0 @@
-@tailwind base;
-
-@layer base {
- html {
- font-family: Public Sans, system-ui, sans-serif;
- }
-}
diff --git a/packages/pos-dashboard/src/styles/components.css b/packages/pos-dashboard/src/styles/components.css
deleted file mode 100644
index 020aabafdea..00000000000
--- a/packages/pos-dashboard/src/styles/components.css
+++ /dev/null
@@ -1 +0,0 @@
-@tailwind components;
diff --git a/packages/pos-dashboard/src/styles/logo.css b/packages/pos-dashboard/src/styles/logo.css
deleted file mode 100644
index 91f492bec07..00000000000
--- a/packages/pos-dashboard/src/styles/logo.css
+++ /dev/null
@@ -1,21 +0,0 @@
-.taiko-logo {
- display: none;
-}
-
-[data-theme='dark'] .taiko-logo {
- display: inline;
-}
-
-[data-theme='dark'] .taiko-light-logo {
- display: none;
-}
-
-@media screen and (max-width: 768px) {
- [data-theme='dark'] .taiko-logo {
- display: none;
- }
-
- [data-theme='light'] .taiko-light-logo {
- display: none;
- }
-}
diff --git a/packages/pos-dashboard/src/styles/override.css b/packages/pos-dashboard/src/styles/override.css
deleted file mode 100644
index e594307e9ee..00000000000
--- a/packages/pos-dashboard/src/styles/override.css
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Remove Arrows/Spinners */
-
-/* Chrome, Safari, Edge, Opera */
-input::-webkit-outer-spin-button,
-input::-webkit-inner-spin-button {
- -webkit-appearance: none;
- margin: 0;
-}
-
-/* Firefox */
-input[type='number'] {
- -moz-appearance: textfield;
-}
-
-/* Invert accent button colors */
-.btn.btn-accent {
- background-color: hsla(var(--af) / var(--tw-bg-opacity, 1));
- border-color: hsla(var(--af) / var(--tw-bg-opacity, 1));
-}
diff --git a/packages/pos-dashboard/src/styles/utilities.css b/packages/pos-dashboard/src/styles/utilities.css
deleted file mode 100644
index 65dd5f63a7d..00000000000
--- a/packages/pos-dashboard/src/styles/utilities.css
+++ /dev/null
@@ -1 +0,0 @@
-@tailwind utilities;
diff --git a/packages/pos-dashboard/src/utils/Deferred.spec.ts b/packages/pos-dashboard/src/utils/Deferred.spec.ts
deleted file mode 100644
index 8ddebab418d..00000000000
--- a/packages/pos-dashboard/src/utils/Deferred.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Deferred } from './Deferred';
-
-describe('Deferred', () => {
- it('should resolve', async () => {
- const deferred = new Deferred();
- deferred.resolve('test');
-
- try {
- await expect(deferred.promise).resolves.toBe('test');
- } catch (e) {
- throw Error('This should never happen');
- }
- });
-
- it('should reject', async () => {
- const deferred = new Deferred();
- deferred.reject('test');
-
- try {
- await deferred.promise;
- } catch (err) {
- expect(err).toBe('test');
- }
- });
-});
diff --git a/packages/pos-dashboard/src/utils/Deferred.ts b/packages/pos-dashboard/src/utils/Deferred.ts
deleted file mode 100644
index 36ef1b9f389..00000000000
--- a/packages/pos-dashboard/src/utils/Deferred.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export class Deferred {
- public promise: Promise;
- public resolve: (value?: T) => void;
- public reject: (reason?: unknown) => void;
-
- constructor() {
- this.promise = new Promise((resolve, reject) => {
- this.resolve = resolve;
- this.reject = reject;
- });
- }
-}
diff --git a/packages/pos-dashboard/src/utils/addressAvatar.spec.ts b/packages/pos-dashboard/src/utils/addressAvatar.spec.ts
deleted file mode 100644
index 30ac9f5c19f..00000000000
--- a/packages/pos-dashboard/src/utils/addressAvatar.spec.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import Identicon from 'identicon.js';
-
-import {
- DEFAULT_IDENTICON,
- getAddressAvatarFromIdenticon,
-} from './addressAvatar';
-
-it('should return a base64 avatar string', () => {
- const dummyAddress = '0x63FaC9201494f0bd17B9892B9fae4d52fe3BD377';
- const expectedIdenticonString = new Identicon(dummyAddress, 420).toString();
-
- expect(getAddressAvatarFromIdenticon(dummyAddress)).toStrictEqual(
- expectedIdenticonString,
- );
-});
-
-it('should return default base64 avatar when no address is passed', () => {
- expect(getAddressAvatarFromIdenticon('')).toStrictEqual(DEFAULT_IDENTICON);
-});
diff --git a/packages/pos-dashboard/src/utils/addressAvatar.ts b/packages/pos-dashboard/src/utils/addressAvatar.ts
deleted file mode 100644
index 63d3cb88be8..00000000000
--- a/packages/pos-dashboard/src/utils/addressAvatar.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { ethers } from 'ethers';
-import Identicon from 'identicon.js';
-
-export const DEFAULT_IDENTICON = new Identicon(
- 'c157a79031e1c40f85931829bc5fc552',
- {
- foreground: [0, 0, 0, 255],
- background: [255, 255, 255, 255],
- margin: 0.2,
- size: 420,
- },
-).toString();
-
-export const getAddressAvatarFromIdenticon = (address: string): string => {
- if (!address || !ethers.utils.isAddress(address)) {
- return DEFAULT_IDENTICON;
- }
-
- const data = new Identicon(address, 420).toString();
- return data;
-};
diff --git a/packages/pos-dashboard/src/utils/addressSubsection.spec.ts b/packages/pos-dashboard/src/utils/addressSubsection.spec.ts
deleted file mode 100644
index 03f371d1a8c..00000000000
--- a/packages/pos-dashboard/src/utils/addressSubsection.spec.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { addressSubsection } from './addressSubsection';
-
-it('should return string with prefix and suffix', () => {
- const dummyAddress = '0x63FaC9201494f0bd17B9892B9fae4d52fe3BD377';
-
- expect(addressSubsection(dummyAddress)).toStrictEqual('0x63F…D377');
-});
-
-it('should return 0x if empty', () => {
- expect(addressSubsection('')).toStrictEqual('0x');
-});
diff --git a/packages/pos-dashboard/src/utils/addressSubsection.ts b/packages/pos-dashboard/src/utils/addressSubsection.ts
deleted file mode 100644
index 93322f00326..00000000000
--- a/packages/pos-dashboard/src/utils/addressSubsection.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const addressSubsection = (address: string) => {
- if (!address) return '0x';
- return `${address.substring(0, 5)}…${address.substring(38, 42)}`;
-};
diff --git a/packages/pos-dashboard/src/utils/depositTaikoToken.ts b/packages/pos-dashboard/src/utils/depositTaikoToken.ts
deleted file mode 100644
index 46daf1a7cf1..00000000000
--- a/packages/pos-dashboard/src/utils/depositTaikoToken.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import TaikoL1 from '../constants/abi/TaikoL1';
-
-export const depositTaikoToken = async (
- signer: ethers.Signer,
- contractAddress: string,
- amount: BigNumber,
-): Promise => {
- const contract: Contract = new Contract(contractAddress, TaikoL1, signer);
- return await contract.depositTaikoToken(amount);
-};
diff --git a/packages/pos-dashboard/src/utils/getAssignedBlocks.ts b/packages/pos-dashboard/src/utils/getAssignedBlocks.ts
deleted file mode 100644
index c054a55edbc..00000000000
--- a/packages/pos-dashboard/src/utils/getAssignedBlocks.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import axios from 'axios';
-import type { ethers } from 'ethers';
-import type { APIResponse, APIResponseEvent } from 'src/domain/api';
-
-export const getAssignedBlocks = async (
- eventIndexerApiUrl: string,
- signer: ethers.Signer,
-): Promise => {
- const resp = await axios.get(
- `${eventIndexerApiUrl}/assignedBlocks`,
- {
- params: {
- address: await signer.getAddress(),
- },
- },
- );
- return resp.data.items.map((item) => {
- item.amount = '0';
- return item;
- });
-};
diff --git a/packages/pos-dashboard/src/utils/getBlocksProven.ts b/packages/pos-dashboard/src/utils/getBlocksProven.ts
deleted file mode 100644
index f51fa28e894..00000000000
--- a/packages/pos-dashboard/src/utils/getBlocksProven.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import axios from 'axios';
-import type { ethers } from 'ethers';
-import type { APIResponse, APIResponseEvent } from 'src/domain/api';
-
-export const getBlockProvenEvents = async (
- eventIndexerApiUrl: string,
- signer: ethers.Signer,
-): Promise => {
- const resp = await axios.get(`${eventIndexerApiUrl}/events`, {
- params: {
- event: 'BlockProven',
- address: await signer.getAddress(),
- },
- });
-
- return resp.data.items;
-};
diff --git a/packages/pos-dashboard/src/utils/getCurrentProvers.ts b/packages/pos-dashboard/src/utils/getCurrentProvers.ts
deleted file mode 100644
index 18f7e62fa5c..00000000000
--- a/packages/pos-dashboard/src/utils/getCurrentProvers.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { Prover, ProversResp } from '../domain/prover';
-
-export default async function getCurrentProvers(
- eventIndexerApiUrl?: string,
-): Promise> {
- const response = await fetch(`${eventIndexerApiUrl}/currentProvers`);
- const data = (await response.json()) as ProversResp;
-
- return data.provers || [];
-}
diff --git a/packages/pos-dashboard/src/utils/getExitedEvents.ts b/packages/pos-dashboard/src/utils/getExitedEvents.ts
deleted file mode 100644
index e24c3dfd8d5..00000000000
--- a/packages/pos-dashboard/src/utils/getExitedEvents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import axios from 'axios';
-import type { ethers } from 'ethers';
-import type { APIResponse, APIResponseEvent } from '../domain/api';
-
-export const getExitedEvents = async (
- eventIndexerApiUrl: string,
- signer: ethers.Signer,
-): Promise => {
- const resp = await axios.get(`${eventIndexerApiUrl}/events`, {
- params: {
- event: 'Exited',
- address: await signer.getAddress(),
- },
- });
-
- return resp.data.items;
-};
diff --git a/packages/pos-dashboard/src/utils/getProverInfo.ts b/packages/pos-dashboard/src/utils/getProverInfo.ts
deleted file mode 100644
index 83091c0e035..00000000000
--- a/packages/pos-dashboard/src/utils/getProverInfo.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import type { Prover } from '../domain/prover';
-import type { Staker } from '../domain/staker';
-import ProverPool from '../constants/abi/ProverPool';
-
-export const getProverInfo = async (
- provider: ethers.providers.Provider,
- contractAddress: string,
- userAddress: string,
-): Promise<{ prover: Prover; staker: Staker; address: string }> => {
- const contract: Contract = new Contract(
- contractAddress,
- ProverPool,
- provider,
- );
-
- const resp: { prover: Prover; staker: Staker; address: '' } = {
- staker: {
- maxCapacity: BigNumber.from(0),
- exitAmount: BigNumber.from(0),
- exitRequestedAt: BigNumber.from(0),
- proverId: 0,
- },
- prover: {
- currentCapacity: 0,
- address: '',
- stakedAmount: BigNumber.from(0),
- amountStaked: BigNumber.from(0),
- },
- address: '',
- };
- try {
- const staker = await contract.getStaker(userAddress);
-
- if (staker.staker.proverId !== 0) {
- const prover = await contract.proverIdToAddress(staker.staker.proverId);
- resp.prover = prover;
- resp.staker = staker.staker;
- resp.prover = staker.prover;
- resp.address = prover;
- }
- } catch (e) {
- console.error(e);
- }
- return resp;
-};
diff --git a/packages/pos-dashboard/src/utils/getProverRequirements.ts b/packages/pos-dashboard/src/utils/getProverRequirements.ts
deleted file mode 100644
index 45e4ce97c9a..00000000000
--- a/packages/pos-dashboard/src/utils/getProverRequirements.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import ProverPool from '../constants/abi/ProverPool';
-
-export const getProverRequirements = async (
- provider: ethers.providers.Provider,
- contractAddress: string,
-) => {
- const contract: Contract = new Contract(
- contractAddress,
- ProverPool,
- provider,
- );
-
- const minStakePerCapacity = await contract.MIN_STAKE_PER_CAPACITY();
- const minCapacity = await contract.MIN_CAPACITY();
-
- return { minStakePerCapacity, minCapacity };
-};
diff --git a/packages/pos-dashboard/src/utils/getSlashedTokensEvents.ts b/packages/pos-dashboard/src/utils/getSlashedTokensEvents.ts
deleted file mode 100644
index 4d71b90f349..00000000000
--- a/packages/pos-dashboard/src/utils/getSlashedTokensEvents.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import axios from 'axios';
-import type { ethers } from 'ethers';
-import type { APIResponse, APIResponseEvent } from 'src/domain/api';
-
-export const getSlashedTokensEvents = async (
- eventIndexerApiUrl: string,
- signer: ethers.Signer,
-): Promise => {
- if (!signer) return;
-
- const resp = await axios.get(`${eventIndexerApiUrl}/events`, {
- params: {
- event: 'Slashed',
- address: await signer.getAddress(),
- },
- });
-
- return resp.data.items;
-};
diff --git a/packages/pos-dashboard/src/utils/getStakedEvents.ts b/packages/pos-dashboard/src/utils/getStakedEvents.ts
deleted file mode 100644
index d48a488f40b..00000000000
--- a/packages/pos-dashboard/src/utils/getStakedEvents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import axios from 'axios';
-import type { ethers } from 'ethers';
-import type { APIResponse, APIResponseEvent } from '../domain/api';
-
-export const getStakedEvents = async (
- eventIndexerApiUrl: string,
- signer: ethers.Signer,
-): Promise => {
- const resp = await axios.get(`${eventIndexerApiUrl}/events`, {
- params: {
- event: 'Staked',
- address: await signer.getAddress(),
- },
- });
-
- return resp.data.items;
-};
diff --git a/packages/pos-dashboard/src/utils/getTTKOBalance.ts b/packages/pos-dashboard/src/utils/getTTKOBalance.ts
deleted file mode 100644
index c4a4419619b..00000000000
--- a/packages/pos-dashboard/src/utils/getTTKOBalance.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import ERC20 from '../constants/abi/ERC20';
-
-export const getTTKOBalance = async (
- provider: ethers.providers.Provider,
- contractAddress: string,
- userAddress: string,
-): Promise => {
- const contract: Contract = new Contract(contractAddress, ERC20, provider);
- return await contract.balanceOf(userAddress);
-};
diff --git a/packages/pos-dashboard/src/utils/getTaikoL1Balance.ts b/packages/pos-dashboard/src/utils/getTaikoL1Balance.ts
deleted file mode 100644
index 3242b94502a..00000000000
--- a/packages/pos-dashboard/src/utils/getTaikoL1Balance.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import TaikoL1 from '../constants/abi/TaikoL1';
-
-export const getTaikoL1Balance = async (
- provider: ethers.providers.Provider,
- contractAddress: string,
- userAddress: string,
-): Promise => {
- const contract: Contract = new Contract(contractAddress, TaikoL1, provider);
- return await contract.getTaikoTokenBalance(userAddress);
-};
diff --git a/packages/pos-dashboard/src/utils/getWithdrawnEvents.ts b/packages/pos-dashboard/src/utils/getWithdrawnEvents.ts
deleted file mode 100644
index cf294db4bc6..00000000000
--- a/packages/pos-dashboard/src/utils/getWithdrawnEvents.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import axios from 'axios';
-import type { ethers } from 'ethers';
-import type { APIResponse, APIResponseEvent } from '../domain/api';
-
-export const getWithdrawnEvents = async (
- eventIndexerApiUrl: string,
- signer: ethers.Signer,
-): Promise => {
- const resp = await axios.get(`${eventIndexerApiUrl}/events`, {
- params: {
- event: 'Withdrawn',
- address: await signer.getAddress(),
- },
- });
-
- return resp.data.items;
-};
diff --git a/packages/pos-dashboard/src/utils/injectedProvider.spec.ts b/packages/pos-dashboard/src/utils/injectedProvider.spec.ts
deleted file mode 100644
index 27dbce7592d..00000000000
--- a/packages/pos-dashboard/src/utils/injectedProvider.spec.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import { ethers } from 'ethers';
-
-import {
- getInjectedSigner,
- hasInjectedProvider,
- rpcCall,
-} from './injectedProvider';
-
-jest.mock('../constants/envVars');
-
-jest.mock('ethers', () => {
- const Web3Provider = jest.fn();
- Web3Provider.prototype = {
- getSigner: jest.fn(),
- send: jest.fn(),
- };
-
- return {
- ethers: {
- providers: {
- Web3Provider,
- },
- },
- };
-});
-
-beforeEach(() => {
- globalThis.ethereum = {
- isMetaMask: true,
- request: jest.fn(),
- };
-
- jest.clearAllMocks();
-});
-
-describe('injectedProvider - rpcCall', () => {
- it('should call rpc method', async () => {
- jest
- .mocked(ethers.providers.Web3Provider.prototype.send)
- .mockResolvedValueOnce('test value');
-
- const result = await rpcCall('eth_requestAccounts');
-
- expect(result).toEqual('test value');
- expect(ethers.providers.Web3Provider.prototype.send).toHaveBeenCalledWith(
- 'eth_requestAccounts',
- undefined,
- );
- });
-
- it('should throw error if rpc method fails', async () => {
- jest
- .mocked(ethers.providers.Web3Provider.prototype.send)
- .mockRejectedValue(new Error('test error'));
-
- await expect(rpcCall('eth_requestAccounts')).rejects.toThrowError(
- 'RPC call "eth_requestAccounts" failed',
- );
- });
-});
-
-describe('injectedProvider - getInjectedSigner', () => {
- it('should return signer', () => {
- const mockSigner = {} as ethers.providers.JsonRpcSigner;
- jest
- .mocked(ethers.providers.Web3Provider.prototype.getSigner)
- .mockReturnValue(mockSigner);
-
- expect(getInjectedSigner()).toEqual(mockSigner);
-
- expect(ethers.providers.Web3Provider).toHaveBeenCalledWith(
- globalThis.ethereum,
- 'any',
- );
- });
-});
-
-describe('injectedProvider - hasInjectedProvider', () => {
- it('should return true if injected provider is available', () => {
- expect(hasInjectedProvider()).toBeTruthy();
- });
-
- it('should return false if injected provider is not available', () => {
- globalThis.ethereum = undefined;
-
- expect(hasInjectedProvider()).toBeFalsy();
- });
-});
diff --git a/packages/pos-dashboard/src/utils/injectedProvider.ts b/packages/pos-dashboard/src/utils/injectedProvider.ts
deleted file mode 100644
index 0855cb61fb3..00000000000
--- a/packages/pos-dashboard/src/utils/injectedProvider.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import { ethers } from 'ethers';
-
-import { getLogger } from './logger';
-
-type Network = {
- name: string;
- chainId: number;
- ensAddress?: string;
-};
-
-type Networkish = Network | string | number;
-
-type RPCMethod =
- | 'eth_requestAccounts'
- | 'wallet_watchAsset'
- | 'wallet_addEthereumChain';
-
-const log = getLogger('util:injectedProvider');
-
-export const errorCodes = {
- rpc: {
- invalidInput: -32000,
- resourceNotFound: -32001,
- resourceUnavailable: -32002,
- transactionRejected: -32003,
- methodNotSupported: -32004,
- limitExceeded: -32005,
- parse: -32700,
- invalidRequest: -32600,
- methodNotFound: -32601,
- invalidParams: -32602,
- internal: -32603,
- },
- provider: {
- userRejectedRequest: 4001,
- unauthorized: 4100,
- unsupportedMethod: 4200,
- disconnected: 4900,
- chainDisconnected: 4901,
- },
-};
-
-export function getInjectedProvider(network: Networkish = 'any') {
- return new ethers.providers.Web3Provider(
- // The globalThis property provides a standard way of accessing the global this value
- // across environments (e.g. unit tests in Node vs browser)
- globalThis.ethereum,
- network,
- );
-}
-
-export function getInjectedSigner(
- network: Networkish = 'any',
- addressOrIndex?: string | number,
-) {
- return getInjectedProvider(network).getSigner(addressOrIndex);
-}
-
-// The type definition for provider.send method is actually incorrect, hence:
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export async function rpcCall(method: RPCMethod, params?: any) {
- const provider = getInjectedProvider();
-
- log(`RPC call "${method}" with params`, params);
-
- try {
- return await provider.send(method, params);
- } catch (error) {
- console.error(error);
-
- throw new Error(`RPC call "${method}" failed`, { cause: error });
- }
-}
-
-export function hasInjectedProvider() {
- return Boolean(globalThis.ethereum);
-}
diff --git a/packages/pos-dashboard/src/utils/isMobileDevice.ts b/packages/pos-dashboard/src/utils/isMobileDevice.ts
deleted file mode 100644
index 5e0e6427585..00000000000
--- a/packages/pos-dashboard/src/utils/isMobileDevice.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-type MobileOS = 'Windows' | 'Android' | 'iOS' | null;
-
-function getMobileOS(): MobileOS {
- const { userAgent } = navigator;
-
- // Windows Phone must come first because its UA might contain "Android"
- if (/windows phone/i.test(userAgent)) {
- return 'Windows';
- }
-
- if (/android/i.test(userAgent)) {
- return 'Android';
- }
-
- if (/ipad|iphone|ipod/i.test(userAgent)) {
- return 'iOS';
- }
-
- return null; // unknown or simply not a mobile
-}
-
-// This includes tablets
-export function isMobileDevice() {
- return ['Windows', 'Android', 'iOS'].includes(getMobileOS());
-}
diff --git a/packages/pos-dashboard/src/utils/isOnCorrectChain.spec.ts b/packages/pos-dashboard/src/utils/isOnCorrectChain.spec.ts
deleted file mode 100644
index 82f37e2da10..00000000000
--- a/packages/pos-dashboard/src/utils/isOnCorrectChain.spec.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { Wallet } from 'ethers';
-
-import { taikoChain } from '../chain/chains';
-import { isOnCorrectChain } from './isOnCorrectChain';
-
-jest.mock('../constants/envVars');
-
-const mockProvider = {
- getCode: jest.fn(),
-};
-
-const mockSigner = {
- getChainId: jest.fn(),
- provider: mockProvider,
-};
-
-jest.mock('ethers', () => ({
- ...jest.requireActual('ethers'),
- Wallet: function () {
- return mockSigner;
- },
-}));
-
-describe('isOnCorrectChain()', () => {
- beforeEach(() => {
- jest.resetAllMocks();
- });
-
- it('should return true when signer is on the correct chain', async () => {
- const signer = new Wallet('0x');
-
- mockSigner.getChainId.mockImplementationOnce(() => {
- return taikoChain.id;
- });
-
- mockProvider.getCode.mockImplementationOnce(() => {
- return '0x00';
- });
- const result = await isOnCorrectChain(signer, taikoChain.id);
- expect(result).toBe(true);
- });
-
- it('should return false when chainId is not correct', async () => {
- const signer = new Wallet('0x');
-
- mockSigner.getChainId.mockImplementationOnce(() => {
- return taikoChain.id + 1;
- });
- const result = await isOnCorrectChain(signer, taikoChain.id);
- expect(result).toBe(false);
- });
-
- it('should return false when bridgeAddress or tokenVaultAddress does not exist', async () => {
- mockSigner.getChainId.mockImplementationOnce(() => {
- return taikoChain.id;
- });
-
- mockProvider.getCode.mockImplementationOnce(() => {
- return '0x';
- });
-
- const signer = new Wallet('0x');
-
- const result = await isOnCorrectChain(signer, taikoChain.id);
-
- expect(result).toBe(false);
- });
-});
diff --git a/packages/pos-dashboard/src/utils/isOnCorrectChain.ts b/packages/pos-dashboard/src/utils/isOnCorrectChain.ts
deleted file mode 100644
index 05b124cf92a..00000000000
--- a/packages/pos-dashboard/src/utils/isOnCorrectChain.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import type { ethers } from 'ethers';
-
-import { chains } from '../chain/chains';
-import { tokenVaults } from '../vault/tokenVaults';
-
-export async function isOnCorrectChain(
- signer: ethers.Signer,
- wantChain: number,
-) {
- const signerChain = await signer.getChainId();
- if (signerChain !== wantChain) {
- return false;
- }
-
- const bridgeAddress = chains[wantChain].bridgeAddress;
- const tokenVaultAddress = tokenVaults[wantChain];
-
- const bridgeAddressCode = await signer.provider.getCode(bridgeAddress);
-
- const tokenVaultAddressCode = await signer.provider.getCode(
- tokenVaultAddress,
- );
-
- if (bridgeAddressCode === '0x' || tokenVaultAddressCode === '0x') {
- return false;
- }
-
- return true;
-}
diff --git a/packages/pos-dashboard/src/utils/jsonParseOrEmptyArray.spec.ts b/packages/pos-dashboard/src/utils/jsonParseOrEmptyArray.spec.ts
deleted file mode 100644
index 7adde511b5c..00000000000
--- a/packages/pos-dashboard/src/utils/jsonParseOrEmptyArray.spec.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { jsonParseOrEmptyArray } from './jsonParseOrEmptyArray';
-
-describe('jsonParseOrEmptyArray', () => {
- it('should return empty array when input is null or empty string', () => {
- expect(jsonParseOrEmptyArray(null)).toEqual([]);
- expect(jsonParseOrEmptyArray('')).toEqual([]);
- });
-
- it('should return empty array when input is not a valid JSON', () => {
- expect(jsonParseOrEmptyArray(undefined)).toEqual([]);
- expect(jsonParseOrEmptyArray('not a valid JSON')).toEqual([]);
- });
-
- it('should return parsed JSON when input is a valid JSON', () => {
- const strJson = '{"person": "Fran", "age": "Unknown"}';
- expect(jsonParseOrEmptyArray(strJson)).toEqual(JSON.parse(strJson));
- });
-});
diff --git a/packages/pos-dashboard/src/utils/jsonParseOrEmptyArray.ts b/packages/pos-dashboard/src/utils/jsonParseOrEmptyArray.ts
deleted file mode 100644
index 1e13e0f382f..00000000000
--- a/packages/pos-dashboard/src/utils/jsonParseOrEmptyArray.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export function jsonParseOrEmptyArray(strJson: string | null): T[] {
- try {
- // Keep in mind that strJson could be null or empty string
- // JSON.parse would not throw an error in those cases
- return strJson ? JSON.parse(strJson) : [];
- } catch (e) {
- return [];
- }
-}
diff --git a/packages/pos-dashboard/src/utils/logger.ts b/packages/pos-dashboard/src/utils/logger.ts
deleted file mode 100644
index fa4b5eebc6a..00000000000
--- a/packages/pos-dashboard/src/utils/logger.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import debug from 'debug';
-
-export function getLogger(namesapce: string) {
- return debug(`bridge:${namesapce}`);
-}
diff --git a/packages/pos-dashboard/src/utils/stake.ts b/packages/pos-dashboard/src/utils/stake.ts
deleted file mode 100644
index eaf35a02a73..00000000000
--- a/packages/pos-dashboard/src/utils/stake.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import ProverPool from '../constants/abi/ProverPool';
-
-export const stake = async (
- signer: ethers.Signer,
- contractAddress: string,
- amount: BigNumber,
- rewardPerGas: BigNumber,
- maxCapacity: BigNumber,
-): Promise => {
- const contract: Contract = new Contract(contractAddress, ProverPool, signer);
- return await contract.stake(amount, rewardPerGas, maxCapacity);
-};
diff --git a/packages/pos-dashboard/src/utils/switchNetwork.spec.ts b/packages/pos-dashboard/src/utils/switchNetwork.spec.ts
deleted file mode 100644
index 2b34604eb00..00000000000
--- a/packages/pos-dashboard/src/utils/switchNetwork.spec.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { get } from 'svelte/store';
-import { switchNetwork as wagmiSwitchNetwork } from 'wagmi/actions';
-
-import { L1_CHAIN_ID, L2_CHAIN_ID } from '../constants/envVars';
-import { switchNetwork } from './switchNetwork';
-
-jest.mock('../constants/envVars');
-
-jest.mock('wagmi/actions', () => ({
- switchNetwork: jest.fn(),
-}));
-
-jest.mock('svelte/store', () => ({
- ...jest.requireActual('svelte/store'),
- get: jest.fn(),
-}));
-
-describe('switchNetwork', () => {
- beforeEach(() => {
- jest.clearAllMocks();
- });
-
- it('should switch network', async () => {
- const starting = Date.now();
- let getCalls = 0;
-
- jest.mocked(get).mockImplementation(() => {
- getCalls += 1;
-
- // We deliver the chain after 1 second has passed
- if (Date.now() > starting + 1000) {
- return { id: L2_CHAIN_ID };
- }
-
- return null;
- });
-
- await switchNetwork(L2_CHAIN_ID);
-
- expect(wagmiSwitchNetwork).toHaveBeenCalledWith({ chainId: L2_CHAIN_ID });
- expect(get).toHaveBeenCalledTimes(getCalls);
- });
-});
diff --git a/packages/pos-dashboard/src/utils/switchNetwork.ts b/packages/pos-dashboard/src/utils/switchNetwork.ts
deleted file mode 100644
index 92954950e73..00000000000
--- a/packages/pos-dashboard/src/utils/switchNetwork.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { switchNetwork as wagmiSwitchNetwork } from 'wagmi/actions';
-
-export async function switchNetwork(chainId: number) {
- await wagmiSwitchNetwork({ chainId });
-}
diff --git a/packages/pos-dashboard/src/utils/truncateString.spec.ts b/packages/pos-dashboard/src/utils/truncateString.spec.ts
deleted file mode 100644
index 4303ea32e36..00000000000
--- a/packages/pos-dashboard/src/utils/truncateString.spec.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { truncateString } from './truncateString';
-
-it('should truncate when string > maxLength', () => {
- const dummyBalance =
- '148234732894732894723894432847328947.42384732894732894732894';
-
- expect(truncateString(dummyBalance)).toStrictEqual('1482347328');
-});
-
-it('should return string when < maxLength', () => {
- const dummyBalance = '1';
-
- expect(truncateString(dummyBalance, 2)).toStrictEqual(dummyBalance);
-});
-
-it('should return empty string if empty', () => {
- expect(truncateString('')).toStrictEqual('');
-});
diff --git a/packages/pos-dashboard/src/utils/truncateString.ts b/packages/pos-dashboard/src/utils/truncateString.ts
deleted file mode 100644
index 287584663e8..00000000000
--- a/packages/pos-dashboard/src/utils/truncateString.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const truncateString = (str: string, maxLength: number = 10) => {
- if (!str) return '';
- return str.length > maxLength ? `${str.substring(0, maxLength)}` : str;
-};
diff --git a/packages/pos-dashboard/src/utils/withdrawTaikoToken.ts b/packages/pos-dashboard/src/utils/withdrawTaikoToken.ts
deleted file mode 100644
index da143f8a06d..00000000000
--- a/packages/pos-dashboard/src/utils/withdrawTaikoToken.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { BigNumber, Contract, ethers } from 'ethers';
-import TaikoL1 from '../constants/abi/TaikoL1';
-
-export const withdrawTaikoToken = async (
- signer: ethers.Signer,
- contractAddress: string,
- amount: BigNumber,
-): Promise => {
- const contract: Contract = new Contract(contractAddress, TaikoL1, signer);
- return await contract.withdrawTaikoToken(amount);
-};
diff --git a/packages/pos-dashboard/src/vite-env.d.ts b/packages/pos-dashboard/src/vite-env.d.ts
deleted file mode 100644
index 496af0d63f5..00000000000
--- a/packages/pos-dashboard/src/vite-env.d.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-///
-///
-
-interface ImportMetaEnv {
- readonly VITE_L1_RPC_URL: string;
- readonly VITE_L2_RPC_URL: string;
- readonly VITE_L1_EXPLORER_URL: string;
- readonly VITE_L2_EXPLORER_URL: string;
- readonly VITE_RELAYER_URL: string;
- readonly VITE_L1_CHAIN_ID: string;
- readonly VITE_L2_CHAIN_ID: string;
- readonly VITE_L1_CHAIN_NAME: string;
- readonly VITE_L2_CHAIN_NAME: string;
- readonly VITE_L1_TOKEN_VAULT_ADDRESS: string;
- readonly VITE_L2_TOKEN_VAULT_ADDRESS: string;
- readonly VITE_L1_CROSS_CHAIN_SYNC_ADDRESS: string;
- readonly VITE_L2_CROSS_CHAIN_SYNC_ADDRESS: string;
- readonly VITE_L1_BRIDGE_ADDRESS: string;
- readonly VITE_L2_BRIDGE_ADDRESS: string;
- readonly VITE_L1_SIGNAL_SERVICE_ADDRESS: string;
- readonly VITE_L2_SIGNAL_SERVICE_ADDRESS: string;
- readonly VITE_TEST_ERC20: string;
- readonly VITE_SENTRY_DSN: string;
- readonly VITE_WALLETCONNECT_PROJECT_ID: string;
-}
-
-interface ImportMeta {
- readonly env: ImportMetaEnv;
-}
diff --git a/packages/pos-dashboard/src/wagmi/client.ts b/packages/pos-dashboard/src/wagmi/client.ts
deleted file mode 100644
index 6ea3c679258..00000000000
--- a/packages/pos-dashboard/src/wagmi/client.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { type Chain, configureChains, createClient } from 'wagmi';
-import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet';
-import { MetaMaskConnector } from 'wagmi/connectors/metaMask';
-import { WalletConnectConnector } from 'wagmi/connectors/walletConnect';
-import { jsonRpcProvider } from 'wagmi/providers/jsonRpc';
-import { publicProvider } from 'wagmi/providers/public';
-
-import {
- L1_CHAIN_ID,
- L1_EXPLORER_URL,
- L1_RPC,
- WALLETCONNECT_PROJECT_ID,
-} from '../constants/envVars';
-import { providers } from '../provider/providers';
-import { isMobileDevice } from '../utils/isMobileDevice';
-
-export const mainnetWagmiChain: Chain = {
- id: L1_CHAIN_ID,
- name: 'L1',
- network: '',
- nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
- rpcUrls: {
- default: { http: [L1_RPC] },
- public: { http: [L1_RPC] },
- },
- blockExplorers: {
- default: {
- name: 'Main',
- url: L1_EXPLORER_URL,
- },
- },
-};
-
-const { chains, provider } = configureChains(
- [mainnetWagmiChain],
- [
- publicProvider(),
- jsonRpcProvider({
- rpc: (chain) => ({
- http: providers[chain.id].connection.url,
- }),
- }),
- ],
-);
-
-export const client = createClient({
- autoConnect: true,
- provider,
- connectors: [
- !isMobileDevice() ? new MetaMaskConnector({ chains }) : null,
- new WalletConnectConnector({
- chains,
- options: {
- projectId: WALLETCONNECT_PROJECT_ID,
- showQrModal: true,
- qrModalOptions: {
- themeVariables: {
- // DaisyUI modal has a z-index of 999 by default
- // WalletConnect modal has a z-index of 89 by default
- // Let's increase wc to beat daisyui's modal
- '--wcm-z-index': '9999',
- '--wcm-background-color': '#E81899',
-
- // @ts-ignore
- // '--wcm-color-fg-1': '#E81899',
- '--wcm-accent-color': '#E81899',
- },
- },
- },
- }),
- new CoinbaseWalletConnector({
- chains,
- options: { appName: 'Taiko Bridge' },
- }),
- ].filter(Boolean), // remove nulls
-});
diff --git a/packages/pos-dashboard/src/wagmi/watcher.ts b/packages/pos-dashboard/src/wagmi/watcher.ts
deleted file mode 100644
index 89d2ef0e480..00000000000
--- a/packages/pos-dashboard/src/wagmi/watcher.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { fetchSigner, watchAccount, watchNetwork } from 'wagmi/actions';
-
-import { mainnetChain } from '../chain/chains';
-import { srcChain } from '../store/chain';
-import { isSwitchChainModalOpen } from '../store/modal';
-import { signer } from '../store/signer';
-import { getLogger } from '../utils/logger';
-
-const log = getLogger('wagmi:watcher');
-
-let isWatching = false;
-let unWatchNetwork: () => void;
-let unWatchAccount: () => void;
-
-const setChain = (chainId: number) => {
- if (chainId === mainnetChain.id) {
- srcChain.set(mainnetChain);
-
- log(`Network switched to ${mainnetChain.name}`);
- } else {
- isSwitchChainModalOpen.set(true);
- }
-};
-
-export function startWatching() {
- if (!isWatching) {
- // Action for subscribing to network changes.
- // See https://wagmi.sh/core/actions/watchNetwork
- unWatchNetwork = watchNetwork(async (networkResult) => {
- log('Network changed', networkResult);
-
- if (networkResult.chain?.id) {
- const _signer = await fetchSigner();
- signer.set(_signer);
-
- setChain(networkResult.chain.id);
- } else {
- log('No chain id found');
- srcChain.set(null);
- }
- });
-
- // Action for subscribing to account changes.
- // See https://wagmi.sh/core/actions/watchAccount
- unWatchAccount = watchAccount(async (accountResult) => {
- log('Account changed', accountResult);
-
- if (accountResult.isConnected) {
- const _signer = await fetchSigner();
- signer.set(_signer);
- } else {
- log('Acount disconnected');
- signer.set(null);
- }
- });
-
- isWatching = true;
- }
-}
-
-export function stopWatching() {
- unWatchNetwork();
- unWatchAccount();
- isWatching = false;
-}
diff --git a/packages/pos-dashboard/svelte.config.cjs b/packages/pos-dashboard/svelte.config.cjs
deleted file mode 100644
index 38bd8b94dc5..00000000000
--- a/packages/pos-dashboard/svelte.config.cjs
+++ /dev/null
@@ -1,13 +0,0 @@
-const sveltePreprocess = require('svelte-preprocess');
-
-const svelteConfig = {
- compilerOptions: {
- enableSourcemap: true,
- },
-
- preprocess: sveltePreprocess({
- sourceMap: true,
- }),
-};
-
-module.exports = svelteConfig;
diff --git a/packages/pos-dashboard/tailwind.config.cjs b/packages/pos-dashboard/tailwind.config.cjs
deleted file mode 100644
index 82038ca7bfb..00000000000
--- a/packages/pos-dashboard/tailwind.config.cjs
+++ /dev/null
@@ -1,90 +0,0 @@
-module.exports = {
- content: ['./src/**/*.{html,js,svelte,ts}'],
- plugins: [require('daisyui')],
- darkMode: ['class', '[data-theme="dark"]'],
- theme: {
- extend: {
- colors: {
- 'dark-1': 'var(--color-dark-1)',
- 'dark-2': 'var(--color-dark-2)',
- 'dark-3': 'var(--color-dark-3)',
- 'dark-4': 'var(--color-dark-4)',
- 'dark-5': 'var(--color-dark-5)',
- 'dark-6': 'var(--color-dark-6)',
- tabs: 'var(--tabs)',
- },
- keyframes: {
- rise: {
- '0%': { position: 'absolute', bottom: '-10px' },
- // '100%': { position: 'static' },
- },
- },
- animation: {
- rise: 'rise 0.5s ease-in-out',
- },
- },
- },
- daisyui: {
- styled: true,
- base: true,
- utils: true,
- logs: true,
- rtl: false,
- prefix: '',
- darkTheme: 'dark',
- themes: [
- {
- dark: {
- ...require('daisyui/colors/themes')['[data-theme=black]'],
- primary: '#242424',
- secondary: '#181818',
- accent: '#E81899',
- 'accent-focus': '#E81899',
- 'accent-content': '#F3F3F3',
- neutral: '#242424',
- 'base-100': '#10151B',
- 'base-300': '#242424',
- info: '#373737',
- success: '#008000',
- warning: '#FFFF00',
- error: '#FF0000',
- '--color-dark-1': '#000000',
- '--color-dark-2': '#000000',
- '--color-dark-3': '#0F0F0F',
- '--color-dark-4': '#242424',
- '--color-dark-5': '#373737',
- '--color-dark-6': '#4F4F4F',
- '--rounded-btn': '.5rem',
- '--rounded-box': '.5rem',
- '--btn-text-case': 'capitalize',
- '--tabs': '#1E2026',
- },
- light: {
- ...require('daisyui/colors/themes')['[data-theme=light]'],
- accent: '#E81899',
- 'accent-focus': '#E81899',
- 'accent-content': '#F3F3F3',
- neutral: '#d4d4d4',
- 'neutral-focus': '#a3a3a3',
- 'neutral-content': '#181818',
- 'base-100': '#F3F3F3',
- 'base-300': '#d4d4d4',
- info: '#373737',
- success: '#008000',
- warning: '#FFFF00',
- error: '#FF0000',
- '--color-dark-1': '#000000',
- '--color-dark-2': '#FFFFFF',
- '--color-dark-3': '#FAFAFA',
- '--color-dark-4': '#242424',
- '--color-dark-5': '#CDCDCD',
- '--color-dark-6': '#4F4F4F',
- '--rounded-btn': '.5rem',
- '--rounded-box': '.5rem',
- '--btn-text-case': 'capitalize',
- '--tabs': '#F3F3F3',
- },
- },
- ],
- },
-};
diff --git a/packages/pos-dashboard/temp.txt b/packages/pos-dashboard/temp.txt
deleted file mode 100644
index 45b983be36b..00000000000
--- a/packages/pos-dashboard/temp.txt
+++ /dev/null
@@ -1 +0,0 @@
-hi
diff --git a/packages/pos-dashboard/tsconfig.json b/packages/pos-dashboard/tsconfig.json
deleted file mode 100644
index 5fc826c3398..00000000000
--- a/packages/pos-dashboard/tsconfig.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "extends": "@tsconfig/svelte/tsconfig.json",
- "compilerOptions": {
- "target": "es2022",
- "useDefineForClassFields": true,
- "module": "es2022",
- "resolveJsonModule": true,
- "baseUrl": ".",
- /**
- * Typecheck JS in `.svelte` and `.js` files by default.
- * Disable checkJs if you'd like to use dynamic types in JS.
- * Note that setting allowJs false does not prevent the use
- * of JS in `.svelte` files.
- */
- "allowJs": true,
- "checkJs": true,
- "isolatedModules": false
- },
- "include": [
- "vite.config.ts",
- "__mocks__/**/*.ts",
- "src/**/*.d.ts",
- "src/**/*.ts",
- "src/**/*.js",
- "src/**/*.svelte"
- ],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
diff --git a/packages/pos-dashboard/tsconfig.node.json b/packages/pos-dashboard/tsconfig.node.json
deleted file mode 100644
index 65dbdb96ae5..00000000000
--- a/packages/pos-dashboard/tsconfig.node.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "module": "ESNext",
- "moduleResolution": "Node"
- },
- "include": ["vite.config.ts"]
-}
diff --git a/packages/pos-dashboard/vite.config.ts b/packages/pos-dashboard/vite.config.ts
deleted file mode 100644
index 6b3370148a0..00000000000
--- a/packages/pos-dashboard/vite.config.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { sentryVitePlugin } from '@sentry/vite-plugin';
-import { svelte } from '@sveltejs/vite-plugin-svelte';
-import polyfillNode from 'rollup-plugin-polyfill-node';
-import { defineConfig } from 'vite';
-
-export default defineConfig({
- build: { sourcemap: true },
- define: { global: 'globalThis' },
- plugins: [
- svelte(),
- polyfillNode(),
- sentryVitePlugin({
- org: process.env.SENTRY_ORG,
- project: process.env.SENTRY_PROJECT,
- authToken: process.env.SENTRY_AUTH_TOKEN,
- }),
- ],
-});
diff --git a/packages/pos-dashboard/wagmi.config.ts b/packages/pos-dashboard/wagmi.config.ts
deleted file mode 100644
index 6dd5f6cb596..00000000000
--- a/packages/pos-dashboard/wagmi.config.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { defineConfig } from '@wagmi/cli';
-import type { Abi } from 'abitype';
-
-// CI will fail if we import from the protocol package
-// We'll ignore this file on svelte-check: `svelte-check --ignore ./wagmi.config.ts`
-import Bridge from '../protocol/out/Bridge.sol/Bridge.json';
-import TokenVault from '../protocol/out/TokenVault.sol/TokenVault.json';
-import ICrossChainSync from '../protocol/out/ICrossChainSync.sol/ICrossChainSync.json';
-import FreeMintERC20 from '../protocol/out/FreeMintERC20.sol/FreeMintERC20.json';
-import ERC20 from '../protocol/out/ERC20.sol/ERC20.json';
-
-export default defineConfig({
- out: 'src/constants/abi/index.ts',
- contracts: [
- {
- name: 'bridge',
- abi: Bridge.abi as Abi,
- },
- {
- name: 'tokenVault',
- abi: TokenVault.abi as Abi,
- },
- {
- name: 'crossChainSync',
- abi: ICrossChainSync.abi as Abi,
- },
- {
- name: 'freeMintErc20',
- abi: FreeMintERC20.abi as Abi,
- },
- {
- name: 'erc20',
- abi: ERC20.abi as Abi,
- },
- ],
-});