-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Assume that `CallBuilder`s return a `MessageResult` * Add `try_*` variants to `CallBuilder` * Add doc test showing how to handle `LangError` from `build_call` * Remove TODO related to `delegate_call` * Account for `LangError` in E2E tests * Improve `return_value` error message * Remove extra `expect` from E2E tests * Add test for checking that `fire` panics on `LangError` * Fix spelling * Remove extra `unwrap` in more E2E tests * Fix ERC-1155 example * Fix `invoke_contract` doc test * RustFmt * Fix `delegator` example * Update ERC-20 tests * Indicate that doc test panics in off-chain env * Forgot some commas 🤦 * Get `Flipper` example compiling again * Remove more unwraps * Update UI tests * Print out `LangError` when panicking after `invoke` * Bump `scale` to fix UI tests
- Loading branch information
Showing
20 changed files
with
261 additions
and
116 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
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
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
66 changes: 33 additions & 33 deletions
66
crates/ink/tests/ui/trait_def/fail/message_output_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,39 +1,39 @@ | ||
error[E0277]: the trait bound `NonCodec: WrapperTypeEncode` is not satisfied | ||
--> tests/ui/trait_def/fail/message_output_non_codec.rs:6:26 | ||
| | ||
6 | fn message(&self) -> NonCodec; | ||
| ^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodec` | ||
| | ||
= 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_output_non_codec.rs:6:26 | ||
| | ||
6 | fn message(&self) -> NonCodec; | ||
| ^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `NonCodec` | ||
| | ||
= 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 `DispatchOutput` | ||
--> src/codegen/dispatch/type_check.rs | ||
| | ||
| T: scale::Encode + 'static; | ||
| ^^^^^^^^^^^^^ required by this bound in `DispatchOutput` | ||
--> src/codegen/dispatch/type_check.rs | ||
| | ||
| T: scale::Encode + 'static; | ||
| ^^^^^^^^^^^^^ required by this bound in `DispatchOutput` | ||
|
||
error[E0599]: the method `fire` exists for struct `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd>>>, Set<ReturnType<NonCodec>>>`, but its trait bounds were not satisfied | ||
--> tests/ui/trait_def/fail/message_output_non_codec.rs:5:5 | ||
| | ||
1 | pub struct NonCodec; | ||
| ------------------- doesn't satisfy `NonCodec: parity_scale_codec::Decode` | ||
--> tests/ui/trait_def/fail/message_output_non_codec.rs:5:5 | ||
| | ||
1 | pub struct NonCodec; | ||
| ------------------- doesn't satisfy `NonCodec: parity_scale_codec::Decode` | ||
... | ||
5 | #[ink(message)] | ||
| ^ method cannot be called on `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd>>>, Set<ReturnType<NonCodec>>>` due to unsatisfied trait bounds | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`NonCodec: parity_scale_codec::Decode` | ||
5 | #[ink(message)] | ||
| ^ method cannot be called on `CallBuilder<E, Set<Call<E>>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd>>>, Set<ReturnType<NonCodec>>>` due to unsatisfied trait bounds | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`NonCodec: parity_scale_codec::Decode` | ||
note: the following trait must be implemented | ||
--> $CARGO/parity-scale-codec-3.2.1/src/codec.rs | ||
| | ||
| pub trait Decode: Sized { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
--> $CARGO/parity-scale-codec-3.2.2/src/codec.rs | ||
| | ||
| pub trait Decode: Sized { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ |
Oops, something went wrong.