-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
ERC-1228 Delegated Execution #1228
Comments
Hey @kosecki123 ! Could you expand a bit more on how this is related to #1077 and why 1077 is not sufficient to cover the needs #1228 aims to fulfill? Some examples could be useful to better undersand! |
Hey @PhABC. Both #1077 and this can fulfill the same needs. The differences I can think of now:
|
Regarding payload flexibility, it seems to be like the I think I can see where storing on-chain the payloads could be useful for some applications, it can make things simpler. ERC-1077 does refund the gas (in any tokens), but does not allow explicitly to pay more than the gas consumed. That's a good point |
Agree, I overlooked the definition for the payload on #1077. So, yes this is the same.
I think in general there are 2 different approaches and the root problems these ERCs are trying to solve.
@alexvandesande let me know if that's correct |
@kosecki123 What are your thoughts on #965 ? |
There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review. |
This issue was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment. |
Simple Summary
A standard interface for delegated transactions in order to execute them.
Abstract
The following standard allows for the implementation of a standard API for contracts that can be executed by any execution agents. We aim to define the type of interactions, payload storage and incentives for execution.
Motivation
A standard interface allows any smart contract to set a reward for the delegated execution. This allows developers to build general-purpose execution agent networks serving multiple protocols based on the delegated execution principal.
The idea of third party executions exists in the Ethereum Alarm Clock and Chronos protocols, as well as in standards such as EIP #1077 and EIP #948. This present EIP can in fact be viewed as a layer of abstraction over EIP #1077 as it defines the API for which third party executors can implement in order to be flexible across all of the third party execution schemes.
Ideally, the third party executor software could switch out the addresses it would execute at and be able to call these methods out of the box.
Specification
Contract
Methods
execute
Executes the
_payload
provides by the caller. MUST check forcanExecute
to returntrue
before execution. SHOULD allow any caller to successfully execute the contract. SHOULD transfer funds set asfee
to caller after successful execution.OPTIONAL -
payload
equals 0x0 in case contract storing it internally.canExecute
Returns
true
if execution conditions are fulfilled for provided_payload
.payload
Returns the
payload
to be used forexecute
andcanExecute
functionspayloadStorage
Returns the location of
_payload
. 0x0 in case using internal storage. Multilink in case using external storage.nonceUsed
Checks whether a specific nonce has been used for an account.
Will return true if the specific nonce has been used for the account and therefore the transaction is invalid to be executed. Otherwise, the nonce has not been used and the execution is valid for that nonce.
payToCode
Defines the code to be ran when an execution took place. The code will follow the EIP #1197 Meta Payments standard.
Returns the code that will be run upon execution.
Events
Implementation
WIP https://github.com/chronologic/chronos/blob/c--/contracts/c_offchain/C.sol
History
Copyright
Copyright and related rights waived via CC0.
The text was updated successfully, but these errors were encountered: