Coder Social home page Coder Social logo

automate's People

Contributors

brandonchuah avatar goums avatar hilmarx avatar mkykadir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

automate's Issues

Installing gelatodigital/ops via npm or yarn?

Hi everybody,

I am trying to write a resolver contract which can also a contract creator for several bots. I looked into your examples and noticed
that I need to inherit OpsTaskCreator.sol

So I tried to install your public gelatodigital/ops as node-modul via yarn add https://github.com/gelatodigital/ops.git
and I am getting this error:

error C:\Github\EasyPI-Contract\node_modules\gelato-ops: Command failed.
Exit code: 1
Command: yarn husky install
Arguments:
Directory: C:\Github\EasyPI-Contract\node_modules\gelato-ops
Output:

my yarn version is 1.22.19

when I try the same with npm install https://github.com/gelatodigital/ops.git
I get the error:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `yarn husky install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

my npn version is: 6.14.15

Is there a lib for the npm registry? If not, should I just dl the contracts and includ them manually?
Thanks for your help!

Support Task Names without Signatures

Instead of using signatures for task names consider the following:

Add a new parameter here:
https://github.com/gelatodigital/ops/blob/dd0d214bf59376ed771b5da036411f3cf6853081/contracts/Ops.sol#L50

string calldata name

And emit the name here:
https://github.com/gelatodigital/ops/blob/dd0d214bf59376ed771b5da036411f3cf6853081/contracts/Ops.sol#L206

then you can cheaply get all names for tasks, either by quickly querying events or by getting them through a subgraph

Scan of onlyEOA modifier using contracts source code

If a function within a smart contract that a user wants to automate contains an onlyEOA modifier, Gelato wont work with it.

Lets try to scan a selected contracts source code that we receive from Etherscan for the respective function to see if there is a onlyEOA modifier present. If yes, we need to display a warning saying: "Please remove the onlyEOA modifier from your smart contracts to make it compatible with Gelato

Using Proxy Contracts

What if I use proxy contracts for the contract to Poke/Automate?

I have a proxy contract that does delegate calls to an implementation/logic contract, if I use the address of the proxy contract in the Gelato Ops page it will therefore give me the functions for that proxy (the proxy is verified on etherscan so it gets its abi from there).

Is there a way to use a proxy contract on Gelato Ops?

Suggestion, moonbeam

hello there, heroes of defi.

i would like to automate the staking of my staking rewards (compounding) on moonbeam/GLMR.

here is the link to the staking contract: https://moonbeam.moonscan.io/address/0x0000000000000000000000000000000000000800#writeContract
(function 8: delegator_bond_more)

maybe make it possible to split the rewards up in 3 portions (20 tokens / 3) and stake 33% of the rewards on collator/node #1, 33% on collator/node #2, and 33% on collator/node #3. (i have spread my staked tokens over 3 collators/nodes for more stable returns/less randomness in rewards)

the problem is that im too n00b to figure out how to do it myself, and you guys have not yet gotten to the task of writing the code to do so.

i actually only write this to tell you that i think that everybody on moonbeam would appreciate it greatly if this function/service got added to the Gelato UI (https://app.gelato.network/) service/function list in a not so distant future :)

have a great summer frens ๐Ÿฅ‡

Document process for adding a new network to Ops - checklist

Smart contract

  • Deploy IceCreamNFT
  • Deploy Forwarder
  • Deploy TaskTreasuryL2
  • Deploy TaskTreasuryUpgradable
  • Deploy Ops.sol
  • Whitelist Ops on TaskTreasuryUpgradable
  • Whitelist Ops on TaskTreasuryL2
  • Whitelist TaskTreasuryUpgradable on TaskTreasuryL2
  • Add deployed addresses to /hardhat/config/addresses

Subgraph

  • Add configs to subgraph
  • If network is a test net, add to function isTestnet()
  • If network is a prod net, add Uni v2 router, USD and Wrapped native address
  • Add name and ticker for native token in function getOrCreatePaymentToken()
  • Deploy subgraph

Backend

  • Add configs to backend
  • If network is a test net, add to IS_TESTNET
  • If network is a prod net, add wrapped native address
  • Deploy backend

Allow TaskTreasury Sponsorship (sponsor balance pays for sponsored user tasks)

To address Parent / Child payment model, we could allow sponsorship on the TaskTreasury contract.

Workflow would be:

  1. As a parent (ie Sponsor), I deposit funds on the TaskTreasury
  2. As a parent, I sponsor my child contracts to use my funds on the TaskTreasury:
TaskTreasury.sponsorUser(child)
  1. As a child, I can create tasks & their executions will be paid by my parent (ie Sponsor)

On a technical level, this would require changes only on the TaskTreasuryUpgradable contract:

  • create a mapping sponsoredUsers = sponsor address => list of sponsored users address
  • create a mapping userSponsor = user address => sponsor address
  • implement methods sponsorUser() / removeSponsoredUser() to add / remove sponsored users for the current msg.sender
  • on the useFunds method, check if the current _user (ie the task creator) has a sponsor and if so, use the sponsor balance instead of the user balance

Questions:

  • what if multiple sponsor want to sponsor the same user ?
    • reject ? only one sponsor per user
    • replace ? only the last sponsor will sponsor the user
    • allow multiple ? need to handle a list of sponsors per user
  • what if user is already having a balance ?
    • we could fallback to using the user balance if the sponsor is running out of fund?
    • or we could use user balance first and then lookup for sponsor

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.