cpchain-rust-sdk

Crates.iocpchain-rust-sdk
lib.rscpchain-rust-sdk
version0.1.20
sourcesrc
created_at2022-12-17 01:55:23.163605
updated_at2023-08-09 07:52:17.428478
descriptionRust SDK for CPChain Ecosystem
homepagehttps://cpchain.io
repositoryhttps://github.com/cpchain/cpchain-rust-sdk
max_upload_size
id739578
size113,023
zgljl2012 (zgljl2012)

documentation

README

CPCHAIN RUST SDK

This is the rust sdk for CPChain.

Start


cargo add cpchain-rust-sdk

Example


use cpchain_rust_sdk::CPCWeb3;

ABI 编码分析


事件:(<address>, [['2020/08/08', 'desc'], ['2020/08/09', 'desc2']])

0x40 -> 64 -> 两个 uint256
0x80 -> 128 -> 4
0x100 -> 256 -> 8

1:  000000000000000000000000fb18e43eb224df26371d2e39101631cc1463772f #0 <address>
2:  0000000000000000000000000000000000000000000000000000000000000040 #32 二维数组相对偏移量
3:  0000000000000000000000000000000000000000000000000000000000000002 #64 二维数组元素个数
4:  0000000000000000000000000000000000000000000000000000000000000040 #96 ['2020/08/08', 'desc'] 偏移量
5:  0000000000000000000000000000000000000000000000000000000000000100 #128 ['2020/08/09', 'desc2'] 偏移量
6:  0000000000000000000000000000000000000000000000000000000000000040 #160 '2020/08/08' 偏移量
7:  0000000000000000000000000000000000000000000000000000000000000080 #192 'desc' 偏移量
8:  000000000000000000000000000000000000000000000000000000000000000a #224 '2020/08/08' 长度
9:  323032322f30382f303100000000000000000000000000000000000000000000 #256
10: 0000000000000000000000000000000000000000000000000000000000000004 #288 'desc' 长度
11: 6465736300000000000000000000000000000000000000000000000000000000 #320
12: 0000000000000000000000000000000000000000000000000000000000000040
13: 0000000000000000000000000000000000000000000000000000000000000080
14: 000000000000000000000000000000000000000000000000000000000000000a
15: 323032322f30382f303200000000000000000000000000000000000000000000
16: 0000000000000000000000000000000000000000000000000000000000000005
17: 6465736332000000000000000000000000000000000000000000000000000000

Commit count: 0

cargo fmt