Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,701 changes: 1,196 additions & 505 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,16 @@ const_env = { version = "0.1" }

# Substrate dependencies
frame-metadata = { version = "23.0.0", default-features = false }
frame-system = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
frame-support = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
pallet-balances = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
pallet-timestamp = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
frame-system = { version = "42.0.0", default-features = false }
frame-support = { version = "42.0.0", default-features = false }

pallet-revive = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
pallet-revive-uapi = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["unstable-hostfn"] }
pallet-revive-uapi = { version = "0.8.0", default-features = false, features = ["unstable-hostfn"] }

sp-externalities = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] }
sp-core = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
sp-keyring = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
sp-runtime = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1" }
sp-weights = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
xcm = { package = "staging-xcm", git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false }
sp-core = { version = "38.0.0", default-features = false }
sp-keyring = { version = "43.0.0", default-features = false }
sp-runtime = { version = "43.0.0" }
sp-weights = { version = "33.0.0", default-features = false }
xcm = { package = "staging-xcm", version = "18.0.0", default-features = false }

# PolkaVM dependencies
polkavm-derive = { version = "0.26.0", default-features = false }
Expand Down
5 changes: 0 additions & 5 deletions crates/env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ xcm = { workspace = true, optional = true }
hex-literal = "1"
const-crypto = "0.3.0"

sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] }

[target.'cfg(target_arch = "riscv64")'.dependencies]
polkavm-derive = { workspace = true, default-features = false }

Expand Down Expand Up @@ -79,8 +76,6 @@ std = [
"scale-info/std",
"secp256k1",
"schnorrkel",
"sp-io/std",
"sp-runtime-interface/std",
"num-traits/std",
# Enables hashing crates for off-chain environment.
"sha2",
Expand Down
5 changes: 0 additions & 5 deletions crates/ink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ linkme = { workspace = true, optional = true }
polkavm-derive = { workspace = true }
xcm = { workspace = true, optional = true }

sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] }

[dev-dependencies]
ink_ir = { workspace = true, default-features = true }
ink_metadata = { workspace = true } # todo why here too?
Expand All @@ -54,8 +51,6 @@ std = [
"scale/std",
"xcm?/std",
"derive_more/std",
"sp-runtime-interface/std",
"sp-io/std",
"dep:linkme"
]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:13:9
|
13 | / pub fn constructor(_input: NonCodecType) -> Self {
14 | | Self {}
15 | | }
| |_________^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`

error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:13:28
|
Expand All @@ -19,21 +34,6 @@ note: required by a bound in `DispatchInput`
| T: scale::Decode + 'static;
| ^^^^^^^^^^^^^ required by this bound in `DispatchInput`

error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:13:9
|
13 | / pub fn constructor(_input: NonCodecType) -> Self {
14 | | Self {}
15 | | }
| |_________^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`

error[E0277]: the trait bound `NonCodecType: AbiEncodeWith<_>` is not satisfied
--> tests/ui/contract/fail/constructor/constructor-input-non-codec.rs:3:1
|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
error[E0308]: mismatched types
--> tests/ui/contract/fail/impl/impl-block-for-non-storage-01.rs:20:10
|
20 | impl NonContract {
| ^^^^^^^^^^^ expected `IsSameType<Contract>`, found `IsSameType<NonContract>`
|
= note: expected struct `IsSameType<contract::Contract>`
found struct `IsSameType<NonContract>`

error[E0599]: no function or associated item named `constructor_2` found for struct `contract::Contract` in the current scope
--> tests/ui/contract/fail/impl/impl-block-for-non-storage-01.rs:22:16
|
Expand All @@ -20,7 +11,7 @@ error[E0599]: no function or associated item named `constructor_2` found for str
... |
21 | | #[ink(constructor)]
22 | | pub fn constructor_2() -> Self {
| | -^^^^^^^^^^^^^ function or associated item not found in `Contract`
| | -^^^^^^^^^^^^^ function or associated item not found in `contract::Contract`
| |_______________|
|
|
Expand Down Expand Up @@ -48,7 +39,7 @@ error[E0599]: no function or associated item named `message_2` found for struct
... |
26 | | #[ink(message)]
27 | | pub fn message_2(&self) {}
| | -^^^^^^^^^ function or associated item not found in `Contract`
| | -^^^^^^^^^ function or associated item not found in `contract::Contract`
| |_______________|
|
|
Expand All @@ -62,3 +53,12 @@ help: there is a method `message_1` with a similar name, but with different argu
|
15 | pub fn message_1(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
--> tests/ui/contract/fail/impl/impl-block-for-non-storage-01.rs:20:10
|
20 | impl NonContract {
| ^^^^^^^^^^^ expected `IsSameType<Contract>`, found `IsSameType<NonContract>`
|
= note: expected struct `IsSameType<contract::Contract>`
found struct `IsSameType<NonContract>`
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ error[E0599]: no method named `env` found for reference `&contract::Contract` in
--> tests/ui/contract/fail/impl/impl-block-using-env-no-marker.rs:24:26
|
24 | let _ = self.env().caller();
| ^^^ method not found in `&Contract`
| ^^^ method not found in `&contract::Contract`
|
= help: items from traits can only be used if the trait is in scope
help: trait `Env` which provides `env` is implemented but not in scope; perhaps you want to import it
|
3 + use ink::codegen::Env;
3 + use ink::codegen::env::Env;
|
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error[E0599]: no function or associated item named `env` found for struct `contr
| ------------------- function or associated item `env` not found for this struct
...
22 | let _ = Self::env().caller();
| ^^^ function or associated item not found in `Contract`
| ^^^ function or associated item not found in `contract::Contract`
|
note: if you're trying to build a new `contract::Contract` consider using one of the following associated functions:
contract::_::<impl contract::Contract>::constructor
Expand All @@ -20,5 +20,5 @@ note: if you're trying to build a new `contract::Contract` consider using one of
= help: items from traits can only be used if the trait is in scope
help: trait `StaticEnv` which provides `env` is implemented but not in scope; perhaps you want to import it
|
3 + use ink::codegen::StaticEnv;
3 + use ink::codegen::env::StaticEnv;
|
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:9
|
18 | pub fn message(&self, _input: NonCodecType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`

error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:31
|
Expand All @@ -19,19 +32,6 @@ note: required by a bound in `DispatchInput`
| T: scale::Decode + 'static;
| ^^^^^^^^^^^^^ required by this bound in `DispatchInput`

error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is not satisfied
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:9
|
18 | pub fn message(&self, _input: NonCodecType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeDecode` is not implemented for `NonCodecType`
|
= help: the following other types implement trait `WrapperTypeDecode`:
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`

error[E0277]: the trait bound `NonCodecType: AbiEncodeWith<_>` is not satisfied
--> tests/ui/contract/fail/message/message-input-non-codec.rs:3:1
|
Expand All @@ -50,7 +50,7 @@ note: required by a bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, Arg
| T: AbiEncodeWith<Abi>,
| ^^^^^^^^^^^^^^^^^^ required by this bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd, Abi>, Abi>::push_arg`

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
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
--> tests/ui/contract/fail/message/message-input-non-codec.rs:18:9
|
18 | pub fn message(&self, _input: NonCodecType) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
error[E0277]: the trait bound `Result<NonCodecType, LangError>: Encode` is not satisfied
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:3:1
|
3 | #[ink::contract]
| ^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Result<NonCodecType, LangError>`
|
= help: the trait `Encode` is implemented for `Result<T, E>`
note: required by a bound in `return_value`
--> $WORKSPACE/crates/env/src/api.rs
|
| pub fn return_value<R>(return_flags: ReturnFlags, return_value: &R)
| ------------ required by a bound in this function
| where
| R: scale::Encode,
| ^^^^^^^^^^^^^ required by this bound in `return_value`
= note: this error originates in the attribute macro `ink::contract` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NonCodecType: WrapperTypeEncode` is not satisfied
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:18:34
|
Expand All @@ -24,24 +41,7 @@ note: required by a bound in `DispatchOutput`
| T: scale::Encode + 'static;
| ^^^^^^^^^^^^^ required by this bound in `DispatchOutput`

error[E0277]: the trait bound `Result<NonCodecType, LangError>: Encode` is not satisfied
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:3:1
|
3 | #[ink::contract]
| ^^^^^^^^^^^^^^^^ the trait `Encode` is not implemented for `Result<NonCodecType, LangError>`
|
= help: the trait `Encode` is implemented for `Result<T, E>`
note: required by a bound in `return_value`
--> $WORKSPACE/crates/env/src/api.rs
|
| pub fn return_value<R>(return_flags: ReturnFlags, return_value: &R)
| ------------ required by a bound in this function
| where
| R: scale::Encode,
| ^^^^^^^^^^^^^ required by this bound in `return_value`
= note: this error originates in the attribute macro `ink::contract` (in Nightly builds, run with -Z macro-backtrace for more info)

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
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
--> tests/ui/contract/fail/message/message-returns-non-codec.rs:18:9
|
6 | pub struct NonCodecType;
Expand All @@ -63,7 +63,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvi
`NonCodecType: WrapperTypeDecode`
which is required by `NonCodecType: DecodeMessageResult<ink::abi::Ink>`
note: the trait `WrapperTypeDecode` must be implemented
--> $CARGO/parity-scale-codec-3.7.5/src/codec.rs
--> $CARGO/parity-scale-codec-$VERSION/src/codec.rs
|
| pub trait WrapperTypeDecode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ note: required by a bound in `Execution::<Args, Output, Abi>::new`
| pub fn new(input: ExecutionInput<Args, Abi>) -> Self {
| --- required by a bound in this associated function

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
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
--> tests/ui/trait_def/fail/message_input_non_codec.rs:5:5
|
5 | #[ink(message)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ note: required by a bound in `Execution::<Args, Output, Abi>::new`
| pub fn new(input: ExecutionInput<Args, Abi>) -> Self {
| --- required by a bound in this associated function

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
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
--> tests/ui/trait_def/fail/message_output_non_codec.rs:5:5
|
1 | pub struct NonCodec;
Expand All @@ -87,7 +87,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<E, Set<Call
`NonCodec: WrapperTypeDecode`
which is required by `NonCodec: DecodeMessageResult<ink::abi::Ink>`
note: the trait `WrapperTypeDecode` must be implemented
--> $CARGO/parity-scale-codec-3.7.5/src/codec.rs
--> $CARGO/parity-scale-codec-$VERSION/src/codec.rs
|
| pub trait WrapperTypeDecode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 changes: 0 additions & 4 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ cfg-if = { workspace = true }
num-traits = { workspace = true, features = ["i128"] }
sp-core = { workspace = true }

sp-io = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-runtime-interface = { git = "https://github.com/use-ink/polkadot-sdk.git", rev = "a71ec19a94702ea71767ba5ac97603ea6c6305c1", default-features = false, features = ["disable_target_static_assertions"] }
sp-weights = { workspace = true }
impl-trait-for-tuples = { workspace = true }
itertools = { workspace = true }
Expand All @@ -55,8 +53,6 @@ std = [
"scale-info/std",
"scale/std",
"sp-core/std",
"sp-io/std",
"sp-runtime-interface/std",
"sp-weights/std",
"primitive-types/std",
"primitive-types/scale-info",
Expand Down
Loading
Loading