Story Contracts
Install Dependencies
-
Install npm
if you haven't.
-
Pull node_modules
.
npm install -g pnpm
pnpm install
Build
- Install
abigen
.
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
- Build the contracts.
make build
Test
- Install
foundry
.
curl -L https://foundry.paradigm.xyz | bash
source ~/.bash_profile
foundryup
- Run tests.
make test
Deploy
These smart contracts are predeploys (part of the genesis state of Execution Layer).
To generate this first state:
- Add a .env file in
contracts/.env
ADMIN_ADDRESS=0x...
TIMELOCK_EXECUTOR_ADDRESS=0x...
TIMELOCK_GUARDIAN_ADDRESS=0x...
ADMIN_ADDRESS
will be the owner of the TimelockController
contract. Will be able to propose transactions to the timelock, and cancel them.
TIMELOCK_EXECUTOR_ADDRESS
address allowed to execute the scheduled actions once the timelock matures.
TIMELOCK_GUARDIAN_ADDRESS
address allowed to cancel proposals
- Run
forge script script/GenerateAlloc.s.sol -vvvv --chain-id <DESIRED_CHAIN_ID>
Copy the contents of the resulting JSON file, and paste in the alloc
item of story-geth
genesis.json