Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMR 2250: Preparing repo for open source release #98

Merged
merged 5 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ermyas @wcgcyx @Benjimmutable
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,12 @@ $ forge build
```

### Testing
To run all tests (unit, integration, and fork tests), run the following command:
To run unit, integration and fuzz tests execute the following command:
```shell
$ forge test
$ forge test --no-match-path "test/{fork,invariant}/**"
```
This requires setting the relevant environment variables as described in the "Fork Test" section below.

**Unit and Integration Tests Only**
```shell
$ forge test --no-match-path "test/fork/**"
```

**Fork Tests Only**
**Fork Tests**

The fork tests run a suite of tests against one or more deployments of the bridge.
To run these tests copy [`.env.example`](.env.example) file to a `.env` file and set the `MAINNET_RPC_URL` and `TESTNET_RPC_URL` environment variables. Set or update any other environment variables as required.
Expand Down
6 changes: 3 additions & 3 deletions deployments/mainnet/.env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ RATE_LIMIT_ETH_LARGE_THRESHOLD=5.04
## https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=20016
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=5.56
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=10008

# Set prior to 2_deployment_validation.js
Expand Down
6 changes: 3 additions & 3 deletions deployments/testnet/.env.testnet
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ RATE_LIMIT_ETH_REFILL_RATE=0.0028
RATE_LIMIT_ETH_LARGE_THRESHOLD=5.04
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=0xca6c31cc71fb8f00dc2c465299f605039e0e1f4b
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=20016
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=5.56
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=10008
## The address of GU token to set rate limit policy.
RATE_LIMIT_GU_ADDR=0x5c9f1680bb6a4b4fc698e0cf702e0cc34aed91b7
Expand Down
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ src = "src"
out = "out"
libs = ["lib"]
solc-version = "0.8.19"

# Reason for why this flag is required can be found here: https://github.com/foundry-rs/foundry/issues/7607
unchecked_cheatcode_artifacts = true
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
6 changes: 3 additions & 3 deletions scripts/bootstrap/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ RATE_LIMIT_ETH_REFILL_RATE=
RATE_LIMIT_ETH_LARGE_THRESHOLD=
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=
## The address of GU token to set rate limit policy.
RATE_LIMIT_GU_ADDR=
Expand Down
6 changes: 3 additions & 3 deletions scripts/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ RATE_LIMIT_ETH_REFILL_RATE=
RATE_LIMIT_ETH_LARGE_THRESHOLD=
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=
## The address of GU token to set rate limit policy.
RATE_LIMIT_GU_ADDR=
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ RATE_LIMIT_ETH_REFILL_RATE=
RATE_LIMIT_ETH_LARGE_THRESHOLD=
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=
## The address of GU token to set rate limit policy.
RATE_LIMIT_GU_ADDR=
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ RATE_LIMIT_ETH_REFILL_RATE=
RATE_LIMIT_ETH_LARGE_THRESHOLD=
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=
## The address of GU token to set rate limit policy.
RATE_LIMIT_GU_ADDR=
Expand Down
6 changes: 3 additions & 3 deletions scripts/localdev/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ RATE_LIMIT_ETH_REFILL_RATE=0.0028
RATE_LIMIT_ETH_LARGE_THRESHOLD=5.04
## The address of USDC token to set rate limit policy.
RATE_LIMIT_USDC_ADDR=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
## The capacity of the rate limit policy of USDC token, unit is in 10^18.
## The capacity of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_CAPACITY=20016
## The refill rate of the rate limit policy of USDC token, unit is in 10^18.
## The refill rate of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_REFILL_RATE=5.56
## The large threshold of the rate limit policy of USDC token, unit is in 10^18.
## The large threshold of the rate limit policy of USDC token, unit is in 10^6.
RATE_LIMIT_USDC_LARGE_THRESHOLD=10008
## The address of GU token to set rate limit policy.
RATE_LIMIT_GU_ADDR=0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97
Expand Down
Loading