4.0.0-pre.2
Pre-release
Pre-release
austinabell
released this
19 Aug 18:42
·
347 commits
to master
since this release
This release comes with various API fixes. For up to date changes, see CHANGELOG.
Changes in this release:
- Update
panic
andpanic_utf8
syscall signatures to indicate they do not return. PR 489 - Deprecate
env::panic
in favor ofenv::panic_str
. PR 492- This method now takes a
&str
as the bytes are enforced to be utf8 in the runtime. - Change is symmetric to
env::log_str
change in4.0.0-pre.1
- This method now takes a
- Removes
PublicKey
generic onenv
promise 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
Hash
derive 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_nonce
are 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 anAccountId
instead of a genericToString
and converting unchecked toAccountId
. PR 518 - Fixes NFT contract standard
mint
function to not be in theNonFungibleTokenCore
trait. PR 525- If using the
mint
function from the code generated function on the contract, switch to call it on theNonFungibleToken
field of the contract (self.mint(..)
=>self.token.mint(..)
)
- If using the
- Fixes
nft_is_approved
method on contract standard to take&self
instead of movingself
. - Fixes
receiver_id
inmock::Receipt
toAccountId
from string. This is a change to the type added in4.0.0-pre.1
. PR 529 - Moves runtime syscalls to
near-sys
crate and includes new functions available PR 507