Skip to content

Commit

Permalink
chore(withdrawer): replace contracts with astria-bridge-contracts s…
Browse files Browse the repository at this point in the history
…ubmodule (#1164)

## Summary
the bridge contracts were moved to their own repo
(https://github.com/astriaorg/astria-bridge-contracts/tree/main) as we
rely on them in astria-geth as well. this replaces the contracts in the
repo with a submodule.

## Changes
- replace withdrawer contracts with `astria-bridge-contracts` submodule

## Testing
n/a
  • Loading branch information
noot committed Jun 8, 2024
1 parent 29baa40 commit 7a0a17a
Show file tree
Hide file tree
Showing 24 changed files with 678 additions and 367 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/[email protected]
- uses: taiki-e/[email protected]
with:
Expand Down Expand Up @@ -97,6 +99,8 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/[email protected]
- uses: Swatinem/[email protected]
with:
Expand All @@ -123,6 +127,8 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/[email protected]
- uses: Swatinem/[email protected]
with:
Expand All @@ -146,6 +152,8 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/[email protected]
- uses: Swatinem/[email protected]
with:
Expand All @@ -163,6 +171,8 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true' && needs.run_checker.outputs.run_lint_rust == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/[email protected]
with:
components: clippy
Expand All @@ -189,6 +199,8 @@ jobs:
if: needs.run_checker.outputs.run_tests == 'true' && needs.run_checker.outputs.run_lint_rust == 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@v1
with:
# This has to match `rust-toolchain` in the rust-toolchain file of the dylint lints
Expand Down
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "crates/astria-bridge-withdrawer/ethereum/lib/forge-std"]
path = crates/astria-bridge-withdrawer/ethereum/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "crates/astria-bridge-withdrawer/ethereum/lib/openzeppelin-contracts"]
path = crates/astria-bridge-withdrawer/ethereum/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "crates/astria-bridge-withdrawer/astria-bridge-contracts"]
path = crates/astria-bridge-withdrawer/astria-bridge-contracts
url = https://github.com/astriaorg/astria-bridge-contracts.git
1 change: 1 addition & 0 deletions crates/astria-bridge-withdrawer/astria-bridge-contracts
6 changes: 3 additions & 3 deletions crates/astria-bridge-withdrawer/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

Abigen::new(
"IAstriaWithdrawer",
"./ethereum/out/IAstriaWithdrawer.sol/IAstriaWithdrawer.json",
"./astria-bridge-contracts/out/IAstriaWithdrawer.sol/IAstriaWithdrawer.json",
)?
.generate()?
.write_to_file("./src/withdrawer/ethereum/generated/astria_withdrawer_interface.rs")?;

Abigen::new(
"AstriaWithdrawer",
"./ethereum/out/AstriaWithdrawer.sol/AstriaWithdrawer.json",
"./astria-bridge-contracts/out/AstriaWithdrawer.sol/AstriaWithdrawer.json",
)?
.generate()?
.write_to_file("./src/withdrawer/ethereum/generated/astria_withdrawer.rs")?;

Abigen::new(
"AstriaBridgeableERC20",
"./ethereum/out/AstriaBridgeableERC20.sol/AstriaBridgeableERC20.json",
"./astria-bridge-contracts/out/AstriaBridgeableERC20.sol/AstriaBridgeableERC20.json",
)?
.generate()?
.write_to_file("./src/withdrawer/ethereum/generated/astria_bridgeable_erc20.rs")?;
Expand Down
14 changes: 0 additions & 14 deletions crates/astria-bridge-withdrawer/ethereum/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions crates/astria-bridge-withdrawer/ethereum/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions crates/astria-bridge-withdrawer/ethereum/foundry.toml

This file was deleted.

1 change: 0 additions & 1 deletion crates/astria-bridge-withdrawer/ethereum/lib/forge-std
Submodule forge-std deleted from 978ac6
Submodule openzeppelin-contracts deleted from dbb610
26 changes: 0 additions & 26 deletions crates/astria-bridge-withdrawer/ethereum/local.env.example

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7a0a17a

Please sign in to comment.