Skip to content

furblood0/Motoko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Simple To-do Project

Canister ID: mkv5r-3aaaa-aaaab-qabsq-cai

import Nat "mo:base/Nat"; import Nat64 "mo:base/Nat64"; import Cycles "mo:base/ExperimentalCycles"; //gas fee(cycle)

//canister actor HelloCycles{ //let (immutable) //var (mutable) let limit = 10_000_000;

//fonksiyonlar(query,update)

public func wallet_balance(): async Nat { Cycles.balance(); };

public func wallet_receive() : async {accepted: Nat64}{ let available = Cycles.available(); let accepted = Cycles.accept(Nat.min(available,limit)); {accepted = Nat64.fromNat(accepted)} };

public func transfer( receiver: shared() -> async (), amount: Nat): async { refunded : Nat } { Cycles.add(amount); await receiver(); { refunded = Cycles.refunded() }; }; };

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published