Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a Standard About Action Callbacks #13

Open
clesaege opened this issue Dec 27, 2017 · 8 comments
Open

Make a Standard About Action Callbacks #13

clesaege opened this issue Dec 27, 2017 · 8 comments

Comments

@clesaege
Copy link
Member

clesaege commented Dec 27, 2017

See the example of should-refill in http://1corp.io/snow/docs

-Function with the prefix should_ and the same parameters.
-Return True if need to call.

Ideally the standard should allow to do:
When function1 with args1 of contract1 returns true, call function2 with args2 of contract.

A deamon could watch the blockchain, calling function1 with args1 of contract1 at repeated interval. When it returns true. It should call function2 with args2 of contract2. Incentives could be made with a protocol like snow, the ethereum alarm clock (https://github.com/ethereum-alarm-clock/ethereum-alarm-clock) or another incentive system.

The goal is to be able to have deamon executing some functions of a smart contract which can be called by anyone (like passPeriod, executeRuling and oneShotTokenRepartition in https://github.com/kleros/kleros/blob/master/contracts/KlerosPOC.sol).
This would greatly increase the user experience while using dapps.

@clesaege
Copy link
Member Author

By the way, for now it seems we have to use bytes (or do some ugly stuff with the ABI), but we may get something cleaner and backward compatible when ethereum/solidity#1707 will be implemented.

@clesaege clesaege changed the title Make a standard about boolean callback Make a standard about action callback Jan 1, 2018
@clesaege
Copy link
Member Author

clesaege commented Jan 3, 2018

For now, we'll have to make some sort of "hack", we can come back to standardizing when the required tools will be developed in solidity.

@clesaege clesaege closed this as completed Jan 3, 2018
@clesaege
Copy link
Member Author

clesaege commented Jan 5, 2018

As discussed in the slack, we can make a standard even without any hack.

"Call Function of Contract with Args when calling it would not revert".
We could also specify an interval between each test calls and a maxtime after which we stop calling.

@clesaege clesaege reopened this Jan 5, 2018
@n1c01a5
Copy link
Contributor

n1c01a5 commented Jun 21, 2018

The link http://1corp.io/snow/docs is broken (I don't find the new link).

@clesaege
Copy link
Member Author

I warned Zack about it. They may have abandoned the project.

@clesaege
Copy link
Member Author

No answer, the project seems to be dead, let's not rely on it.

@epiqueras
Copy link
Contributor

epiqueras commented Sep 14, 2018

By the way, for now it seems we have to use bytes (or do some ugly stuff with the ABI)

What for?

@epiqueras epiqueras changed the title Make a standard about action callback Make a Standard About Action Callback Nov 12, 2018
@epiqueras epiqueras changed the title Make a Standard About Action Callback Make a Standard About Action Callbacks Nov 15, 2018
@0xferit
Copy link
Member

0xferit commented Jun 16, 2019

Is this still relevant? @satello @clesaege

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants