This repository contains a script to generate governance transactions for the Story protocol, referenced in SIPs. It uses foundry script to generate the raw transactions so the community and signers can verify them
npm install -g pnpm
pnpm install
curl -L https://foundry.paradigm.xyz | bash
source ~/.bash_profile
foundryup
Since admin transactions are timelocked in Story, for execution they have to be scheduled and executed after a delay. To help properly encode the transaction and be a source of truth for the community, we developed helper contracts.
JSONTxHelper
will generate a JSON file with the transactions and store them in the script/admin-actions/output/<chainId>
folder.
- Inherit from
JSONTimelockedOperations
- Set the
from
address to the admin address - Set the
Modes
toModes.SCHEDULE
,Modes.EXECUTE
orModes.CANCEL
Modes.SCHEDULE
: Governance process will schedule the transaction to be executed after a delayModes.EXECUTE
: Execution is public on Story mainnet to ensure the governance process can be executed by any address.Modes.CANCEL
: In order to block scheduled erroneous or malicious transactions, a Security Council is being constituted, which controls a wallet with the CANCELLER/Guardian role. The role allows cancelling scheduled transactions during the timelock period.
- Run the script.
forge script script/admin-actions/<script_name>.s.sol -vvvv --rpc-url <RPC_URL>
// TODO