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

Implement fastrlp traits for Signature #1444

Merged
merged 1 commit into from Jul 4, 2022

Conversation

Rjected
Copy link
Contributor

@Rjected Rjected commented Jul 1, 2022

Motivation

Deriving fastrlp Encodable and Decodable traits for types that contain Signature would not be possible without implementing Encodable and Decodable for Signature.

Solution

  • Add fastrlp as a dependency to ethers-core, meaning this conflicts with Implement fastrlp traits for Bytes #1443 for the time being
  • Implement Hash on Signature (just a convenience impl, not related to fastrlp traits)
  • Implement RLP encoding and decoding for Signature. This does not encode or decode a RLP header for a signature type, since types that would contain a signature (for example a signed transaction) are usually encoded as [...rest of object, v, r, s] rather than [...rest of object, [v, r, s]].

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

ethers-core/Cargo.toml Outdated Show resolved Hide resolved
@gakonst gakonst merged commit c077a63 into gakonst:master Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants