Expand description
§NEAR Workspaces
A library for automating workflows and writing tests for NEAR smart contracts. This software is not final, and will likely change.
Re-exports§
pub use result::Result;pub use types::AccessKey;pub use types::BlockHeight;pub use types::CryptoHash;pub use types::InMemorySigner;pub use cargo_near_build;pub use near_abi_client;
Modules§
- error
- All errors that can occur within workspaces, including but not limited to the following: IO, RPC, Execution, Sandbox, DataConversion errors.
- network
- All builtin network types and traits.
- operations
- All operation types that are generated/used when making transactions or view calls.
- prelude
- All traits that are essential to the ease of use of workspaces.
- result
- Result and execution types from results of RPC calls to the network.
- rpc
- types
- Types used in the workspaces crate.
Structs§
- Account
Accountis directly associated to an account in the network provided by theWorkerthat creates it.- Account
Details Patch - Details of an Account or Contract. This is an non-exhaustive list of items that the account stores in the blockchain state.
- Account
Id - NEAR Account Identifier.
- Block
- Struct containing information on block coming from the network
- Chunk
- Contract
Contractis directly associated to a contract in the network provided by theWorkerthat creates it.- Worker
- The
Workertype allows us to interact with any NEAR related networks, such as mainnet and testnet.
Enums§
Traits§
- DevNetwork
- DevNetwork is a Network that can call into
Worker::dev_create_accountandWorker::dev_deployto create developer accounts. - Network
- Network trait specifies the functionality of a network type such as mainnet, testnet or any other networks that are not specified in this library.
Functions§
- betanet
- Connect to the betanet network, and grab a
Workerthat can interact with it. - compile_
project - Builds the cargo project located at
project_pathand returns the generated wasm file contents. - custom
- Connect to a custom network, and grab a
Workerthat can interact with it. - mainnet
- Connect to the mainnet network, and grab
a
Workerthat can interact with it. - mainnet_
archival - Connect to the mainnet archival
network, and grab a
Workerthat can interact with it. - sandbox
- Spin up a new sandbox instance, and grab a
Workerthat interacts with it. - sandbox_
with_ version - Spin up a new sandbox instance, and grab a
Workerthat interacts with it. - testnet
- Connect to the testnet network, and grab
a
Workerthat can interact with it. - testnet_
archival - Connect to the testnet archival
network, and grab a
Workerthat can interact with it. - with_
betanet - Run a locally scoped task where a
betanetinstancedWorkeris supplied. - with_
custom - with_
mainnet - Run a locally scoped task where a
mainnetinstancedWorkeris supplied. - with_
mainnet_ archival - Run a locally scoped task where a
mainnet_archivalinstancedWorkeris supplied. - with_
sandbox - Run a locally scoped task where a
sandboxinstancedWorkeris supplied. - with_
testnet - Run a locally scoped task where a
testnetinstancedWorkeris supplied. - with_
testnet_ archival - Run a locally scoped task where a
testnet_archivalinstancedWorkeris supplied.