Designed for rapid iteration in IC Canister development projects.

Overview

IC_Utils

Designed for rapid iteration in IC Canister development projects.

IcContext

IcContext provides the context for ic canister object invocation, which is used to store the object type and facilitate the user to store and call the object data in canister.

let tll = context::get_mut::<VecDeque<SwapOrder>>();

In this example, an empty VecDeque of type VecDeque is returned if no object of type VecDeque exists in the context, or a stored object if one exists. The returned object is actually a mutable reference, and any user edits to the reference will modify the object.

NatUtils

nat_utils is used for rapidly generating Nat types as natural numbers and performing mutual conversions between different types.

 fstr_to_nat("3.1231313",1_000_000_000_000_000_000f64);

In this example, we are converting numeric characters of type 'str' into Nat numbers with 18-digit precision.

Guard

The tool supports locking operations requested to canister to prevent anomalies caused by data reentry.

//Add Exclusion Lock
let guard = CallerGuard::new(id().clone());
    if guard.is_err() {
    panic!("{}",guard.err().unwrap());
}

Throws

The throws utility class is used to handle exceptions when called, throwing panic when the received instance is an exception and returning data results when normal.

//Exception handling when creating a canister
let (cid, ) = throw(create_canister(CreateCanisterArgument {
        settings: Some(CanisterSettings {
            controllers: Some(vec![id()]),
            compute_allocation: None,
            memory_allocation: None,
            freezing_threshold: None,
        })
    }, 500000000000).await.map_err(|e| "Create Pool failed:".to_string() + &*e.1));
You might also like...
Local blockchain for Free TON DApp development and testing.

TON OS Startup Edition Local blockchain for Free TON DApp development and testing. Have a question? Get quick help in our channel: TON OS Startup Edit

This is the Repo used to learn blockchain development in conjusction with the CyberGen NFT Project.

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

Unified directories for different use cases of an application, providing standard directories for local development, when run as service or when run by a user.

UniDirs Unified directories for different use cases of an application, providing standard directories for local development, when run as service or wh

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

foundry Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust. Foundry consists of: Forge: Ethe

Compiler development environment.

compiler-dev 北大编译实践教学用编译器开发环境 (Compiler Development Environment). 该仓库的内容将被打包为 Docker 镜像, 所以不建议直接使用该仓库, 具体使用方法见使用方法一节. 使用方法 WIP. 镜像中包含的内容 必要的工具: git, f

Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain
Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

A secure development tool box and fintech application made with Rust to be used for developing cryptocurrencies on the blockchain.

Crypto Fintech Tools for Rust (CFT) Dependencies Rust MacOS Homebrew # xcode cli tools xcode-select --install # install dependencies using Homebrew b

Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

Beaker helps simplify CosmWasm development workflow.
Beaker helps simplify CosmWasm development workflow.

Beaker Beaker makes it easy to scaffold a new cosmwasm app, with all of the dependencies for osmosis hooked up, interactive console, and a sample fron

Owner
AlphaQ
AlphaQ
Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer.

JWT Issuer Proof of Concept Overview Simple PoC to issue JSON Web Tokens (JWTs) with a canister on the Internet Computer. It allows the issuance of tw

Dominic Wörner 7 Oct 13, 2022
React Native (Expo) + JWT Authentication + Rust ICP canister

React Native (Expo) app with JWT Authentication and IC Rust canister This is a Proof-of-Concept React Native Expo mobile application that uses JSON We

Luca Bertelli 5 May 2, 2024
Rapid, reliable and robust template management

Rapid, reliable and robust template management

null 14 Apr 16, 2022
A template for AVR executable (non-library) projects

Rust AVR executable template A template for Rust based AVR executables. NOTE: This software template repository is offered in the public domain. It is

The AVR-Rust project 16 Sep 18, 2022
Crib - Extensible, Minimal Template for Sway Projects

crib • Extensible, Minimal Template for Sway Projects. Developing First Time? New to rust? Install with: curl --proto '=https' --tlsv1.2 -sSf https://

velleity.eth 17 Jul 31, 2022
Extensible, Minimal Template for Sway Projects

crib • Extensible, Minimal Template for Sway Projects. Developing First Time? New to rust? Install with: curl --proto '=https' --tlsv1.2 -sSf https://

andreas 17 Jul 31, 2022
Template for multi-contract CosmWasm projects

CosmWasm Template Template for multi-contract CosmWasm projects How to Use Install cargo-make: cargo install --force cargo-make Run formatter: cargo m

null 11 Jan 28, 2023
A template for developing Rust projects, with sensible defaults

Rust Template A template for developing Rust projects, with sensible defaults. Getting Started Click the Use this template button at the top of the pa

Paul Razvan Berg 39 Feb 22, 2023
Utilities for working with native solc and compiling projects.

foundry-compilers Utilities for working with native solc and compiling projects. To also compile contracts during cargo build (so that ethers abigen!

Foundry 9 Oct 4, 2023
A Software Development Kit (SDK) for Zero-Knowledge Transactions

Aleo SDK The Aleo SDK is a developer framework to make it simple to create a new account, craft a transaction, and broadcast it to the network. Table

Aleo 270 Jan 5, 2023