GithubHelp home page GithubHelp logo

ravenerzz / spells-mainnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makerdao/spells-mainnet

0.0 0.0 0.0 1.66 MB

Staging repo for MakerDAO weekly executive spells

License: GNU Affero General Public License v3.0

Shell 0.16% JavaScript 0.03% Python 0.07% Makefile 0.01% Solidity 99.73%

spells-mainnet's Introduction

spells-mainnet

Build Status

Staging repo for MakerDAO 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_LIMIT is set to a high enough number to deploy the contract.

$ export ETH_RPC_URL=<Mainnet URL>
$ export ETH_GAS_LIMIT=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_LIMIT to this value.

export ETH_GAS_LIMIT="$((<value from previous step> + 0))"
export ETH_GAS_LIMIT=$(bc <<< "$ETH_GAS_LIMIT + 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")

Cast to tenderly

  1. Create Tenderly account (no trial period needed atm) https://dashboard.tenderly.co/register
    • Note down TENDERLY_USER and TENDERLY_PROJECT values
  2. Create Tenderly access token (on the account level!) https://dashboard.tenderly.co/account/authorization
    • Note down TENDERLY_ACCESS_KEY values
  3. Export required env vars via export or create scripts/cast-on-tenderly/.env file with them:
    ETH_RPC_URL=""
    TENDERLY_USER=""
    TENDERLY_PROJECT=""
    TENDERLY_ACCESS_KEY=""
  4. 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
  5. Open the public explorer url printed into the console (it should require no credentials)

spells-mainnet's People

Contributors

brianmcmichael avatar gbalabasquer avatar amusingaxl avatar iamchrissmith avatar naszam avatar godsflaw avatar nanexcool avatar kmbarry1 avatar hexonaut avatar wilbarnes avatar hbarcelos avatar sidestreamcoldmelon avatar 0xdecr1pto avatar talbaneth avatar julienmartinlevrai avatar rockyfour avatar sidestreamsweatypumpkin avatar andy8052 avatar the-arbiter avatar dizzy avatar e18r avatar krzkaczor avatar olivdb avatar 0xp3th1um avatar sidestreamstrongstrawberry avatar wilfredta avatar wei3erhase avatar oddaf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.