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 ink! chain extensions #592
Conversation
Also introduce a new AttributeArgKind type and AttributeArg::kind method.
Codecov Report
@@ Coverage Diff @@
## master #592 +/- ##
==========================================
- Coverage 83.71% 82.90% -0.81%
==========================================
Files 156 161 +5
Lines 6975 7353 +378
==========================================
+ Hits 5839 6096 +257
- Misses 1136 1257 +121
Continue to review full report at Codecov.
|
Also removes the unstable crate feature guarding the feature.
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
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.
LGTM. As discussed the expect_ok
and expect_output
attributes are not perfect, but I can't think of better names for now and is certainly not a blocker to merge.
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
…k into robin-impl-chain-extension
We concluded to try out how a new proposed syntax would look like instead of going with #[ink(
extension = 1,
handle_status = true|false,
returns_result = true|false
)]
fn my_extension_method(); Where |
Some examples and docs might be invalidated or outdated.
nice :) |
Implements #585.
ToDo List
ink_env
definitions and remove crate feature.#[ink::chain_extension]
code generation for the new design.#[ink::contract]
env_types
parameter toenv
.Self::ErrorCode
in chain extension method signatures. Ideally users should be able to use it.Result<T, Self::ErrorCode>
is implcit forexpect_ok && !expect_output
.expect_ok: false
andexpect_output: false
expect_ok: false
andexpect_output: true
expect_ok: true
andexpect_output: false
expect_ok: true
andexpect_output: true
expect_output
andexpect_ok
.handle_status: bool
andreturns_result: bool
attributes that default totrue
.