Build with the Fluentbase SDK

Deploy on the Fluent Public Devnet

The Fluentbase SDK is in experimental development and is still a work in progress. All bindings, methods, and naming conventions within the codebase are not standardized and may change significantly. Additionally, the codebase has not been audited or fully tested, which could lead to potential vulnerabilities or crashes.


Modules

  1. bin

A crate with a binary application that is used for translating Wasm apps to the Fluent rWasm VM. It’s required only for creating system precompile contracts where direct translation from Wasm to rWasm is needed.

  1. crates

Contains all Fluentbase modules.

  1. e2e (partially outdated)

A set of e2e tests for testing EVM transition and other Wasm features.


Supported Languages

The Fluentbase SDK currently supports writing smart contracts in:

  • Rust

  • Solidity

  • Vyper


Example Code

Fluentbase can be used to develop different types of applications; in most cases, the same interface is utilized. Here is one simple application that can be developed using Fluentbase.

#![cfg_attr(target_arch = "wasm32", no_std)]
extern crate fluentbase_sdk;

use fluentbase_sdk::{basic_entrypoint, SharedAPI};

#[derive(Default)]
struct GREETING;

impl GREETING {
    fn deploy<SDK: SharedAPI>(&self) {
        // any custom deployment logic here
    }
    fn main<SDK: SharedAPI>(&self) {
        // b"Hello, world": "b" here tells the compiler that the string should be treated as a byte sequence. 
        // This is called a byte string literal.
        const HELLO: &[u8] = b"Hello, world";
        SDK::write(HELLO.as_ptr(), HELLO.len() as u32);
    }
}
basic_entrypoint!(GREETING);

Fluentbase Operation

Fluentbase operates using Fluent's rWasm VM (reduced WebAssembly). This VM employs a 100% compatible Wasm binary representation optimized for zk operations. The instruction set is reduced, and sections are embedded inside the binary to simplify the proving process.

Limitations and Future Enhancements

As of now, Fluentbase does not support floating-point operations. However, this feature is on the roadmap for future enhancements.

Last updated