This is a utility for running a local Bedrock devnet.
It allows us to quickly start the devnet locally (with L1 network as BSC network and L2 network as opbnb network).
docker, nodejs 16+, yarn, foundry, python2, python3
Tips:
Install Foundry by following the instructions located here.
First, execute yarn install
and yarn build
commands in the root directory.
Then we can use the following commands in the project root directory:
Initialize and start devnet:
make devnet-up-deploy
Stop devnet:
make devnet-down
Stop and clean devnet data:
make devnet-clean
View devnet logs:
make devnet-logs
- If you encounter a ValueError: invalid mode: 'rU' while trying to load binding.gyp error when executing
yarn install
, this may be caused by python3 installed on your computer but Npm requires python 2.7. You need to install python 2.7 and configure the environment variable to specify the python version to use:export npm_config_python=/path/to/executable/python
. - When executing for the first time, please be patient if you see the message "wait L1 up...", as the BSC network takes time to initialize.
- If you encounter an error during the "Deploying contracts" step, please try again as it usually recovers.
- Do not use the
make devnet-up
command, use themake devnet-up-deploy
command to start devnet. Thedevnet-up
command is not well adapted. - L1 is accessible at https://localhost:8545, and L2 is accessible at https://localhost:9545
L1 chain ID is 714.
L2 chain ID is 901.
L1 test account:
address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Private key: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
L2 test account:
Address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Private key: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80