All Projects → WeBankBlockchain → liquid

WeBankBlockchain / liquid

Licence: Apache-2.0 License
Liquid 由微众银行区块链团队开发并完全开源,是一种嵌入式领域特定语言( embedded Domain Specific Language,eDSL),能够用来编写运行于区块链底层平台FISCO BCOS的智能合约。

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to liquid

Translation Contracts
A set of translation abstractions extracted out of the Symfony components
Stars: ✭ 1,949 (+7396.15%)
Mutual labels:  contract
purpose
Purpose and DUBI, ethereum tokens aiming to make the world a better place
Stars: ✭ 35 (+34.62%)
Mutual labels:  contract
laravel-web3
Laravel SDK wrapper for the Web3 PHP API client that interacts with the Ethereum blockchain.
Stars: ✭ 85 (+226.92%)
Mutual labels:  contract
ethjs-contract
A simple contract object for the Ethereum RPC layer.
Stars: ✭ 21 (-19.23%)
Mutual labels:  contract
freelancer contract
Template freelance developer contract
Stars: ✭ 91 (+250%)
Mutual labels:  contract
Contracts
Metarhia core docs and contracts specifications 📒
Stars: ✭ 26 (+0%)
Mutual labels:  contract
Cache Contracts
A set of cache abstractions extracted out of the Symfony components
Stars: ✭ 1,800 (+6823.08%)
Mutual labels:  contract
python-valid8
Yet another validation lib ;). Provides tools for general-purpose variable validation, function inputs/outputs validation as well as class fields validation. All entry points raise consistent ValidationError including all contextual details, with dynamic inheritance of ValueError/TypeError as appropriate.
Stars: ✭ 24 (-7.69%)
Mutual labels:  contract
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (-42.31%)
Mutual labels:  contract
clausejs
Write contract once. Get data & function validators & conformers, an accurate & readable project contract, auto-generated API documentation, generative test coverage, plus more. A tool that enables a more predictable workflow for developing your JavaScript projects.
Stars: ✭ 29 (+11.54%)
Mutual labels:  contract
PancakeTokenSniper
BSC BNB Pancake token sniper, buy, take profit and rug check
Stars: ✭ 184 (+607.69%)
Mutual labels:  contract
ethereum-erc20
Fungible token implementation for the Ethereum blockchain.
Stars: ✭ 27 (+3.85%)
Mutual labels:  contract
framework
Lightweight, open source and magic-free framework for testing solidity smart contracts.
Stars: ✭ 36 (+38.46%)
Mutual labels:  contract
Event Dispatcher Contracts
A set of event dispatcher abstractions extracted out of the Symfony components
Stars: ✭ 2,667 (+10157.69%)
Mutual labels:  contract
ethereum-dex
Decentralized exchange implementation for the 0xcert protocol on the Ethereum blockchain.
Stars: ✭ 18 (-30.77%)
Mutual labels:  contract
Service Contracts
A set of service abstractions extracted out of the Symfony components
Stars: ✭ 1,931 (+7326.92%)
Mutual labels:  contract
quarkchain-web3.js
QuarkChain client library built around web3.js
Stars: ✭ 21 (-19.23%)
Mutual labels:  contract
contract
Contract programming for C++
Stars: ✭ 28 (+7.69%)
Mutual labels:  contract
CryptoLogos
Hundreds of crypto logos simply named by their normalized contract address
Stars: ✭ 14 (-46.15%)
Mutual labels:  contract
erc721
The reference implementation of the ERC-721 non-fungible token standard.
Stars: ✭ 989 (+3703.85%)
Mutual labels:  contract

Liquid - Makes Smart Contract Smarter

GitHub license Code Lines Latest release Language

Liquid 由微众银行区块链团队开发并完全开源,是一种嵌入式领域特定语言( embedded Domain Specific Language,eDSL),能够用来编写运行于区块链底层平台FISCO BCOS的智能合约。

关键特性

安全(Security)

  • 支持在智能合约内部便捷地编写单元测试用例,可通过内嵌的区块链模拟环境直接在本地执行;

  • 算数溢出及内存越界安全检查;

  • 能够结合模糊测试等工具进行深度测试;

  • 未来将进一步集成形式化验证及数据隐私保护技术。

性能(Performance)

  • 配合 LLVM 优化器,支持将智能合约代码编译为可移植、体积小、加载快 Wasm 格式字节码;

  • 对 Wasm 执行引擎进行了深度优化,并支持交易并行化等技术;

  • 结合 Tree-Shaking 等技术,进一步压缩智能合约体积。

体验(Experience)

  • 支持使用大部分现代语言特性(如移动语义及自动类型推导等);

  • 提供专有开发工具及编辑器插件辅助开发;

  • 丰富的标准库及第三方组件。

可定制(Customization)

  • 能够根据业务需求对编程模型、语言文法的进行深度定制。

  • 未来还将进一步探索如何与隐私保护、跨链协同等功能相结合。

合约示例

使用 Liquid 编写的 HelloWorld 合约如下所示:

#![cfg_attr(not(feature = "std"), no_std)]

use liquid::storage;
use liquid_lang as liquid;

#[liquid::contract]
mod hello_world {
    use super::*;

    #[liquid(storage)]
    struct HelloWorld {
        name: storage::Value<String>,
    }

    #[liquid(methods)]
    impl HelloWorld {
        pub fn new(&mut self) {
            self.name.initialize(String::from("Alice"));
        }

        pub fn get(&self) -> String {
            self.name.clone()
        }

        pub fn set(&mut self, name: String) {
            self.name.set(name)
        }
    }

    #[cfg(test)]
    mod tests {
        use super::*;

        #[test]
        fn get_works() {
            let contract = HelloWorld::new();
            assert_eq!(contract.get(), "Alice");
        }

        #[test]
        fn set_works() {
            let mut contract = HelloWorld::new();

            let new_name = String::from("Bob");
            contract.set(new_name.clone());
            assert_eq!(contract.get(), "Bob");
        }
    }
}

技术文档

阅读Liquid 在线技术文档,详细了解如何使用 Liquid。

架构设计

架构设计

社区

最小支持 Rust 版本(Minimum Supported Rust Version,MSRV)

Rust Nightly 1.52 或更高。

License

Liquid 的开源协议为 Apache License 2.0,详情请参考LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].