https://github.com/starcoinorg/starcoin-cookbook/tree/table_extension/examples/table-test
demo相关
1.先修改Move.toml
TableTest相关账号修改成自己使用的账号 这里指
TableTest相关账号
...
0xed9ea1f3533c14e1b52d9ff6475776ba |
2.deploy package
...
YSG/Github/starcoin-cookbook/examples/table-test/release/table-test.v0.0.1.blob -s 0xed9ea1f3533c14e1b52d9ff6475776ba -b |
3.构建table
代码块 |
---|
account execute-function --function 0xed9ea1f3533c14e1b52d9ff6475776ba::TableTest::make_test_tables -s 0xed9ea1f3533c14e1b52d9ff6475776ba -b |
4. table写数据
代码块 |
---|
account execute-function --function 0xed9ea1f3533c14e1b52d9ff6475776ba::TableTest::incr_table_elem -s 0xed9ea1f3533c14e1b52d9ff6475776ba --arg 2u8 -b |
...
5.展示数据
代码块 |
---|
account execute-function --function 0xed9ea1f3533c14e1b52d9ff6475776ba::TableTest::show_table_elem -s 0xed9ea1f3533c14e1b52d9ff6475776ba --arg 2u8 -b |