Announcing "Token Standard" as topic of the first meeting of the Ledger & Tokenization Working Group

Dear WG members!

Due to holiday season and multiple core contributors not being available, we decided to cancel today’s meeting of 2023-08-08.

1 Like

Good Morning,

Just a quick heads up - anyone who uses the Dfinity icrc-ledger-types package (https://github.com/dfinity/ic/tree/master/packages/icrc-ledger-types) will get an error if they upgrade to candid 0.9.0+

Breaking changes to candid::Func creates an error in icrc3/archive.rs (code below)

impl<Input: CandidType, Output: CandidType> CandidType for QueryArchiveFn<Input, Output> {
    fn _ty() -> candid::types::Type {
        candid::types::Type::Func(candid::types::Function {
            modes: vec![candid::parser::types::FuncMode::Query],
            args: vec![Input::_ty()],
            rets: vec![Output::_ty()],
        })
    }

    fn idl_serialize<S>(&self, serializer: S) -> Result<(), S::Error>
    where
        S: candid::types::Serializer,
    {
        candid::types::reference::Func::from(self.clone()).idl_serialize(serializer)
    }
}

I’ve been using this library to call SNS ICRC canisters. I’m trying to get composite queries to work so need candid 0.9.0… does anyone know how to update the code above to use the define_function! as per candid release notes? (https://github.com/dfinity/candid/blob/master/Changelog.md#2023-06-30-rust-090)

My rust skills are still in development!

Thanks,

Nathan

Does ICRC-1 explicitly allow or disallow a transfer of amount 0?

EDIT: I tested the ICRC-1 interface of the ICP ledger and it does allow it (just like the legacy interface of the ICP ledger always did).

Hey Nathan,
I would advise you to wait a bit until upgrading candid to version 0.9.+. But if you really want to use a recent candid version here are the required changes:

impl<Input: CandidType, Output: CandidType> CandidType for QueryArchiveFn<Input, Output> {
    fn _ty() -> candid::types::Type {
        candid::types::internal::TypeInner::Func(candid::types::internal::Function {
            modes: vec![candid::types::internal::FuncMode::Query],
            args: vec![Input::_ty()],
            rets: vec![Output::_ty()],
        })
        .into()
    }

    fn idl_serialize<S>(&self, serializer: S) -> Result<(), S::Error>
    where
        S: candid::types::Serializer,
    {
        candid::types::reference::Func::from(self.clone()).idl_serialize(serializer)
    }
}


candid::define_function!(pub QueryBlockArchiveFn : (GetBlocksRequest) -> (BlockRange) query);
candid::define_function!(pub QueryTxArchiveFn : (GetTransactionsRequest) -> (TransactionRange) query);

Thank you! Am I right in thinking I’ll need candid 0.9 to do composite queries?

It’s not a deal breaker but would make things a bit quicker for users.

I looked at the candid crate and it seems that indeed you’ll need candid 0.9 for composite queries.

1 Like

Hey @dieter.sommer is there a meeting going on now? There is one scheduled on the calendar. Is there a different calendar or did the schedule change?

Hey Levi,

It seems that has been an issue with the WG meeting yesterday. I apologize for that and I’ll make sure it won’t happen again.

The next meeting will be the 19th of September. We will use the zoom link that is part of the existing calendar entries.

Dear working group members!

Here is the proposed agenda for the ledger and tokenization WG meeting on Tuesday, September 19, 2023. See the working group calendars (Google Calendar , calendar browser link ) for details and dial-in information.

Agenda

  • ICRC-3: A standard for accessing the transaction log

Slides

Specifically, we want to

  • try to wrap ICRC-3 up and go towards voting. There have been some issues still open before we can vote on this.

See you later!

Please find the recording and minutes of the WG Meeting of August 22, 2023 linked below:
Recording
Minutes

You can find all the recordings, chats, and slides of all meetings here:
All files of all meetings

Please find the slides, recording, and minutes of the WG Meeting of September 19, 2023 linked below:
Recording
Slides
Minutes

You can find all the recordings, chats, and slides of all meetings here:
All files of all meetings

Are there any wallets yet that support arbitrary ICRC-1 subaccounts (not just the default subaccount)?

Bitfinity Wallet supports ICRC-1 subaccounts

1 Like

I see, as far as I can tell it supports sending to arbitrary subaccounts but not receiving, i.e. handling own non-default subaccounts.

Yes, sending to a subaccount is supported, AFAIK there are no other wallets supporting subaccount transfers atm. You have to handle subaccount transfers at your end using encode&decodeICRCAccount

Ok. I was hoping to be able to compare UIs to manage own subaccounts. But then I’m glad if our wallet here brings something new to the table (besides being open source): https://forum.dfinity.org/t/announcement-a-full-featured-open-source-icrc-1-wallet
Hope people will find it useful to play around with subaccounts.

1 Like

Quick question - does ICRC-2 change the type of transactions that are returned from the ckBTC ledger?

At the moment I’ve got a canister indexing ckBTC transactions. This canister pulls transactions from the “get_transactions” endpoint and sorts them as Mint, Burn, Transfer before doing some other calculations. Will the canister find something other than Mint, Burn, or Transfer returned from the ICRC-2 version of ckBTC ‘get_transactions’ endpoint?

I’m also working on a wallet (React Native) for web/ios/android that will soon be open sourced once I’ve finished the remaining details and cleaned up some code: https://etk52-fqaaa-aaaak-ae4ca-cai.icp0.io

1 Like

It looks really nice. Looking forward to it being open sourced. We need more open code for wallets that people can experiment with, learn from and fork.

You may want to look here: https://github.com/dfinity/ICRC-1/tree/icrc-3/standards/ICRC-3#icrc2_approve-schema

I would imagine that icrc 3 will get a new endpoint, so maybe get_transactions will stay untouched…but I think that there will end up being an approve transaction added. For OGY when we added a DIP20 pass-through, approves would come through as a 0 amount transaction.(example: Internet Computer Loading). Since zero transactions are otherwise not allowed we can identify them. Unfortunately, the approved amount is masked from the ledger and that data is held in the passthrough canister.

1 Like