DIP20 tokens and transaction signatures

is there a function for dip20 tokens that returns a transaction log? or how can we check that a transaction has indeed gone through? Is there a way with DIP20 tokens to receive a transaction receipt for the individual token movements?

To that end, is there a way to ADD a function to a DIP20 token and retain its use across wallets and services? Assuming we write it ground up?

According to the spec anything relating to tx logs is optional. I suppose you can open a PR to the spec, but I wouldn’t expect too much. Rewriting a standard is no small feat

Once icrc2 and icrc3 are finalized I’d expect a wrapper contract for existing dip20 tokens would be very straightforward.

And because functions are Namespaced it should be super easy to add to existing tokens(you would just need to explicitly state that you only support the default subaccount).

1 Like

Hypothetically, can we add a function and redeploy?

Very interesting. A icrc1 wrap.

Of course you can always add a function to your canister. But if you want to interface with a bunch of canisters of some specific standard then you can’t expect all of them to support your extra method

1 Like

public query func getUserTransactions(who: Principal, start: Nat, limit: Nat) : async [TxRecord]

This function does not already do what I am looking for? Sorry I am new to the backend side of things

I don’t know what exactly you want to have it do. The description seems pretty clear to me. If you’re still not sure I recommend you reach out to the maintainers. I don’t have any extra information on the topic

Bless you sir this is a huge help

Do you think it would be possible to add

};

type TransferArgs = record {
from_subaccount : opt Subaccount;
to : Account;
amount : nat;
fee : opt nat;
memo : opt blob;
created_at_time : opt Timestamp;
};

To a dip20 as a function without altering the standard too much? The fear is doing this and then breaking the token.

Specificity, the Memo, this is crucial for the development of our project. Id love to hear some insites on this

We specifically added a memo of unbounded size(blob) to the the ICRC1 and ICRC2 because it was a commonly requested feature. It is up to the ledger implementation to put bounds on the size.

I’m curious why you are focusing on DIP20?

Re why DIP20: time will tell

The question remains, can I add the memo function without completely destroying the standard.

I don’t think so. The candid won’t line up and you’ll get errors. Maybe if it is nullable other tools using the standard will get defaults to null. You should try it on motoko playground. Just set up two actors and have one call the other with a partial candid reference.

Something like:

shared func x(a: nat, b: ?Nat): async ?Nat{
   return b;
};
let type service = actor {
   x : (Nat) -> ?nat;
};

shared func callx() : async ?Nat{
 
     let aservice: service = actor("deployed principal from playground");
     return await aservice.x(3);
};
2 Likes

Austin ilu im sorry I memed on you in the past

1 Like