https://github.com/ryanio/truffle-mint-dai
Demonstration repo to show how you can acquire your own forked mainnet DAI.
https://github.com/ryanio/truffle-mint-dai
Last synced: about 1 year ago
JSON representation
Demonstration repo to show how you can acquire your own forked mainnet DAI.
- Host: GitHub
- URL: https://github.com/ryanio/truffle-mint-dai
- Owner: ryanio
- Created: 2019-11-05T17:16:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T01:35:36.000Z (over 3 years ago)
- Last Synced: 2025-04-19T12:14:10.219Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://medium.com/ethereum-grid/forking-ethereum-mainnet-mint-your-own-dai-d8b62a82b3f7
- Size: 649 KB
- Stars: 19
- Watchers: 0
- Forks: 11
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Truffle Mint Dai
[](https://github.com/ryanio/truffle-mint-dai/actions)
This repo is a [Truffle](https://www.trufflesuite.com) project as an accompanying supplement to the article [Forking Ethereum Mainnet: Mint Your Own DAI](https://medium.com/ethereum-grid/forking-mainnet-for-an-easy-local-ethereum-developer-environment-d8b62a82b3f7).
This repo contains a test suite that shows you how you can acquire your own DAI on a forked mainnet.
First run `yarn` and then set up your environment variables by running:
`export ETHEREUM_NODE=https://mainnet.infura.io/v3/your_project_id`
(If using geth, `ETHEREUM_NODE` may look like: `http://localhost:8545`)
and
`export USER_ADDRESS=$(yarn --silent getAddress)`
Then run:
`yarn ganache`
#### Tests
After your forked mainnet with `ganache-cli` is up and running, in a separate terminal run:
`yarn test`
You should expect output like below:
