1. Create a new Witnet-enabled project¶
This article is part of the beginner tutorial on creating a totally decentralized Bitcoin price feed on Ethereum with Solidity and Witnet.
Using the Witnet Truffle Box¶
If you are creating a new project from scratch, the quickest way to get things working is using Truffle to download a Witnet-enabled project template:
mkdir bitcoin-price-feed
cd bitcoin-price-feed
truffle unbox witnet/truffle-box
You can keep reading this page to learn more about the Truffle box boilerplate, but if you are feeling impatient you can jump straight to defining data sources.
Project folder structure¶
After unboxing you should find yourself in a project that has been populated with the following directory structure:
bitcoin-price-feed
├── contracts // Where your Solidity contracts will be
│ └── requests // Where Witnet requests end up after compilation
├── migrations // Deployment scripts
├── requests // Witnet request source code (.js files)
└── test // Scripts for testing your contracts
Next step: adding data sources¶
You are now ready to move forward into defining the data sources to be used.