Crate near_sdk_sim[−][src]
near_sdk_sim
This crate provides an interface for simulating transactions on NEAR’s Blockchain. The simulator uses a standalone runtime that can handle any of the actions provided by the real runtime, including: creating accounts, deploying contracts, making contract calls and calling view methods.
Re-exports
pub use near_crypto; | |
pub use crate::to_yocto; |
Modules
| outcome | |
| runtime | |
| units | |
| user |
Macros
| call | Makes a contract call to a |
| deploy | Deploys a contract. Will either deploy or deploy and initialize a contract.
Returns a |
| view | Calls a view method on the contract account. |
Structs
| ContractAccount | A account for a contract that includes a reference to the contract proxy and a user account |
| ExecutionResult | An ExecutionResult is created by a UserAccount submitting a transaction. It wraps an ExecutionOutcome which is the same object returned from an RPC call. |
| UserAccount | A user that can sign transactions. It includes a signer and an account id. |
| UserTransaction | A transaction to be signed by the user which created it. Multiple actions can be chained together and then signed and sumited to be executed. |
| ViewResult | The result of a view call. Contains the logs made during the view method call and Result value, which can be unwrapped and deserialized. |
Constants
| DEFAULT_GAS | |
| STORAGE_AMOUNT |
Functions
| init_simulator | The simulator takes an optional GenesisConfig, which sets up the fees and other settings.
It returns the |
| to_nanos | |
| to_ts | |
| to_yocto |
Type Definitions
| TxResult |