spells-mainnet
February 12, 2026 ยท View on GitHub
Staging repo for MakerDAO executive spells.
Instructions
Getting Started
git clone --recurse-submodules git@github.com:sky-ecosystem/spells-mainnet
Build
make
Test (Forge without Optimizations)
Prerequisites
Install Foundry latest stable version.
Operation
Set ETH_RPC_URL to a Mainnet node.
export ETH_RPC_URL=<Mainnet URL>
make test
Deploy
Provide the following environment variables:
ETH_RPC_URL- a Mainnet RPC URLETH_KEYSTORE- a location to the keystore file, e.g.~/.foundry/keystores/deployETHERSCAN_API_KEY- an Etherscan API key for spell verification
Then run:
make deploy
Estimating gas needed for deployment
Gas estimation is generally handled by Foundry automatically. However, manual limits can be specified as well, refer to the forge create documentation.
You can use the following to get a gas estimate for the deploy:
make estimate
Once you have that, add another million gas as a buffer against
out-of-gas errors. Set ETH_GAS_LIMIT to this value.
export ETH_GAS_LIMIT="$((<value from previous step> + 0))"
export ETH_GAS_LIMIT=$(bc <<< "$ETH_GAS_LIMIT + 1000000")
You can also check current gas prices on your favorite site
(e.g. https://ethgasstation.info/) and put that gwei value in the
ETH_GAS_PRICE.
export ETH_GAS_PRICE=$(cast --to-wei 420 "gwei")
Cast to tenderly
- Create Tenderly account (no trial period needed atm) https://dashboard.tenderly.co/register
- Note down
TENDERLY_USERandTENDERLY_PROJECTvalues
- Note down
- Create Tenderly access token (on the account level!) https://dashboard.tenderly.co/account/authorization
- Note down
TENDERLY_ACCESS_KEYvalues
- Note down
- Export required env vars via
exportor createscripts/cast-on-tenderly/.envfile with them:ETH_RPC_URL="" TENDERLY_USER="" TENDERLY_PROJECT="" TENDERLY_ACCESS_KEY="" - Execute
make cast-on-tenderly spell=0x..., with the address of the spell that hasn't been casted yet- The execution should finish with
successfully casted
- The execution should finish with
- Open the
public explorer urlprinted into the console (it should require no credentials)
Important Note on Secrets
We strongly discourage using .env files to store non-revocable secrets (e.g., private keys). Local .env files are an easy target for malware and accidental exposure.
Whenever possible, prefer:
- encrypted accounts/keystores supported by our tooling;
- hardware wallets supported by our tooling.
Configure your setup via environment variables that reference those secure sources (rather than embedding raw secrets in a .env file).