Skip to content

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

27 Feb 15:52
v0.65.0
972088e

Choose a tag to compare

  • VM:
    • DebugHandle now uses a Weak pointer to TxContext, fixing LLDB inspection;
    • Signal error UTF-8 fix;
    • VMAddress alias removed;
    • Removed deprecated Shareable / with_shared_mut_ref infrastructure.
  • sc-meta new scen-blackbox tool that reads scenario JSON files (mandos) and generates Rust blackbox tests
    • Generates strongly-typed Rust blackbox test code from mandos .scen.json files;
    • Supports payments, variadic arguments, block info, token IDs, addresses, H256 constants, timestamps/durations,
  • ABI:
    • rustMethodName field added to the JSON ABI, where it differs from the endpoint name;
    • specificType field, used for TimestampSeconds, TimestampMillis, DurationSeconds, DurationMillis.
    • PaymentMultiValue ABI fix.
  • TypeAbi changes:
    • Added TypeAbiUniversalInput, to allow developers to bypass proxy argument type restrictions;
    • IgnoreValue blanket TypeAbiFrom impl removed; since it was conflicting with TypeAbiUniversalInput;
    • Added ScenarioValueRaw, an alias for TypeAbiUniversalInput<BytesValue>, used by the sc-meta scen-blackbox tool as a placeholder, for when it cannot determine an appropriate typed value.
  • Testing improvements:
    • Support for transaction ids in tests;
    • Address and H256 const 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()
      • Utility methods for dealing with NonZeroBigUint:
        • Payment::try_new with generic error type;
        • NonZeroBigUint::try_from for u8, u16, u32, u64, usize, and NonZero<_>;
        • cmp/eq between NonZeroBigUint and BigUint;
        • NonZeroBigUint::one();
      • TestTokenIdentifier renamed to TestTokenId (old name kept as deprecated alias);
      • MultiEgldOrEsdtPayment to PaymentVec conversion check;
      • Other deprecations:
        • MultiEsdtPayment (superseded by PaymentVec);
        • TestEsdtTransfer, Payment is now used instead;
        • .commit() in blackbox set/check account (no longer needed);
      • Scenario payments use PaymentVec internally instead of MultiEgldOrEsdtPayment.
  • Codec fixes and improvements:
    • bool encode/decode correctness fix;
    • num-bigint encoding fix;
    • MultiValueVec new constructors and unit tests;
    • Inline annotations adjusted for better performance and consistency.
  • Dependency upgrades:
    • Upgraded reqwest, switched TLS backend to rustls;
    • Dependencies upgraded to the latest versions.
  • LLDB pretty-printer fix.

sc 0.64.2, chain 0.21.2, sdk 0.14.2

18 Feb 09:49
v0.64.2
1492b37

Choose a tag to compare

  • Workaround for mBufferFromBigIntSigned VM hook bug:
    • The hook was incorrectly converting negative numbers to their absolute value;
    • The mBufferToBigIntSigned VM 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-executor to 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/BigUint proportion and into_proportion methods, for computing self * part / total efficiently, with overflow checks.
    • BigUint::into_non_zero_or_panic method.
    • BigUint::new_unchecked unsafe constructor from BigInt.
    • BigInt::overwrite_i64 now takes &mut self instead of &self.
  • New FungiblePayment type, representing a payment with a TokenId and a NonZeroBigUint amount (no nonce). Includes ManagedVecItem, TypeAbi, and codec implementations.
  • sc-meta improvements:
    • Added --locked CLI flag support;
    • Build error messages now include the full command that was executed.
  • Storage mapper documentation improvements across all mappers.
  • Derive substitution list fix: Ref and ManagedVecRef no longer incorrectly listed as having an API generic.

sc 0.64.1, chain 0.21.1, sdk 0.14.1

13 Jan 21:19
v0.64.1
cbec25f

Choose a tag to compare

  • TokenId backwards compatibility conversions:
    • Converting empty token identifiers, as well as EGLD to EGLD-000000;
    • Converting not only upon decode, but also in constructors and conversions (from);
    • Added an unsafe unchecked constructor;
    • The same conversions apply to EgldOrEsdtTokenIdentifier.
  • 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.

sc 0.64.0, codec 0.24.0, chain 0.21.0, sdk 0.14.0, scenario-format 0.25.0

18 Dec 20:11
v0.64.0
537b478

Choose a tag to compare

  • Switched to Rust edition 2024, minimum compiler version becomes 1.85.
  • New payments API:
    • New objects: TokenId and Payment. Besides them having shorter names, they treat EGLD the same as all other ESDTs, making their handling easier. EGLD is always serialized as EGLD-000000.
    • Payment amounts are NonZeroBigUint, a new refinement type that prevents the value from being zero. This prevents at compile time zero-value payments from occurring.
    • New call_value methods:
      • 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.
    • MultiTransfer marker for forcing an ESDT multi transfer, even when not strictly necessary.
    • Deprecated EgldOrMultiEsdtPayment and call_value``any_payment.
    • ManagedVecRef renamed to Ref.
    • Token identifier display fix.
  • NonZeroBigUint implementation, including all common operators. Additional fixes for the BigInt and BigUint operators.
  • SDK - fixed an issue with parsing transactions with large values in SCRs.
  • Upgraded all dependencies.

sc 0.63.3

18 Dec 18:14
v0.63.3
b9e8498

Choose a tag to compare

  • Reverted the EsdtTokenIdentifier ABI name to TokenIdentifier.

sc 0.63.2

18 Dec 18:14
v0.63.2
9bacbe9

Choose a tag to compare

  • Legacy whitebox test block timestamp APIs renamed and made type-safe.

sc 0.63.1

18 Dec 18:14
v0.63.1
813927c

Choose a tag to compare

  • Blockchain API renames: epoch_start_block_* -> get_epoch_start_block_*, for consistency.
  • Set block timestamp methods renamed to block_timestamp_seconds and block_timestamp_millis, respectively, also for consistency.

sc 0.63.0, chain 0.20.0, sdk 0.13.0, scenario-format 0.24.0

17 Nov 17:23
v0.63.0
cba1251

Choose a tag to compare

  • New block info API, which returns timestamps as either TimestampSeconds or TimestampMillis, instead of just u64:
    • New types for measuring time, not only timestamps, but also durations (DurationSeconds and DurationMillis);
    • Previous functions deprecated in favor of the new ones as follows:
      • get_block_timestamp -> get_block_timestamp_seconds
      • get_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 TimestampSeconds and TimestampMillis when setting up blackbox tests;
    • Mandos support for millisecond timestamps, in both mandos-go and mandos-rs.
  • 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-opt version can be specified in sc-config.toml. While sc-meta cannot install or change this version, it will crash if there is a version mismatch, signalling problems with reproducible builds.
    • The sc-meta standalone tool signals version incompatibilities when building contracts. Most importantly it writes a warning to console if multiversx-sc version < v0.58 and 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.
  • TokenIdentifier renamed to EsdtTokenIdentifier, 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

24 Sep 12:24
v0.62.0
1ba9c2d

Choose a tag to compare

  • BLS signing support in tests.
  • Gas simulations available in the interactor:
    • Simulation only;
    • Auto-simulate to find gas estimation.
  • sc-meta post-build validation improvements:
    • Fixed opcode checker to support call_indirect.
    • Opcode versioning in sc-config.toml and opcodde checker.
    • Post-build VM hook signature validation.
  • 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

04 Sep 21:06
v0.61.0
ee29670

Choose a tag to compare

  • BLS crypto function support in the Rust VM. Functionality is guarded by the bls feature flag.
  • Managed buffer slices out of bounds handled in the framework.
  • Interactor - fixed log management.