-
Notifications
You must be signed in to change notification settings - Fork 428
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
Add #[ink(default)]
attribute for constructors and messages
#1724
Conversation
e127de5
to
05bd2df
Compare
@HCastano i see you are takinkg a 👀 at this PR. A lot checks have failed because of:
It seems like a one time issue, do you have permission to retry checks ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Can you create the follow-up issues as mentioned in #1703?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks!
crates/metadata/src/specs.rs
Outdated
@@ -498,6 +525,8 @@ pub struct MessageSpec<F: Form = MetaForm> { | |||
return_type: ReturnTypeSpec<F>, | |||
/// The message documentation. | |||
docs: Vec<F::String>, | |||
/// If the message is default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// If the message is default | |
/// If the message is the default for off-chain consumers (e.g UIs). |
crates/metadata/src/specs.rs
Outdated
@@ -275,6 +283,8 @@ pub struct ConstructorSpec<F: Form = MetaForm> { | |||
pub return_type: ReturnTypeSpec<F>, | |||
/// The deployment handler documentation. | |||
pub docs: Vec<F::String>, | |||
/// If the constructor is default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// If the constructor is default | |
/// If the constructor is the default for off-chain consumers (e.g UIs). |
#[ink(default)]
attribute for constructors and messages
Yes, I was waiting for approval before moving to downstream projects. |
Adds
default
attribute for constructors and messages.default
attribute is reflected in metadata so consuming services can for example determine which constructor/message should be selected by default.#1703