1 unstable release

0.1.2 Jan 8, 2023
0.1.1 Jan 4, 2023
0.1.0 Jan 4, 2023

#15 in #multiversx

Download history 1/week @ 2024-02-20 29/week @ 2024-02-27 1/week @ 2024-03-05 12/week @ 2024-03-12 3/week @ 2024-03-26 39/week @ 2024-04-02 16/week @ 2024-04-23

58 downloads per month

GPL-3.0-only

13KB
172 lines

Buidly X-Modules

Usage

Check out the latest release of the library on crates.io by following this link xmodules crate. The version is specified in the install instructions or directly add them in your Cargo.toml file for the smart contract with:

[dependencies.xmodules]
version = "x.x.x"

In your smart contract main lib entry inherit the module you want to use directly on the contract trait:

use xmodules::my_module;

#[elrond_wasm::contract]
pub trait MyContract: my_module::MyModule {
    ...

Or use it on another module, but beware the contract also needs to implement the trait

use xmodules::my_module;

#[elrond_wasm::module]
pub trait MyOtherModule: my_module::MyModule {
    ...

#[elrond_wasm::contract]
pub trait MyContract:
    MyOtherModule +
    my_module::MyModule
{
    ...

Dependencies

~4.5MB
~87K SLoC