description |
---|
Start using Chainlink in your smart contracts and front-end today 😁 |
Author: pharo.eth 🥷🏽
Source code: https://github.com/scaffold-eth/scaffold-eth-examples/tree/chainlink-tutorial-1
Intended audience: Beginners/Intermediate
Topics: Scaffold-eth basics, Chainlink, API Integration, VRF, Price Feeds
From a terminal or code editor of your choice start by cloning the repo.
git clone -b chainlink-tutorial-1 https://github.com/scaffold-eth/scaffold-eth-examples.git app
cd app
Update all the packages.
yarn install
Generate a deployer account and mnemonic.
yarn generate
You can ignore the warnings here.
You need to fund your account with ETH to deploy on the Kovan network. By running the following command it will show you the deployer address and the balance.
Testnet ETH is available from:
- Kovan: https://faucet.kovan.network/
- Rinkeby: https://faucet.rinkeby.io/
yarn account
Now you are ready to deploy your contracts.
yarn deploy
Start the front-end application.
yarn start
When your application starts at http://localhost:3000 you will see your contracts interfaces. These have all been pre-added in the App.jsx file.
You still need to fund the RandomNumberConsumer contract with LINK so copy the address and send it some test LINK.
Side Quest - use deploy.js to fund the contract with LINK after funding deployer account.
- Testnet LINK is available from https://kovan.chain.link/
ToDo: gather the screen shots, show how I designed a dice roll with the RNG result in solidity.