| Crates.io | glin-contracts |
| lib.rs | glin-contracts |
| version | 0.1.4 |
| created_at | 2025-10-05 04:27:07.766493+00 |
| updated_at | 2025-10-10 14:49:25.61293+00 |
| description | Contract metadata, deployment, and interaction utilities for GLIN Network |
| homepage | https://docs.glin.ai/sdk/rust/setup |
| repository | https://github.com/glin-ai/glin-sdk-rust |
| max_upload_size | |
| id | 1868607 |
| size | 160,911 |
This crate provides comprehensive tools for working with ink! smart contracts on GLIN Network:
Add this to your Cargo.toml:
[dependencies]
glin-contracts = "0.1.0"
glin-client = "0.1.0"
tokio = { version = "1", features = ["full"] }
use glin_client::{create_client, get_dev_account};
use glin_contracts::{deploy_contract, call_contract};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Connect to network
let client = create_client("ws://localhost:9944").await?;
let signer = get_dev_account("alice")?;
// Deploy contract
let result = deploy_contract(
&client,
&signer,
"path/to/contract.contract",
vec![], // constructor args
0, // value
).await?;
println!("Contract deployed at: {}", result.contract_address);
// Call contract method
call_contract(
&client,
&signer,
&result.contract_address,
"transfer",
vec![], // method args
0, // value
).await?;
Ok(())
}
This crate works with ink! contract metadata format (.contract files), which includes:
This crate is part of the GLIN SDK for Rust, providing complete blockchain interaction capabilities for GLIN Network.
glin-types - Shared type definitionsglin-client - Network connection and RPC operationsFor full SDK documentation, contract examples, and deployment guides, see the main repository.
Apache-2.0