DEPLOYER_PRIVATE_KEY
: Deployer's private keyANALYZER_PRIVATE_KEY
: Analyzer's private keyALCHEMY_KEY
: Alchemy key
echo "{}" > ./scripts/data/deployedContracts.json # initialize contract addresses
npx hardhat run ./scripts/deploy/1_deployToL2.ts --network scrollSepolia
npx hardhat run ./scripts/deploy/2_deployToL1.ts --network sepolia
npx hardhat run ./scripts/deploy/3_initializeOnL2.ts --network scrollSepolia
User deposits Eth to the contract and cancels the deposit.
npx hardhat run scripts/test/depositAndCancelEth.ts --network sepolia
User deposits Eth to the contract and cancels the deposit.
npx hardhat run scripts/test/depositAndCancelERC20.ts --network sepolia
The analyzer checks the deposit and rejects deposits that do not meet the AML criteria. Before running this script, make at least one deposit. By commenting out the cancel part of the above script, you can make a deposit only.
npx hardhat run scripts/test/analyzeDeposit.ts --network sepolia
The relayer relays the already analyzed deposits to L2. Before running this script, you need to run the analyzeDeposit script.
npx hardhat run scripts/test/relayDeposits.ts --network sepolia
Block builders need to stake and register the URL of their API endpoint to post blocks.
npx hardhat run scripts/test/updateBlockBuilder.ts --network scrollSepolia
Block builders post blocks to the contract.
npx hardhat run scripts/test/postBlock.ts --network scrollSepolia
User wants to withdraw assets from Intmax2. The withdrawal aggregator aggregates the user's balance proof and generates a withdrawal proof. Then, the withdrawal aggregator submits the withdrawal proof to the withdrawal contract by running the following script.
npx hardhat run scripts/test/withdrawalL2.ts --network scrollSepolia
Withdrawal aggregator relays user's withdrawal on L2 to L1.
npx hardhat run scripts/test/relayWithdrawals.ts --network scrollSepolia
npm run test test/integration.ts
npx hardhat run scripts/e2e/1_deposit.ts --network sepolia
npx hardhat run scripts/e2e/2_withdrawal_l2.ts --network scrollSepolia
This script should be executed after the messaging bridge of scroll is completed. This usually takes a few hours.
npx hardhat run scripts/e2e/3_withdrawal_l1.ts --network sepolia
npm run lint