-
Notifications
You must be signed in to change notification settings - Fork 1
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
6948754
commit 88d3ef6
Showing
9 changed files
with
145 additions
and
123 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Common Changelog](https://common-changelog.org/). | ||
|
||
[1.0.0]: https://github.com/chronicleprotocol/greenhouse/releases/tag/v1.0.0 | ||
|
||
## [1.0.0] - 2023-08-01 | ||
|
||
### Added | ||
|
||
- Initial release |
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
Submodule chronicle-std
updated
6 files
+11 −11 | script/IAuthChaincheck.sol | |
+11 −11 | script/ITollChaincheck.sol | |
+11 −11 | src/auth/Auth.sol | |
+5 −3 | test/auth/Auth.t.sol | |
+2 −2 | test/auth/IAuthTest.sol | |
+4 −2 | test/toll/Toll.t.sol |
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
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Greenhouse Script | ||
|
||
This document describes how to deploy and manage `Greenhouse` instances via the `Greenhouse.s.sol`'s `GreenhouseScript`. | ||
|
||
The following environment variables are necessary for all commands: | ||
|
||
- `RPC_URL`: The RPC URL of an EVM node | ||
- `PRIVATE_KEY`: The private key to use | ||
|
||
Note that foundry offers different wallet options, for more info see `$ forge script -h`. | ||
|
||
## Deployment | ||
|
||
Set the following environment variables: | ||
- `ETHERSCAN_API_KEY`: The Etherscan API key for the Etherscan's chain instance | ||
- `INITIAL_AUTHED`: The address being auth'ed on the newly deployed `Greenhouse` instance | ||
|
||
Run: | ||
```bash | ||
$ forge script \ | ||
--private-key $PRIVATE_KEY \ | ||
--broadcast \ | ||
--rpc-url $RPC_URL \ | ||
--etherscan-api-key $ETHERSCAN_API_KEY \ | ||
--verify \ | ||
--sig $(cast calldata "deploy(address)" $INITIAL_AUTHED) \ | ||
-vvv \ | ||
script/Greenhouse.s.sol:GreenhouseScript | ||
``` | ||
|
||
|
||
## Management | ||
|
||
`Greenhouse` implements `chronicle-std`'s `Auth` and `Toll` modules which can be configured. | ||
|
||
Set the following environment variables: | ||
- `GREENHOUSE`: The `Greenhouse` instance's address | ||
|
||
### `IAuth::rely` | ||
|
||
Set the following environment variables: | ||
- `WHO`: The address to grant auth to | ||
|
||
Run: | ||
```bash | ||
$ forge script \ | ||
--private-key $PRIVATE_KEY \ | ||
--broadcast \ | ||
--rpc-url $RPC_URL \ | ||
--sig $(cast calldata "rely(address,address)" $GREENHOUSE $WHO) \ | ||
-vvv \ | ||
script/Greenhouse.s.sol:GreenhouseScript | ||
``` | ||
|
||
### `IAuth::deny` | ||
|
||
Set the following environment variables: | ||
- `WHO`: The address renounce auth from | ||
|
||
Run: | ||
```bash | ||
$ forge script \ | ||
--private-key $PRIVATE_KEY \ | ||
--broadcast \ | ||
--rpc-url $RPC_URL \ | ||
--sig $(cast calldata "deny(address,address)" $GREENHOUSE $WHO) \ | ||
-vvv \ | ||
script/Greenhouse.s.sol:GreenhouseScript | ||
``` | ||
|
||
### `IToll::kiss` | ||
|
||
Set the following environment variables: | ||
- `WHO`: The address grant toll to | ||
|
||
Run: | ||
```bash | ||
$ forge script \ | ||
--private-key $PRIVATE_KEY \ | ||
--broadcast \ | ||
--rpc-url $RPC_URL \ | ||
--sig $(cast calldata "kiss(address,address)" $GREENHOUSE $WHO) \ | ||
-vvv \ | ||
script/Greenhouse.s.sol:GreenhouseScript | ||
``` | ||
|
||
### `IToll::diss` | ||
|
||
Set the following environment variables: | ||
- `WHO`: The address renounce toll from | ||
|
||
Run: | ||
```bash | ||
$ forge script \ | ||
--private-key $PRIVATE_KEY \ | ||
--broadcast \ | ||
--rpc-url $RPC_URL \ | ||
--sig $(cast calldata "diss(address,address)" $GREENHOUSE $WHO) \ | ||
-vvv \ | ||
script/Greenhouse.s.sol:GreenhouseScript | ||
``` |
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
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
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