Skip to content

A wrapper over gstd that provides a fluent interface to interact with the Gear Protocol

License

Notifications You must be signed in to change notification settings

gear-foundation/gstd-fluent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gstd-fluent

Build License Docs

A wrapper over gstd that provides a fluent interface to interact with the Gear Protocol.

To use the default implementation, you should replace gstd with gstd-fluent in your Cargo.toml file:

gstd-fluent = { git = "https://github.com/gear-foundation/gstd-fluent.git" }

Then update your code like this:

#![no_std]

use gstd_fluent::{
    self as builder,
    gstd::{self, prelude::*, ActorId},
    //     ^^^^ Useful when working with gstd attribute macros
};

#[no_mangle]
extern "C" fn handle() {
    // Equivalent to `msg::send_with_gas`
    builder::send(ActorId::zero(), String::from("input"))
        .with_value(42)
        .with_gas_limit(1_000_000)
        .execute()
        .expect("failed to send msg");
}

For more examples, please visit the documentation.

License

The source code is licensed under the MIT license.

About

A wrapper over gstd that provides a fluent interface to interact with the Gear Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages