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

chore: remove deployments, and hardcode compilation params #116

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1

- name: Run Linter
run: yarn lint
run: forge fmt --check
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ This behavior is acknowledged and should be considered when designing a strategy
An alternative solution is to build a queue mechanism on top of the URD with a 0 timelock distribution. Here, the root updater could be a queue designed as the [Delay Modifier of Zodiac](https://github.com/gnosis/zodiac-modifier-delay/blob/36f56fd2e7a4aeb128971c5567fb8dffb6c6a21b/contracts/Delay.sol).


## Getting Started
## Developers

### Installation

Expand All @@ -102,35 +102,18 @@ yarn
cp .env.example .env
```

### Development
### Testing

Running tests requires forge from [Foundry](https://book.getfoundry.sh/getting-started/installation).

```bash
yarn test
forge t
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
```

### Deployment

- Add the desired network key and its corresponding RPC url to `foundry.toml`
- `yarn deploy {network} --broadcast --sender {sender}` followed with appropriate private key management parameters

> [!NOTE]
> If the provided network's RPC url uses a variable environment (such as `ALCHEMY_KEY`), it should be defined in your `.env`

For example:

```bash
yarn deploy goerli --broadcast --ledger --sender 0x7Ef4174aFdF4514F556439fa2822212278151Db6
```

> [!NOTE]
> Broadcast run logs are to be committed to this repository for future reference.

### Etherscan verification

```bash
yarn verify --watch --chain-id {chainid} --etherscan-api-key {key} {address} src/UrdFactory.sol:UrdFactory
forge create src/UrdFactory.sol:UrdFactory
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
```

## Audits
Expand Down
8 changes: 2 additions & 6 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ fs_permissions = [
{ access = "read", path = "./script/config/"},
{ access = "read", path = "./out/"}
]
optimizer_runs = 200
via-ir = true

[profile.default.fmt]
wrap_comments = true
Expand All @@ -17,12 +19,6 @@ goerli = "https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}"
sepolia = "https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_KEY}"


[profile.build]
via-ir = true
test = "/dev/null"
script = "/dev/null"


[profile.script]
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
src = "/dev/null"
test = "/dev/null"
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
11 changes: 0 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@
"bugs": {
"url": "https://github.com/morpho-org/universal-rewards-distributor/issues"
},
"scripts": {
"prepare": "husky install && forge install",
"script": "FOUNDRY_PROFILE=script forge script",
"build": "FOUNDRY_PROFILE=build forge build",
"deploy": "yarn build && yarn script script/DeployUrdFactory.sol --sig \"run(string memory)\"",
"verify": "FOUNDRY_PROFILE=build forge verify-contract",
"test": "FOUNDRY_PROFILE=test forge test",
"lint": "forge fmt --check",
"lint:fix": "forge fmt",
"clean": "forge clean"
},
"devDependencies": {
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
Expand Down
38 changes: 0 additions & 38 deletions script/ConfiguredScript.sol

This file was deleted.

18 changes: 0 additions & 18 deletions script/DeployUrdFactory.sol

This file was deleted.

3 changes: 0 additions & 3 deletions script/config/ethereum.json

This file was deleted.

3 changes: 0 additions & 3 deletions script/config/goerli.json

This file was deleted.

3 changes: 0 additions & 3 deletions script/config/sepolia.json

This file was deleted.

Loading