Crate near_sdk_sim[][src]

Expand description

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

Macros

Makes a contract call to a ContractAccount returning a ExecutionResult.

Deploys a contract. Will either deploy or deploy and initialize a contract. Returns a ContractAccount<T> where T is the first argument.

Calls a view method on the contract account.

Structs

A account for a contract that includes a reference to the contract proxy and a user account

An ExecutionResult is created by a UserAccount submitting a transaction. It wraps an ExecutionOutcome which is the same object returned from an RPC call.

A user that can sign transactions. It includes a signer and an account id.

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.

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

Functions

The simulator takes an optional GenesisConfig, which sets up the fees and other settings. It returns the master_account which can then create accounts and deploy contracts.

Type Definitions