Crates.io | d-modules |
lib.rs | d-modules |
version | 0.1.3 |
source | src |
created_at | 2023-09-14 13:27:20.101746 |
updated_at | 2023-09-14 13:30:17.383435 |
description | Smart contracts modules for Dharithri blockchain |
homepage | |
repository | https://github.com/StakeGold/sc-d-modules-rs |
max_upload_size | |
id | 972645 |
size | 16,418 |
Check out the latest release of the library on crates.io
by following this link d-modules crate.
The version is specified in the install instructions or directly add them in your Cargo.toml
file for the smart contract
with:
[dependencies.d-modules]
version = "x.x.x"
In your smart contract main lib entry inherit the module you want to use directly on the contract trait:
use d-modules::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 d-modules::my_module;
#[elrond_wasm::module]
pub trait MyOtherModule: my_module::MyModule {
...
#[elrond_wasm::contract]
pub trait MyContract:
MyOtherModule +
my_module::MyModule
{
...