Skip to content

Commit

Permalink
Revert "Replace forge install with soldeer (#18930)" (#19115)
Browse files Browse the repository at this point in the history
This reverts commit 1ce8f6b.

## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
longbowlu authored and emmazzz committed Aug 30, 2024
1 parent 4f4f107 commit ab19439
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 53 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Install Foundry Dependencies
working-directory: bridge/evm
run: |
forge soldeer update
forge install https://github.com/OpenZeppelin/[email protected] https://github.com/foundry-rs/[email protected] https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades --no-git --no-commit
- name: cargo test
run: |
cargo nextest run --profile ci -E 'package(sui-bridge)'
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Install Foundry Dependencies
working-directory: bridge/evm
run: |
forge soldeer update
forge install https://github.com/OpenZeppelin/[email protected] https://github.com/foundry-rs/[email protected] https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades --no-git --no-commit
- name: Check Bridge EVM Unit Tests
shell: bash
working-directory: bridge/evm
Expand Down
3 changes: 2 additions & 1 deletion bridge/evm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ out*/
lcov.info
broadcast/**/31337

dependencies
lib/*

13 changes: 8 additions & 5 deletions bridge/evm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🏄‍♂️ Quick Start

This project leverages [Foundry](https://github.com/foundry-rs/foundry) to manage dependencies (via soldeer), contract compilation, testing, deployment, and on chain interactions via Solidity scripting.
This project leverages [Foundry](https://github.com/foundry-rs/foundry) to manage dependencies, contract compilation, testing, deployment, and on chain interactions via Solidity scripting.

#### Environment configuration

Expand All @@ -14,7 +14,7 @@ Duplicate rename the `.env.example` file to `.env`. You'll need accounts and api
To install the project dependencies, run:

```bash
forge soldeer update
forge install https://github.com/OpenZeppelin/[email protected] https://github.com/foundry-rs/[email protected] https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades --no-git --no-commit
```

#### Compilation
Expand All @@ -28,7 +28,8 @@ forge compile
#### Testing

```bash
forge test
forge clean
forge test --ffi
```

#### Coverage
Expand All @@ -44,13 +45,15 @@ forge coverage
> The file should be named `<chainID>.json` and should have the same fields and in the same order (alphabetical) as the `example.json`.
```bash
forge script script/deploy_bridge.s.sol --rpc-url <<alias>> --broadcast --verify
forge clean
forge script script/deploy_bridge.s.sol --rpc-url <<alias>> --broadcast --verify --ffi
```
**Local deployment**
```bash
forge script script/deploy_bridge.s.sol --fork-url anvil --broadcast
forge clean
forge script script/deploy_bridge.s.sol --fork-url anvil --broadcast --ffi
```
All deployments are saved in the `broadcast` directory.
Expand Down
15 changes: 2 additions & 13 deletions bridge/evm/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,20 @@ src = 'contracts'
test = 'test'
no_match_test = "testSkip"
out = 'out'
libs = ['dependencies']
libs = ['lib']
solc = "0.8.20"
build_info = true
extra_output = ["storageLayout"]
fs_permissions = [{ access = "read", path = "/"}]
gas_reports = ["SuiBridge"]
ffi = true

[fmt]
line_length = 100

[fuzz]
runs = 1000

[rpc_endpoints]
mainnet = "${MAINNET_RPC_URL}"
sepolia = "${SEPOLIA_RPC_URL}"
anvil = "http://localhost:8545"

[etherscan]
sepolia = { key = "${ETHERSCAN_API_KEY}" }
mainnet = { key = "${ETHERSCAN_API_KEY}" }

[dependencies]
forge-std = "1.9.2"
openzeppelin-foundry-upgrades = "0.3.1"
"@openzeppelin-contracts-upgradeable" = "5.0.1"
"@openzeppelin-contracts" = "5.0.1"
mainnet = { key = "${ETHERSCAN_API_KEY}" }
13 changes: 5 additions & 8 deletions bridge/evm/remappings.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@forge-std=dependencies/forge-std-1.9.2/src
@openzeppelin/foundry-upgrades=dependencies/openzeppelin-foundry-upgrades-0.3.1/src
@openzeppelin/contracts=dependencies/@openzeppelin-contracts-5.0.1
@openzeppelin/contracts-upgradeable=dependencies/@openzeppelin-contracts-upgradeable-5.0.1
@forge-std-1.9.2=dependencies/forge-std-1.9.2
@openzeppelin-foundry-upgrades-0.3.1=dependencies/openzeppelin-foundry-upgrades-0.3.1
@openzeppelin-contracts-upgradeable-5.0.1=dependencies/@openzeppelin-contracts-upgradeable-5.0.1
@openzeppelin-contracts-5.0.1=dependencies/@openzeppelin-contracts-5.0.1
@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
@openzeppelin/openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/
ds-test/=lib/forge-std/lib/ds-test/src/
forge-std/=lib/openzeppelin-foundry-upgrades/lib/forge-std/src/
24 changes: 0 additions & 24 deletions bridge/evm/soldeer.lock

This file was deleted.

0 comments on commit ab19439

Please sign in to comment.