Skip to content

Commit

Permalink
Merge pull request #22 from TheWaWaR/update-deps
Browse files Browse the repository at this point in the history
chore: update dependencies
  • Loading branch information
TheWaWaR authored Aug 10, 2022
2 parents bc2efe4 + dd99bfb commit 01a6b1b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 22 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "ckb-std"
version = "0.9.0"
version = "0.10.0"
authors = ["Nervos network"]
edition = "2018"
edition = "2021"
license = "MIT"
repository = "https://github.com/nervosnetwork/ckb-std"
description = "This library contains serveral modules help you write CKB contract with Rust"
Expand All @@ -22,4 +22,4 @@ cc = "1.0"
cstr_core = { version = "0.2.4", default-features = false, features = ["alloc"] }
ckb-types = { package = "ckb-standalone-types", version = "0.1.2", default-features = false, optional = true }
buddy-alloc = { version = "0.4.1", optional = true }
ckb-x64-simulator = { version = "0.6.1", optional = true }
ckb-x64-simulator = { version = "0.7.0", optional = true }
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TARGET := riscv64imac-unknown-none-elf
DOCKER_IMAGE := thewawar/ckb-capsule:2021-12-25
DOCKER_IMAGE := thewawar/ckb-capsule:2022-08-01
CC := riscv64-unknown-elf-gcc

default: integration-in-docker
Expand Down Expand Up @@ -30,7 +30,7 @@ check:
cargo check --target ${TARGET} --examples

install-tools:
cargo install --git https://github.com/xxuejie/ckb-binary-patcher.git
cargo install --git https://github.com/nervosnetwork/ckb-binary-patcher.git

.PHONY: test check

4 changes: 2 additions & 2 deletions capsule.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# # path of rust contracts workspace directory,
# # a `Cargo.toml` file is expected under the directory.
# toolchain = "nightly-2021-12-25"
# docker_image = "thewawar/ckb-capsule:2021-12-25"
toolchain = "nightly-2022-08-01"
docker_image = "thewawar/ckb-capsule:2022-08-01"

# capsule version
version = "0.7.3 96bf4af"
Expand Down
2 changes: 1 addition & 1 deletion contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions contracts/exec-caller-by-code-hash/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ pub fn main() -> Result<(), Error> {
let arg1 = cstr!("Hello World");
let arg2 = cstr!("你好");
// $ ckb-cli util blake2b --binary-path build/debug/exec-callee
// 0xa6970d35a0f17190f1fd1885ccb2fb01624632c3492546973fd41e243e5180f4
// 0x27ce272a3b51f2cd8bc684a9e16ae0ee8021710dcf370a14c592da9cb910efb7

let code_hash = [
0xa6, 0x97, 0x0d, 0x35, 0xa0, 0xf1, 0x71, 0x90, 0xf1, 0xfd, 0x18, 0x85, 0xcc, 0xb2, 0xfb,
0x01, 0x62, 0x46, 0x32, 0xc3, 0x49, 0x25, 0x46, 0x97, 0x3f, 0xd4, 0x1e, 0x24, 0x3e, 0x51,
0x80, 0xf4,
0x27, 0xce, 0x27, 0x2a, 0x3b, 0x51, 0xf2, 0xcd, 0x8b, 0xc6, 0x84, 0xa9, 0xe1, 0x6a, 0xe0,
0xee, 0x80, 0x21, 0x71, 0x0d, 0xcf, 0x37, 0x0a, 0x14, 0xc5, 0x92, 0xda, 0x9c, 0xb9, 0x10,
0xef, 0xb7,
];
ckb_std::debug!("code_hash: {:?}", code_hash);
let ret = high_level::exec_cell(
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
//! * `default_alloc!` and `libc_alloc!` macro: defines global allocator for no-std rust

#![no_std]
#![feature(llvm_asm)]

extern crate alloc;

Expand Down
8 changes: 4 additions & 4 deletions test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
name = "ckb-rust-demo"
version = "0.1.0"
authors = ["Nervos network"]
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ckb-x64-simulator = "0.6.1"
ckb-testtool = "0.6.1"
ckb-x64-simulator = "0.7"
ckb-testtool = "0.8.0"
serde_json = "1.0"
ckb-mock-tx-types = "0.1.0"
ckb-mock-tx-types = "0.4.0"
blake2b-rs = "0.1.5"
faster-hex = "0.6"
5 changes: 1 addition & 4 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ A CKB contract demo.
## Usage

``` sh
cd contract
cargo build
cd ..
cargo test
make test
```

https://justjjy.com/Build-CKB-contract-with-Rust-part-1
Expand Down

0 comments on commit 01a6b1b

Please sign in to comment.