Releases: multiversx/mx-sdk-rs
Releases · multiversx/mx-sdk-rs
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.
sc 0.60.0, chain 0.17.0, sdk 0.11.2
- Block info hooks:
- Rust VM support for the new block/round info hooks:
getBlockTimestampMs,getPrevBlockTimestampMs,getBlockRoundTimeMs,epochStartBlockTimestampMs,epochStartBlockNonce,epochStartBlockRound; - Blackbox test syntax for setting all block info.
- Rust VM support for the new block/round info hooks:
- Cleanup after Barnard:
- Removed the
barnardfeature. All functionality is routed to the new Barnard hooks, where appropriate. - Reverted routing non-fallible transfer execute through the fallible vm hook. This preserves pre-Barnard behavior for most cases.
- Removed the
sc-meta install mx-scenario-goretries several times in case of connection issues.
sc 0.59.1, codec 0.23.1, chain 0.16.1, sdk 0.11.1
- Governance proxy improvements.
- Codec: added support for using u128.
- SDK/interactors:
- Added logging for http requests and responses;
- Fixed an issue with retrieving results from transactions with multi-transfer ESDT.
- Fixed a VM query error handling issue.
sc 0.59.0, codec 0.23.0, chain 0.16.0, sdk 0.11.0
- Support for Barnard features
barnardfeature for smart contracts, can be enabled in the contract'sCargo.tomlorsc-config.toml;- Blockchain API new features:
- Code hash API;
- Block info:
- Timstamps in milliseconds:
get_block_timestamp_ms,get_prev_block_timestamp_ms,epoch_start_block_timestamp_ms; - Block round time:
get_block_round_time_ms; - Epoch start info:
epoch_start_block_timestamp_ms,epoch_start_block_nonce,epoch_start_block_round.
- Timstamps in milliseconds:
- ESDT info:
- Token type API supplied by the protocol (
get_esdt_token_type); get_esdt_token_dataprovides the token type supplied by the protocol;EsdtTokenTypeupdated with new ESDT types (meta & dynamic tokens).
- Token type API supplied by the protocol (
- New transaction mechanisms:
- Fallible synchronous call;
- Fallible transfer-execute;
- Both are integrated in the unified syntax;
- Simplified several scenarios by routing all through the fallible tx VM hooks.
- Optimisations:
- Multi-transfer call value including the direct EGLD is now provided by the VM directly.
- Direct conversion between ManagedBuffer and i64 (small integer) now provided directly by the VM.
- Back transfers now support multi-transfers with EGLD properly
- New
BackTransferstructure contains back-transfers as a multi-transfer list; - It contains methods to filter and extract EGLD or single ESDT values;
- New implementation of
ReturnsBackTransfersandReturnsBackTransfersReset, which work with this payment list; ReturnsBackTransfersEGLDnow supports multi-transfer;- Old implementations renamed to
*Legacy.
- New
- New proxies for system smart contracts:
- Governance system SC;
- Delegation system SC.
- Core crate updates:
- Bech32Address:
- Deduplicated and moved to the core crate, guarded by a
stdfeature; - Support for custom HRP;
- Deduplicated and moved to the core crate, guarded by a
BLSKeyandBLSSignaturetypes, to help the interaction with the delegation contract.
- Bech32Address:
sc-meta:- Support for building contracts with
stdlibrary; test-gensupport for#[should_panic]annotation.
- Support for building contracts with
- Validator processing in the SDK, including parsing from pem.
- Event log name can now be empty or missing in declaration, the method name will be used in this case.
- Fixed a bug in mandos-rs, it was not handling a failing
scQueryproperly. - Codec: improved multi-value length handling.