adamoracle

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2021 License: MIT

README


Adamoracle logo


Adamoracle is middleware to simplify communication with blockchains. Here you'll find the Adamoracle Golang node, currently in alpha. This initial implementation is intended for use and review by developers, and will go on to form the basis for Adamoracle's decentralized oracle network. Further development of the Adamoracle Node and Adamoracle Network will happen here, if you are interested in contributing please see our contribution guidelines.

Features

  • easy connectivity of on-chain contracts to any off-chain computation or API
  • multiple methods for scheduling both on-chain and off-chain computation for a user's smart contract
  • automatic gas price bumping to prevent stuck transactions, assuring your data is delivered in a timely manner
  • push notification of smart contract state changes to off-chain systems, by tracking Ethereum logs
  • translation of various off-chain data types into EVM consumable types and transactions
  • easy to implement smart contract libraries for connecting smart contracts directly to their preferred oracles
  • easy to install node, which runs natively across operating systems, blazingly fast, and with a low memory footprint

Community

Adamoracle has an active and ever growing community. is the primary communication channel used for day to day communication, answering development questions, and aggregating Adamoracle related content. Take a look at the community docs for more information regarding Adamoracle social accounts, news, and networking.

Install

  1. Install Go 1.14, and add your GOPATH's bin directory to your PATH
    • Example Path for macOS export PATH=$GOPATH/bin:$PATH & export GOPATH=/Users/$USER/go
  2. Install NodeJS 12.18 & Yarn
    • It might be easier long term to use nvm to switch between node versions for different projects: nvm install 12.18 && nvm use 12.18
  3. Install Postgres (>= 11.x).
  4. Download Adamoracle: git clone https://github.com/smartcontractadam/adamoracle && cd adamoracle
  5. Build and install Adamoracle: make install
    • If you got any errors regarding locked yarn package, try running yarn install before this step
  6. Run the node: adamoracle help

Ethereum Node Requirements

In order to run the Adamoracle node you must have access to a running Ethereum node with an open websocket connection. Any Ethereum based network will work once you've configured the chain ID. Ethereum node versions currently tested and supported:

Configure

You can configure your node's behavior by setting environment variables. All the environment variables can be found in the ConfigSchema struct of schema.go. For every variable, default values get used if no corresponding environment variable is found.

Project Structure

Adamoracle is a monorepo containing several logicaly separatable and relatable projects.

Build your current version

go build -o adamoracle ./core/
  • Run the binary:
./adamoracle

Solidity Development

  1. Install Yarn
  2. Install the dependencies:
yarn
yarn setup:contracts
  1. Run tests:
cd evm-contracts
yarn test

Use of Go Generate

Go generate is used to generate mocks in this project. Mocks are generated with mockery and live in core/internal/mocks.

Development Tips

For more tips on how to build and test Adamoracle, see our development tips page.

Contributing

Adamoracle's source code is licensed under the MIT License, and contributions are welcome.

Please check out our contributing guidelines for more details.

Thank you!

License

MIT

Directories

Path Synopsis
adapters
Package adapters contain the core adapters used by the Adamoracle node.
Package adapters contain the core adapters used by the Adamoracle node.
cmd
Package cmd is the front-end interface for the application as a command-line utility.
Package cmd is the front-end interface for the application as a command-line utility.
internal/gethwrappers
package gethwrappers provides infrastructure for generating and verifying go-ethereum wrapper packages for smart contracts.
package gethwrappers provides infrastructure for generating and verifying go-ethereum wrapper packages for smart contracts.
logger
package logger exports multiple type loggers: - the *Logger type is a wrapper over uber/zap#SugaredLogger with added conditional utilities.
package logger exports multiple type loggers: - the *Logger type is a wrapper over uber/zap#SugaredLogger with added conditional utilities.
services
Package services contain the key components of the Adamoracle node.
Package services contain the key components of the Adamoracle node.
services/signatures/cryptotest
package cryptotest provides convenience functions for kyber-based APIs.
package cryptotest provides convenience functions for kyber-based APIs.
services/signatures/ethdss
Package ethdss implements the Distributed Schnorr Signature protocol from the ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
Package ethdss implements the Distributed Schnorr Signature protocol from the ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
services/signatures/ethschnorr
Package ethschnorr implements a version of the Schnorr signature which is ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
Package ethschnorr implements a version of the Schnorr signature which is ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
services/signatures/secp256k1
Package secp256k1 is an implementation of the kyber.{Group,Point,Scalar} ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
Package secp256k1 is an implementation of the kyber.{Group,Point,Scalar} ////////////////////////////////////////////////////////////////////////////// XXX: Do not use in production until this code has been audited.
services/vrf
Numbers are deterministically generated from seeds and a secret key, and are statistically indistinguishable from uniform sampling from {0,...,2**256-1}, to computationally-bounded observers who know the seeds, don't know the key, and only see the generated numbers.
Numbers are deterministically generated from seeds and a secret key, and are statistically indistinguishable from uniform sampling from {0,...,2**256-1}, to computationally-bounded observers who know the seeds, don't know the key, and only see the generated numbers.
store
Package store is used to keep application events in sync between the database on the node and the blockchain.
Package store is used to keep application events in sync between the database on the node and the blockchain.
store/models
Package models contain the key job components used by the Adamoracle application.
Package models contain the key job components used by the Adamoracle application.
store/models/vrfkey
Package vrfkey tracks the secret keys associated with VRF proofs.
Package vrfkey tracks the secret keys associated with VRF proofs.
store/presenters
Package presenters allow for the specification and result of a Job, its associated TaskSpecs, and every JobRun and TaskRun to be returned in a user friendly human readable format.
Package presenters allow for the specification and result of a Job, its associated TaskSpecs, and every JobRun and TaskRun to be returned in a user friendly human readable format.
utils
Package utils is used for common functions and tools used across the codebase.
Package utils is used for common functions and tools used across the codebase.
web
Package web handles receiving and supplying information within the node.
Package web handles receiving and supplying information within the node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL