Skip to content

Commit

Permalink
Merge pull request #58 from immutable/NOJIRA_UPDATE_SCRIPTS
Browse files Browse the repository at this point in the history
Nojira update scripts
  • Loading branch information
ermyas authored Feb 13, 2024
2 parents 92bc5e7 + e79a3f9 commit 220bfa6
Show file tree
Hide file tree
Showing 52 changed files with 4,376 additions and 1,756 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
build:
name: End to End Test
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v3

- name: Set Node.js 18.x
- name: Set Node.js 18.18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 18.18.x

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
7 changes: 7 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extensions": ["ts"],
"node-option": [
"experimental-specifier-resolution=node",
"loader=ts-node/esm"
]
}
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"test": "forge test",
"lint": "forge fmt",
"local:start": "cd scripts/localdev; ./start.sh",
"local:setup": "cd scripts/localdev; ./deploy.sh",
"local:test": "cd scripts/localdev; npx mocha --require mocha-suppress-logs ../e2e/",
"local:ci": "cd scripts/localdev; ./ci.sh && ./deploy.sh && npx mocha --require mocha-suppress-logs ../e2e/ && ./stop.sh",
"local:setup": "cd scripts/localdev; rm -rf .child.bridge.contracts.json .root.bridge.contracts.json; ./deploy.sh",
"local:test": "cd scripts/localdev; AXELAR_API_URL=skip npx mocha ../e2e/e2e.ts",
"local:ci": "cd scripts/localdev; rm -rf .child.bridge.contracts.json .root.bridge.contracts.json; ./ci.sh && ./deploy.sh && AXELAR_API_URL=skip npx mocha --require mocha-suppress-logs ../e2e/e2e.ts && ./stop.sh",
"local:chainonly": "cd scripts/localdev; LOCAL_CHAIN_ONLY=true ./start.sh",
"local:axelaronly": "cd scripts/localdev; node axelar_setup.js",
"local:axelaronly": "cd scripts/localdev; npx ts-node axelar_setup.ts",
"stop": "cd scripts/localdev; ./stop.sh"
},
"author": "",
Expand All @@ -27,7 +27,10 @@
"@axelar-network/axelar-local-dev": "^2.1.1-alpha.2",
"@axelar-network/axelarjs-sdk": "^0.12.8",
"@ethersproject/hardware-wallets": "^5.7.0",
"@ledgerhq/hw-app-eth": "^6.35.0",
"@ledgerhq/hw-transport-node-hid": "^6.28.0",
"@openzeppelin/contracts": "^4.5.0",
"@types/chai-as-promised": "^7.1.8",
"axios": "^0.27.2",
"bip39": "^3.0.4",
"config": "^3.3.9",
Expand Down
98 changes: 42 additions & 56 deletions scripts/bootstrap/.env.example
Original file line number Diff line number Diff line change
@@ -1,74 +1,56 @@
# Set prior to 1_deployer_funding.js
# Set prior to 0_pre_validation.js
# Name of the child chain MUST match Axelar's definition.
CHILD_CHAIN_NAME=
# The RPC URL of child chain.
CHILD_RPC_URL=
# The chain ID of the child chain.
CHILD_CHAIN_ID=
# Name of the root chain MUST match Axelar's definition.
ROOT_CHAIN_NAME=
# The RPC URL of root chain.
ROOT_RPC_URL=
# The chain ID of the root chain.
ROOT_CHAIN_ID=
## The admin EOA address on the child chain.
CHILD_ADMIN_ADDR=
## The private key for the admin EOA or "ledger" if using hardware wallet.
CHILD_ADMIN_EOA_SECRET=
## The deployer address on child chain.
CHILD_DEPLOYER_ADDR=
## The private key for the deployer on child chain or "ledger" if using hardware wallet.
CHILD_DEPLOYER_SECRET=
## The amount of fund deployer required on L2, unit is in IMX or 10^18 Wei.
CHILD_DEPLOYER_FUND=
## The deployer address on root chain.
ROOT_DEPLOYER_ADDR=
## The private key for the deployer on root chain or "ledger" if using hardware wallet.
ROOT_DEPLOYER_SECRET=
## The private key for rate admin or "ledger" if using hardware wallet.
ROOT_BRIDGE_RATE_ADMIN_SECRET=
## The deployer address on child & root chains.
DEPLOYER_ADDR=
## The private key for the deployer on child & root chains or "ledger" if using hardware wallet.
DEPLOYER_SECRET=
## The ledger index for the deployer on child & root chains, required if using ledger.
DEPLOYER_LEDGER_INDEX=
## The nonce reserved deployer address on child & root chains.
NONCE_RESERVED_DEPLOYER_ADDR=
## The nonce reserved deployer, or "ledger" if using hardware wallet.
NONCE_RESERVED_DEPLOYER_SECRET=
## The ledger index for the nonce reserved deployer.
NONCE_RESERVED_DEPLOYER_INDEX=
## The reserved nonce for token template deployment.
NONCE_RESERVED=
## The IMX token address on root chain.
ROOT_IMX_ADDR=
## The Wrapped ETH token address on the root chain.
ROOT_WETH_ADDR=
## The Axelar address for receive initial funding on the child chain.
## The Axelar address to receive initial funding on the child chain.
AXELAR_EOA=
## The passport nonce reserver
PASSPORT_NONCE_RESERVER_ADDR=
## The amount of fund Axelar requested, unit is in IMX or 10^18 Wei.
AXELAR_FUND=
## The amount of fund deployer to be left with after bootstrapping on L2, unit is in IMX or 10^18 Wei.
CHILD_DEPLOYER_FUND=
## The amount of fund nonce reserved deployer required on L2, unit is in IMX or 10^18 Wei.
CHILD_NONCE_RESERVED_DEPLOYER_FUND=
## The amount of fund passport reserver required on L2, unit is in IMX or 10^18 Wei.
PASSPORT_NONCE_RESERVER_FUND=
## The maximum amount of IMX that can be deposited to L2, unit is in IMX or 10^18 Wei.
IMX_DEPOSIT_LIMIT=
## The address to perform child bridge upgrade.
CHILD_PROXY_ADMIN=
## The address to be assigned with DEFAULT_ADMIN_ROLE in child bridge.
CHILD_BRIDGE_DEFAULT_ADMIN=
## The address to be assigned with PAUSER_ROLE in child bridge.
CHILD_BRIDGE_PAUSER=
## The address to be assigned with UNPAUSER_ROLE in child bridge.
CHILD_BRIDGE_UNPAUSER=
## The address to be assigned with ADAPTOR_MANAGER_ROLE in child bridge.
CHILD_BRIDGE_ADAPTOR_MANAGER=
## The address to be assigned with DEFAULT_ADMIN_ROLE in child adaptor.
CHILD_ADAPTOR_DEFAULT_ADMIN=
## The address to be assigned with BRIDGE_MANAGER_ROLE in child adaptor.
CHILD_ADAPTOR_BRIDGE_MANAGER=
## The address to be assigned with GAS_SERVICE_MANAGER_ROLE in child adaptor.
CHILD_ADAPTOR_GAS_SERVICE_MANAGER=
## The address to be assigned with TARGET_MANAGER_ROLE in child adaptor.
CHILD_ADAPTOR_TARGET_MANAGER=
## The address to perform root adaptor upgrade.
ROOT_PROXY_ADMIN=
## The address to be assigned with DEFAULT_ADMIN_ROLE in root bridge.
ROOT_BRIDGE_DEFAULT_ADMIN=
## The address to be assigned with PAUSER_ROLE in root bridge.
ROOT_BRIDGE_PAUSER=
## The address to be assigned with UNPAUSER_ROLE in root bridge.
ROOT_BRIDGE_UNPAUSER=
## The address to be assigned with VARIABLE_MANAGER_ROLE in root bridge.
ROOT_BRIDGE_VARIABLE_MANAGER=
## The address to be assigned with ADAPTOR_MANAGER_ROLE in root bridge.
ROOT_BRIDGE_ADAPTOR_MANAGER=
## The address to be assigned with DEFAULT_ADMIN_ROLE in root adaptor.
ROOT_ADAPTOR_DEFAULT_ADMIN=
## The address to be assigned with BRIDGE_MANAGER_ROLE in root adaptor.
ROOT_ADAPTOR_BRIDGE_MANAGER=
## The address to be assigned with GAS_SERVICE_MANAGER_ROLE in root adaptor.
ROOT_ADAPTOR_GAS_SERVICE_MANAGER=
## The address to be assigned with TARGET_MANAGER_ROLE in root adaptor.
ROOT_ADAPTOR_TARGET_MANAGER=
## The privileged transaction Multisig address on the root chain.
ROOT_PRIVILEGED_MULTISIG_ADDR=
# The break glass signer address on the root chain.
ROOT_BREAKGLASS_ADDR=
## The privileged transaction Multisig address on the child chain.
CHILD_PRIVILEGED_MULTISIG_ADDR=
# The break glass signer address on the child chain.
CHILD_BREAKGLASS_ADDR=
## The capacity of the rate limit policy of IMX token, unit is in 10^18.
RATE_LIMIT_IMX_CAPACITY=
## The refill rate of the rate limit policy of IMX token, unit is in 10^18.
Expand Down Expand Up @@ -120,6 +102,10 @@ CHILD_GAS_SERVICE_ADDRESS=
MULTISIG_CONTRACT_ADDRESS=
ROOT_GATEWAY_ADDRESS=
ROOT_GAS_SERVICE_ADDRESS=
## (Optional) to verify child contract after deployment
CHILD_CHAIN_BLOCKSCOUT_API_URL=
## (Optional) to verify root contract after deployment
ROOT_CHAIN_ETHERSCAN_API_KEY=

# Set prior to bridge testing
TEST_ACCOUNT_SECRET=
Loading

0 comments on commit 220bfa6

Please sign in to comment.