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.
The source code is licensed under the MIT license.