Oracle implementation using Solidity, Truffle and API of stock market info presented as lab assingment for BCDV1011 - Design Patterns for Blockchain from Blockchain Development program from George Brown College.
Open your terminal in the folder you want to clone the project
# Clone this repo
git clone https://github.com/LorranSutter/Stock-Oracle.git
# Go to the project folder
cd Stock-Oracle
# Install dependencies
yarn
Now you will need two opened terminals to run the project. One for truffle to simulate the EVM and another one for the frontend.
Truffle will run on http://127.0.0.1:9545/
Frontend will run on http://localhost:3000/
## In the first terminal ##
# Go to smart contract folder
cd src/StockSmartContract
# Init truffle
truffle develop
# Run migrations
migrate
The last command above will generate a new ABI and write contract address in a JSON file. You do not have to worry about importing these info in the frontend though. Also you may change the smart contract and run migrations again to see your changes.
## In the another terminal ##
# Go to frontend application
cd ..
# Run the project
yarn start
- Alpha Vantage - stock API
- Web3 calls - understanding web3.js calls