Across
How to verify Across Bundles
Last updated
Was this helpful?
How to verify Across Bundles
Last updated
Was this helpful?
Step 1: Install Required Dependencies:
git:
Documentation:
yarn:
Documentation:
node.js
Documentation:
Run the following command to check what version of node you are running: node -v
Make sure it is greater than 16.18.0.
redis:
Documentation:
Note: Follow the instructions
ts-node
You can use the following to install globally: npm install -g ts-node
Nvm (optional)
Documentation:
Note: Optional, but nvm allows you to easily install and switch between node versions
VS Code (optional)
Highly recommend using a code editor like VS code.
Step 2: Clone the relayer-v2 repo:
If using VS code, open the terminal and run the following command:
Step 3: Run Redis
Open a terminal window and run:
Step 4: Environment Variables
Change the .env.example file to .env
In line 8 and 9, uncomment either the MNEMONIC or PRIVATE_KEY and input a private key that has no money on it.
In the .env file, update the following env variables to the URL for your infura account. The underscore number at the end of the variable represents the chain ID. So RPC_PROVIDER_ALCHEMY_1 is mainnet.
Include the NODE_URL_324 for zksync below even though it hasn’t been added to the .env.example file yet:
Step 5: Run the script
The below is an example, however the two changes that need to be made based on the request are:
REQUEST_TIME=CHANGE_THIS_TO_THE_TIMESTAMP
I used privateKey for the below, however, if you used mnemonic in your env variables, it should be changed to –wallet mnemonic
Note: The first time you run this, it is going to take a long time.
REQUEST_TIME=1692110627 ts-node ./src/scripts/validateRootBundle.ts --wallet privateKey
When the script finishes running, check the Validation results as shown below. The below shows an example of an invalid bundle as it shows “valid”: false:
Appendix
For additional documentation on Across root bundles, visit:
I used to create a private key to use for the demo but again, do not use one that has any money on it as it is an unnecessary risk.
Sign up for an Infura account and click ‘Create New API Key’. After you create the key, you should see a list of endpoints for each network.
You can use to find the ID by network.