-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make default behaviour of `fire()` to return "raw" return value * Update delegate call codepath to give option to handle `EnvError` * Update `CreateBuilder::instantiate()`'s default cleaner as well * Add a breaking change note in the changelog * Fix delegator example * Drive-by: rename `fire()` method to `invoke()` This keeps this more consistent since we're wrapping a few methods with `invoke` in the name anyways. * Fix ERC-1155 example * Update `Multisig` example * Fix ContractRef tests * Revert "Drive-by: rename `fire()` method to `invoke()`" This reverts commit 72add05. Decided it's best to do this in a standalone PR. * Use instantiate instead of `try_instantiate` in `delegator` Co-authored-by: Andrew Jones <[email protected]>
- Loading branch information
Showing
12 changed files
with
216 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 50 additions & 50 deletions
100
crates/ink/tests/ui/trait_def/fail/message_input_non_codec.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
error[E0277]: the trait bound `NonCodec: WrapperTypeDecode` is not satisfied | ||
--> tests/ui/trait_def/fail/message_input_non_codec.rs:6:23 | ||
| | ||
6 | fn message(&self, input: NonCodec); | ||
| ^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodec` | ||
| | ||
= help: the following other types implement trait `WrapperTypeDecode`: | ||
Arc<T> | ||
Box<T> | ||
Rc<T> | ||
= note: required for `NonCodec` to implement `parity_scale_codec::Decode` | ||
--> tests/ui/trait_def/fail/message_input_non_codec.rs:6:23 | ||
| | ||
6 | fn message(&self, input: NonCodec); | ||
| ^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodec` | ||
| | ||
= help: the following other types implement trait `WrapperTypeDecode`: | ||
Arc<T> | ||
Box<T> | ||
Rc<T> | ||
= note: required for `NonCodec` to implement `parity_scale_codec::Decode` | ||
note: required by a bound in `DispatchInput` | ||
--> src/codegen/dispatch/type_check.rs | ||
| | ||
| T: scale::Decode + 'static; | ||
| ^^^^^^^^^^^^^ required by this bound in `DispatchInput` | ||
--> src/codegen/dispatch/type_check.rs | ||
| | ||
| T: scale::Decode + 'static; | ||
| ^^^^^^^^^^^^^ required by this bound in `DispatchInput` | ||
|
||
error[E0277]: the trait bound `NonCodec: WrapperTypeEncode` is not satisfied | ||
--> tests/ui/trait_def/fail/message_input_non_codec.rs:3:1 | ||
| | ||
3 | #[ink::trait_definition] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodec` | ||
4 | pub trait TraitDefinition { | ||
5 | #[ink(message)] | ||
| - required by a bound introduced by this call | ||
| | ||
= help: the following other types implement trait `WrapperTypeEncode`: | ||
&T | ||
&mut T | ||
Arc<T> | ||
Box<T> | ||
Cow<'a, T> | ||
Rc<T> | ||
String | ||
Vec<T> | ||
parity_scale_codec::Ref<'a, T, U> | ||
= note: required for `NonCodec` to implement `Encode` | ||
--> tests/ui/trait_def/fail/message_input_non_codec.rs:3:1 | ||
| | ||
3 | #[ink::trait_definition] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodec` | ||
4 | pub trait TraitDefinition { | ||
5 | #[ink(message)] | ||
| - required by a bound introduced by this call | ||
| | ||
= help: the following other types implement trait `WrapperTypeEncode`: | ||
&T | ||
&mut T | ||
Arc<T> | ||
Box<T> | ||
Cow<'a, T> | ||
Rc<T> | ||
String | ||
Vec<T> | ||
parity_scale_codec::Ref<'a, T, U> | ||
= note: required for `NonCodec` to implement `Encode` | ||
note: required by a bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd>>::push_arg` | ||
--> $WORKSPACE/crates/env/src/call/execution_input.rs | ||
| | ||
| T: scale::Encode, | ||
| ^^^^^^^^^^^^^ required by this bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd>>::push_arg` | ||
--> $WORKSPACE/crates/env/src/call/execution_input.rs | ||
| | ||
| T: scale::Encode, | ||
| ^^^^^^^^^^^^^ required by this bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd>>::push_arg` | ||
|
||
error[E0599]: the method `fire` exists for struct `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ink::ink_env::call::utils::Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd>>>>, Set<ReturnType<()>>>`, but its trait bounds were not satisfied | ||
--> tests/ui/trait_def/fail/message_input_non_codec.rs:5:5 | ||
| | ||
5 | #[ink(message)] | ||
| ^ method cannot be called on `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ink::ink_env::call::utils::Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd>>>>, Set<ReturnType<()>>>` due to unsatisfied trait bounds | ||
| | ||
::: $WORKSPACE/crates/env/src/call/execution_input.rs | ||
| | ||
| pub struct ArgumentList<Head, Rest> { | ||
| ----------------------------------- doesn't satisfy `_: Encode` | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`ArgumentList<ink::ink_env::call::utils::Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd>>: Encode` | ||
error[E0599]: the method `try_fire` exists for struct `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ink::ink_env::call::utils::Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd>>>>, Set<ReturnType<()>>>`, but its trait bounds were not satisfied | ||
--> tests/ui/trait_def/fail/message_input_non_codec.rs:5:5 | ||
| | ||
5 | #[ink(message)] | ||
| ^ method cannot be called on `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ink::ink_env::call::utils::Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd>>>>, Set<ReturnType<()>>>` due to unsatisfied trait bounds | ||
| | ||
::: $WORKSPACE/crates/env/src/call/execution_input.rs | ||
| | ||
| pub struct ArgumentList<Head, Rest> { | ||
| ----------------------------------- doesn't satisfy `_: Encode` | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`ArgumentList<ink::ink_env::call::utils::Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd>>: Encode` |
Oops, something went wrong.