Skip to content

Conversation

@davidsemakula
Copy link
Collaborator

@davidsemakula davidsemakula commented Feb 10, 2025

Summary

Closes - N/A

  • [n] y/n | Does it introduce breaking changes?
  • [n] y/n | Is it dependent on a specific version of cargo-contract or pallet-revive?

Adds Address and Byte types that can be unambiguously mapped to Solidity's address and bytes<N> (and bytes) types.

Description

See this discussion for rationale and additional details.

Checklist before requesting a review

  • I have added an entry to CHANGELOG.md
  • I have commented on my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@cmichi
Copy link
Collaborator

cmichi commented Feb 12, 2025

As discussed in Element, the PR should also change the function signature of e.g. self.env().address to return Address. I think there's more functions that return an H160 right now, when it's actually an Address.

What should also be done is go through the examples and see where a H160 is used, when it semantically should be an Address.

@davidsemakula
Copy link
Collaborator Author

Superseded by #2441

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.

2 participants