-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh: Project Structure refactor (#12)
* move hh project to the repo root * updated the readme * update pr workflow * update .gitignore
- Loading branch information
Showing
50 changed files
with
90 additions
and
497 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DEPLOYER_PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 | ||
|
||
ETHEREUM_GOERLI_RPC=API | ||
ETHEREUM_SEPOLICA_RPC=API | ||
|
||
ETHERSCAN_API_KEY=API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,56 @@ | ||
# Token Price Oracle | ||
A simple oracle for tracking token prices on-chain and accompanying API | ||
for tracking & management of the data. | ||
![Token Price Oracle - SC - banner](./assets/banner.jpeg) | ||
# Token Price Oracle - Smart Contracts 📑 | ||
The core Solidity contracts for the Token Price Oracle | ||
|
||
## Contributions | ||
## Requirements ✅ | ||
To run the project, you'll need: | ||
- [Node.js](https://nodejs.org/en/) (Version 16 works) | ||
- [Yarn](https://yarnpkg.com/) | ||
|
||
## Running the project 🚀 | ||
### Installation ⚙️ | ||
#### Git 🦑 | ||
1. Clone the repo: ```git clone https://github.com/pajicf/token-price-oracle.git``` | ||
2. Navigate to the folder: ```cd token-price-oracle``` | ||
|
||
#### Installing the dependencies 🧱 | ||
3. Run ```yarn``` to install the dependencies | ||
4. Run ```cp .env.example .env``` and fill the values | ||
|
||
#### Hardhat 👷♂️ | ||
- Compile: ```yarn compile``` | ||
- Tests: ```yarn test``` | ||
|
||
#### Contracts CLI 🧑💻 | ||
- Set a new price for a ticker: ```yarn contracts:set-ticker-price``` | ||
- Set a new feed for a ticker: ```yarn contracts:set-ticker-feed``` | ||
|
||
#### Miscellanious 🧹 | ||
- Project linting: ```yarn lint``` | ||
- Documentation generation: ```yarn docs:generate``` | ||
|
||
## Documentation 📚 | ||
All the Smart Contract documentation can be found inside the `/docs` folder: | ||
- [`docs/api`](https://github.com/pajicf/token-price-oracle/tree/main/docs/api) - Contains the API of the Smart Contracts generated from the natspec | ||
- [`docs/diagrams`](https://github.com/pajicf/token-price-oracle/tree/main/docs/diagrams) - Contains the Diagrams of common SC interactions | ||
|
||
## Deployments 🌐 | ||
### How to Deploy on a new network? 📜 | ||
The Deployment is done decoratively using [Hardhat Ignition](https://hardhat.org/ignition/docs/getting-started#overview). | ||
To deploy to the new network, you should: | ||
1. Add the network to the [`hardhat.config.ts`](https://github.com/pajicf/token-price-oracle/blob/main/contracts/hardhat.config.ts) file | ||
2. Run ```yarn hardhat ignition deploy /ignition/modules/TickerPriceStorage.ts --network yournewnetwok --verify``` | ||
> [!IMPORTANT] | ||
> Ensure that the network you're deploying supports Etherscan for verification to be successfull | ||
### Bytecode 💼 | ||
All the deployment and build artifacts are located inside [`ignition/deplotments`](https://github.com/pajicf/token-price-oracle/tree/main/ignition/deployments) | ||
|
||
### Block Explorer Links 🔎 | ||
Ξ Ethereum Göerli: | ||
`TickerUSDFeedRegistry`: [0xF3D020838782213d3da52daa079A9c07F0A8e67e](https://goerli.etherscan.io/address/0xF3D020838782213d3da52daa079A9c07F0A8e67e#code) | ||
`TickerPriceStorage`: [0xa909e0bC9a35cC161dE9eA85cA76AB7A9b5b0121](https://goerli.etherscan.io/address/0xa909e0bC9a35cC161dE9eA85cA76AB7A9b5b0121#code) | ||
|
||
Ξ Ethereum Sepolia: | ||
`TickerUSDFeedRegistry`: [0xF3D020838782213d3da52daa079A9c07F0A8e67e](https://sepolia.etherscan.io/address/0xF3D020838782213d3da52daa079A9c07F0A8e67e#code) | ||
`TickerPriceStorage`: [0xa909e0bC9a35cC161dE9eA85cA76AB7A9b5b0121](https://sepolia.etherscan.io/address/0xa909e0bC9a35cC161dE9eA85cA76AB7A9b5b0121#code) |
File renamed without changes
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.