Forge project for the bridge withdrawer contract.
Requirements:
- foundry
Build:
forge build
Copy the example .env: cp local.env.example .env
Put your private key in .env
and source .env
.
Deploy AstriaWithdrawer.sol
:
forge script script/AstriaWithdrawer.s.sol:AstriaWithdrawerScript \
--rpc-url $RPC_URL --broadcast --sig "deploy()" -vvvv
Call withdrawToSequencer
in AstriaWithdrawer.sol
:
forge script script/AstriaWithdrawer.s.sol:AstriaWithdrawerScript \
--rpc-url $RPC_URL --broadcast --sig "withdrawToSequencer()" -vvvv
Call withdrawToOriginChain
in AstriaWithdrawer.sol
:
forge script script/AstriaWithdrawer.s.sol:AstriaWithdrawerScript \
--rpc-url $RPC_URL --broadcast --sig "withdrawToOriginChain()" -vvvv
Deploy AstriaBridgeableERC20.sol
:
forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \
--rpc-url $RPC_URL --broadcast --sig "deploy()" -vvvv
Mint tokens (note that this will only work on a local anvil network, as it uses vm.prank()
)
forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \
--rpc-url $RPC_URL --broadcast --sig "mint()" -vvvv
Get balance:
forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \
--rpc-url $RPC_URL --sig "getBalance()" -vvvv
Call withdrawToSequencer
in AstriaBridgeableERC20.sol
:
forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \
--rpc-url $RPC_URL --broadcast --sig "withdrawToSequencer()" -vvvv
Call withdrawToOriginChain
in AstriaBridgeableERC20.sol
:
forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \
--rpc-url $RPC_URL --broadcast --sig "withdrawToOriginChain()" -vvvv