Skip to content

Commit

Permalink
refactor: reduce dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
0xClandestine committed Jan 30, 2025
1 parent 4b17531 commit ceac804
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 48 deletions.
Empty file removed .solhintignore
Empty file.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ This will:

We have a few fork tests against ETH mainnet. Passing these requires the environment variable `RPC_MAINNET` to be set. See `.env.example` for an example. Once you've set up your environment, `forge test` should show these fork tests passing.

Additionally, to run all tests in a forked environment, [install yq](https://mikefarah.gitbook.io/yq/v/v3.x/). Then, set up your environment using this script to read from `config.yml`:
Additionally, to run all tests in a forked environment, [install yq](https://mikefarah.gitbook.io/yq/v/v3.x/). Then, set up your environment by running the following command.

`source source-env.sh [goerli|local]`
`source bin/source-env.sh [goerli|local]`

Then run the tests:

Expand Down
20 changes: 5 additions & 15 deletions source-env.sh → bin/source-env.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
#!/bin/bash

# Check if yq is installed
if ! command -v yq &> /dev/null
then
echo "yq is not installed. Please install it and try again."
return 1
fi

# Check for arguments
if [ "$#" -ne 1 ]; then
echo "Usage: $0 [goerli|local]"
return 1
fi

# Read the YAML file
CONFIG_FILE="config.yml"

case $1 in
goerli)
CHAIN_ID=$(yq e '.goerli.CHAIN_ID' $CONFIG_FILE)
EXECUTOR_MULTISIG=$(yq e '.goerli.EXECUTOR_MULTISIG' $CONFIG_FILE)
FOUNDRY_FUZZ_RUNS=$(yq e '.goerli.FOUNDRY_FUZZ_RUNS' $CONFIG_FILE)
CHAIN_ID=5
EXECUTOR_MULTISIG="0x3d9C2c2B40d890ad53E27947402e977155CD2808"
FOUNDRY_FUZZ_RUNS=1
;;
local)
CHAIN_ID=$(yq e '.local.CHAIN_ID' $CONFIG_FILE)
FOUNDRY_FUZZ_RUNS=$(yq e '.local.FOUNDRY_FUZZ_RUNS' $CONFIG_FILE)
CHAIN_ID=31337
FOUNDRY_FUZZ_RUNS=256
;;
*)
echo "Invalid argument. Usage: $0 [goerli|local]"
Expand Down
7 changes: 0 additions & 7 deletions config.yml

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

23 changes: 0 additions & 23 deletions test.sh

This file was deleted.

0 comments on commit ceac804

Please sign in to comment.