0.0.4 • Published 2 years ago

@georacle/contracts v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm georacleapi Official documentation

Georacle Smart Contracts

Installation

# via Yarn
$ yarn add @georacle/contracts

# via npm
$ npm install @georacle/contracts --save

Directory Structure

@georacle/contracts
├── examples
│   ├── Area.sol
│   ├── BBox.sol
│   ├── Proximity.sol
│   ├── Info.sol
│   ├── Geocode.sol
│   ├── ReverseGeocode.sol
│   └── Geometry.sol
└── src
    ├── v0.7
    └── v0.8

Usage

The solidity smart contracts can be imported via the src directory of @georacle/contracts

import '@georacle/contracts/src/v0.8/.sol';

Local Development

Use the Hardhat enviroment to interact with Georacle locally

  1. Clone this repo
    $ git clone https://github.com/georacleapi/georacle.git && cd georacle
  1. Populate the environment file
    # Add your API keys
    $ mv .env.example .env
  1. Deploy examples

The test scripts will attempt to auto-fund your deployed contracts with LINK. Make sure your wallet has enough test link.

    $ npx hardhat deploy
  1. Authorize contracts

    Head over to the Georacle dashboard and authorize your newly deployed contracts.

  2. Continuing with Hardhat

    # Run the examples on the Kovan testnet
    $ npx hardhat test