Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.75 KB

README.md

File metadata and controls

49 lines (34 loc) · 1.75 KB

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