Skip to content

Nuklai/nuklai-contracts-bitcoin-form

Repository files navigation

Nuklai Bitcoin Price Research Dataset Smart Contracts

This repository contains the smart contracts for the Bitcoin Price Research Dataset

Serves as a helper to fetch the Bitcoin price only once at a specific timestamp. This functionality is crucial for determining the winner of the Bitcoin Price Research Dataset, where the user closest to the price wins the prize. Fetches and stores the latest price of a specified coin pair, in this case BTC/USD pair using Chainlink Data Feeds.

In addition, the contract ensures that the fetch operation can only be executed once to prevent duplicate price fetching and it's triggered by using a time-based upkeep contract from Chainlink Automation.


Developers are required to have some familiarity with:


Table of Contents

Expand

Install

To install all the dependencies of this repo, execute the following command:

yarn

or

yarn install

Usage

1. Build contracts

To compile contracts, export ABIs, and generate TypeScript interfaces, execute the following command:

yarn build

2. Reset Environment

To remove cached and temporary files, execute the following command:

yarn clean

3. Tests

To run all unit tests, execute the following command:

yarn test

4. Coverage

To generate a coverage report, execute the following command:

yarn coverage

5. Contracts Size

To generate a contracts size report, execute the following command:

yarn contract-size

6. Linting

To run linting on all configured source files (*.sol, *.ts, *.js, *.json), execute the following command:

yarn lint

Contracts Description

Smart Contract Description
CoinPriceOneTimeFetch Generic contract that fetches and store the latest price of a specified coin pair using Chainlink Data Feeds and can be fetched only once

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published