Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corollari/neo-oracle
Price oracle for NEO smart contracts
https://github.com/corollari/neo-oracle
cryptocurrency neo neo-blockchain oracle price-oracle
Last synced: about 2 months ago
JSON representation
Price oracle for NEO smart contracts
- Host: GitHub
- URL: https://github.com/corollari/neo-oracle
- Owner: corollari
- License: mit
- Created: 2020-02-20T11:04:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T05:32:00.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T14:39:15.331Z (8 months ago)
- Topics: cryptocurrency, neo, neo-blockchain, oracle, price-oracle
- Language: JavaScript
- Size: 1.42 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NEO Oracle
> Price oracle for NEO smart contracts## Set up
1. Create a private key with any NEO wallet (eg: [ansy](https://snowypowers.github.io/ansy/))
2. Compute the address associated with the private key you just created, you can use neon-js
3. Update the variable `Owner` in `Oracle.cs` to use the address you just computed instead of the one that is hardcoded
4. Publish the contract `Oracle.cs` (or a contract that implements the same interface) on testnet/mainnet/privnet
5. Install the dependencies with `npm install`## Run
```bash
PRIVATE_KEY="9ab7e154840daca3a2efadaf0df93cd3a5b51768c632f5433f86909d9b994a69" # Replace with the private key you generated during setup
CONTRACT_SCRIPTHASH="5b7074e873973a6ed3708862f219a6fbf4d1c411" # Replace with the scripthash of the contract you deployed
BNC_TICKER="BNB_BTCB-1DE" # Replace with the Binance Chain ticker of the BEP2 token that the oracle needs to serve
export PRIVATE_KEY CONTRACT_SCRIPTHASH BNC_TICKER
node clock.js
```## Deploy
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)## Development
```bash
npm run lint # Lint code
npm test # Run tests
```