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

0x transaction developer experience improvements #34

Closed
abandeali1 opened this issue May 2, 2019 · 1 comment
Closed

0x transaction developer experience improvements #34

abandeali1 opened this issue May 2, 2019 · 1 comment
Labels
status: implemented Proposed changes have been implemented (and deployed, if smart contract) type: core

Comments

@abandeali1
Copy link
Member

abandeali1 commented May 2, 2019

Preamble

ZEIP: 34
Title: 0x transaction developer experience improvements
Author: 0x Core Team
Type: Standard Track
Category: Core
Status: Final
Created: 2019-10-29

Discussion: #34

Summary

This is a catch-all for smaller developer experience improvements to 0x transactions. Improvements include:

  • Logging an event upon successful transaction execution
  • Refactoring executeTransaction to take a ZeroExTransaction struct as an input
  • Adding a bytes return value to executeTransaction that is equal to the return data of the underlying function call

Motivation

All of these features should make it easier to work with 0x transactions, both off-chain and at the smart contract level.

Specification

TransactionExecuted event

Upon successful execution, executeTransaction will log a TransactionExecution event.

// TransactionExecution event is emitted when a ZeroExTransaction is executed.
event TransactionExecution(
    bytes32 indexed transactionHash
);

New executeTransaction function signature

The inputs and outputs of executeTransaction will be modified as follows:

struct ZeroExTransaction {
    uint256 salt;                   // Arbitrary number to ensure uniqueness of transaction hash.
    uint256 expirationTimeSeconds;  // Timestamp in seconds at which transaction expires.
    uint256 gasPrice;               // gasPrice that transaction is required to be executed with.
    address signerAddress;          // Address of transaction signer.
    bytes data;                     // AbiV2 encoded calldata.
}

/// @dev Executes an Exchange method call in the context of signer.
/// @param transaction 0x transaction containing salt, signerAddress, and data.
/// @param signature Proof that transaction has been signed by signer.
/// @return ABI encoded return data of the underlying Exchange function call.
function executeTransaction(
    LibZeroExTransaction.ZeroExTransaction memory transaction,
    bytes memory signature
)
    public
    payable
    returns (bytes memory);
@abandeali1 abandeali1 added 3.0 and removed 3.0 labels May 3, 2019
@dekz dekz mentioned this issue Oct 21, 2019
@hysz hysz mentioned this issue Nov 8, 2019
@TamirTian
Copy link

It can also look like meta-transaction that forward transaction of the user only sign (exclude pay gas)

@mintcloud mintcloud added status: implemented Proposed changes have been implemented (and deployed, if smart contract) type: core and removed 3.0 labels Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: implemented Proposed changes have been implemented (and deployed, if smart contract) type: core
Projects
None yet
Development

No branches or pull requests

4 participants
@mintcloud @abandeali1 @TamirTian and others