Skip to content

astriaorg/astria-bridge-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

contracts for astria's rollup bridging protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published