This file contains a centralizes a trace of all published crate versions, with their changes in short.
The mx-sdk-rs repo contains many crates, grouped into several families. Crates in these families always have the same version with one another.
For brevity, the changelog will only mention a short version of their name.
They are:
multiversx-sc, in shortsc, the smart contract framework, 7 crates + 3 for contracts/modules:multiversx-scmultiversx-sc-derivemultiversx-sc-metamultiversx-sc-meta-libmultiversx-sc-scenariomultiversx-sc-snippetsmultiversx-sc-wasm-adaptermultiversx-sc-modules- standard contract modulesmultiversx-price-aggregator-sc- core contractmultiversx-wegld-swap-sc- core contract
multiversx-sc-codec, in shortcodec, the serializer/deserializer, 2 crates:multiversx-sc-codecmultiversx-sc-codec-derive
- Chain crates, in short
chain. Formerly it was only the VM (vm). 2 crates:multiversx-chain-core- a common crate for chain types, constants, flagsmultiversx-chain-vm- a Rust VM implementation
multiversx-chain-scenario-format, in shortscenario-format, scenario JSON serializer/deserializer, 1 crate.multiversx-sdk, in shortsdk, allows communication with the chain(s), 3 crates:multiversx-sdkmultiversx-sdk-httpmultiversx-sdk-dapp
And crate group being released requires all crate groups downstream to be released as well.
┌──────────────────────────┐
│ ▼
┌─────────────────┐ ┌───┴───┐ ┌─────┐ ┌────┐
│ │ │ │ │ │ │ │
│ codec ├─────►│ chain ├─────►│ sdk ├───┬─►│ sc │
│ │ │ │ │ │ │ │ │
└─────────────────┘ └───────┘ └─────┘ │ └────┘
│
┌────────────────────────────────────────┘
│
┌────────┴────────┐
│ │
│ scenario-format │
│ │
└─────────────────┘
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
- 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.
- Reverted the EsdtTokenIdentifier ABI name to TokenIdentifier.
- Legacy whitebox test block timestamp APIs renamed and made type-safe.
- 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.
- 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.
- BLS fix (Mutex over BLS library to prevent concurrent calls).
wasmer-prodbuild fix (homedependency fix).- Legacy syntax fix.
- 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.
- 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.
- 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.
- 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.
- 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.
- Rust VM and debugger redesign:
- VM major refactoring: runtime, execution, debugger, VM hooks handler;
- Integration of the new executor interface: new instance, executor & VM hooks interfaces;
- Early exit mechanism for VM hooks;
- Integration of Wasmer 2.2 production code, via an adapter;
- Integration of Wasmer 6, as an experimental alternative, but more stable in tests;
- Mechanism for running blackbox and mandos-rs tests with compiled contracts (.wasm);
- Mechanism for running the same test via the debugger as part of the Rust test suite, and via Wasmer as part of the Wasm tests;
- Crude metering, as a proof-of-concept, will be refined in the future. Gas schedule can be configured.
- New feature
compiled-sc-teststo replacerun-go-tests.
- Build system:
- Opcode validator, as a post-build automated process. It detects and signals the usage of non-whitelisted WASM opcodes.
- WASM target:
- Default target is now
wasmv1-noneinstead ofwasm32-unknown-unknown. This is to allow upgrading to Rust 1.87, which uses LLVM 20 and normally emits bulk memory opcodes, which are currently unsupported on MultiversX. This change prevents these opcodes to be emitted. - A mechanism for overriding the default target, per contract, in
sc-config.toml. - Target will be autoinstalled upon build, if missing.
- Default target is now
sc-metanewtestargument:-wor--wasm, to run tests based on compiled smart contracts; replaces--go.- Improved interactor error handling.
- Back-transfer object cloneable.
- Fixed typos.
- Updated dependencies.
- Retrieve token properties using
get_token_properties; - Fixed URIs for
esdt_metadata_recreateandesdt_metadata_update; sc-meta:- Fixed
test --chain-simulatorused for running chain-simulator interactor tests; - Added extra checks for argument validity.
- Fixed
- Interactor:
- Fixed
setStateOverwrite; - Fixed
ReturnsTxHashresult handler.
- Fixed
- Enhanced
checkStateto allow partial key verification.
- Newer compiler support:
- Dropped support for Rust compiler versions older than 1.83.
- Support and optimizations for using Rust 1.85.
sc-meta:- Windows support.
- Removed the concept of a "main" contract configuration.
- Using
typenum/generic-arrayinstead of const generics/macros for:- ManagedVec payloads;
- ManagedDecimal const decimals.
- ManagedDecimal - more arithmetic operator implementations for combinations of const + var decimals.
- ManagedVecItem can now be derived for enums with fields.
- Codec and ABI support for bitflags.
- Storage mappers:
- New storage mapper:
TimelockMapper; - Renamed source type and object.
- New storage mapper:
ESDTTransferRole:- Reintroduced role after being accidentally dropped;
- Added a
token_has_transfer_rolemethod for checking if it is set on a token, as a workaround until Barnard release.
- Unified syntax - result handler for back transfers, which resets previous back transfers (
ReturnsBackTransfersReset). - SDK:
- Chain simulator - set state overwrite support;
Walletget_shardmethod.
- Debugger - improved mandos error messages.
- Dependencies upgraded.
- Allow setting gas for callback for direct transfers.
- NestedEncode for interaction types: TestAddress, TestScAddress and TestTokenIdentifier.
- Bugfix: pretty representation for ManagedAddress when debugging.
- Upgrade dependency: ruplacer.
- Rust VM support for readonly sync calls.
ManagedMapEncoded, a map type that can use any key or value types that are serializable.ManagedDecimalimplementsManagedVecItem.- Bugfixes, improvements:
- Fixed a bug regarding the ESDT roles VM hook;
- Pretty representation for ManagedBuffer and other string-like types when debugging;
- API fix of an issue that was preventing set state in chain simulator;
- Snippets generator fixes involving the crate path and the upgrade result handler.
- Integrating Spica changes into the framework:
- EGLD+ESDT multi-transfers are now possible:
- changed the handling of call values: EGLD is treated almost the same as an ESDT in
all_transfersandmulti_egld_or_esdt, old ESDT methods are given some protection against unexpected scenarios - changed the tx unified syntax for sending EGLD+ESDT from contracts, interactors and tests;
- support in the Rust VM.
- changed the handling of call values: EGLD is treated almost the same as an ESDT in
- New built-in functions in the
ESDTSystemSCProxy:ESDTModifyRoyalties,SDTSetNewURIs,ESDTModifyCreator,ESDTMetaDataRecreate,ESDTMetaDataUpdate.
- EGLD+ESDT multi-transfers are now possible:
- Interactor support for "set state" on the chain simulator.
- Fixed ownership for ManagedVec iterators, specifically reference iterators only produce references to the items.
- Syntax cleanup:
#[payable]now allowed instead of#[payable("*")];register_promiseallows callback, without calling a function on destination.
- Refactoring and optimizations:
- Simplified the callback selector;
- Performance improvements in ManagedVec iterators;
- Removed some unnecessary bound checks in
multi_esdt.
ManagedDecimalbugfixes:- ABI/proxy bugfix;
- Rescale bugfix.
ManagedVec- deprecatedsortand guarded it by theallocfeature, since it uses the allocator.sc-meta- versioning fix;
- interactor generator fix.
- Interactors - fixed code metadata on deploy.
sc-metainstall debuggerCLI that prepares VSCode extension for debugging;- fixed a crash involving templates and installers.
- Deprecated
#[derive(TypeAbi)]and added an additional warning in the macro.
#[storage_mapper_from_address]fixes for:FungibleTokenMapper,NonFungibleTokenMapper,TokenAttributesMapper,UniqueIdMapper,UserMapper,AddressToIdMapper.
- Codec improvements:
MultiValueX-TopDecodeMultiLengthimplementation fix;ManagedVecItemimplemented for MultiValue2 and MultiValue3.
sc-meta snippetsimprovements.
sc-metacs- ChainSimulator CLI, which provides handy functionality to:- install the chain simulator image in Docker;
- start/stop the chain simulator;
- quick testing using the
chain-simulator-testsfeature flag.
- Adder interactor cleanup, including in template.
- Interactor -
use_chain_simulatorbuilder method, for improved backwards compatibility. MultiValueEncodedCounted- a lazy multi-value encoding, but with known number of elements.
- New crate,
multiversx-chain-core, to be used in both framework and Rust VM. It contains common types, flags, and constants that refer to the protocol. - Major SDK/interactor refactor:
- Added support for Chain Simulator in interactors:
- Added chain-simulator-specific endpoints: feed account, advance blocks
- Added a system to set up accounts in the chain simulator from the interactor;
- Support for advancing blocks in the interactor;
- Split SDK crate into:
multiversx-sdk- only contains the specifications of the gateway API, without a mechanism to call the API;multiversx-sdk-http- functionality to call the gateway via reqwest;multiversx-sdk-dapp- functionality to call the gateway via wasm-bindgen, to be used in WebAssembly front-ends;
- Major improvements in the retrieving of transactions and other blockchain data from the API, many bugs fixed;
- Support for writing integration tests for interactors, using the Chain Simulator;
- Also added support for test-related
chain-simulator-testsfeature flag insc-meta;
- Also added support for test-related
- Interactors on the front-end:
- Interactor type made generic over the gateway API implementation, so that it can be used in both front-end and back-end, with no change in the code base;
- Support for custom random number generation for the front-end;
- Mechanism for fixing file paths in the interactor context;
- Fixed an issue with the account tool;
- Adjusted
sc-meta snippetsfor the new syntax and the chain simulator support;
- Added support for Chain Simulator in interactors:
- Unified syntax:
ReturnsHandledOrErrorresult handler, which can gracefully deal with failed transactions;ReturnsGasUsedresult handler;PassValueresult handler for providing a closure-like context for multi-transaction call/deploy;- More specific back transfer result handlers:
ReturnsBackTransfersEGLD,ReturnsBackTransfersMultiESDT,ReturnsBackTransfersSingleESDT; - Fixed an issue with the update functionality not being general enough;
- Deprecated
prepare_async(), developers can now callrun()directly, asynchronously;
sc-metaimprovements:- New mechanism for detecting and warning about storage writes in readonly endpoints, integrated into the build system;
- Support for referencing the framework via git commit, branch, or tag, to make it easier to try out unreleased versions;
- Support for
default-features; - Better representation in console of the contract/lib folders, as well as better error messages.
- Refactoring of the dependency handling logic.
- Fixed the debugger, following changes in the Rust debug tooling.
ManagedVecsetalways consumes ownership. Preparations for a profound memory management cleanup.- ABI:
titlefield and annotation;- Refactoring.
StakingModulefix.
- Interactor:
- Allow signature to be empty in TransactionOnNetwork;
- Allow return data to be empty in VMOutputApi.
- Unified syntax:
- Whitebox testing;
- Proxy fix for ManagedOption;
- TestTokenIdentifier syntactic sugar.
- New ResultHandler:
ReturnsLogs. - Interactor:
- Fix on API fetch process status;
- Fix on ReturnsNewTokenIdentifier edge cases solved;
- Fix on ESDTTransfer for transfer step;
- Support for Keystore + password.
- Framework API support: EI 1.4 crypto functions.
sc-meta:- New
walletcommand: PEM and keystore generator and conversions; - New
reportcommand:- Generate json or Markdown report based on size, path, allocator and panic messages;
- Compare reports;
- Convert reports.
- New
- VecMapper update with index.
- Substitution list: AddressToIdMapper
- Dependencies updated.
- Pause module events.
ManagedBufferReadToEndextract data methods.
ManagedBufferReadToEndTypeAbiimplementation.
- 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-meta upgradebugfix.
- 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.
- Temporarily removed dependency to rustc 1.78, to ease transition from older versions. Will be re-enabled in 0.51.0.
- `#[storage_mapper_from_address] annotation.
- Added missing equality operator for test addresses (
TestAddress,TestSCAddress).
- Compiler version requirement (1.78).
- Minor imports fix.
- Dependency update and fix. There was an issue with the
zipdependency in sc-meta.
- 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-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).
- 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.
- Unified transaction syntax
- new syntax for sending transactions from contracts
- new syntax for integration tests: tx, set state, check state, etc.
- new syntax for interactors
- new proxies, generated from sc-meta
- support for upgrade in new proxies
- Improved interactor tx result polling performance.
- Simplified decoding of small numbers (i64/u64).
- Manual reset of the
StaticApi, in order to free memory for long-running tasks.
Fourth pre-release, contains many interactor improvements, including improved tx polling.
Third pre-release of the unified syntax, includes backwards compatibility fixes and testing set state/check state.
Second pre-release of the unified syntax. Most features done, including fully featured interactors. Still missing: set state/check state in tests.
- When serializing to a managed buffer, static buffer caching is disabled by default.
sc-meta:- installers for wasm32 target and wasm-opt.- Integrated traits for token management:
FixedSupplyToken,Mergeable.
First pre-release of the unified syntax. Syntax not yet stabilized, should only be used for experimenting with various smart contracts.
- Test coverage functionality in sc-meta.
- Removed deprecation from legacy whitebox testing framework, since it is still used extensively.
- Template bugfix (concerning the interactor).
- Template naming bugfix, regarding numbers in the project name.
- Added the interactor to the adder template.
- Fixed an issue with
MapMapperwhen reading from another contract. - Got rid of nightly feature
maybe_uninit_uninit_array/maybe_uninit_array_assume_init.
- Post-build wasm report added to
.mxsc.jsonfile. - Fixed a dependency issue involving ed25519-dalek (downgraded dependency).
- SDK: changed the way to retrieve the new deployed address after deploy/
- Support for reading from another contract for the following storage mappers:
AddressToIdMapper,BiDiMapper,LinkedListMapper,SetMapper,SingleValueMapper,UniqueIdMapper,UnorderedSetMapper,UserMapper,VecMapper,WhitelistMapper. - Additional methods to access data nodes directly in the
SetMapperandQueueMapper.
- Scenario testing infrastructure:
- The Rust VM can generate mock addresses, if not specified in advance.
- The
sc:syntax now generates addresses with VM type 0x0500, same as the latest version of mx-scenario-go. - Rust test support for checking
code_metadata.
- Explicit discriminants supported for enums.
- Optimized
top_encode_numberfunction. It no longer contains branches or loops. - Removed reliance on Rust nightly features
is_sortedandslice_partition_dedup.
- Blockchain hooks:
get_code_metadata,is_builtin_function. - Support for
mxsc:syntax in scenarios. - Updated dependencies.
- Added support for the code metadata in the Rust VM and Rust scenarios backend.
sc-meta:- New
mx-scenario-goinstaller; --nocaptureflag added insc-meta testCLI;- Framework version system refactor,
- New
SetMapperandQueueMappercan read from another contract.- Fixed an edge case when generating enum encoding.
- Interactor: fixed parsing of newly issued token identifier.
- Promises callback memory allocator bugfix.
- Removed features:
promises,managed-map,back-transfers. - Removed
hashbrowndependency from framework. - Imports in output now sorted.
- Updated framework dependencies to the latest versions: syn, bitflags, wasmparser, base64, sha2, sha3, itertools, hmac, pem, pbkdf2, etc.
sc-metaimprovements:overflow-checksfield insc-config.toml;- Upgrade: new
--no-checkflag, which disables the compile check after major version upgrades; - Template:
wasmcrates no longer copied for new versions; retroactively patched missingmultiversx.jsonfile for older versions.
- Fixed sc-meta standalone install backwards compatibility.
- Better hygiene in codec derive.
- Replicated VM 1.5 in the Rust VM. This includes support for:
- promises,
- back-transfers,
- modified event logs.
- New endpoint annotation,
#[upgrade]. Contract variants with upgrade endpoint, but without init now allowed. - Build system:
wasmcrates now fully generated based on data fromsc-config.tomland rootCargo.toml.- Setting wasm target dir automatically, if not specified, based on workspace.
- Back-transfer:
- API support in framework (not yet implemented in the Rust VM);
- Feature flag:
"back-transfers"; - EI updated.
- ESDT attribute ABI annotation and generator.
- Multiple var-args disallowed, unless annotating endpoint with
#[allow_multiple_var_args]. - Build system updates:
multicontract.tomlrenamed tosc-config.toml;add-unlabelleddefault true.
- New
FunctionCallobject & refactoring. Can be used as multi-value to pass contract call info to contracts. AddressToIdstorage mapper.
- Meta crate: removed external dependencies to
wasm2watandwasm-objdump, replaces with internal implementation. - NFT subscription module.
- EsdtTokenData implements
ManagedVecItem. - Contract call
argumentmethod. SendRawWrappermade public.
- Bugfix in
sc-meta: fixed--locked argumentinallcommand. - Template fix: added
multiversx.jsonfiles. - Testing framework: check NFT balances and attributes.
- Added several new methods in the
SendWrapper, which perform EGLD & ESDT transfers but don't do anything if the value is zero. - Added the
DeleteUsernamebuiltin function to the VM. - Minor fixes in API wrapper constructors.
- Template tool tag argument validation bugfix.
- Template tool improvements:
- Ability to specify for which framework version to download (based on git tag). The first allowed version is 0.43.0.
- Ability to specify path where to create new contract.
- Various bugfixes.
- VM implementation for
get_shard_of_addressVM hook.
- Fixed a rustc compatibility issue when building contracts. The meta crate looks at the rustc version when generating the wasm crate code:
- pre-rustc-1.71;
- between rustc-1.71 and rustc-1.73;
- latest, after rustc-1.73. Also upgraded some dependencies, notably proc-macro2 "1.0.66" and ed25519-dalek "2.0.0".
- Initial version of the contract template tool in multiversx-sc-meta:
- Ability to download and adapt template contracts, to kickstart contract development;
- A template mechanism that is customizable on the framework side;
- Available templates: adder, empty, crypto-zombies.
- The Rust debugger is now thread safe.
- Removed the
big-floatfeature of multiversx-sc, because the functionality is already available on mainnet. - Arguments
--target-dir-wasm,--target-dir-meta, and--target-dir-allin themultiversx-sc-metaCLI. - Fixed an issue with contract calls and ESDT transfers in the
StaticApienvironment.
- Multi-endpoints in multi-contracts:
- It is now possible to have multiple versions of the same endpoint in different multi-contract variants.
- We can also have multiple versions of the constructor.
- Major architectural redesign of the debugger:
- The VM executor interface inserted between the smart contract API objects and the Rust VM. A new
VMHooksApiis used to connect on the smart contract side. AVMHooksDispatcherobject andVMHooksHandlerinterface provide the connection on the VM side. - The
VMHooksApicomes in several flavors (backends):- The old
DebugApiis now only used at runtime, on the VM context stack; - A new
StaticApiprovides support for managed types in a regular context, without needing to be initialized; - An additional
SingleTxApiis useful for unit tests. Aside managed types, it also allows some basic context for tx inputs, results, storage and block info.
- The old
- Removed almost all of the legacy functionality from the smart contract APIs.
- The VM executor interface inserted between the smart contract API objects and the Rust VM. A new
- System SC mock.
- It is now possible to issue tokens (fungible, SFT, NFT) in integration tests.
- Setting roles is modelled.
- It is, however, not fully mocked.
- Integration of blackbox and whitebox testing into one unified framework.
- Whitebox testing was the modus operandi of the old testing framework.
- Integration of whitebox functionality into the new testing framework allows easier migration in some specific cases.
- Tested the new whitebox framework with the old tests by injecting it into the implementation of the old one.
- Interactors can now export a trace of their execution, thus producing integration tests.
- Integrated tool for retrieving the initial states of the involved accounts from the blockchain.
- Tight integration with the scenario testing infrastructure makes generating the trace straightforward;
- The same format for the trace is used, as in the case of the integration tests.
- Interactors can now execute several steps (calls, deploys) in parallel.
- Redesigned the wrappers around the Rust and Go JSON scenario executors;
- Also improved the
sc-meta test-gentool for auto-generating these wrappers. - Using the
ScenarioRunnerinterface to abstract away the various backends used to run tests.
- Also improved the
- Redesigned syntax of both the testing and the interactor (snippets) frameworks.
- While the codebases are separate (the latter is async Rust), the names and arguments of the methods are the same, and both use the scenario infrastructure.
- Methods that allow chaining scenario steps, while also processing results;
- Added several defaults in the syntax, for more concise code;
- Deprecated the old testing framework;
- Updated all contract interactors and blackbox tests with the new syntax;
- Upgraded the snippets generator to produce new syntax.
- Bugfix on
ManagedBufferCachedBuilder, involving large inputs. - Explicit enum ABI:
OperationCompletionStatusis now properly described in the ABI as an enum that gets serialized by name instead of discriminant.
- Releasing a new version of the codec, without the dependency to
wee_alloc.
- Fixed an edge case for the token storage mappers (
FungibleTokenMapper,NonFungibleTokenMapper).
- Fixed compatibility with rustc v1.71.0.
- Allocator system:
- Contracts can now choose their own allocator. This works in multi-contract contexts.
- New allocators:
fail(default),static64k,leaking. - Removed dependency to
wee_alloc, but using it is still possible if the contract references it directly. - Contract call stack size is now configurable in
multicontract.toml. - The 'panic with message' system now relies on managed buffers instead of on an allocator.
- Fixed BigUint bitwise operations in the debugger.
- When building contracts, an additional
.mxsc.jsonfile is created, which packs both the contract binary, the ABI, and some additional metadata. - Refactor: reorganized the meta crate.
- Deprecated some legacy methods in the API wrappers.
- Building contracts also triggers an EI check, which verifies compatibility with various VM versions. It currently only issues warnings.
ManagedVecItemimplementation for arrays.
- Call value
egld_valueandall_esdt_transfersmethods returnManagedRefinstead of owned objects, because they are cached (to avoid accidental corruption of the underlying cache).
multiversx-sc-metatest-gencommand: generates Rust integration tests based on scenarios present in thescenariosfolder.UnorderedSetMapperswap_indexesmethod.
TokenIdentifiertickermethod.ManagedBufferconcatmethod.
multiversx-sc-metaimprovements:- Bugfix: custom names in the main contract no longer crash the multi-contract build.
- Bugfix: the
--mirflag works correctly insc-meta all build; - Multi-contract configs can now specify separate cargo features for individual contracts, for conditional compilation.
multiversx-sc-metaimprovements:- Rust snippet generator fixes. The generator creates compilable code with appropriate argument types.
local-depscommand: generates a report on the local dependencies of contract crates. Will explore indirect dependencies too.- Upgrade tool minor fix.
multiversx-sc-metaimprovements:--lockedflag get passed to the build command, preserves dependencies in Cargo.lock.updatecommand updates Cargo.lock files without building the contracts.
- Backwards compatibility for running scenarios using the VM Go infrastructure.
multiversx-sc-metaimprovements:upgradecan handle crates as early as0.28.0;--ignoreflag for theallcommand: will ignore folders with given names, by default set totarget;infocommand, shows contracts and contract library crates with their respective framework versions;--mirflag when building, also emits MIR files;- printing to console the build command.
BigUintfromu128conversion.
multiversx-sc-metaimprovements:allcommand that allows calling all contract meta crates in a folder;upgradealso re-generates wasm crates after reaching 0.39.1.
- Cleaned up dependencies.
multiversx-sc-metacan be installed as a standalone tool (sc-meta), and used to automatically upgrade contracts.- Many dependencies updates across the repo.
- Updated readme files.
- All crates were renamed, in line with the MultiversX brand.
- New crate:
multiversx-chain-vm, extracted from the old debug crate. - New crate:
multiversx-sdk, adapted from a solution proposed by the community. - A
ScenarioWorldfacade, for contract tests. - The meta crate supports
twiggypost-processing, this is a tool to analyze contract size and investigate bloat in the binaries. - Dropped crate:
elrond-wasm-output. There is no equivalent crate, its job was passed to the individualwasmcrates. ManagedVecsupports sorting and deduplication.migrateUserNamebuiltin function mock.
ContractCallrefactor. Building a contract call comes with harder compile-time constraints. This also reduces compiled code size.ContractBasesupertrait can be now stated explicitly for contract and module traits.- Debugger:
- Callback payment is now set correctly.
- Function names are represented internally as strings instead of bytes, which aids debugging.
- Removed the
ei-1-2feature, which was guarding the newer VM functions. These functions are in the mainnet, so this feature is no longer needed. - New utility functions:
self.send().esdt_local_burn_multi(...,self.blockchain().get_token_attributes(...). - Updated all crates to Rust 2021.
- Multi-contract build system:
- build system refactor;
multicontract.tomlconfig system with labels,- eliminated monomorphization issue that was bloating some contracts;
- build post-processing:
wasm2wat, imports viawasm-objdump.
- Support for the new async call system (promises):
- new APIs;
- a new flavor of callbacks (
#[promises-callback]); - callback optimizations.
elrond-codecrefactor: removedTopEncodeNoErr,NestedEncodeNoErrandTypeInfo- System SC proxy: added support for
controlChangesendpoint and transfer create role (from community). - Module updates:
MergedTokenInstancesmodule;- Governance module improvements;
set_if_emptyfor FungibleTokenMapper and NonFungibleTokenMapper.
IntoMultiValuetrait.- Storage mapper improvements:
- Storage mappers can read from another contract.
BiDiMapperimprovements;- Fixed missing substitution rules for
FungibleTokenMapper,NonFungibleTokenMapper,UniqueIdMapper,BiDiMapper,WhitelistMapper,RandomnessSource; - Added
takeandreplacemethods forSingleValueMapper; - Implemented
Extendtrait forUnorderedSetMapper.
- Deprecated
ContractCallexecute_on_dest_context_ignore_resultmethod, since it is currently redundant.
EsdtTokenPaymentlegacy decode: objects encoded by older versions of the framework can now also be decoded, if flagesdt-token-payment-legacy-decodeis active.- Codec
NestedDecodeInputnewpeek_intomethod. FungibleTokenMappercaches the token identifier.
- Rust interactor snippet generator.
- Added some missing substitution rules in the contract preprocessor.
- Allow single zero byte when top-decoding Option::None.
- Ongoing operations module.
- Claim developer rewards module.
FromIteratortrait forManagedVec.- Mandos
"id"accepted as synonym to"txId".
#[only_admin]annotation- Safer BigUint/BigInt conversions
- Added and published
price-aggregatorandwegld-swapcore contracts.
[elrond-wasm 0.34.0, elrond-codec 0.12.0, mandos 0.16.0, elrond-interact-snippets 0.1.0] - 2022-07-08
- Major refactor of the mandos-rs infrastructure.
- High-level Mandos objects moved to elrond-wasm-debug;
- The
mandoscrate no longer depends onelrond-wasm-debug(as originally intended and implemented); - Typed mandos contract call objects, for better call syntax.
- More syntactic sugar for writing mandos calls.
- The first version of elrond-interact-snippets, which can be used to write short blockchain interactor programs.
- The syntax relies on contract proxies to easily build calls.
- Some of the infrastructure is shared with Mandos.
- There is an example of such a interactor for the multisig contract.
- Refactor of managed type handles in all API traits. Eliminated undefined behavior when using the same handle in multiple contexts.
- Transfer role proxy module.
- NFT merge module.
#[only_user_account]annotation. Only user accounts can call these endpoints.- ABI - fixed missing event logs from modules.
- CodecSelf for BigInt
- Removed the data field for direct EGLD & ESDT transfers.
- Testing and debugging environment aligned with VM version 1.4.53.
- Call value and token data infrastructure additional cleanup.
- VM new functionality added as part of the environment interface 1.2:
- Fully managed functionality for elliptic curves (no allocator);
- Fully managed cryptographic functions (no allocator);
- More efficient printing of big ints and hex;
- Functionality available by adding the
ei-1-2flag to contracts.
BigFloatfunctionality. Since the functionality is not yet deployed on mainnet, use flagbig-floatto use.- Major refactoring of the call value mechanism:
TokenIdentifiernow only refers to ESDT, for mixed EGLD+ESDT we haveEgldOrEsdtTokenIdentifier.EsdtTokenPaymentnow only refers to ESDT, for mixed EGLD+ESDT we haveEgldOrEsdtTokenPayment.- Compact version for multi-transfer:
let [payment_a, payment_b, payment_c] = self.call_value().multi_esdt();. - Explicit
single_esdtvs.single_fungible_esdtvs.egld_or_single_esdtvs.egld_or_single_fungible_esdt. - Payment arguments are still supported, although discouraged. They always assume the EGLD+ESDT scenario.
ManagedOptionprovides some minor optimization for specific use-cases. Mostly for use in the framework.- Cleanup in the callback mechanism and in the
SendApi. SparseArrayimplementation.UniqueIdMapper- efficient storage mapper for holding unique values.- The ABI also contains events.
- New standard module:
StakingModule.
- Bugfix - formatter single char issue.
- Improved formatter. Strings can be formatted similarly to the standard Rust ones, but without allocator, using managed buffers. Macros
require!,sc_panic!,sc_format!,sc_print!use it. - Removed build flag
ei-1-1, following mainnet updated and new VM endpoints being available. Among others, managedsha256andkeccak256APIs can be used freely. CodecFromandCodecIntotraits to define equivalent encodings and conversions via codec.- Generated smart contract proxies use the
CodecFrom/CodecIntotraits to accept a wider range of types. - Mandos Rust testing framework v2, which uses contract proxies for composing calls and is capable of building and exporting mandos scenarios.
- Managed type handle management system in the contract, to reduce the number of API calls to the VM. General VM API refactor.
- Eliminated
#[var_args]annotation. The framework can now distinguish between single-values and multi-values solely based on type. - Contract cleans up return data after performing synchronous calls. Getting return data by range is no longer needed and the respective methods have been removed.
- Fixed behavior of blockchain API
get_esdt_token_data. - Git tag/commit info in ABI (fixed & reintroduced).
- Feature flags in
elrond-wasm:allocallows contracts to use the heap allocator. It is not a hard restriction, there is still access to the implementations of the heap-allocated types, but they are not imported. Some methods are only available with this flag.ei-1-1allows contracts to use VM endpoints that are not yet available on the mainnet.
- Fixes with async calls, smart contract deploy & upgrade.
- Refactoring regarding small number types in the API.
- Rust testing framework: Allow checking NFT balance without also checking attributes.
- View for
MapMapper.
ManagedVecbackwards compatible implementation forset.- Implemented
ManagedVecItemforOption<T>.
- Disabled git tag/commit info in ABI due to issue in standard modules.
- Cleaned up allocator from modules:
DnsModule,EsdtModule,FeaturesModule,PauseModule,UsersModule. - Crypto API managed wrapper over legacy VM endpoints.
- Managed multi-value types refactor and rename.
ManagedVec-remove,contains,find.ManagedVecItemderive for simple enums.- Feature
cb_closure_managed_deserreplaced bycb_closure_unmanaged_deser, managed implementation is now the default. - Git tag/commit info in ABI.
- Major elrond-codec refactor:
- Redesigned the error handling for single value encoding
- Introduced multi-value encoding, which replaces the previous endpoint argument and result mechanisms
- Mandos improvements:
- Multi-values: out, topics, ESDT uri
- Logs "+" wildcard
- Builtin function mocks:
ESDTNFTUpdateAttributes,ESDTNFTAddURI - New storage mappers:
FungibleTokenMapper,NonFungibleTokenMapper,WhitelistMapper - Call value wrapper avoids using invalid token index in requests
- Backwards compatibility fix.
- Backwards compatibility fix.
- Trailing commas are allowed in
sc_panic!,require!andsc_print!. - EsdtTokenData
decode_attributes_or_exitfor easier error handling.
- Added missing non-specialized decode implementations for managed types.
- Deriving
PartialEqnow works on structs that contain managed types.
- Fixed certain compilation error messages. The previous implementation of the macro preprocessor would have concealed the location of many issues.
- Changed implementation of
require!:require!no longer returns aSCResulttype, when the condition is false it now stops the transaction immediately, viasignal_error;require!now accepts message formatting;require_old!gives access to the old implementation.
- The Rust testing framework can now handle panics and async calls.
- ABI bugfix - an issue regarding nested types.
metacrate build also attempts to callwasm-optafter building the contracts.- Refactored
CodeMetadataand added "payable by SC" field. - Empty contract template.
- Major VM API trait refactoring. All API methods can be accessed from a static context. Removed api instance variables from all objects.
- External view contracts
- Annotating one or more endpoints with
#[external_view]triggers the framework to create a second "external view" contract where all these endpoints are placed. This is primarily to reduce the main contract size. - General
metacrate functionality refactor to allow multiple contract generation.
- Annotating one or more endpoints with
ManagedReftype- Provided as a more efficient alternative to regular references to managed types
- Has
Copysemantics ManagedVeciterators made safer by the proper use of lifetimesManagedVecget_mutoffers a safe mutable reference, using lifetimes- Some initial optimizations in storage mappers
- First version of a message formatter based on
ManagedBuffers:sc_print!macrosc_panic!macro
- Random number generator wrapper over randomness source from the VM.
- Rust testing framework - mandos generation fixes and some more getters
- Standard modules moved to
elrond-wasm-modulescrates
- Rust testing framework
- Managed Crypto API - keccak256 and sha256
- New hook for ESDT local roles
- Only-owner module annotation
ArrayVecserializationManagedAddressadditional conversions
- Static access to API. Static thread-local context stack in the debugger.
- Derive
ManagedVecItemgenerics fix - Constructor can reside in module
ManagedMultiResultVecpush accepts multi result
ManagedVarArgsEagerimplementationEsdtLocalRoleFlags, no heap allocation inget_esdt_local_roles
- Optimized decode unsigned number from slice
- Optimized decode unsigned number from slice
- Optimized blockchain API: managed get token nonce, get esdt balance
ManagedVecItemforManagedByteArray
- Optimized decode u64 from
ManagedBuffer ManagedVecIteminderive_imports
- Implemented
ManagedVecItemforbool. - Substitution for
ManagedMultiResultVec::new().
- Derive
ManagedVecItem. - Nested encode and decode from ManagedBuffers cached in a static singleton buffer.
- Implemented
ExactSizeIteratorforManagedVecIterator.
- Memory allocation optimisations.
- Callback endpoint automatically created empty for contracts that have no callbacks. This is determined by the
metacrate, based on the ABI of the contract and its modules. UnorderedSetMapperIgnoreVarArgsvariadic argument type that ignores input
- Made the generated code in
wasm/lib.rsmore compact with the use of macros.
- Mechanism for generating contract endpoints based on ABI. Previously, all endpoints from all modules from a crate were automatically included, now they can be filtered based on what modules are used.
- Contract
metacrates are now capable of building the respective contracts and the ABIs without relying onerdpy. - Renamed feature
arwen-teststomandos-go-tests
- Bugfix regarding contract upgrade args in
elrond-wasm-debug
- Relative path improvements and fixes in
elrond-wasm-debug:- mandos-rs
file:syntax now actually loads files and correctly unifies equivalent paths - debugging now works seamlessly, without needing to temporarily change paths in the tests
- mandos-rs
- SC proxy -
register_meta_esdt - Debugger builtin function mocks check for ESDT roles
- ABI provides definitions for EsdtTokenPayment, EsdtTokenData, EsdtTokenType
- Mandos support for NFT syntax. Many more small improvements and some major refactoring.
- Major refactoring of the
elrond-wasm-debugcrate, which enables the debugger and the coverage tool. Many features added:- support for synchronous calls, also nested synchronous calls
- support for NFT simple transfers
- support for ESDT multitransfer (FT + NFT)
- builtin functions mocked in the debugger:
ESDTLocalMint,ESDTLocalBurn,MultiESDTNFTTransfer,ESDTNFTTransfer,ESDTNFTCreate,ESDTNFTAddQuantity,ESDTNFTBurn,ESDTTransfer,ChangeOwnerAddress,SetUserName - supports deploy/deploy from source/upgrade/upgrade from source from contracts
#[payment_multi]annotationManagedReftype, that allows easier handling of managed types- ABI contains endpoint mutability flag (mutable/readonly)
- reverse iteration for
ManagedVec
- Added missing managed methods in blockchain API:
is_smart_contract,get_shard_of_address,get_balance. - Improved preprocessor substitutions:
ManagedAddress,TokenIdentifier.
- Managed callback handling
- Managed async call result
- ManagedVec improvements, deserialization fix
- Better conversions between big numeric types
- Improved preprocessor substitutions: hidden generics for most managed types
- Build info in ABI - rustc version, framework version, crate version
- Legacy Send API implementation fix
- Managed types used extensively. Because of this, the recommended Arwen minimum version is
v1.4.10.- Redesigned parts of the elrond-codec, so as to allow custom type specializations. These specializations allow serializers and types to bypass the limitations of the codec traits to provide optimized implementations. Managed type serialization relies on this.
- Redesigned existing managed types:
BigInt,BigUint,EllipticCurve. - Added the
ManagedBuffertype, which can be used to store anything on the VM side. - Support for complex operations using managed buffers, such as storing lists of elements in a managed buffer via the
ManagedVectype. - There are
ManagedAddresses now. They rely on another managed type, theManagedByteArray, which is a fixed size managed structure. TokenIdentifieris now a managed type.- Serializer based on a managed buffer.
- Storage keys are now based on managed buffers.
- All error messages generated by the framework are assembled using a managed buffer.
- The blockchain API uses managed types for most interactions.
- The contract call API uses managed types for most interactions.
- The call value API supports multi transfer via managed
EsdtTokenPaymentobjects. - Event logs are sent to the VM via managed types (
ManagedVec<ManagedBuffer>for topics,ManagedBufferfor data). - Type conversion traits for managed types:
ManagedFromandManagedInto. - There are now 2 types of
SCError:StaticSCErrorfor static messages andManagedSCError, which is backed by a managed buffer. - Contract errors can now be triggered immediately, without the need to return them from an endpoint.
- Improved macro preprocessor: more complex patterns can now be substituted.
- Generic API parameter needs not be specified every time.
- Substitutions available for most managed types and storage mappers.
- Separated contract API into low-level VM API connectors and high-level utility objects to be used in the contracts.
- Mandos-rs improvements:
- Self tests synchronized with mandos-go. Some missing features needed to be added to make them pass.
- Support for ESDT tokens.
- Support for ESDT multi-transfer.
- Crypto API:
ripemd160function, custom secp256k1 signature verification (verify_custom_secp256k1) and signature generation (encode_secp256k1_der_signature).
- Added "safe" storage mappers, which serialize keys using nested encoding instead of top. The old respective mappers only kept for backwards compatibility, are now deprecated.
- New math hooks exposed from Arwen:
pow,log2,sqrt- cryptography: elliptic curves
deploy_contractnow returnsOption<Address>deploy_from_source_contractAPI- Send API refactored for more consistency and ease of use.
- High level proxies can be used to deploy contracts.
- Mandos log syntax updated, to match Arwen.
- A better
#[only_owner]annotation, which can be applied directly to endpoint methods. This annotation also shows up in the ABI. elrond-wasm-derivenow an optional dependency ofelrond-wasm. Use#[elrond_wasm::contract]instead of#[elrond_wasm_derive::contract]now. Same for proxies and modules.
- conversions from big ints to small int:
BigUint::to_u64,BigInt::to_i64
SingleValueMapperset_if_emptymethod
- callbacks can now declared in modules only (manual forwarding from the main contract no longer required)
legacy-nft-transferfeature for interacting with older versions of Arwen
- Integration tests can now call Arwen-Mandos (mandos-go)
- Send API refactoring and cleanup
- ESDT builtin function calls no longer require explicit gas
- sync calls and transfer-execute no longer require explicit gas
#[payment_nonce]endpoint argument annotation#[payable]annotation no longer allowed without argument
- New implementation for the
Trytrait forSCResult, in accordance to featuretry_trait_v2 - Published DNS module, which helps contracts register usernames for themselves
ESDTLocalRolemore expressive type ABI
- Improvements in mandos-rs: username, contract owner, nested async calls
- The arguments to contract/module/proxy annotations are gone. All items are generated in the same Rust module. Both submodule inclusion and contract calls are now Rust-module-aware.
- Submodule imports are now expressed as supertraits instead of the module getter annotated methods. Note: explicitly specifying the Rust module is required, in order for the framework to fetch generated types and functions from that module.
- Each contract now generates its own callable proxy to ease calling it. Caller contracts do no longer need to define a call interface, they can import it from the crate of the contract they want to call. Callable proxies contain the methods from the main contract, as well as from all the modules. Note: calling a contract requires the caller to specify the Rust module where it resides.
- We no longer have a separate syntax/parser/code generation for call proxies. They are just contracts with no implementations and annotated with
#[elrond_wasm_derive::proxy]instead of#[elrond_wasm_derive::contract]. - BigUint and BigInt are now associated types instead of generics in all API traits. Contracts need to specify them as
Self::BigUintinstead of justBigUint. Although more verbose, this might be more intuitive for the developer. ContractCalls,AsyncCalls and all other call & transfer result types now contain a reference to the Send API. This also means theexecute_on_dest_contextmethod no longer requires an api argument.execute_on_dest_contextcan now deserialize the call results automatically and provide them to the calling contract. There is a mechanism in place to deconstruct non-serialized types, e.g.SCResult<T>becomesTandAsyncCall<Self::BigUint>becomes().- Callbacks and callback proxies needed to be adapted to the new system, but work similar to how they did in the past.
- Contracts can define proxy getter methods using the
#[proxy]annotation. - Callbacks can now have names, just like endpoints. This name gets saved in the callback closure in storage, but has no other impact on the contract. The reason I needed it was to help me with defining callback forwarders and avoiding some name collisions there. Callback forwarders are still needed for a little longer, until module callbacks are properly implemented.
- mandos-rs syntax synchronized with mandos-go (
sc:syntax, new ESDT call value syntax, no NFTs yet).
- Mitigating nested sync calls with Send API
execute_on_dest_context_raw_custom_result_range
- ABI
- Constructor representation
- Simplified ABI syntax for tuples and fixed-size arrays
- Final cleanup for the contract APIs: split off blockchain and crypto APIs
- Small fixes in the send API
TokenIdentifiervalidation- Minor refactoring in the elrond-codec
- Fixed contract call/callback logs in mandos-rs
- Unified variadic arguments with respective variadic results
- ESDT functionality:
- ESDT system smart contract proxy, though which it is possible to mint, burn, issue, freeze, pause, etc.
- Endpoints to handle NFTs. Also added NFT management in the ESDT system smart contract proxy
- Get balance, get token data, local mint/burn
- Contract calls:
- Low-level and high-level support for synchronous calls via
execute_on_dest_context. - Callback bug fix
- Low-level and high-level support for synchronous calls via
- Improvements in storage mappers:
- VecMapper length is now lazy
- UserMapper more functionality
- Mandos
scQuerystep- fixed defaults: unspecified fields now check the default value instead of being ignored
- check logs
nested:andbiguint:syntax
elrond-codec-derivedix -TopDecodeOrDefaultworks with generics- Upgraded to Rust2021.
- Events revamped:
- any event name of any length is accepted. The event name is now expressed as ASCII instead of hex
- topics can have any length
- topics and data are serialized using the elrond-codec instead of the old macro-based solution
- old events are still allowed for now via the
#[legacy_event("0x...")]syntax; might be removed in the future
- Major refactoring of elrond-wasm-derive. This doesn't change much of the functionality, though.
- SingleValueMapper redesigned for easier use. It no longer keeps the storage value cached.
- Reorganized ESDT and EGLD direct send api.
- New async call syntax
- redesigned contract proxies
- contract calls are communicated via objects returned from endpoint methods
- callbacks now specified programmatically
- got rid of the
#[callback_arg]annotation
- Major refactoring of the contract API: split into smaller traits
- Storage mappers:
- LinkedListMapper
- SetMapper
- MapMapper
- SendApi
- created SendApi, which groups all functionality related to sending tokens and interactions with other contracts
- integrated the new TransferESDT hook from Arwen
- added an unsafe buffer for handling values before transfer
- mandos-rs fixes
- contracts now use the new API + more mandos tests
- Call Value API refactor and
#[payable]updates:- Main features:
#[payable]annotation more versatile:#[payable("EGLD")]#[payable("TOKEN-ID")]#[payable("*")]#[payable]still accepted but throws a warning, will become unsupported in the future.#[payment]argument attribute now also provides ESDT payment where applicable- a new TokenIdentifier type that encodes the EGLD special token and any ESDT token
- a new
#[token_identifier]argument attribute provides the token id. Similar to#[payment]it is a fake argument, not exported. - ABI updated ("payableInTokens" is no longer restricted to "EGLD")
- all new features covered by mandos tests
- async proxies still only accept
#[payable("EGLD")], but that is for future updates
- Less visible changes:
- all call value hooks now grouped in a new CallValueApi
- for low-level access, developers now need to write self.call_value().egld_value(), etc.
- some optimizations in the handling of call value hooks
- Refactoring:
- parse_attr mod was split into a proper folder with many files, since it had grown too large
- an extensive refactoring of elrond-wasm-derive not yet performed, will come soon
- Main features:
- ABI enum discriminants generation
- Crypto API fixes:
keccak256:prefix also supported in mandos- reorganized crypto mandos tests in basic-features
- mandos-rs was accidentally providing keccak256 instead of sha256
- Temporary fix: callbacks allow error message argument to be missing
- Codec derive with defaults
- Storage mapper infrastructure
- ABI generation of endpoint output names
- Codec type hygiene
- Minor fixes, support for strings
- Codec derive
- ABI generation framework
- New example contracts
- SC deploy API
- Monomorphization via codec trait instead of TypeInfo for arguments and storage
- Reorganized all contracts in the
contractsfolder
- H256 & BoxedBytes fixes
- H256 is_zero, minor fixes
- BoxedBytes
- optimized allocation, used in hooks
- used for error messages
- Optimized Address/H256 hooks
- Allow slices as arguments
storage_is_emptyannotation
- BigUint serialization bugfix
- Serialization completely refactored to use "fast exit" methods
- Storage/argument/result traits completely redesigned, simplified and optimized
- Completely ditched the approach from elrond-wasm 0.8.0.
- Was the first version to split Encode/Decode into TopEncode/NestedEncode/TopDecode/NestedDecode
- Attempted to optimize the serializer to use "fast exit" closures. It worked, but the resulting bytecode size was not satisfactory. Even though it was completely replaced and never got to be used, it historically remains the solution of this release.
- Some of the storage/argument/result trait refactorings, survived.
- small int EI
- minor refactors, serialization fixes
- Avoid function selector infinite loop
- Crowdfunding contract initial commit
- Code coverage now possible
- Mandos in Rust
- Modules properly integrated in the build process
- NonZeroUsize iterator and utils
- Integrated NonZeroUsize into the framework
- Specialized small int top encoding/decoding
only_owner!macro
- Redesigned the entire build process with wasm crates
- Standard modules
- Moved all example contracts from sc-examples-rs to the framework
- H256 now boxed
- SCResult is_ok, is_err
- MultiResultVec - new, from_iter
- EncodeError type
- Extracted elrond-codec to separate crate
- Fixed non_snake_case endpoint handling
- Queue type
#[view]attribute, same as#[endpoint]#[init]attributestorage get mutannotation + BorrowedMutStorage- Encode for references
- Array serialization/deserialization
- Option serialization fix
- Arg name in error message
- Async call arguments based on traits
- EndpointResult trait, arg serialization trait, arg loader
- Variadic args/results: OptionalArg, OptionalResult, MultiResultX
- MultiResultVec implementation
- Callback varargs
storage_setallows slices- H256 to_vec
- async call and callback argument fixes
- eliminate bloat when no callback
- the new elrond lightweight serializer (would later become elrond-codec)
- imports macro
- OtherContractHandle implementation
- Serialization fixes for small ints
get_cumulated_validator_rewardshook
- Allow any (macro-based) serializable argument in async call
#[var_args]- Call data serialization refactoring
- Tutorial setup (later abandoned)
- Direct storage conversion for simple types
- Block info hooks
- Serde-based serializer (later abandoned)
- Major storage improvements:
- Generate storage getters & setters
- Variable length storage keys
- Fixes in the macro-based argument handling
- Raw callback support
storage_load_lenhook- Multi args
- Multi args in async calls
- BigUint trait created, added operators (including bitwise)
- BigUint used for balances
- Async call contract proxy infrastructure
- Initial release of the framework
- Main features at this time:
- contract main macro
- handling of arguments and results automagically using macros
- BigInt generic type, hooked directly to the Arwen big int heap
#[private]attribute
- Early framework moved here from sc-examples
- 4 crates:
- elrond-wasm
- elrond-wasm-derive for macros
- elrond-wasm-node for wasm
- elrond-wasm-debug for debugging and early tests