Skip to content

Commit d3b349c

Browse files
committed
fix: tests
1 parent a0219b2 commit d3b349c

File tree

13 files changed

+74
-74
lines changed

13 files changed

+74
-74
lines changed

crates/ink/tests/ui/contract/fail/constructor/constructor-input-non-codec.stderr

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
2+
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:13:9
3+
|
4+
13 | / pub fn constructor(_input: NonCodecType) -> Self {
5+
14 | | Self {}
6+
15 | | }
7+
| |_________^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
8+
|
9+
= help: the following other types implement trait `WrapperTypeDecode`:
10+
Arc<T>
11+
Box<T>
12+
Rc<T>
13+
sp_core::Bytes
14+
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`
15+
116
error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
217
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:13:28
318
|
@@ -19,21 +34,6 @@ note: required by a bound in `DispatchInput`
1934
| T: scale::Decode + 'static;
2035
| ^^^^^^^^^^^^^ required by this bound in `DispatchInput`
2136

22-
error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
23-
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:13:9
24-
|
25-
13 | / pub fn constructor(_input: NonCodecType) -> Self {
26-
14 | | Self {}
27-
15 | | }
28-
| |_________^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
29-
|
30-
= help: the following other types implement trait `WrapperTypeDecode`:
31-
Arc<T>
32-
Box<T>
33-
Rc<T>
34-
sp_core::Bytes
35-
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`
36-
3737
error[E0277]: the trait bound `NonCodecType: AbiEncodeWith<_>` is not satisfied
3838
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:3:1
3939
|

crates/ink/tests/ui/contract/fail/impl/impl-block-for-non-storage-01.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
error[E0308]: mismatched types
2-
--> tests/ui/contract/fail/impl/impl-block-for-non-storage-01.rs:20:10
3-
|
4-
20 | impl NonContract {
5-
| ^^^^^^^^^^^ expected `IsSameType<Contract>`, found `IsSameType<NonContract>`
6-
|
7-
= note: expected struct `IsSameType<contract::Contract>`
8-
found struct `IsSameType<NonContract>`
9-
101
error[E0599]: no function or associated item named `constructor_2` found for struct `contract::Contract` in the current scope
112
--> tests/ui/contract/fail/impl/impl-block-for-non-storage-01.rs:22:16
123
|
@@ -20,7 +11,7 @@ error[E0599]: no function or associated item named `constructor_2` found for str
2011
... |
2112
21 | | #[ink(constructor)]
2213
22 | | pub fn constructor_2() -> Self {
23-
| | -^^^^^^^^^^^^^ function or associated item not found in `Contract`
14+
| | -^^^^^^^^^^^^^ function or associated item not found in `contract::Contract`
2415
| |_______________|
2516
|
2617
|
@@ -48,7 +39,7 @@ error[E0599]: no function or associated item named `message_2` found for struct
4839
... |
4940
26 | | #[ink(message)]
5041
27 | | pub fn message_2(&self) {}
51-
| | -^^^^^^^^^ function or associated item not found in `Contract`
42+
| | -^^^^^^^^^ function or associated item not found in `contract::Contract`
5243
| |_______________|
5344
|
5445
|
@@ -62,3 +53,12 @@ help: there is a method `message_1` with a similar name, but with different argu
6253
|
6354
15 | pub fn message_1(&self) {}
6455
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
56+
57+
error[E0308]: mismatched types
58+
--> tests/ui/contract/fail/impl/impl-block-for-non-storage-01.rs:20:10
59+
|
60+
20 | impl NonContract {
61+
| ^^^^^^^^^^^ expected `IsSameType<Contract>`, found `IsSameType<NonContract>`
62+
|
63+
= note: expected struct `IsSameType<contract::Contract>`
64+
found struct `IsSameType<NonContract>`

crates/ink/tests/ui/contract/fail/impl/impl-block-using-env-no-marker.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ error[E0599]: no method named `env` found for reference `&contract::Contract` in
22
--> tests/ui/contract/fail/impl/impl-block-using-env-no-marker.rs:24:26
33
|
44
24 | let _ = self.env().caller();
5-
| ^^^ method not found in `&Contract`
5+
| ^^^ method not found in `&contract::Contract`
66
|
77
= help: items from traits can only be used if the trait is in scope
88
help: trait `Env` which provides `env` is implemented but not in scope; perhaps you want to import it
99
|
10-
3 + use ink::codegen::Env;
10+
3 + use ink::codegen::env::Env;
1111
|

crates/ink/tests/ui/contract/fail/impl/impl-block-using-static-env-no-marker.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error[E0599]: no function or associated item named `env` found for struct `contr
55
| ------------------- function or associated item `env` not found for this struct
66
...
77
22 | let _ = Self::env().caller();
8-
| ^^^ function or associated item not found in `Contract`
8+
| ^^^ function or associated item not found in `contract::Contract`
99
|
1010
note: if you're trying to build a new `contract::Contract` consider using one of the following associated functions:
1111
contract::_::<impl contract::Contract>::constructor
@@ -20,5 +20,5 @@ note: if you're trying to build a new `contract::Contract` consider using one of
2020
= help: items from traits can only be used if the trait is in scope
2121
help: trait `StaticEnv` which provides `env` is implemented but not in scope; perhaps you want to import it
2222
|
23-
3 + use ink::codegen::StaticEnv;
23+
3 + use ink::codegen::env::StaticEnv;
2424
|

crates/ink/tests/ui/contract/fail/message/message-input-non-codec.stderr

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
2+
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:9
3+
|
4+
18 | pub fn message(&self, _input: NonCodecType) {}
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
6+
|
7+
= help: the following other types implement trait `WrapperTypeDecode`:
8+
Arc<T>
9+
Box<T>
10+
Rc<T>
11+
sp_core::Bytes
12+
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`
13+
114
error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
215
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:31
316
|
@@ -19,19 +32,6 @@ note: required by a bound in `DispatchInput`
1932
| T: scale::Decode + 'static;
2033
| ^^^^^^^^^^^^^ required by this bound in `DispatchInput`
2134

22-
error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
23-
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:9
24-
|
25-
18 | pub fn message(&self, _input: NonCodecType) {}
26-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
27-
|
28-
= help: the following other types implement trait `WrapperTypeDecode`:
29-
Arc<T>
30-
Box<T>
31-
Rc<T>
32-
sp_core::Bytes
33-
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`
34-
3535
error[E0277]: the trait bound `NonCodecType: AbiEncodeWith<_>` is not satisfied
3636
--> tests/ui/contract/fail/message/message-input-non-codec.rs:3:1
3737
|
@@ -50,7 +50,7 @@ note: required by a bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, Arg
5050
| T: AbiEncodeWith<Abi>,
5151
| ^^^^^^^^^^^^^^^^^^ required by this bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd, Abi>, Abi>::push_arg`
5252

53-
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvironment, Set<Call>, Set<ExecutionInput<ArgumentList<Argument<NonCodecType>, ArgumentList<ArgumentListEnd, ArgumentListEnd, Ink>, Ink>, Ink>>, Set<ReturnType<()>>>`, but its trait bounds were not satisfied
53+
error[E0599]: the method `try_invoke` exists for struct `ink::ink_env::call::CallBuilder<DefaultEnvironment, Set<Call>, Set<ExecutionInput<ArgumentList<Argument<NonCodecType>, ArgumentList<ArgumentListEnd, ArgumentListEnd, ink::abi::Ink>, ink::abi::Ink>, ink::abi::Ink>>, Set<ReturnType<()>>>`, but its trait bounds were not satisfied
5454
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:9
5555
|
5656
18 | pub fn message(&self, _input: NonCodecType) {}

crates/ink/tests/ui/contract/fail/message/message-returns-non-codec.stderr

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
error[E0277]: the trait bound `Result<NonCodecType, LangError>: Encode` is not satisfied
2+
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:3:1
3+
|
4+
3 | #[ink::contract]
5+
| ^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Result<NonCodecType, LangError>`
6+
|
7+
= help: the trait `Encode` is implemented for `Result<T, E>`
8+
note: required by a bound in `return_value`
9+
--> $WORKSPACE/crates/env/src/api.rs
10+
|
11+
| pub fn return_value<R>(return_flags: ReturnFlags, return_value: &R)
12+
| ------------ required by a bound in this function
13+
| where
14+
| R: scale::Encode,
15+
| ^^^^^^^^^^^^^ required by this bound in `return_value`
16+
= note: this error originates in the attribute macro `ink::contract` (in Nightly builds, run with -Z macro-backtrace for more info)
17+
118
error[E0277]: the trait bound `NonCodecType: WrapperTypeEncode` is not satisfied
219
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:18:34
320
|
@@ -24,24 +41,7 @@ note: required by a bound in `DispatchOutput`
2441
| T: scale::Encode + 'static;
2542
| ^^^^^^^^^^^^^ required by this bound in `DispatchOutput`
2643

27-
error[E0277]: the trait bound `Result<NonCodecType, LangError>: Encode` is not satisfied
28-
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:3:1
29-
|
30-
3 | #[ink::contract]
31-
| ^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Result<NonCodecType, LangError>`
32-
|
33-
= help: the trait `Encode` is implemented for `Result<T, E>`
34-
note: required by a bound in `return_value`
35-
--> $WORKSPACE/crates/env/src/api.rs
36-
|
37-
| pub fn return_value<R>(return_flags: ReturnFlags, return_value: &R)
38-
| ------------ required by a bound in this function
39-
| where
40-
| R: scale::Encode,
41-
| ^^^^^^^^^^^^^ required by this bound in `return_value`
42-
= note: this error originates in the attribute macro `ink::contract` (in Nightly builds, run with -Z macro-backtrace for more info)
43-
44-
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvironment, Set<Call>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd, Ink>, Ink>>, Set<ReturnType<NonCodecType>>>`, but its trait bounds were not satisfied
44+
error[E0599]: the method `try_invoke` exists for struct `ink::ink_env::call::CallBuilder<DefaultEnvironment, Set<Call>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd, ink::abi::Ink>, ink::abi::Ink>>, Set<ReturnType<NonCodecType>>>`, but its trait bounds were not satisfied
4545
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:18:9
4646
|
4747
6 | pub struct NonCodecType;
@@ -63,7 +63,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvi
6363
`NonCodecType: WrapperTypeDecode`
6464
which is required by `NonCodecType: DecodeMessageResult<ink::abi::Ink>`
6565
note: the trait `WrapperTypeDecode` must be implemented
66-
--> $CARGO/parity-scale-codec-3.7.5/src/codec.rs
66+
--> $CARGO/parity-scale-codec-$VERSION/src/codec.rs
6767
|
6868
| pub trait WrapperTypeDecode: Sized {
6969
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

crates/ink/tests/ui/trait_def/fail/message_input_non_codec.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ note: required by a bound in `Execution::<Args, Output, Abi>::new`
5959
| pub fn new(input: ExecutionInput<Args, Abi>) -> Self {
6060
| --- required by a bound in this associated function
6161

62-
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call>, Set<ExecutionInput<ArgumentList<Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd, Ink>, Ink>, Ink>>, Set<ReturnType<()>>>`, but its trait bounds were not satisfied
62+
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call>, Set<ExecutionInput<ArgumentList<Argument<NonCodec>, ArgumentList<ArgumentListEnd, ArgumentListEnd, ink::abi::Ink>, ink::abi::Ink>, ink::abi::Ink>>, Set<ReturnType<()>>>`, but its trait bounds were not satisfied
6363
--> tests/ui/trait_def/fail/message_input_non_codec.rs:5:5
6464
|
6565
5 | #[ink(message)]

crates/ink/tests/ui/trait_def/fail/message_output_non_codec.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ note: required by a bound in `Execution::<Args, Output, Abi>::new`
6565
| pub fn new(input: ExecutionInput<Args, Abi>) -> Self {
6666
| --- required by a bound in this associated function
6767

68-
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd, Ink>, Ink>>, Set<ReturnType<NonCodec>>>`, but its trait bounds were not satisfied
68+
error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call>, Set<ExecutionInput<ArgumentList<ArgumentListEnd, ArgumentListEnd, ink::abi::Ink>, ink::abi::Ink>>, Set<ReturnType<NonCodec>>>`, but its trait bounds were not satisfied
6969
--> tests/ui/trait_def/fail/message_output_non_codec.rs:5:5
7070
|
7171
1 | pub struct NonCodec;
@@ -87,7 +87,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call
8787
`NonCodec: WrapperTypeDecode`
8888
which is required by `NonCodec: DecodeMessageResult<ink::abi::Ink>`
8989
note: the trait `WrapperTypeDecode` must be implemented
90-
--> $CARGO/parity-scale-codec-3.7.5/src/codec.rs
90+
--> $CARGO/parity-scale-codec-$VERSION/src/codec.rs
9191
|
9292
| pub trait WrapperTypeDecode: Sized {
9393
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

integration-tests/public/runtime-call-contract/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a7
1515
frame-system = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
1616
pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
1717
pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
18-
sp-runtime = { version = "43.0.0", default-features = false }
19-
18+
sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
2019
# todo
2120
codec = { package = "parity-scale-codec", version = "3.7.4", default-features = false }
2221
scale-info = { version = "2.11.1", default-features = false }
@@ -29,11 +28,11 @@ edition = "2024"
2928
publish = false
3029

3130
[dependencies]
32-
ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.4", default-features = false }
31+
ink = { path = "../../../crates/ink", default-features = false }
3332
flipper-traits = { path = "traits", default-features = false }
3433

3534
[dev-dependencies]
36-
ink_e2e = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.4"}
35+
ink_e2e = { path = "../../../crates/e2e" }
3736
ink_sandbox = { path = "../../../crates/sandbox" }
3837
sandbox-runtime = { path = "sandbox-runtime", default-features = false }
3938
scale-value = "0.18.0"

integration-tests/public/runtime-call-contract/sandbox-runtime/pallet-revive-caller/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ frame-support = { workspace = true, default-features = false, features = ["try-r
1919
frame-system = { workspace = true, default-features = false }
2020
sp-runtime = { workspace = true, default-features = false }
2121

22-
pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["try-runtime"] }
22+
pallet-revive = { workspace = true, default-features = false, features = ["try-runtime"] }
2323
flipper-traits = { path = "../../traits", default-features = false }
24-
ink = { git = "https://github.com/use-ink/ink", tag = "v6.0.0-alpha.4", features = ["no-panic-handler", "no-allocator"] }
24+
ink = { path = "../../../../../crates/ink", features = ["no-panic-handler", "no-allocator"] }
2525
ink_sandbox = { path = "../../../../../crates/sandbox" }
2626

2727
[features]

0 commit comments

Comments
 (0)