Skip to content

Commit 33d2895

Browse files
committed
chore: use pallet-revive-uapi from crates.io
1 parent 82f8c9d commit 33d2895

File tree

5 files changed

+48
-18
lines changed

5 files changed

+48
-18
lines changed

Cargo.lock

Lines changed: 35 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ frame-metadata = { version = "23.0.0", default-features = false }
8787
frame-system = { version = "42.0.0", default-features = false }
8888
frame-support = { version = "42.0.0", default-features = false }
8989

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

9292
sp-io = { version = "42.0.0", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
9393
sp-runtime-interface = { version = "31.0.0", default-features = false, features = ["disable_target_static_assertions"] }

crates/sandbox/src/client.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ where
348348
data,
349349
salt(),
350350
caller_to_origin::<S>(caller),
351+
// TODO: mismatch in dependencies
351352
pallet_revive::Weight::from_parts(
352353
gas_limit.ref_time(),
353354
gas_limit.proof_size(),
@@ -447,6 +448,7 @@ where
447448
};
448449

449450
let result = ContractResult::<InstantiateReturnValue, E::Balance> {
451+
// TODO: mismatch in dependencies
450452
gas_consumed: Weight::from_parts(
451453
dry_run_result.gas_consumed.ref_time(),
452454
dry_run_result.gas_consumed.proof_size(),
@@ -458,11 +460,12 @@ where
458460
storage_deposit: to_revive_storage_deposit(dry_run_result.storage_deposit),
459461
result: dry_run_result
460462
.result
461-
.map_err(|_e| sp_runtime::DispatchError::Other("SandboxError"))
463+
.map_err(|_e| sp_runtime::DispatchError::Other("SandboxError")) // TODO: mismatch in dependencies
462464
.map(|res| {
463465
InstantiateReturnValue {
464466
result: ExecReturnValue {
465-
flags: res.result.flags,
467+
// TODO: mismatch in dependencies
468+
flags: ink_env::ReturnFlags::from_bits_truncate(res.result.flags.bits()),
466469
data: res.result.data,
467470
},
468471
addr: res.addr,
@@ -566,6 +569,7 @@ where
566569
value,
567570
input_data,
568571
caller_to_origin::<S>(signer),
572+
// TODO: mismatch in dependencies
569573
pallet_revive::Weight::from_parts(
570574
gas_limit.ref_time(),
571575
gas_limit.proof_size(),
@@ -648,6 +652,7 @@ where
648652
// todo error when `AccountUnmapped`
649653
Ok(CallDryRunResult {
650654
exec_result: ContractExecResultFor::<E> {
655+
// TODO: mismatch in dependencies
651656
gas_consumed: Weight::from_parts(
652657
result.gas_consumed.ref_time(),
653658
result.gas_consumed.proof_size(),
@@ -659,10 +664,11 @@ where
659664
storage_deposit: to_revive_storage_deposit(result.storage_deposit),
660665
result: result
661666
.result
662-
.map_err(|_e| sp_runtime::DispatchError::Other("SandboxError"))
667+
.map_err(|_e| sp_runtime::DispatchError::Other("SandboxError")) // TODO: mismatch in dependencies
663668
.map(|res| {
664669
ExecReturnValue {
665-
flags: res.flags,
670+
// TODO: mismatch in dependencies
671+
flags: ink_env::ReturnFlags::from_bits_truncate(res.flags.bits()),
666672
data: res.data,
667673
}
668674
}),

integration-tests/public/cross-contract-calls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ink = { path = "../../../crates/ink", default-features = false }
1212
#
1313
# If we don't we will end up with linking errors!
1414
other-contract = { path = "other-contract", default-features = false, features = ["ink-as-dependency"] }
15-
pallet-revive-uapi = { version = "0.4.0", default-features = false }
15+
pallet-revive-uapi = { version = "0.7.0", default-features = false }
1616

1717
[dev-dependencies]
1818
ink_e2e = { path = "../../../crates/e2e" }

integration-tests/public/cross-contract-calls/other-contract/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ publish = false
77

88
[dependencies]
99
ink = { path = "../../../../crates/ink", default-features = false }
10-
pallet-revive-uapi = { version = "0.4.0", default-features = false }
10+
pallet-revive-uapi = { version = "0.7.0", default-features = false }
1111

1212
[dev-dependencies]
1313
ink_e2e = { path = "../../../../crates/e2e" }

0 commit comments

Comments
 (0)