near-sdk (Rust) 4.0.0-pre.2
This release comes with various API fixes. For up to date changes, see CHANGELOG.
- A pre-release, not marked stable on GitHub.
- The newest stable release in the 4.0 line: near-sdk (Rust) 4.0.0
- Newest near-sdk (Rust): near-sdk (Rust) 5.30.0
This release comes with various API fixes. For up to date changes, see CHANGELOG.
Changes in this release:
- Update
panicandpanic_utf8syscall signatures to indicate they do not return. PR 489 - Deprecate
env::panicin favor ofenv::panic_str. PR 492- This method now takes a
&stras the bytes are enforced to be utf8 in the runtime. - Change is symmetric to
env::log_strchange in4.0.0-pre.1
- This method now takes a
- Removes
PublicKeygeneric onenvpromise batch calls. Functions now just take a reference to thePublicKey. PR 495 - fix: Public keys can no longer be borsh deserialized from invalid bytes. PR 502
- Adds
Hashderive toPublicKey
- Adds
- Changes method name parameters from bytes (
Vec<u8>and&[u8]) to string equivalents for batch function call promises PR 515promise_batch_action_function_call,Promise::function_call,promise_batch_action_add_key_with_function_call,Promise::add_access_key, andPromise::add_access_key_with_nonceare afffected.- Updates
promise_then,promise_create, andReceipt::FunctionCall's method name to string equivalents from bytes PR 521. - Instead of
b"method_name"just use"method_name", the bytes are enforced to be utf8 in the runtime.
- Fixes
#[ext_contract]codegen function signatures to take anAccountIdinstead of a genericToStringand converting unchecked toAccountId. PR 518 - Fixes NFT contract standard
mintfunction to not be in theNonFungibleTokenCoretrait. PR 525- If using the
mintfunction from the code generated function on the contract, switch to call it on theNonFungibleTokenfield of the contract (self.mint(..)=>self.token.mint(..))
- If using the
- Fixes
nft_is_approvedmethod on contract standard to take&selfinstead of movingself. - Fixes
receiver_idinmock::ReceipttoAccountIdfrom string. This is a change to the type added in4.0.0-pre.1. PR 529 - Moves runtime syscalls to
near-syscrate and includes new functions available PR 507