Socket
Socket
Sign inDemoInstall

@gelatonetwork/core

Package Overview
Dependencies
47
Maintainers
9
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @gelatonetwork/core

Gelato Core Smart Contracts


Version published
Maintainers
9
Created

Readme

Source

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

Keywords

FAQs

Last updated on 10 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc