ddd009

ddd009

twitter

iCAN:最容易使用的容器管理平台

iCAN:最易於使用的容器管理平台#

什麼是 iCAN?-- IC 上最易於使用的 Canister 管理平台。

背景#

  1. 目前,開發者只能通過 NNS 錢包和 DFX 命令行來管理他們的容器。

  2. NNS 錢包僅顯示有關 Canister 的基本信息。並且開發者不能輕易使用 NNS 錢包管理 Canister。只有 Canister id 沒有其他信息,使得開發者無法方便地使用 NNS 錢包管理自己的 canister。

  3. 難以通過 DFX CLI 管理容器狀態。

介紹#

使用 UI 界面來方便的部署和管理您的 CANISTERS

  1. iCAN = IC + Canister。它是一個基於 IC 的鏈上 Canister 管理工具。

  2. iCAN 幫助開發者通過圖形界面管理 Canister,創建合約、下載 WebAssembly 模塊、管理 Canister 狀態指標等。

iCan

功能#

  1. 精細化管理

    a.Canister 設置的動態更改

    b. 更方便的容器管理

    c.Canister 的詳細描述

  2. 狀態檢測

    a. 支持直接使用 ICP 向充值 Canister,直接將 Cycles 存入 Canister

    b. 及時反饋 Canister 狀態,讓開發者了解 Canister 當前狀態並及時管理

  3. 創建和刪除

    a. 圖形化的 Canister 管理界面

    b. 能夠創建和刪除 Canister,並自動取回 Cycles

  4. 支持導入

    將之前創建的 Canisters 導入您自己的 hub。

  5. WebAssembly 控制

    下載最新的 WebAssembly 文件

優勢#

iCAN 開發者平台幫助開發者管理 Canister。未來的目標是成為 IC 上的全面的合約管理平台。

  1. 在隨機子網中創建管理 Hub

    通過在隨機子網中創建的 Hub,您可以選擇要創建 Canister 的子網。

  2. 便捷管理

    您可以命名 Canister、標記它們或給它們一個描述,以便您可以方便地管理它們。

  3. 無信任管理

    Hub Canister 僅由您自己控制,它支持無需信任的托管服務。

架構圖#

iCAN 的工作原理

API#

介紹 iCAN Canister 和 Hub Canister 的公共接口。

類型

    module{
        public type Error = {
            #Invalid_Caller;
            #Invalid_CanisterId;
            #No_Wasm;
            #No_Record;
            #Insufficient_Cycles;
            #Ledger_Transfer_Failed : Nat; // value : log id
            #Create_Canister_Failed : Nat;
        };
        public type Canister = {
            name : Text;
            description : Text;
            canister_id : Principal;
            wasm : ?[Nat8];
        };
        public type Status = {
            cycle_balance : Nat;
            memory : Nat;
        };
        public type UpdateSettingsArgs = {
            canister_id : Principal;
            settings : canister_settings
        };
        public type TransformArgs = {
            icp_amount : Nat64; // e8s
            to_canister_id : Principal
        };
        public type DeployArgs = {
            name : Text;
            description : Text;
            settings : ?canister_settings;
            deploy_arguments : ?[Nat8];
            wasm : ?[Nat8];
            cycle_amount : Nat;
            preserve_wasm : Bool;
        };
        public type canister_settings = {
            freezing_threshold : ?Nat;
            controllers : ?[Principal];
            memory_allocation : ?Nat;
            compute_allocation : ?Nat;
        };
    };

iCAN Canister

iCAN Canister 用於創建管理中心。

    // iCAN Canister Public Service Interface
    public type iCAN = actor{
        // get your own hubs' info (call this function use your identity)
        // @return array of (Hub Name, Hub Canister Id)
        getHub : query () -> async [(Text, Principal)];
        // get current hub wasm and cycle withdraw wasm in use
        // @return (hub wasm, cycle withdraw wasm)
        getWasms : query () -> async ([Nat8], [Nat8]);
        // get administrators of ican at present
        // @return array of administrators
        getAdministrators : query () -> async [Principal];
        // create canister management hub
        // @param name : hub name
        // @param amount : icp e8s amount
        createHub : (name : Text, amount : Nat64) -> async Result.Result<Principal, Error>;
        // add hub info to your hubs
        // @param name : hub name
        // @param hub_id : hub canister principal
        addHub : (name : Text, hub_id : Principal) -> async Text;
        // delete hub from your hub set
        deleteHub : (hub_id : Principal) -> async Result.Result<(), Error>;
        // transform icp to cycles and deposit the cycles to target cansiter
        transformIcp : (args : TransformArgs) -> async Result.Result<(), Error>;
    };

Hub Canister

Hub Canister 是用戶部署的個人管理 Canister。

    public type Hub = actor{
        // get current version hub canister's wasm
        // @return Wasm Version
        getVersion : query() -> async Nat;
        // get owners of this hub canister
        // @return owners array
        getOwners : query() -> async [Principal];
        // get status of hub canister ( owner only )
        getStatus : query() -> async Result.Result<Status, Error>;
        // get canisters managed by this hub ( owner only )
        getCanisters : query() -> async Result.Result<[Canister], Error>;
        // get wasm of specified canister ( owner only )
        getWasm : query (canister_id : Principal) -> async Result.Result<[Nat8], Error>;
        // put canister into hub ( not matter if not controlled by hub canister ) ( owner only )
        // @param c : should be put into hub canister
        putCanister : (c : Canister) -> async Result.Result<(), Error>;
        // deploy canister by hub canister  ( owner only )
        // @return #ok(new canister's principal) or #err(Error)
        deployCanister : (args : DeployArgs) -> async Result.Result<Principal, Error>;
        // update canister settings  ( owner only )
        updateCanisterSettings : (args : UpdateSettingsArgs) -> async Result.Result<(), Error>;
        // start the specify canister, which should be controlled by hub canister  ( owner only )
        // @param principal : target canister's principal
        startCanister : (principal : Principal) -> async Result.Result<(), Error>;
        // stop canister ( owner only )
        // @param principal : target canister's principal
        stopCanister : (principal : Principal) -> async Result.Result<(), Error>;
        // deposit cycles to target canister ( equal to top up to target canister)
        // @param id : target canister principal, cycle amount : how much cycles should be top up
        depositCycles(id : Principal, cycle_amount : Nat, ) : async Result.Result<(), Error>;
        // delete canister from hub canister and withdraw cycles from it ( owner only )
        // @param canister's principal
        delCanister : ( id : Principal ) -> async Result.Result<(), Error>;
        // install cycle wasm to hub canister ( owner only )
        // @param wasm : cycle wasm blob (you can deploy your own cycle wasm to your hub canister)
        installCycleWasm : (wasm : [Nat8]) -> async Result.Result<(), Error>;
        // change hub owner ( owner only )
        // @param : new owners array
        changeOwner : (newOwners : [Principal]) -> async Result.Result<(), Error>;
    };

路線圖#

2022Q2 MVP 發布。

2022Q3全面支持當前的 Canister 管理。

  1. 導入之前創建的容器

  2. 支持部署 Actor Class Canister

  3. 支持向 Hub Canister 添加更多管理員(支持團隊合作)

  4. 開源 iCAN 並交給社區 DAO

支持一鍵創建特定類型的 Canister(asset canisters, NFT canisters)並上傳前端 assets。

2022Q4 上線日誌管理平台。支持數據恢復。

2022Q4-2023成為 IC 的最佳 Canister 管理平台和開發者基礎設施。

團隊#

Mixlabs 是由亞洲頂尖大學和社區開發者組成的區塊鏈方向前沿技術實驗室。主要從事區塊鏈方向的前沿技術研究、孵化和生態支持。

快來加入我們吧!

網站:icantool.app

推特:@iCAN_DAPP

電子郵件:team@icantool.app

https://embed.0xecho.com.ipns.page/?color-theme=light&desc=hello%20world&has-h-padding=true&has-v-padding=true&modules=like%2Cdislike%2Ctip%2Ccomment&receiver=ddd009.eth&target_uri=https%3A%2F%2Fmirror.xyz%2Fddd009.eth%2F7ukjsRePZ3lOFt9L-nJ6rmRtKsaXWZtaEwFV8WGxJqU&height=800&display=iframe

載入中......