Skip to content

nimble-technology/nimble-prediction-contracts

Repository files navigation

Nimble Network EVM Contracts

This repo is a set of contracts for Nimble AI network to publish model predictions and DApps to consume the data.

Avaliable Scripts

# generate abis
npm install
npm run generate-abi

# install pre-commit tools
pre-commit install

Prerequisites

Install necessary building tools:

# install foundry
# if error, maybe change /etc/hosts
./scripts/install_foundry.sh

# install jq
brew install jq

# install jsonnet
brew install jsonnet

forge deploy contract

# init contracts
# if error, maybe execute(sudo killall -HUP mDNSResponder)
forge init nimble --no-commit --force

# build
cd nimble
forge build

# test
forge test

# deploy contract
forge create  src/contracts/MockNimble.sol:MockNimble --constructor-args {YOUR_ARGS} --rpc-url {YOUR_QUICKNODE} --private-key {YOUR_PRIVATE_KEY}

ts contract call/send

# prediction get
npm run get-prediction

# prediction update
npm run update-prediction

api test

# api test
npm run api-test -- --network {network(Arbitrum/Avalanche/Binance/Ethereum/Optimism/Polygon)} --address {entity address} --data {updata data}
# for example: npm run api-test -- --network Binance --address 0x8B38Da6a701c568545dCfcB03FcB875f56beddC9 --data 0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000002a307838423338446136613730316335363835343564436663423033466342383735663536626564644339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000022b000000000000000000000000000000000000000000000000000000000000022b0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000033535350000000000000000000000000000000000000000000000000000000000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published