Releases: multiversx/mx-sdk-rs
Releases · multiversx/mx-sdk-rs
sc 0.65.0, codec 0.25.0, chain 0.22.0, sdk 0.15.0, scenario-format 0.26.0
- VM:
DebugHandlenow uses aWeakpointer toTxContext, fixing LLDB inspection;- Signal error UTF-8 fix;
VMAddressalias removed;- Removed deprecated
Shareable/with_shared_mut_refinfrastructure.
sc-metanewscen-blackboxtool that reads scenario JSON files (mandos) and generates Rust blackbox tests- Generates strongly-typed Rust blackbox test code from mandos
.scen.jsonfiles; - Supports payments, variadic arguments, block info, token IDs, addresses, H256 constants, timestamps/durations,
- Generates strongly-typed Rust blackbox test code from mandos
- ABI:
rustMethodNamefield added to the JSON ABI, where it differs from the endpoint name;specificTypefield, used forTimestampSeconds,TimestampMillis,DurationSeconds,DurationMillis.PaymentMultiValueABI fix.
- TypeAbi changes:
- Added
TypeAbiUniversalInput, to allow developers to bypass proxy argument type restrictions; IgnoreValueblanketTypeAbiFromimpl removed; since it was conflicting withTypeAbiUniversalInput;- Added
ScenarioValueRaw, an alias forTypeAbiUniversalInput<BytesValue>, used by thesc-meta scen-blackboxtool as a placeholder, for when it cannot determine an appropriate typed value.
- Added
- Testing improvements:
- Support for transaction ids in tests;
AddressandH256const constructors from hex;- Payment API additions and improvements:
.payment()calls can be chained, and arguments are automatically merged into a multi-payment, at compile time;- Deprecated
.esdt()and.multi_esdt(), since they are now superseded by.payment()
- Deprecated
- Utility methods for dealing with
NonZeroBigUint:Payment::try_newwith generic error type;NonZeroBigUint::try_fromforu8,u16,u32,u64,usize, andNonZero<_>;cmp/eqbetweenNonZeroBigUintandBigUint;NonZeroBigUint::one();
TestTokenIdentifierrenamed toTestTokenId(old name kept as deprecated alias);MultiEgldOrEsdtPaymenttoPaymentVecconversion check;- Other deprecations:
MultiEsdtPayment(superseded byPaymentVec);TestEsdtTransfer,Paymentis now used instead;.commit()in blackbox set/check account (no longer needed);
- Scenario payments use
PaymentVecinternally instead ofMultiEgldOrEsdtPayment.
- Codec fixes and improvements:
boolencode/decode correctness fix;num-bigintencoding fix;MultiValueVecnew constructors and unit tests;- Inline annotations adjusted for better performance and consistency.
- Dependency upgrades:
- Upgraded
reqwest, switched TLS backend torustls; - Dependencies upgraded to the latest versions.
- Upgraded
- LLDB pretty-printer fix.
sc 0.64.2, chain 0.21.2, sdk 0.14.2
- Workaround for
mBufferFromBigIntSignedVM hook bug:- The hook was incorrectly converting negative numbers to their absolute value;
- The
mBufferToBigIntSignedVM hook has been added to the deprecated hooks list; - Fixed a related bug in the Rust VM, also pertaining to negative numbers, in
mb_to_small_int_signed(mBufferFromSmallIntSigned).
- VM: added ESDT metadata recreate and metadata update mock built-in functions.
- Upgraded
multiversx-chain-vm-executorto v0.5.1.- Contains upgrade to Wasmer 6.1.0 (wasmer-experimental);
- This fixes and issue with wasmer-prod and wasmer-experimental builds on Linux for certain versions of Rust.
- Big number improvements:
BigInt/BigUintproportionandinto_proportionmethods, for computingself * part / totalefficiently, with overflow checks.BigUint::into_non_zero_or_panicmethod.BigUint::new_uncheckedunsafe constructor fromBigInt.BigInt::overwrite_i64now takes&mut selfinstead of&self.
- New
FungiblePaymenttype, representing a payment with aTokenIdand aNonZeroBigUintamount (no nonce). IncludesManagedVecItem,TypeAbi, and codec implementations. - sc-meta improvements:
- Added
--lockedCLI flag support; - Build error messages now include the full command that was executed.
- Added
- Storage mapper documentation improvements across all mappers.
- Derive substitution list fix:
RefandManagedVecRefno longer incorrectly listed as having an API generic.
sc 0.64.1, chain 0.21.1, sdk 0.14.1
TokenIdbackwards compatibility conversions:- Converting empty token identifiers, as well as
EGLDtoEGLD-000000; - Converting not only upon decode, but also in constructors and conversions (
from); - Added an unsafe unchecked constructor;
- The same conversions apply to
EgldOrEsdtTokenIdentifier.
- Converting empty token identifiers, as well as
- Debugger fixes:
- Fixed error messages when using the
StaticApi. Following changes to the VM a few releases ago, the error messages were being swallowed by the API. - Fixed a crash caused by the error trace in the
StaticApi.
- Fixed error messages when using the
sc 0.64.0, codec 0.24.0, chain 0.21.0, sdk 0.14.0, scenario-format 0.25.0
- Switched to Rust edition 2024, minimum compiler version becomes 1.85.
- New payments API:
- New objects:
TokenIdandPayment. Besides them having shorter names, they treat EGLD the same as all other ESDTs, making their handling easier. EGLD is always serialized asEGLD-000000. Paymentamounts areNonZeroBigUint, a new refinement type that prevents the value from being zero. This prevents at compile time zero-value payments from occurring.- New
call_valuemethods:all()- all payments, EGLD and ESDT;single()- expect precisely one payment, and retrieve that payment. Crash for no payments, or for multiple payments;single_optional()- expect either zero or one payments. Returns an Option of Payment reference;array()- expect the exact number of payments and retrieve them as array.
MultiTransfermarker for forcing an ESDT multi transfer, even when not strictly necessary.- Deprecated
EgldOrMultiEsdtPaymentandcall_value``any_payment. ManagedVecRefrenamed toRef.- Token identifier display fix.
- New objects:
NonZeroBigUintimplementation, including all common operators. Additional fixes for theBigIntandBigUintoperators.- SDK - fixed an issue with parsing transactions with large values in SCRs.
- Upgraded all dependencies.
sc 0.63.3
- Reverted the EsdtTokenIdentifier ABI name to TokenIdentifier.
sc 0.63.2
- Legacy whitebox test block timestamp APIs renamed and made type-safe.
sc 0.63.1
- Blockchain API renames:
epoch_start_block_*->get_epoch_start_block_*, for consistency. - Set block timestamp methods renamed to
block_timestamp_secondsandblock_timestamp_millis, respectively, also for consistency.
sc 0.63.0, chain 0.20.0, sdk 0.13.0, scenario-format 0.24.0
- New block info API, which returns timestamps as either
TimestampSecondsorTimestampMillis, instead of justu64:- New types for measuring time, not only timestamps, but also durations (
DurationSecondsandDurationMillis); - Previous functions deprecated in favor of the new ones as follows:
get_block_timestamp->get_block_timestamp_secondsget_block_timestamp_ms->get_block_timestamp_millis- same for previous block and epoch start block
get_block_round_time_ms->get_block_round_time_millis;
- Support for
TimestampSecondsandTimestampMilliswhen setting up blackbox tests; - Mandos support for millisecond timestamps, in both mandos-go and mandos-rs.
- New types for measuring time, not only timestamps, but also durations (
- Rust VM support for fallible sync calls. Adjusted event logs to match the Go VM.
- Contract build improvements:
- The Rust version is now sent to the wasm build command via CLI, always. This overrides all other settings, giving the framework full control over the Rust version used.
- The Rust version can be configured in
sc-config.toml. This overrides all other settings. If missing, the current config will be detected and used explicitly. - The
wasm-optversion can be specified insc-config.toml. Whilesc-metacannot install or change this version, it will crash if there is a version mismatch, signalling problems with reproducible builds. - The
sc-metastandalone tool signals version incompatibilities when building contracts. Most importantly it writes a warning to console if multiversx-sc version <v0.58and rustc ≥v1.87. - Added a deprecated VM hooks checker mechanism. Currently only checks for legacy call value getters.
- ABI build info improvements:
- Added host;
- Added LLVM version;
- Rustc version guaranteed to match the one used for building the wasm binary;
- Ensured historical backwards compatibility, back to the first version of the ABI format.
TokenIdentifierrenamed toEsdtTokenIdentifier, since the old name was misleading. Old name kept as alias, for backwards compatibility.- Fixed proxy imports in snippets.
sc 0.62.0, chain 0.19.0, sdk 0.12.0
- BLS signing support in tests.
- Gas simulations available in the interactor:
- Simulation only;
- Auto-simulate to find gas estimation.
sc-metapost-build validation improvements:- Fixed opcode checker to support
call_indirect. - Opcode versioning in
sc-config.tomland opcodde checker. - Post-build VM hook signature validation.
- Fixed opcode checker to support
- Proxy generator fix for enums with explicit discriminants.
- Removed legacy typed mandos scenario and interactor syntax.
sc 0.61.0, chain 0.18.0, sdk 0.11.3
- BLS crypto function support in the Rust VM. Functionality is guarded by the
blsfeature flag. - Managed buffer slices out of bounds handled in the framework.
- Interactor - fixed log management.