Code Monkey home page Code Monkey logo

credict-chainlink-spring22's Introduction

credict-chainlink-spring22

Credibly predict oracles. Project for Chainlink Hackathon Spring 2022

Getting started

Interact with existing contract instances

PredictionRecorder: stores prediction data in a trust-worthy way

InvitationalBet: a showcase application that reads prediction data and oracle rounds to bet

This work is mostly a single Solidity file: PredictionRecorder.sol. You can deploy two contracts and verify their source codes. Then you can interact with the deployed contracts using any Web3 provider.

Deploy and verify new instances

Dependencies

hdwallet-provider is for authentication and truffle-plugin-verify is for verifying source codes that contain imports.

npm install @truffle/hdwallet-provider
npm install -D truffle-plugin-verify

Environment variables

In the truffle folder you need two files to locally configure authentication credentials.

  • create a .env file to hold INFURA_PROJECT_ID and ETHERSCAN_API_KEY.
  • create a .secret fild to hold mnenomics (space-separated words, typically 12 of them) that generate your HDWallet.

Deploy!

To deploy PredictionRecorder or InvitationalBet, modify the comments in migrations.js.

  • for PredictionRecorder, you need to set the target oracle address. Note that this can vary between different networks.
  • for InvitationalBet, you need to set the PredictionRecorder address, invited participants, and timeframe / watermark parameters.

When your deployment parameters are ready, do

truffle deploy --network rinkeby
truffle run verify <either-PredictionRecorder-or-InvitationalBet> --network rinkeby

Optional Python API

Secure original predictions need encryption, decryption, and watermarks, which we suggest managing programmatically. For instance, you can consider taking a look at the python folder to use credict-py. It takes care of RSA encryption and watermarks.

credict-chainlink-spring22's People

Contributors

phurwicz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.