motoko-base
motoko-base copied to clipboard
The Motoko base library
Adjusting the base library for latest Motoko RTS changes: * Also test enhanced orthogonal persistence with Wasm Memory 64. * Be prepared for the RTS dependency upgrade https://github.com/dfinity/motoko/pull/4677 and https://github.com/dfinity/motoko/pull/4683....
https://github.com/dfinity/motoko-base/blob/6f49e5f877742b79e97ef1b6f226a7f905ba795c/src/Principal.mo#L60
In some cases, one wants to profile cycles consumption of the async* function, and it will be convenient to have the out-of-box function for that, just like it is for...
Hi, It seems two added functions are causing warnings, today upgraded to latest version of both dfx (motoko) and base and I can't do anything to solve these warnings. ![Screenshot...
Since there is now Principal.toLedgerAccount the other most common functions are **toSubaccount** https://github.com/infu/minimal_swap/blob/215217d41d91635a4e4562887ffa37a1e12c339a/swap.mo#L44 https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp#gear-fromprincipal Used by almost every tokenized canister **toICRC1Text** https://github.com/NatLabs/icrc1/blob/0800c7ac03026a4c5a72eeb357cbbd0aca2f0fb4/src/ICRC1/Account.mo#L83 Will be useful for converting Account to Text...
containing, for example `VarArray.take`, `VarArray.filter` etc.
Since we have similar functions for other collection types.
https://github.com/dfinity/motoko-base/blob/8028da2d691151a3202d7539b5828a7a381f40c6/src/Principal.mo#L80 It is a little weird if the base library itself uses deprecated functions because it produces compiler warnings that the user cannot do anything about. Shall we inline the...
I came up with these: ``` Motoko type Comp = { #less; #equal; #greater }; // Comparison combinators public func compare2(ca : (A, A) -> Comp, cb : (B, B)...