Skip to content

Staging repo for MakerDAO weekly executive spells

License

Notifications You must be signed in to change notification settings

ultraschuppi/spells-mainnet

 
 

Repository files navigation

spells-mainnet

Build Status

Staging repo for MakerDAO weekly executive spells.

Instructions

Getting Started

$ git clone [email protected]:makerdao/spells-mainnet.git
$ dapp update

Build

$ make

Test (DappTools without Optimizations)

Set ETH_RPC_URL to a Mainnet node.

$ export ETH_RPC_URL=<Mainnet URL>
$ make test

Test (Forge without Optimizations)

Prerequisites

  1. Install Rust.
  2. Install Forge.

Operation

Set ETH_RPC_URL to a Mainnet node.

$ export ETH_RPC_URL=<Mainnet URL>
$ make test-forge

Deploy

Set ETH_RPC_URL to a Mainnet node and ensure ETH_GAS is set to a high enough number to deploy the contract.

$ export ETH_RPC_URL=<Mainnet URL>
$ export ETH_GAS=5000000
$ export ETH_GAS_PRICE=$(seth --to-wei 100 "gwei")
$ make deploy

A few helpful tips to estimate gas. You can use the following to get a gas estimate for the deploy.

make all
make estimate

Once you have that, add another million gas as a buffer against out-of-gas errors. Set ETH_GAS to this value.

export ETH_GAS="$((<value from previous step> + 0))"
export ETH_GAS=$(bc <<< "$ETH_GAS + 1000000")

You should also check current gas prices on your favorite site (e.g. https://ethgasstation.info/) and put that gwei value in the ETH_GAS_PRICE line.

export ETH_GAS_PRICE=$(seth --to-wei 420 "gwei")

About

Staging repo for MakerDAO weekly executive spells

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 99.7%
  • Other 0.3%