Skip to content

Enable EIP- 2831 Signer transaction.wait() style rejections. #1477

@ricmoo

Description

@ricmoo

When a Signer sends a transaction, the TransactionResponse object has a .wait() method. Currently that method rejects a CALL_EXCEPTION if the transaction reverts, otherwise it resolves with the TransactionReceipt, once the transaction is mined, based on its hash.

This feature will enable an additional rejection case, along with a new error in the Logger,, TRANSACTION_REPLACED. This will occur if the transaction is replaced (i.e. the from and nonce match the transaction but the hash is different), with a field indicating the reason for the replacement:

  • repriced; the data and to match, but the gas price has changed
  • cancelled; the data has been changed to 0x and the to changed to the from
  • replaced; any other change

This must occur in a minor version bump.

In v6 we may change repriced to also resolve (instead of reject), but this requires more thought and would not be backwards compatible within v5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement.fixed/completeThis Bug is fixed or Enhancement is complete and published.minor-bumpPlanned for the next minor version bump.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions