From 47061b685a363275e309eaa5890c20e4434b1e18 Mon Sep 17 00:00:00 2001 From: joii2020 Date: Wed, 30 Oct 2024 18:08:27 +0800 Subject: [PATCH] Update dependencies: ckb-std --- tests/Cargo.lock | 4 ++-- tests/contracts/exec-child/src/main.rs | 3 +++ tests/contracts/exec-parent/src/main.rs | 3 +++ tests/contracts/spawn-cases/src/main.rs | 3 +++ tests/contracts/spawn-child/src/main.rs | 3 +++ tests/contracts/spawn-parent/src/main.rs | 3 +++ tests/libs/ckb-std-wrapper/Cargo.toml | 2 +- 7 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/Cargo.lock b/tests/Cargo.lock index 741514b..51c7381 100644 --- a/tests/Cargo.lock +++ b/tests/Cargo.lock @@ -106,9 +106,9 @@ dependencies = [ [[package]] name = "buddy-alloc" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" +checksum = "ee741d62dcaf41ca303576ef890989ccb01d5dd77f8ce1a6d6c7846ab5d09efb" [[package]] name = "byteorder" diff --git a/tests/contracts/exec-child/src/main.rs b/tests/contracts/exec-child/src/main.rs index e1437c0..b150e9a 100644 --- a/tests/contracts/exec-child/src/main.rs +++ b/tests/contracts/exec-child/src/main.rs @@ -12,6 +12,9 @@ ckb_std::entry!(program_entry); default_alloc!(); use ckb_std_wrapper::ckb_std; +#[cfg(not(any(feature = "native-simulator", test)))] +use alloc::format; + pub fn program_entry() -> i8 { ckb_std::debug!("This is a sample contract exec-child!"); diff --git a/tests/contracts/exec-parent/src/main.rs b/tests/contracts/exec-parent/src/main.rs index 506c230..30625e9 100644 --- a/tests/contracts/exec-parent/src/main.rs +++ b/tests/contracts/exec-parent/src/main.rs @@ -18,6 +18,9 @@ use ckb_std::ckb_types::prelude::Unpack; use ckb_std::debug; use core::ffi::CStr; +#[cfg(not(any(feature = "native-simulator", test)))] +use alloc::format; + pub fn program_entry() -> i8 { debug!("This is a sample contract exec-parent!"); diff --git a/tests/contracts/spawn-cases/src/main.rs b/tests/contracts/spawn-cases/src/main.rs index ba047d4..3555480 100644 --- a/tests/contracts/spawn-cases/src/main.rs +++ b/tests/contracts/spawn-cases/src/main.rs @@ -19,6 +19,9 @@ use ckb_std_wrapper::ckb_std; use core::ffi::CStr; use spawn_cmd::SpawnCasesCmd; +#[cfg(not(any(feature = "native-simulator", test)))] +use alloc::format; + const CKB_STDIN: usize = 0; const CKB_STDOUT: usize = 1; diff --git a/tests/contracts/spawn-child/src/main.rs b/tests/contracts/spawn-child/src/main.rs index 61c4fea..8fffa34 100644 --- a/tests/contracts/spawn-child/src/main.rs +++ b/tests/contracts/spawn-child/src/main.rs @@ -18,6 +18,9 @@ use alloc::{ use ckb_std::{debug, syscalls}; use spawn_cmd::SpawnCmd; +#[cfg(not(any(feature = "native-simulator", test)))] +use alloc::format; + pub fn program_entry() -> i8 { debug!("-B- Spawn-Child(pid:{}) Begin --", syscalls::process_id()); diff --git a/tests/contracts/spawn-parent/src/main.rs b/tests/contracts/spawn-parent/src/main.rs index 173ea93..7aa226f 100644 --- a/tests/contracts/spawn-parent/src/main.rs +++ b/tests/contracts/spawn-parent/src/main.rs @@ -24,6 +24,9 @@ use ckb_std::{ use core::ffi::CStr; use spawn_cmd::SpawnCmd; +#[cfg(not(any(feature = "native-simulator", test)))] +use alloc::format; + pub fn program_entry() -> i8 { debug!("-A- SpawnParent(pid:{}) Begin --", syscalls::process_id()); diff --git a/tests/libs/ckb-std-wrapper/Cargo.toml b/tests/libs/ckb-std-wrapper/Cargo.toml index 93a516c..b7df6b9 100644 --- a/tests/libs/ckb-std-wrapper/Cargo.toml +++ b/tests/libs/ckb-std-wrapper/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" native-simulator = ["ckb-std/native-simulator"] [dependencies] -ckb-std = { git = "https://github.com/joii2020/ckb-std.git", rev = "a4dfebc" } +ckb-std = { git = "https://github.com/nervosnetwork/ckb-std.git", rev = "ef251e2" } # ckb-std = { path = "../../../../ckb-std" }