Skip to content

Commit

Permalink
Merge pull request #5 from bobanetwork/wsdt/deployments
Browse files Browse the repository at this point in the history
chore: Mainnet Lightbridge contract deployments
  • Loading branch information
wsdt authored Feb 16, 2024
2 parents 468fdb9 + bdad7a2 commit 94df91b
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 38 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ LIGHTBRIDGE_POLLING_INTERVAL=
LIGHTBRIDGE_BLOCK_RANGE_PER_POLLING=
# Etherscan
ETHERSCAN_API_KEY=
OPTIMISMSCAN_API_KEY=
ARBISCAN_API_KEY=

23 changes: 14 additions & 9 deletions .github/workflows/lb-release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build & Release Light Bridge

on:
workflow_dispatch:
release:
types: [published]
push:
tags:
- 'v*.*.*'

jobs:
build_docker:
Expand All @@ -20,14 +20,19 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
- name: Get project versions
run: |
echo "version=$(cat ./package.json | jq ".version" | tr -d '"\r\n')" >> $GITHUB_OUTPUT
id: version
- name: Create tag artifact
uses: actions/upload-artifact@v2
with:
name: ${{github.ref_name}}
path: Release
#- name: Get project versions
# run: |
# echo "version=$(cat ./package.json | jq ".version" | tr -d '"\r\n')" >> $GITHUB_OUTPUT
# id: version
- name: Build version specific docker image
run: docker build . --file ./Dockerfile.prod --tag bobanetwork/lightbridge:v${{ steps.version.outputs.version }}
run: docker build . --file ./Dockerfile.prod --tag bobanetwork/lightbridge:${{ github.ref_name }}
- name: Push version specific docker image
run: docker push bobanetwork/lightbridge:v${{ steps.version.outputs.version }}
run: docker push bobanetwork/lightbridge:${{ github.ref_name }}
- name: Build stable docker image
run: docker build . --file ./Dockerfile.prod --tag bobanetwork/lightbridge:stable
- name: Push stable docker image
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ Make sure disbursers have enough liquidity in form of the native asset (such as
- LightBridge deployed to: `0x3f7Da9C51138E0475aA26E80677d27A568cFD6b9`
- Proxy__LightBridge deployed to: `0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801`

### Optimism Mainnet
- LightBridge deployed to: `0x3f7Da9C51138E0475aA26E80677d27A568cFD6b9`
- Proxy__LightBridge deployed to: `0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801`

### Arbitrum Mainnet
- LightBridge deployed to: `0x3f7Da9C51138E0475aA26E80677d27A568cFD6b9`
- Proxy__LightBridge deployed to: `0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801`

### Boba ETH Mainnet
- LightBridge deployed to: `0x670b130112C6f03E17192e63c67866e67D77c3ee`
- Proxy__LightBridge deployed to: `0x0dfFd3Efe9c3237Ad7bf94252296272c96237FF5`


## Testnet deployments
Expand All @@ -72,6 +83,7 @@ Make sure disbursers have enough liquidity in form of the native asset (such as
### Boba Sepolia
- LightBridge deployed to: `0x3f7Da9C51138E0475aA26E80677d27A568cFD6b9`
- Proxy__LightBridge deployed to: `0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801`
- No alerts set yet, since no Tenderly support available (14 Feb 2024)

### Boba Goerli
- LightBridge deployed to: `0x95ec63aE2573bD5e70C223E075D9483573968699`
Expand Down
5 changes: 5 additions & 0 deletions deploy/contract.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,18 @@ async function main() {
deployer
)

//const gasPrice = BigNumber.from("110000000")
let gasLimit = prompt("Custom gas limit? [number/N]")
if (isNaN(gasLimit?.toLowerCase())) {
gasLimit = null;
} else {
gasLimit = parseInt(gasLimit)
}

/*const deployData = Factory__LightBridge.interface.encodeDeploy()
const estimatedGas = await provider.estimateGas({ data: deployData })
console.log("ESTIMATED GAS: ", estimatedGas, deployData)*/

const redeploy = prompt("Want to redeploy? [Y/n]")?.toLowerCase() === "y"
if (redeploy) {
LightBridge = await Factory__LightBridge.deploy({gasLimit})
Expand Down
15 changes: 8 additions & 7 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}}
},
networks: {
mainnet: {
url: 'https://eth.llamarpc.com',
url: process.env.LIGHTBRIDGE_RPC_ETHMAINNET ?? 'https://eth.llamarpc.com',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
bsc: {
Expand All @@ -29,7 +29,7 @@ const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}}
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
boba_eth_mainnet: {
url: 'https://mainnet.boba.network',
url: process.env.LIGHTBRIDGE_RPC_BOBAETHMAINNET ?? 'https://mainnet.boba.network',
accounts: [process.env.DEPLOYER_PK ?? LOCAL_PK],
},
boba_bnb_mainnet: {
Expand Down Expand Up @@ -60,7 +60,7 @@ const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}}
solidity: {
version: '0.8.9',
settings: {
optimizer: { enabled: true, runs: 10_000 },
optimizer: { enabled: true, runs: 200 },
},
},
paths: {
Expand All @@ -72,18 +72,19 @@ const config: HardhatUserConfig & {etherscan: {apiKey: any, customChains: any}}
etherscan: {
apiKey: {
sepolia: process.env.ETHERSCAN_API_KEY,
arbitrumOne: "",
arbitrumOne: process.env.ARBISCAN_API_KEY,
bsc: "",
mainnet: process.env.ETHERSCAN_API_KEY,
optimisticEthereum: "",
optimisticEthereum: process.env.OPTIMISMSCAN_API_KEY,
boba_eth_mainnet: "boba", // not required, set placeholder
},
customChains: [
{
network: "boba_eth_mainnet",
chainId: 288,
urls: {
apiURL: "",
browserURL: "",
apiURL: "https://api.routescan.io/v2/network/mainnet/evm/288/etherscan",
browserURL: "https://bobascan.com"
},
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
LightBridge deployed to: 0x670b130112C6f03E17192e63c67866e67D77c3ee
Proxy__LightBridge deployed to: 0x0dfFd3Efe9c3237Ad7bf94252296272c96237FF5
Initialized proxy: [object Object]
LightBridge initialized: [object Object]
Added route for 1 chain, and token: 0x0000000000000000000000000000000000000000, receipt: [object Object]
Added route for 1 chain, and token: 0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7, receipt: [object Object]
Added route for 56288 chain, and token: 0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7, receipt: [object Object]
Added route for 56 chain, and token: 0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7, receipt: [object Object]
Network iteration done
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
LightBridge deployed to: 0x3f7Da9C51138E0475aA26E80677d27A568cFD6b9
Proxy__LightBridge deployed to: 0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801
Initialized proxy: [object Object]
LightBridge initialized: [object Object]
Added route for 288 chain, and token: 0x0000000000000000000000000000000000000000, receipt: [object Object]
Network iteration done
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
LightBridge deployed to: 0x3f7Da9C51138E0475aA26E80677d27A568cFD6b9
Proxy__LightBridge deployed to: 0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801
Initialized proxy: [object Object]
LightBridge initialized: [object Object]
Added route for 288 chain, and token: 0x0000000000000000000000000000000000000000, receipt: [object Object]
Network iteration done
37 changes: 15 additions & 22 deletions src/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@ export const BobaChains: IBobaChains = {

//#region boba_networks
288: {
// TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves) --> boba listed though, but requires a hosted service
url:
process.env.LIGHTBRIDGE_RPC_BOBAETHMAINNET ??
'https://boba-ethereum.gateway.tenderly.co',
testnet: false,
name: 'Boba Ethereum Mainnet',
teleportationAddress: '0xd68809330075C792C171C450B983F4D18128e9BF',
height: 873302,
teleportationAddress: '0x0dfFd3Efe9c3237Ad7bf94252296272c96237FF5',
height: 1111267,
supportedAssets: {
['0x0000000000000000000000000000000000000000'.toLowerCase()]: Asset.ETH,
['0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7'.toLowerCase()]: Asset.BOBA,
['0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d'.toLowerCase()]: Asset.USDT,
['0x68ac1623ACf9eB9F88b65B5F229fE3e2c0d5789e'.toLowerCase()]: Asset.BNB,
//['0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d'.toLowerCase()]: Asset.USDT,
//['0x68ac1623ACf9eB9F88b65B5F229fE3e2c0d5789e'.toLowerCase()]: Asset.BNB,
},
},
56288: {
Expand All @@ -57,7 +56,6 @@ export const BobaChains: IBobaChains = {
},
},
2888: {
// TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves)
url:
process.env.LIGHTBRIDGE_RPC_BOBAETHGOERLI ??
'https://replica.goerli.boba.network',
Expand All @@ -71,7 +69,6 @@ export const BobaChains: IBobaChains = {
},
},
9728: {
// TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves)
url:
process.env.LIGHTBRIDGE_RPC_BOBABNBTESTNET ??
'https://boba-bnb-testnet.gateway.tenderly.co',
Expand Down Expand Up @@ -110,40 +107,37 @@ export const BobaChains: IBobaChains = {
},
},
42161: {
// TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves)
url:
process.env.LIGHTBRIDGE_RPC_ARBITRUMMAINNET ??
'https://arbitrum.llamarpc.com',
testnet: false,
name: 'Arbitrum Mainnet',
teleportationAddress: '0xd68809330075C792C171C450B983F4D18128e9BF',
height: 3393,
teleportationAddress: '0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801',
height: 180755096,
supportedAssets: {
['0x0000000000000000000000000000000000000000'.toLowerCase()]: Asset.ETH,
},
},
10: {
// TODO: seemingly no public graph node available (would require hosted_service or deploying it ourselves)
url:
process.env.LIGHTBRIDGE_RPC_OPTIMISMMAINNET ??
'https://optimism.llamarpc.com',
testnet: false,
name: 'Optimism Mainnet',
teleportationAddress: '0xd68809330075C792C171C450B983F4D18128e9BF',
height: 3393,
teleportationAddress: '0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801',
height: 116168267,
supportedAssets: {
['0x0000000000000000000000000000000000000000'.toLowerCase()]: Asset.ETH,
},
},
//#endregion
//#region l1
1: {
// TODO: Public nodes available, deploy once contract is live
url: process.env.LIGHTBRIDGE_RPC_ETHMAINNET ?? 'https://eth.llamarpc.com',
testnet: false,
name: 'Ethereum Mainnet',
teleportationAddress: '0x0',
height: 17565090,
teleportationAddress: '0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801',
height: 19227141,
supportedAssets: {
['0x0000000000000000000000000000000000000000'.toLowerCase()]: Asset.ETH,
['0x42bBFa2e77757C645eeaAd1655E0911a7553Efbc'.toLowerCase()]: Asset.BOBA,
Expand All @@ -152,17 +146,16 @@ export const BobaChains: IBobaChains = {
},
},
56: {
// TODO: Public nodes available, deploy once contract is live
// TODO: Replace light bridge contract
url: process.env.LIGHTBRIDGE_RPC_BNBMAINNET ?? 'https://rpc.ankr.com/bsc',
testnet: false,
name: 'BNB Mainnet',
teleportationAddress: '0x0',
height: 30907682,
supportedAssets: {
/*'0x0000000000000000000000000000000000000000': 'ETH',
'0x42bBFa2e77757C645eeaAd1655E0911a7553Efbc': 'BOBA',
'0xdAC17F958D2ee523a2206206994597C13D831ec7': 'USDT',
'0xB8c77482e45F1F44dE1745F52C74426C631bDD52': 'BNB',*/
['0xE0DB679377A0F5Ae2BaE485DE475c9e1d8A4607D'.toLowerCase()]: Asset.BOBA,
['0x0000000000000000000000000000000000000000'.toLowerCase()]: Asset.BNB,
['0x2170Ed0880ac9A755fd29B2688956BD959F933F8'.toLowerCase()]: Asset.ETH,
},
},
// Sepolia
Expand All @@ -187,7 +180,7 @@ export const BobaChains: IBobaChains = {
testnet: true,
name: 'Boba Sepolia Testnet',
teleportationAddress: '0x2dE73Bd1660Fbf4D521a52Ec2a91CCc106113801',
height: 19220000, // TODO: might need to be adapted
height: 1043907, // TODO: might need to be adapted
supportedAssets: {
['0x0000000000000000000000000000000000000000'.toLowerCase()]: Asset.ETH,
['0x4200000000000000000000000000000000000023'.toLowerCase()]: Asset.BOBA,
Expand Down

0 comments on commit 94df91b

Please sign in to comment.