0.7.0
This release comes with some minor breaking changes, with the main feature here being asynchronous builders for querying data into the chain. Also comes with general fixes for better error reporting that comes from anyhow errors from running sandbox.
Added
view_*
asynchronous builders have been added which provides being able to query from a specific block hash or block height{CallTransaction, Transaction}::transact_async
for performing transactions without directly having to wait for it complete it on chainview_chunk
added for querying into chunk related info on the network.- Adds
Chunk
andChunkHeader
type to reference specific chunk info.
- Adds
Error::{simple, message, custom}
are now public and usable for custom errors
Changed
- Apart of the changes from adding
view_*
async builders, we have a couple breaking changes to theview_*
functions:{Account, Contract, Worker}::view_state
movedprefix
parameter into builder. i.e.worker.view_state("account_id", Some(prefix)).await?; // is now worker.view_state("account_id") .prefix(prefix) .await?; // if prefix was `None`, then simply delete the None argument.
view
function changed to be a builder, and no longer take inargs
as a parameter. It instead has been moved to the builder side.- Changed
Worker::view_latest_block
toWorker::view_block
as the default behavior is equivalent. operations::Function
type no longer takes a lifetime parameter.operations::CallTransaction
type takes one less lifetime parameter.
Worker::call
signature changed to be more in line withview_*
async builders. It will now return a builder like{Account, Contract}::call
- This
call
no longer acceptsContract
since that was not as accessible. Instead aInMemorySigner
is now required to sign transactions (which can be retrieved from{Account, Contract}::signer
orInMemorySigner::{from_secret_key, from_file}
). {Account, Contract}::signer
now exposed.
- This
Fixed
- Changed the docs to reflect proper size of of rate limits on near.org RPC
- Cached nonces now are per account-id and public-key instead of just public-key
- this didn't matter if only one KeyPair was being used per account, but could be problematic when there were multiple KeyPairs per account utilizing the same nonces.
- Error message context wasn't being exposed properly by sandbox, so this fixed it