Registry / crypto / ink-lang

ink-lang

JSON →
library3.4.0rscratesunverified

An eDSL for writing smart contracts in Rust for Substrate-based blockchains.

# Cargo.toml [dependencies] ink_lang = "3.4.0"
INSTALL
IMPORT
SIG · INK-LANG
I
ink-lang
cryptorustv3.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

contract
use ink_lang::contract;

Defines a simple ink! smart contract.

use ink_lang::contract; #[contract] mod my_contract { #[ink(storage)] pub struct MyContract { value: i32, } impl MyContract { #[ink(constructor)] pub fn new(init_value: i32) -> Self { Self { value: init_value } } #[ink(message)] pub fn get(&self) -> i32 { self.value } } }
Debug
Known issues
gotchaRequires specific nightly Rust toolchain and wasm target
fix
Use `rustup target add wasm32-unknown-unknown` and a compatible nightly
affects: >=3.0.0
Upgrade
Version history
3.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
ink-lang — cargo add ink-lang · libregistry