Web3MoveEx.Starcoin.Caller.Contract (web3_move_ex v0.0.4)
api about contract
Link to this section Summary
Functions
Contract call_v2.
Metion:
0x01) func id could be built by Caller.build_namespace
0x02) hex can be tranfered into starcoin_bytes in type_translator
example
Contract get code
for example
Link to this section Functions
Link to this function
build_payload(function_id, args)
Link to this function
build_payload(function_id, type_args, args)
Link to this function
call_v2(endpoint, function_id, args)
Contract call_v2.
Metion:
0x01) func id could be built by Caller.build_namespace
0x02) hex can be tranfered into starcoin_bytes in type_translator
example:
Web3MoveEx.Caller.Contract.call_v2(
"http://localhost:9851",
"0x1168e88ffc5cec53b398b42d61885bbb::EthSigVerifier::verify_eth_sig",
[],
["x"90a938f7457df6e8f741264c32697fc52f9a8f867c52dd70713d9d2d472f2e415d9c94148991bbe1f4a1818d1dff09165782749c877f5cf1eff4ef126e55714d1c"", "x"29c76e6ad8f28bb1004902578fb108c507be341b"", "x"b453bd4e271eed985cbab8231da609c4ce0a9cf1f763b6c1594e76315510e0f1""])
Link to this function
call_v2(endpoint, function_id, type_args, args)
Link to this function
get_code(endpoint, module_path)
Contract get code:
get_code( "http://localhost:9851", "0x1::Account")
Link to this function
get_resource(endpoint, address, resource_path)
for example:
{
"id":101,
"jsonrpc":"2.0",
"method":"contract.get_resource",
"params":["0x0000000000000000000000000a550c18", "0x1::Account::Balance<0x1::STC::STC>"]
}