resim CLI supports basic method (or function) invocation transactions. Starting from
v0.3.0, any transaction
resim supports can be outputted as a transaction manifest without committing it to the simulated ledger.
To turn on the feature, add
--manifest <path> flag to your
resim call-function command (or any other command that would create a transaction).
resim call-function package_sim1qy2f2f63ddpw8x40m55ytpru428vk66edhdpvz60ljqsj5y7v8 Hello instantiate_hello --manifest out.rtm
will produce something like:
CALL_METHOD Address("account_sim1qsw6l5leaj62zd38x8f6qhlue76f9lz0n2s49s3mzu8qczjhm2") "lock_fee" Decimal("10"); (1) CALL_FUNCTION Address("package_sim1qy2f2f63ddpw8x40m55ytpru428vk66edhdpvz60ljqsj5y7v8") "Hello" "instantiate_hello"; (2) CALL_METHOD Address("account_sim1qsw6l5leaj62zd38x8f6qhlue76f9lz0n2s49s3mzu8qczjhm2") "deposit_batch" Expression("ENTIRE_WORKTOP"); (3)
|1||To pay for the transaction fees, your transaction must contain a call to a method locking fees. For testing purposes, this example calls the
|2||This line calls the
|3||This line takes all the resources present on the worktop, puts them in buckets and send them back into your account. In this case it’s not important since no resources are returned from the
You can edit the auto-generated manifest to modify or add any other instructions you like.