0.15.0 - 2024-11-18
- [breaking] updates near-* dependencies to 0.27 release (#387)
- [breaking] reexport
cargo-near-build
for configurable build if needed (#386) - make cargo-near-build optional in manifest (#383)
0.14.1 - 2024-10-18
- TransactionStatus::status should not be waiting for Final (#379)
0.14.0 - 2024-09-12
- [breaking] Updated near-* dependencies to 0.26 release (#377)
0.13.0 - 2024-09-10
- [breaking] updates near-* dependencies to 0.25 (#375)
- replace
cargo-near
withcargo-near-build
(#373)
0.12.0 - 2024-08-15
- [breaking] upgraded near deps to 0.24 (#370)
0.11.1 - 2024-08-07
- Gracefully handle account creation request errors from a faucet service [testnet-only] (#366)
0.11.0 - 2024-07-05
- Upgraded deps (#363)
0.10.1 - 2024-06-26
- Exposes status RPC API method (#308)
- Fixed
dev_deploy
to use registrar account to create top-level accounts (nearcore 1.37.0+ forbidden to create top-level accounts by non-registrar accounts) (#360) - Re-exported near-abi-client (#303)
0.10.0 - 2024-01-25
- Impl Clone on result Value (#345)
- Upgraded NEAR crates to 0.20.0 release (#346)
- dependecy bumps (#338)
- cleanup internals (#329)
- use stable sandbox by default (#335)
- [breaking] Remove
interop_sdk
feature from defaults (#339) - fix typos (#340)
0.9.0 - 2023-10-30
- Require Send + Sync for T in Worker to allow near-workspaces usage in multithreading async runtimes (#328)
- Added API for measuring gas (#284)
- Fixed await during acquired lock in rpc::client::fetch_tx_nonce (#334)
- [breaking] Migrate to use NearToken instead of raw u128 for balance variables to ensure strict typing (#333)
- Restrict GasHook type to require RefUnwindSafe and UnwindSafe to avoid breaking release (#323) (#326)
- remove unwraps (#321)
0.8.0 - 2023-10-04
- [breaking] renamed crate to near-workspaces to avoid confusion with Cargo workspaces; imports should now use
near_workspaces
instead of justworkspaces
(#318) - Upgraded to Rust Stable Toolchain. Deprecates requirement of only using rustc-1.69 and lower.
- Import a couple functions over from near_crypto for PublicKey
- Impl
Ord
,PartialOrd
,Hash
,BorshSerialize
,BorshDeserialize
,Display
, andFromStr
forPublicKey
- NOTE: Borsh bytes format is the same as near-sdk, where it is in the form of [bytes_len, key_type, key_data..]
- Added
PublicKey::{empty, len, key_data}
- Impl
Display
forSecretKey
. - more docs were added to both
SecretKey
andPublicKey
. - Impl
Display
,FromStr
,TryFrom<u8>
forKeyType
.
- Impl
- Added
TryFrom<near_sdk::PublicKey>
forworkspaces::PublicKey
- Added
KeyType::len
andPublicKey::try_from_bytes
- Added
- Added experimental apis from near-sdk-rs, available under the experimental flag.
- Methods added are: EXPERIMENTAL_changes_in_block, EXPERIMENTAL_changes, EXPERIMENTAL_genesis_config, EXPERIMENTAL_protocol_config, EXPERIMENTAL_receipt, EXPERIMENTAL_tx_status, EXPERIMENTAL_validators_ordered
- Added Worker::patch to patch account, keys, code, and state in a generic builder
- Added
Worker::patch
andPatchTransaction
that provide builders for patching accounts, keys, code, and state. - Added
AccountDetails
andAccountDetailsPatch
which hold the state of the patch.
- Added
- Allow to select a specific version of near-sandbox (#311)
- Enable support for RPCs that require API keys and support for custom networks (#306)
- expose more
Block
andChunk
fields (#243) - support manually supplied validator key (#274)
Transaction::transact_async
no longer has a lifetime parameter to make it easier to use- Improved error message on calling a json on a void function
- Removed serde-arbitrary-precision feature in examples
- improve error msg on calling
json
on void function (#286) - fix typos (#280)
- Run
neard
onlocalhost
instead of0.0.0.0
to prevent firewall popups on MacOS (#277) - storing credentials (#258)
- Make call consistent with worker::view (#245)
- drop async-process in favor of tokio (#316)
- switch to
near-gas
crate for Gas where possible (#305) - Improved fast_forward docs (#299)
- Added test for delete_account (#289)
- Added a test for transfer_near (#290)
- using url return type (#297)
- dependencies and removed unused deps (#292)
- upgrade to stable toolchain (#293)
- Updated near deps to 0.17 (#283)
- Use cargo-near to build project (#275)
- Added network builder for mainnet, testnet, betanet (#221)
- bump borsh version and other deps (#271)
- bump sandbox to 0.6.2 (#270)
- Import some functions over from near_crypto for PublicKey (#265)
- Added destination account-id for
import_contract
call (#260) - Fix port collision (#257)
- Removed the lifetime in transact_async (#249)
- configure sandbox (#251)
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
- 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
- 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
- Fixed query variant error when supply invalid function name or arguments: #239
Account::view
API exposed: #202
- Unstable
compile_project
uses new the workspaces errors: #204 ValueOrReceiptId::Value(String)
changed toValueOrReceiptId::Value(Value)
: #208Value
type offers convenient APIs likeraw_bytes
,json
, andborsh
like one would find from aExecutionFinalResult
.
- internal dependencies like near-jsonrpc-client upgraded to 0.4.0 from 0.4.0-beta: #210
- Note, the RNG for
SecretKey::{from_random, from_seed}(KeyType::SECP256K1, ...)
has been changed as well, and will produce different keys than before.
- Note, the RNG for
docs.rs
now showsunstable
feature flag: #198- No longer orphaning sandbox processes on early termination of tests: #205
- Fixed sandbox colliding installs: #211
- sandbox no longer spamming stats logs: #213
- Error handling with opaque
workspaces::error::Error
type: #149 - Require
#[must_use]
on the Execution value returned bytransact()
: #150- Added
ExecutionFinalResult
,ExecutionResult
,ExecutionSuccess
andExecutionFailure
types - Added
into_result()
to easily handle#[must_use] ExecutionFinalResult
- Added
unwrap()
to not care about Err variant inExecutionResult
s
- Added
- Renamed CallExecution* types: #150
- Renamed
CallExecution`` to
Execution` - Renamed
CallExecutionDetails
toExecutionFinalResult
- Renamed
args_json
andargs_borsh
no longer returnResult
s and are deferred till later whentransact()
ed: #149- API changes from removing
worker
parameter from function calls: #181Account::from_file
function signature change, requiring a&worker
to be passed in.workspaces::prelude::*
import no longer necessary, where we no longer able to importworkspaces::prelude::DevAccountDeployer
directly.
- Removed impls from exection result: #150
- Removed
impl<T> From<CallExecution<T>> for Result<T>
- Removed
impl From<FinalExecutionOutcomeView> for CallExecutionDetails
- Removed
- No longer require
worker
to be passed in for each transaction: #181
- Gas estimation issue resolved with latest sandbox node (Aug 29, 2022): #188
- Fixed parallel tests, where calling into the same contract would require waiting on a previous call: #173
0.4.1 - 2022-08-16
- Derive
Eq
onAccountDetails
type: https://github.com/near/workspaces-rs/pull/177/files
- Fix macOS non-deterministic overflow error when starting up sandbox: #179
0.4.0 - 2022-07-20
- Mac M1 Support: #169
- Added
Account::secret_key
to grab the account's secret key: #144 Debug
/Clone
impls forAccount
/Contract
, andDebug
forWorker
: #167ExecutionOutcome::tokens_burnt
is now available: #168
- internally no longer creating a new RPC client per call: #154
- upped near dependencies to fix transitive vulnerabilities: #169
- Default sandbox version is now using commit hash master/13a66dda709a4148f6395636914dca2a55df1390 (July 18, 2022): #169
0.3.1 - 2022-06-20
- Raw bytes API similar to
json
/borsh
calls: https://github.com/near/workspaces-rs/pull/133/files - Expose
types
module and addedSecretKey
creation: #139
- If sandbox gets started multiple times, short circuit it early on: #135
- Fix short timeouts on connecting to RPC for macos with custom env variable to specify timeout if needed: #143
0.3.0 - 2022-05-10
- Added betanet support #116
-
Updated default sandbox version to
97c0410de519ecaca369aaee26f0ca5eb9e7de06
commit of nearcore to include 1.26 protocol changes #134 -
Exposed
CallExecutionDetails::raw_bytes
API: #133
0.2.1 - 2022-04-12
- Added more docs to top level or exposed types/functions: #115
- Fix
docs.rs
builds failing on sandbox install: #115
0.2.0 - 2022-04-05
- Time-traveling - the ability to go forwards in block height within tests. This allows to test time specific data changing within contracts: #73
- Credentials created from account/contract creation are now allowed to be stored and specified by users. #98
- [Unstable] Allow users to compile contract projects within tests without having to manually go through this step. #77
- Batch transactions or transactions with multiple actions are now possible. #72
- Sandbox node (nearcore binary) logs are now suppressed and can be re-enabled if desired. #85
- Results now expose logs, receipts, and transaction outcome values. #70
- Convenience methods
Worker::view_code
,Worker::view_latest_block
,Worker::view_account
,Account::view_account
,Contract::view_account
,Contract::view_code
now available. #82 - Improve error handling. If a transaction fails, this error will now be apart of the
Result
return initially. #83 - Added
tracing
logging to internal code and examples. #55 and #75 - Convenient
CallExecutionDetails::{is_success, is_failure}
for testing outcomes of transactions. #58 - Added
mainnet_archival
andtestnet_archival
, whereref-finance
example now usesmainnet_archival
. #57 and #94
- key type for
patch_state
now a slice and no longer requireStoreKey
. #109 - Reorganized imports internally for better maintainability. #102
- No longer running into non-deterministic query failures if RPC isn't available, but this is a breaking API. All
workspaces::{sandbox, testnet, mainnet}
now require.await?
at the end. #99 - TLA trait no longer apart of all networks -- only dev-networks (sandbox, testnet). #101
- Retry times have now been shorten and should take a maximum of 1 second. #92
- doc builds on docs.rs has now been fixed. #90
patch_state
now takes in slices. #80 and #79- Make
access_key
call do optimistic queries which led to better retry times. #60 - Functions no longer take in owned but referenced
AccountId
s now. #52
- Empty JSON array is no longer a valid default argument supplied to transactions. Recommended to supply empty
{}
in the case of JSON if all function arguments in the contract are optional types. #84
0.1.1 - 2021-01-24
- Fix race condition when installing sandbox and running multiples tests at the same time. #46