#execution #contract #effect #testing #command-line #error-message #near-vm-runner

app near-vm-runner-standalone

A command line wrapper around near-vm-runner. All error messages that can be raised during the contract execution are raised by near-vm-runner and the all effects of computing the execution result of a smart contract are encapsulated inside near-vm-runner. One can use near-vm-runner-standalone to test the smart contracts, e.g. with integration tests to make sure it has expected behavior once deployed to the blockchain.

20 releases (5 stable)

2.2.0 Sep 3, 2020
1.2.0 Aug 18, 2020
1.1.0 Jul 27, 2020
0.9.1 May 22, 2020
0.4.1 Nov 1, 2019

#88 in #effect

38 downloads per month

Apache-2.0

1MB
19K SLoC

near-vm-runner-standalone

A command line wrapper around near-vm-runner. All error messages that can be raised during the contract execution are raised by near-vm-runner and the all effects of computing the execution result of a smart contract are encapsulated inside near-vm-runner.

One can use near-vm-runner-standalone to test the smart contracts, e.g. with integration tests to make sure it has expected behavior once deployed to the blockchain.

To use run like this:

cargo run -- --wasm-file ./status_message.wasm --method-name set_status --input '{"message": "12345"}' сargo run -- --wasm-file ./status_message.wasm --method-name get_status --input '{"account_id": "bob"}' --state '{"U1RBVEU=":"AQAAAAMAAABib2IFAAAAMTIzNDU="}'

I.e. persistent state could be passed across runs via --state parameter.

Dependencies

~33–45MB
~721K SLoC