diff --git a/ops_boba/api/watcher-api/serverless-bobaavax.yml b/ops_boba/api/watcher-api/serverless-bobaavax.yml
index 9be0cee529..b17dd7e70e 100644
--- a/ops_boba/api/watcher-api/serverless-bobaavax.yml
+++ b/ops_boba/api/watcher-api/serverless-bobaavax.yml
@@ -116,3 +116,20 @@ functions:
cors: true
layers:
- ${file(env-bobaavax.yml):LAYERS}
+ watcher_getLayerZeroTransactions:
+ handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
+ memorySize: 10240 # optional, in MB, default is 1024
+ timeout: 60 # optional, in seconds, default is 6
+ vpc:
+ securityGroupIds:
+ - ${file(env-bobaavax.yml):SECURITY_GROUPS}
+ subnetIds:
+ - ${file(env-bobaavax.yml):SUBNET_ID_1}
+ - ${file(env-bobaavax.yml):SUBNET_ID_2}
+ events:
+ - http:
+ path: get.layerzero.transactions
+ method: post
+ cors: true
+ layers:
+ - ${file(env-bobaavax.yml):LAYERS}
diff --git a/ops_boba/api/watcher-api/serverless-bobabeam.yml b/ops_boba/api/watcher-api/serverless-bobabeam.yml
index 11e7ed8ccd..1cccec1374 100644
--- a/ops_boba/api/watcher-api/serverless-bobabeam.yml
+++ b/ops_boba/api/watcher-api/serverless-bobabeam.yml
@@ -116,3 +116,20 @@ functions:
cors: true
layers:
- ${file(env-bobabeam.yml):LAYERS}
+ watcher_getLayerZeroTransactions:
+ handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
+ memorySize: 10240 # optional, in MB, default is 1024
+ timeout: 60 # optional, in seconds, default is 6
+ vpc:
+ securityGroupIds:
+ - ${file(env-bobabeam.yml):SECURITY_GROUPS}
+ subnetIds:
+ - ${file(env-bobabeam.yml):SUBNET_ID_1}
+ - ${file(env-bobabeam.yml):SUBNET_ID_2}
+ events:
+ - http:
+ path: get.layerzero.transactions
+ method: post
+ cors: true
+ layers:
+ - ${file(env-bobabeam.yml):LAYERS}
diff --git a/ops_boba/api/watcher-api/serverless-bobabnb.yml b/ops_boba/api/watcher-api/serverless-bobabnb.yml
index 117b569a81..a50beaf4b3 100644
--- a/ops_boba/api/watcher-api/serverless-bobabnb.yml
+++ b/ops_boba/api/watcher-api/serverless-bobabnb.yml
@@ -116,3 +116,20 @@ functions:
cors: true
layers:
- ${file(env-bobabnb.yml):LAYERS}
+ watcher_getLayerZeroTransactions:
+ handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
+ memorySize: 10240 # optional, in MB, default is 1024
+ timeout: 60 # optional, in seconds, default is 6
+ vpc:
+ securityGroupIds:
+ - ${file(env-bobabnb.yml):SECURITY_GROUPS}
+ subnetIds:
+ - ${file(env-bobabnb.yml):SUBNET_ID_1}
+ - ${file(env-bobabnb.yml):SUBNET_ID_2}
+ events:
+ - http:
+ path: get.layerzero.transactions
+ method: post
+ cors: true
+ layers:
+ - ${file(env-bobabnb.yml):LAYERS}
diff --git a/ops_boba/api/watcher-api/serverless-bobabnbtestnet.yml b/ops_boba/api/watcher-api/serverless-bobabnbtestnet.yml
index f6c3f91ce7..b27488a429 100644
--- a/ops_boba/api/watcher-api/serverless-bobabnbtestnet.yml
+++ b/ops_boba/api/watcher-api/serverless-bobabnbtestnet.yml
@@ -116,3 +116,20 @@ functions:
cors: true
layers:
- ${file(env-boba-bnb-testnet.yml):LAYERS}
+ watcher_getLayerZeroTransactions:
+ handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
+ memorySize: 10240 # optional, in MB, default is 1024
+ timeout: 60 # optional, in seconds, default is 6
+ vpc:
+ securityGroupIds:
+ - ${file(env-boba-bnb-testnet.yml):SECURITY_GROUPS}
+ subnetIds:
+ - ${file(env-boba-bnb-testnet.yml):SUBNET_ID_1}
+ - ${file(env-boba-bnb-testnet.yml):SUBNET_ID_2}
+ events:
+ - http:
+ path: get.layerzero.transactions
+ method: post
+ cors: true
+ layers:
+ - ${file(env-boba-bnb-testnet.yml):LAYERS}
diff --git a/ops_boba/api/watcher-api/serverless-bobafuji.yml b/ops_boba/api/watcher-api/serverless-bobafuji.yml
index c8667a6102..1ed19fea30 100644
--- a/ops_boba/api/watcher-api/serverless-bobafuji.yml
+++ b/ops_boba/api/watcher-api/serverless-bobafuji.yml
@@ -116,3 +116,20 @@ functions:
cors: true
layers:
- ${file(env-boba-fuji.yml):LAYERS}
+ watcher_getLayerZeroTransactions:
+ handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
+ memorySize: 10240 # optional, in MB, default is 1024
+ timeout: 60 # optional, in seconds, default is 6
+ vpc:
+ securityGroupIds:
+ - ${file(env-boba-fuji.yml):SECURITY_GROUPS}
+ subnetIds:
+ - ${file(env-boba-fuji.yml):SUBNET_ID_1}
+ - ${file(env-boba-fuji.yml):SUBNET_ID_2}
+ events:
+ - http:
+ path: get.layerzero.transactions
+ method: post
+ cors: true
+ layers:
+ - ${file(env-boba-fuji.yml):LAYERS}
diff --git a/ops_boba/api/watcher-api/serverless-bobaoperatestnet.yml b/ops_boba/api/watcher-api/serverless-bobaoperatestnet.yml
index 0d00f298e5..13e0b55975 100644
--- a/ops_boba/api/watcher-api/serverless-bobaoperatestnet.yml
+++ b/ops_boba/api/watcher-api/serverless-bobaoperatestnet.yml
@@ -116,3 +116,20 @@ functions:
cors: true
layers:
- ${file(env-boba-opera-testnet.yml):LAYERS}
+ watcher_getLayerZeroTransactions:
+ handler: watcher_getLayerZeroTransactions.watcher_getLayerZeroTransactions
+ memorySize: 10240 # optional, in MB, default is 1024
+ timeout: 60 # optional, in seconds, default is 6
+ vpc:
+ securityGroupIds:
+ - ${file(env-boba-opera-testnet.yml):SECURITY_GROUPS}
+ subnetIds:
+ - ${file(env-boba-opera-testnet.yml):SUBNET_ID_1}
+ - ${file(env-boba-opera-testnet.yml):SUBNET_ID_2}
+ events:
+ - http:
+ path: get.layerzero.transactions
+ method: post
+ cors: true
+ layers:
+ - ${file(env-boba-opera-testnet.yml):LAYERS}
diff --git a/ops_boba/api/watcher-api/watcher_getLayerZeroTransactions.py b/ops_boba/api/watcher-api/watcher_getLayerZeroTransactions.py
index a0a8456947..6c5d14904f 100644
--- a/ops_boba/api/watcher-api/watcher_getLayerZeroTransactions.py
+++ b/ops_boba/api/watcher-api/watcher_getLayerZeroTransactions.py
@@ -3,7 +3,7 @@
import pymysql
-def watcher_getLayerZeroTransaction(event, context):
+def watcher_getLayerZeroTransactions(event, context):
# Parse incoming event
body = json.loads(event["body"])
address = body.get("address")
diff --git a/packages/boba/gateway/src/components/listToken/listToken.js b/packages/boba/gateway/src/components/listToken/listToken.js
index e56d306261..70717ee9e2 100644
--- a/packages/boba/gateway/src/components/listToken/listToken.js
+++ b/packages/boba/gateway/src/components/listToken/listToken.js
@@ -11,6 +11,8 @@ import { getCoinImage } from 'util/coinImage'
import * as S from './listToken.styles'
import { BRIDGE_TYPE } from 'util/constant'
+import networkService from 'services/networkService'
+
function ListToken({
token,
chain,
@@ -111,16 +113,16 @@ function ListToken({
>
Fast Bridge to L2
- {token.symbol === 'BOBA' &&
+ {token.symbol === 'BOBA' && !networkService.L1ChainAsset.foundation &&
}
>
@@ -226,7 +228,7 @@ function ListToken({
>
Fast Bridge to L2
- {token.symbol === 'BOBA' &&
+ {token.symbol === 'BOBA' && !networkService.L1ChainAsset.foundation &&
}
>
diff --git a/packages/boba/gateway/src/containers/history/History.js b/packages/boba/gateway/src/containers/history/History.js
index 107d2ab3ee..5c79a73702 100644
--- a/packages/boba/gateway/src/containers/history/History.js
+++ b/packages/boba/gateway/src/containers/history/History.js
@@ -48,6 +48,8 @@ import Tabs from 'components/tabs/Tabs'
import { POLL_INTERVAL } from 'util/constant'
+import networkService from 'services/networkService'
+
function History() {
const theme = useTheme()
@@ -139,7 +141,7 @@ function History() {
{dispatch(setActiveHistoryTab(tab))}}
activeTab={activeTab}
- tabs={['All', 'Ethereum to Boba Ethereum L2', 'Boba Ethereum L2 to Ethereum', 'Bridge between L1s', 'Pending']}
+ tabs={['All', `${networkService.L1ChainAsset.name} to ${networkService.L1ChainAsset.l2Name}`, `${networkService.L1ChainAsset.l2Name} to ${networkService.L1ChainAsset.name}`, 'Bridge between L1s', 'Pending']}
/>
{activeTab === 'All' && (
@@ -149,14 +151,14 @@ function History() {
/>
)}
- {activeTab === 'Ethereum to Boba Ethereum L2' &&
+ {activeTab === `${networkService.L1ChainAsset.name} to ${networkService.L1ChainAsset.l2Name}` &&
}
- {activeTab === 'Boba Ethereum L2 to Ethereum' &&
+ {activeTab === `${networkService.L1ChainAsset.l2Name} to ${networkService.L1ChainAsset.name}` &&
{
+ dispatch(fetchL1FeeBalance()) //ETH balance for paying gas
dispatch(fetchAltL1DepositFee())
},[dispatch])
@@ -139,25 +142,24 @@ function InputStepMultiChain({ handleClose, token, isBridge, openTokenPicker })
)
}
- const onBridgeChange = (e) => {
- setAltL1Bridge(e.target.value)
- }
+ let ETHstring = ''
+ let warning = false
- const customStyles = {
- option: (provided, state) => ({
- ...provided,
- color: state.isSelected ? '#282828' : '#909090',
- }),
+ if (depositFees[altL1Bridge]) {
+ if(Number(depositFees[altL1Bridge].fee) > Number(feeBalance)) {
+ warning = true
+ ETHstring = `WARNING: your L1 ${networkService.L1NativeTokenSymbol} balance of ${Number(feeBalance).toFixed(4)} is not sufficient to cover this transaction.`
+ }
}
return (
<>
- Bridge {token && token.symbol ? token.symbol : ''} to Alt L1s
+ Bridge {token && token.symbol ? token.symbol : ''} to Ethereum
-
-
+ */}
- Estimated fee for bridging {value} {token.symbol} is {depositFees[altL1Bridge].fee} ETH
+ Estimated fee for bridging {value} {token.symbol} is {depositFees[altL1Bridge].fee} {networkService.L1NativeTokenSymbol}
> : null}
@@ -204,6 +206,12 @@ function InputStepMultiChain({ handleClose, token, isBridge, openTokenPicker })
)}
+ {warning && (
+
+ {parse(ETHstring)}
+
+ )}
+