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

Documentation and implementation inconsistency for annotating ink! constructors as payable #1871

Open
davidsemakula opened this issue Aug 9, 2023 · 0 comments

Comments

@davidsemakula
Copy link
Contributor

While ink! docs "claim" that "ink! constructors are always implicitly payable and thus cannot be flagged as such"
https://use.ink/macros-attributes/payable
https://github.com/paritytech/ink/blob/v4.2.1/crates/ink/macro/src/lib.rs#L316-L317
https://github.com/paritytech/ink/blob/v4.2.1/README.md?plain=1#L233

the ink_ir crate currently accepts payable annotations for ink! constructors
https://github.com/paritytech/ink/blob/v4.2.1/crates/ink/ir/src/ir/item_impl/constructor.rs#L143

Which of these is the right thing to do?

  • Update the ink_ir crate to reject ink! payable annotations for ink! constructors.
  • Update the docs to remove/rephrase the "thus cannot be flagged as such" part of the claim (e.g. may be replace it with "thus it's redundant to flag them as such").
  • Leave as is, it's all intentional.
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

No branches or pull requests

1 participant