Releases: multiversx/mx-sdk-rs
Releases · multiversx/mx-sdk-rs
sc 0.52.1
ManagedBufferReadToEndTypeAbiimplementation.
sc 0.52.0, codec 0.20.1
- ManagedBufferReadToEnd type, which flushed a nested data buffer.
- Fixed hex and binary formatters for byte slices.
- Added EI 1.4 and 1.5 configs.
- Dependency upgrades.
sc 0.51.1
sc-meta upgradebugfix.
sc 0.51.0, codec 0.20.0, vm 0.9.0, sdk 0.5.0, scenario-format 0.22.3
- Major refactoring of
multiversx-sc-meta- Crate
multiversx-sc-metasplit in 2:multiversx-sc-metaremains the standalone tool. For backwards compatibility, it can still be used in contract meta crates, but a warning will be issued.multiversx-sc-meta-libis the contract-only library to contract meta crates.
- The refactoring came with few code changes, but dependencies were disentangled and cleaned up.
- Account retrieval tool was merged into
sc-metastandalone. Previously little known feature, it enables downloading the full state of an account and formatting it as a mandos set state step. Very useful for generating tests and investigating state. multiversx-sdkwas also refactored, especially the gateway proxy.
- Crate
- A new code report is available in the
.mxsc.jsonbuild output. The report analyzes the wasm code after build and always offers the following information:imports: what VM hooks are used;eiCheck: if the used imports comply with the environment interface (EI, allowed VM hooks);hasAllocator: is it allocates on the heap;hasPanic: whether it produces Rust panics and formats error messages using the standard Rust formatter (a source of code bloat).
ManagedDecimalandManagedDecimalSigned:- New types that encapulate a managed
BigUintandBigIntrespectively, but treat them as base 10 fixed point rational numbers. - Two flavors are allowed: the number of decimals is known at compile time (e.g. EGLD always has 18 decimals), or only at runtime.
- Type
ConstDecimalsis able to resolve conversions at compile time, reducing code size and making encoding and decoding easier, since the number of decimals does not need to be encoded. - Regular
usizenumber of decimals is resolved at runtime.
- Type
- All basic arithmetic operations are implemented for these types, just like for the big integers.
- New types that encapulate a managed
- Implemented logarithms:
- Natural logarithm
lnforManagedDecimal,BigFloat, andBigInt. - Base 2 logarithm
log2forManagedDecimal. - Precision is about 5 decimals, largely irrespective of input.
- The operation is cheap,
lncosts 44980 gas for managed decimals and 153772 for big floats, largely irrespective of input.
- Natural logarithm
- Smart contract code on the front-end:
- Framework and contract code, together with the Rust VM as a backend, can now be compiled to WebAssembly for front-end, using
wasm-bindgen. - A few incompatible Rust VM features needed to be made optional for this to work.
- Framework and contract code, together with the Rust VM as a backend, can now be compiled to WebAssembly for front-end, using
- Reverted changes in
sc 0.50.6(diagnostic::on_unimplemented& rustc 1.78 dependency). - Bugfix:
sync_call_readonlycan now be used with proxies.
sc 0.50.6
- Temporarily removed dependency to rustc 1.78, to ease transition from older versions. Will be re-enabled in 0.51.0.
sc 0.50.5
#[storage_mapper_from_address]annotation.- Added missing equality operator for test addresses (
TestAddress,TestSCAddress).
sc 0.50.3
- Dependency update and fix. There was an issue with the
zipdependency in sc-meta.
sc 0.50.2
- Unified transaction syntax:
- Better compilation error messages for malformed transactions;
- Deprecated methods
async_callandasync_call_promises, which are kept for backwards compatibility, but causing confusion among developers; - Contract upgrade available in tests.
sc-metaproxy compare option, which checks that proxies are up to date. Useful for CI.TypeAbi- removedUnmanagedassociated type trait bounds, and implemented it for more types.- Removed jitter from interactor transaction fetch.
- Fixed an issue in the snippets generator.
sc 0.50.1
sc-meta all snippetsgenerates unified syntax.- Proxy generator can reference multi-contract variant.
- Fixes:
BoxedBytes- fixed memory leak.ManagedVecItem- allowing larger payloads (up to 128 bytes).
sc 0.50.0, codec 0.19.0, vm 0.8.4, sdk 0.4.1
- Framework now runs on stable Rust. All unstable features were removed. The most important changes enabling this:
CodecFromcompletely removed,TypeAbiFromwas used instead since 0.49.0.ManagedVecItempayload redesigned.- Contract panic message mechanism improved.
- Unified syntax:
NotPayablemarker type in proxies, which prevents callers to add payment to a non-payable endpoint.