Skip to content

Commit

Permalink
updated scripts to support berachain
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-altr committed Sep 6, 2024
1 parent 896d5ae commit ad3b43d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
5 changes: 4 additions & 1 deletion scripts-altlayer/getRetryableSenderAddr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TOKEN_BRIDGE_CREATOR_Arb_One,
TOKEN_BRIDGE_CREATOR_Holesky,
TOKEN_BRIDGE_CREATOR_Ethereum,
TOKEN_BRIDGE_CREATOR_Berachain
} from './createTokenBridge'

async function main() {
Expand All @@ -31,9 +32,11 @@ async function main() {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Holesky
} else if (l2ChainId === 1) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Ethereum
} else if (l2ChainId === 80084) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Berachain
} else {
throw new Error(
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, or Ethereum'
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, Ethereum, or Berachain'
)
}
const L1AtomicTokenBridgeCreator__factory = new ethers.Contract(
Expand Down
5 changes: 4 additions & 1 deletion scripts-altlayer/grantRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
TOKEN_BRIDGE_CREATOR_Arb_One,
TOKEN_BRIDGE_CREATOR_Holesky,
TOKEN_BRIDGE_CREATOR_Ethereum,
TOKEN_BRIDGE_CREATOR_Berachain
} from '../scripts/createTokenBridge'
import { getSigner } from './erc20TokenBridgeDeployment'
import { getExecutorAddress } from './getExecutorAddress'
Expand Down Expand Up @@ -40,9 +41,11 @@ async function main() {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Holesky
} else if (l2ChainId === 1) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Ethereum
} else if (l2ChainId === 80084) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Berachain
} else {
throw new Error(
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, or Ethereum'
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, Ethereum, or Berachain'
)
}

Expand Down
5 changes: 4 additions & 1 deletion scripts-altlayer/revokeRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
TOKEN_BRIDGE_CREATOR_Arb_One,
TOKEN_BRIDGE_CREATOR_Holesky,
TOKEN_BRIDGE_CREATOR_Ethereum,
TOKEN_BRIDGE_CREATOR_Berachain
} from '../scripts/createTokenBridge'
import { getSigner } from './erc20TokenBridgeDeployment'
import { getExecutorAddress } from './getExecutorAddress'
Expand Down Expand Up @@ -40,9 +41,11 @@ async function main() {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Holesky
} else if (l2ChainId === 1) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Ethereum
} else if (l2ChainId === 80084) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Berachain
} else {
throw new Error(
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, or Ethereum'
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, Ethereum, or Berachain'
)
}

Expand Down
5 changes: 4 additions & 1 deletion scripts-altlayer/scheduleArbOSUpgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
TOKEN_BRIDGE_CREATOR_Arb_One,
TOKEN_BRIDGE_CREATOR_Holesky,
TOKEN_BRIDGE_CREATOR_Ethereum,
TOKEN_BRIDGE_CREATOR_Berachain
} from '../scripts/createTokenBridge'
import { getSigner } from './erc20TokenBridgeDeployment'
import { getExecutorAddress } from './getExecutorAddress'
Expand Down Expand Up @@ -41,9 +42,11 @@ async function main() {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Holesky
} else if (l2ChainId === 1) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Ethereum
} else if (l2ChainId === 80084) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Berachain
} else {
throw new Error(
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, or Ethereum'
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, Ethereum, or Berachain'
)
}

Expand Down
3 changes: 3 additions & 0 deletions scripts/createTokenBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export const TOKEN_BRIDGE_CREATOR_Holesky =
export const TOKEN_BRIDGE_CREATOR_Ethereum =
'0x60D9A46F24D5a35b95A78Dd3E793e55D94EE0660'

export const TOKEN_BRIDGE_CREATOR_Berachain =
'0x05F9BD2b098f09afb0F007Ca9AEc393Dc8E804E9'

async function getNativeToken({
rollup,
provider,
Expand Down
6 changes: 4 additions & 2 deletions scripts/transferOwnership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import UpgradeExecutor from '@arbitrum/nitro-contracts/build/contracts/src/mocks
import ArbOwner from '@arbitrum/nitro-contracts/build/contracts/src/precompiles/ArbOwner.sol/ArbOwner.json'
import fs from 'fs'
import { L3Config } from './l3ConfigType'
import { TOKEN_BRIDGE_CREATOR_Arb_Sepolia, TOKEN_BRIDGE_CREATOR_Sepolia, TOKEN_BRIDGE_CREATOR_Arb_One, TOKEN_BRIDGE_CREATOR_Holesky, TOKEN_BRIDGE_CREATOR_Ethereum } from './createTokenBridge'
import { TOKEN_BRIDGE_CREATOR_Arb_Sepolia, TOKEN_BRIDGE_CREATOR_Sepolia, TOKEN_BRIDGE_CREATOR_Arb_One, TOKEN_BRIDGE_CREATOR_Holesky, TOKEN_BRIDGE_CREATOR_Ethereum, TOKEN_BRIDGE_CREATOR_Berachain } from './createTokenBridge'
import L1AtomicTokenBridgeCreator from '@arbitrum/token-bridge-contracts/build/contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol/L1AtomicTokenBridgeCreator.json'

export const getSigner = (provider: JsonRpcProvider, key?: string) => {
Expand Down Expand Up @@ -37,9 +37,11 @@ export async function transferOwner(
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Holesky
} else if (l2ChainId === 1) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Ethereum
} else if (l2ChainId === 80084) {
TOKEN_BRIDGE_CREATOR = TOKEN_BRIDGE_CREATOR_Berachain
} else {
throw new Error(
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, or Ethereum'
'The Base Chain you have provided is not supported, please put RPC for Arb Sepolia, Sepolia, Holesky, Arb One, Ethereum, or Berachain'
)
}

Expand Down

0 comments on commit ad3b43d

Please sign in to comment.