Giter Site home page Giter Site logo

gelato-core-contracts's Introduction

Gelato Core Smart Contractss

Overview

Installation

$ npm install @gelatonetwork/core

Dependencies

This project is build on Buidler & Ethers.js

Usage

Once installed, you can use the contracts in the library by importing them:

pragma solidity ^0.6.10;

import {Condition, Action, Task, Operation, DataFlow} from "@gelatonetwork/core/contracts/gelato_core/IGelatoCore.sol";

contract AutomatedDapp {

    address public immutable gelatoCore;

    constructor(address _gelatoCore) public {
        gelatoCore = _gelatoCore
    }

    function createGelatoTask() public returns(Task memory) {
        Condition memory condition = Condition({
            inst: conditionAddress,
            data: abi.encodePacked(block.number + _blockNumberDelta);
        });

        Action memory condition = Action({
            addr: actionAddress,
            data: abi.encodeWithSignature("doAction(uint256)", actioninput);
            operation: Operation.Call,
            dataFlow: DataFlow.None,
            value: 0,
            termsOkCheck: false
        });

        Task memory task = Task({
            conditions: [condition],
            actions: [action],
            0,
            0
        }):

        return task;
    }

}

Resources

  • ๐Ÿฆ Read our Gelato-V1 release announcement on our blog
  • ๐Ÿฆ Try out our demo tutorial here
  • ๐Ÿฆ Try out our advanced demo here
  • ๐Ÿฆ Soon we will publish Developer Documentation. Bare with us!
  • ๐Ÿฆ Read the Gelato Audit report

gelato-core-contracts's People

Contributors

gitpusha avatar hilmarx 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.