-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92826e7
commit 6a81167
Showing
1 changed file
with
13 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,30 @@ | ||
## Foundry | ||
## Zeus Templates | ||
|
||
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** | ||
|
||
Foundry consists of: | ||
|
||
- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). | ||
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. | ||
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. | ||
- **Chisel**: Fast, utilitarian, and verbose solidity REPL. | ||
|
||
## Documentation | ||
|
||
https://book.getfoundry.sh/ | ||
This repo sets up template contracts for [Zeus](https://github.com/Layr-Labs/zeus), the staged web3 deployer + metadata management CLI. | ||
|
||
## Usage | ||
|
||
### Build | ||
|
||
```shell | ||
$ forge build | ||
``` | ||
|
||
### Test | ||
|
||
```shell | ||
$ forge test | ||
``` | ||
|
||
### Format | ||
The `templates` directory contains all relevant abstract contracts for scripts to inherit. | ||
|
||
```shell | ||
$ forge fmt | ||
``` | ||
An example import is `import {EOADeployer} from "zeus-templates/templates/EOADeployer.sol";` | ||
|
||
### Gas Snapshots | ||
### EOADeployer | ||
|
||
```shell | ||
$ forge snapshot | ||
``` | ||
A generic script with a `deploy(string memory)` entry function for setting up any number of consecutive deploys. | ||
|
||
### Anvil | ||
### MultisigBuilder | ||
|
||
```shell | ||
$ anvil | ||
``` | ||
A generic script with an `execute(string memory)` entry function for setting up any number of arbitrary calls from a multisig. Uses the `MultiSendCallOnly` contract for batching multiple calls into one transaction. | ||
|
||
### Deploy | ||
### OpsTimelockBuilder | ||
|
||
```shell | ||
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key> | ||
``` | ||
A specialized script for the Operations Multisig, allowing for calls to be written for queueing into the Timelock before being sent to the Executor Multisig. See [the multisig governance documentation](https://docs.eigenlayer.xyz/eigenlayer/security/multisig-governance) for more details on EigenLayer's onchain role structure. | ||
|
||
### Cast | ||
## Install via Foundry | ||
|
||
```shell | ||
$ cast <subcommand> | ||
forge install Layr-labs/zeus-templates | ||
``` | ||
|
||
### Help | ||
Run `forge install` inside a relevant repo that Zeus is using as a $ZEUS_CONTRACTS repo (e.g. [eigenlayer-contracts](https://github.com/Layr-Labs/eigenlayer-contracts)). | ||
|
||
```shell | ||
$ forge --help | ||
$ anvil --help | ||
$ cast --help | ||
``` |