Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b4a5fd8
Bump versions on all `polkadot-sdk` crates
cmichi Nov 29, 2024
81c34a3
Adapt `contract-xcm` example
cmichi Dec 2, 2024
5d259df
Rename to new `subxt` names
cmichi Dec 2, 2024
539b1c7
Rename to new `subxt` names
cmichi Dec 2, 2024
b4dbd2c
Migrate to new `Keypair` API
cmichi Dec 2, 2024
e8fa2c6
Make `v` mutable
cmichi Dec 2, 2024
4ac98dc
Add necessary `EncodeAsType` + `IntoVisitor` trait bounds
cmichi Dec 2, 2024
4e411c9
Remove `IntoVisitor` trait bound
cmichi Dec 2, 2024
103a285
Update test fixtures
cmichi Dec 2, 2024
53fda54
Deal with `scale_value::Value` vs `ink_e2e::subxt::dynamic::Value`
cmichi Dec 2, 2024
cea2727
Enable `try-runtime` feature for `frame-support`
cmichi Dec 2, 2024
aa11373
Downgrade to `scale` 3.6.12, as 3.7 was yanked
cmichi Dec 2, 2024
c6bd6a7
Use `parity-scale-codec` 3.7.0
cmichi Dec 2, 2024
52d536d
Use `parity-scale-codec` 3.6.12 everywhere
cmichi Dec 2, 2024
62079a2
Add PR link to todo-comment
cmichi Dec 2, 2024
4162a36
Use `subxt::ext::scale_value::serde`
cmichi Dec 3, 2024
aa959f2
Use `parity-scale-codec` 3.7.0
cmichi Dec 2, 2024
197fa6c
Switch to `parity-scale-codec` 3.6.12
cmichi Dec 3, 2024
e5c1916
Remove unnecessary dependency
cmichi Dec 3, 2024
a4ddb56
Update test fixtures
cmichi Dec 3, 2024
7786e30
Use same `scale-{encode, decode}` as subxt + `frame-decode`
cmichi Dec 4, 2024
911f516
Merge remote-tracking branch 'origin/master' into cmichi-upgrade-deps…
cmichi Dec 4, 2024
5beb88d
Remove superfluous trait bounds
cmichi Dec 4, 2024
505c134
Propagate `std` properly
cmichi Dec 4, 2024
3305916
Revert unneeded trait bound changes
cmichi Dec 4, 2024
aea9fc5
Update test fixtures
cmichi Dec 4, 2024
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,848 changes: 1,052 additions & 796 deletions Cargo.lock

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ version = "5.1.0"
arrayref = { version = "0.3" }
array-init = { version = "2.0", default-features = false }
blake2 = { version = "0.10" }
cargo_metadata = { version = "0.18.0" }
cargo_metadata = { version = "0.19.0" }
cfg-if = { version = "1.0" }
contract-build = { version = "5.0.1" }
darling = { version = "0.20.10" }
Expand All @@ -56,9 +56,9 @@ quickcheck = { version = "1" }
quickcheck_macros = { version = "1" }
quote = { version = "1" }
rlibc = { version = "1" }
scale = { package = "parity-scale-codec", version = "3.6.9", default-features = false, features = ["derive"] }
scale-decode = { version = "0.11.1", default-features = false }
scale-encode = { version = "0.6.0", default-features = false }
scale = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["derive"] }
scale-decode = { version = "0.14.0", default-features = false }
scale-encode = { version = "0.8.0", default-features = false }
scale-info = { version = "2.11", default-features = false }
schemars = { version = "0.8" }
secp256k1 = { version = "0.28.2" }
Expand All @@ -67,9 +67,9 @@ serde_json = { version = "1.0.133" }
sha2 = { version = "0.10" }
sha3 = { version = "0.10" }
static_assertions = { version = "1.1" }
subxt = { version = "0.35.3" }
subxt-metadata = { version = "0.35.2" }
subxt-signer = { version = "0.35.3" }
subxt = { version = "0.38.0" }
subxt-metadata = { version = "0.38.0" }
subxt-signer = { version = "0.38.0" }
syn = { version = "2" }
synstructure = { version = "0.13.1" }
thiserror = { version = "1.0.69" }
Expand All @@ -85,21 +85,21 @@ wat = { version = "1.221.2" }

# Substrate dependencies
frame-metadata = { version = "16.0.0" }
frame-system = { version = "32.0.0", default-features = false }
frame-support = { version = "32.0.0", default-features = false }
pallet-contracts = { version = "31.0.0", default-features = false }
pallet-balances = { version = "33.0.0", default-features = false }
pallet-timestamp = { version = "31.0.0", default-features = false }
pallet-contracts-uapi = { version = "9.0.0", default-features = false }
pallet-contracts-mock-network = { version = "7.0.0", default-features = false }
sp-externalities = { version = "0.28.0", default-features = false }
sp-io = { version = "34.0.0", default-features = false }
sp-runtime-interface = { version = "27.0.0" }
sp-core = { version = "32.0.0", default-features = false }
sp-keyring = { version = "35.0.0", default-features = false }
sp-runtime = { version = "35.0.0", default-features = false }
frame-system = { version = "38.0.0", default-features = false }
frame-support = { version = "38.0.0", default-features = false }
pallet-contracts = { version = "38.0.0", default-features = false }
pallet-balances = { version = "39.0.0", default-features = false }
pallet-timestamp = { version = "37.0.0", default-features = false }
pallet-contracts-uapi = { version = "12.0.0", default-features = false }
pallet-contracts-mock-network = { version = "14.0.0", default-features = false }
sp-externalities = { version = "0.29.0", default-features = false }
sp-io = { version = "38.0.0", default-features = false }
sp-runtime-interface = { version = "28.0.0" }
sp-core = { version = "34.0.0", default-features = false }
sp-keyring = { version = "39.0.0", default-features = false }
sp-runtime = { version = "39.0.2", default-features = false }
sp-weights = { version = "31.0.0", default-features = false }
xcm = { package = "staging-xcm", version = "11.0.0", default-features = false }
xcm = { package = "staging-xcm", version = "14.2.0", default-features = false }

# Local dependencies
ink = { version = "=5.1.0", path = "crates/ink", default-features = false }
Expand Down
3 changes: 1 addition & 2 deletions crates/e2e/sandbox/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ mod construct_runtime {
type AddressGenerator = $crate::pallet_contracts::DefaultAddressGenerator;
type MaxCodeLen = ConstU32<{ 123 * 1024 }>;
type MaxStorageKeyLen = ConstU32<128>;
type MaxTransientStorageSize = ConstU32<{ 1024 * 1024 }>;
type UnsafeUnstableInterface = ConstBool<false>;
type UploadOrigin = $crate::frame_system::EnsureSigned<Self::AccountId>;
type InstantiateOrigin = $crate::frame_system::EnsureSigned<Self::AccountId>;
Expand Down Expand Up @@ -314,8 +315,6 @@ mod construct_runtime {
Default::default(),
);
}


}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/e2e/src/sandbox_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
};
use subxt::{
dynamic::Value,
tx::TxPayload,
tx::Payload,
};
use subxt_signer::sr25519::Keypair;

Expand Down Expand Up @@ -149,7 +149,7 @@
.mint_into(&pair.public().0.into(), amount)
.expect("Failed to mint tokens");

Keypair::from_seed(seed).expect("Failed to create keypair")
Keypair::from_secret_key(seed).expect("Failed to create keypair")
}

async fn free_balance(
Expand Down Expand Up @@ -547,7 +547,7 @@

fn take_snapshot(&mut self) -> Snapshot {
EXT_PARAA.with(|v| {
let v = v.borrow();
let mut v = v.borrow_mut();

Check warning on line 550 in crates/e2e/src/sandbox_client.rs

View check run for this annotation

Codecov / codecov/patch

crates/e2e/src/sandbox_client.rs#L550

Added line #L550 was not covered by tests
let mut backend = v.as_backend().clone();
let raw_key_values = backend
.backend_storage_mut()
Expand Down
12 changes: 6 additions & 6 deletions crates/e2e/src/xts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ where
dest: C::AccountId,
value: E::Balance,
) -> Result<(), subxt::Error> {
let call = subxt::tx::Payload::new(
let call = subxt::tx::DefaultPayload::new(
"Balances",
"transfer_allow_death",
Transfer::<E, C> {
Expand Down Expand Up @@ -311,7 +311,7 @@ where
signer: &Keypair,
) -> ExtrinsicEvents<C>
where
Call: subxt::tx::TxPayload,
Call: subxt::tx::Payload,
{
let account_id = <Keypair as Signer<C>>::account_id(signer);
let account_nonce =
Expand Down Expand Up @@ -418,7 +418,7 @@ where
salt: Vec<u8>,
signer: &Keypair,
) -> ExtrinsicEvents<C> {
let call = subxt::tx::Payload::new(
let call = subxt::tx::DefaultPayload::new(
"Contracts",
"instantiate_with_code",
InstantiateWithCode::<E> {
Expand Down Expand Up @@ -471,7 +471,7 @@ where
code: Vec<u8>,
storage_deposit_limit: Option<E::Balance>,
) -> ExtrinsicEvents<C> {
let call = subxt::tx::Payload::new(
let call = subxt::tx::DefaultPayload::new(
"Contracts",
"upload_code",
UploadCode::<E> {
Expand All @@ -494,7 +494,7 @@ where
signer: &Keypair,
code_hash: E::Hash,
) -> ExtrinsicEvents<C> {
let call = subxt::tx::Payload::new(
let call = subxt::tx::DefaultPayload::new(
"Contracts",
"remove_code",
RemoveCode::<E> { code_hash },
Expand Down Expand Up @@ -547,7 +547,7 @@ where
data: Vec<u8>,
signer: &Keypair,
) -> ExtrinsicEvents<C> {
let call = subxt::tx::Payload::new(
let call = subxt::tx::DefaultPayload::new(
"Contracts",
"call",
Call::<E> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`
note: required by a bound in `DispatchInput`
--> src/codegen/dispatch/type_check.rs
Expand All @@ -30,6 +31,7 @@ error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is
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: Encode` is not satisfied
Expand All @@ -52,7 +54,7 @@ error[E0277]: the trait bound `NonCodecType: Encode` is not satisfied
Rc<T>
String
Vec<T>
ink::parity_scale_codec::Ref<'a, T, U>
and $N others
= note: required for `NonCodecType` to implement `Encode`
note: required by a bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd>>::push_arg`
--> $WORKSPACE/crates/env/src/call/execution.rs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ error[E0277]: the trait bound `contract::Error: WrapperTypeDecode` is not satisf
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `contract::Error` to implement `ink::parity_scale_codec::Decode`
= note: required for `Result<ContractRef, contract::Error>` to implement `ConstructorReturnType<ContractRef>`
note: required by a bound in `CreateBuilder::<E, ContractRef, CodeHash, Limits, Endowment, Args, Salt, Unset<ReturnType<()>>>::returns`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeDecode` is not satisfied
Arc<T>
Box<T>
Rc<T>
sp_core::Bytes
= note: required for `NonCodecType` to implement `ink::parity_scale_codec::Decode`
note: required by a bound in `DispatchInput`
--> src/codegen/dispatch/type_check.rs
Expand All @@ -28,6 +29,7 @@ error[E0277]: the trait bound `NonCodecType: ink::parity_scale_codec::Decode` is
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: Encode` is not satisfied
Expand All @@ -48,7 +50,7 @@ error[E0277]: the trait bound `NonCodecType: Encode` is not satisfied
Rc<T>
String
Vec<T>
ink::parity_scale_codec::Ref<'a, T, U>
and $N others
= note: required for `NonCodecType` to implement `Encode`
note: required by a bound in `ExecutionInput::<ArgumentList<ArgumentListEnd, ArgumentListEnd>>::push_arg`
--> $WORKSPACE/crates/env/src/call/execution.rs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ error[E0277]: the trait bound `NonCodecType: WrapperTypeEncode` is not satisfied
Rc<T>
String
Vec<T>
ink::parity_scale_codec::Ref<'a, T, U>
and $N others
= note: required for `NonCodecType` to implement `Encode`
note: required by a bound in `DispatchOutput`
--> src/codegen/dispatch/type_check.rs
Expand Down Expand Up @@ -57,7 +57,7 @@ error[E0599]: the method `try_invoke` exists for struct `CallBuilder<DefaultEnvi
`NonCodecType: WrapperTypeDecode`
which is required by `NonCodecType: ink::parity_scale_codec::Decode`
note: the trait `WrapperTypeDecode` must be implemented
--> $CARGO/parity-scale-codec-3.7.0/src/codec.rs
--> $CARGO/parity-scale-codec-3.6.12/src/codec.rs
|
| pub trait WrapperTypeDecode: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Loading
Loading