Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 1.84 KB

README.md

File metadata and controls

75 lines (52 loc) · 1.84 KB

astria-bridge-withdrawer

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.

AstriaWithdrawer.sol

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

AstriaBridgeableERC20.sol

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