Open bogwar opened 2 months ago
One last comment, not sure what the correct method name should be.
On ICRC-37 we have icrc37_get_token_approvals
and icrc37_get_collection_approvals
(since we have approvals either per token or the whole collection). That would mean that the method name in ICRC-103 along those lines would be icrc103_get_approvals
.
Where there's two differences:
One last comment, not sure what the correct method name should be.
On ICRC-37 we have
icrc37_get_token_approvals
andicrc37_get_collection_approvals
(since we have approvals either per token or the whole collection). That would mean that the method name in ICRC-103 along those lines would beicrc103_get_approvals
.Where there's two differences:
- "approvals" instead of "allowances", which makes sense since the ICRC-2 allowance method returns the allowance (nat) while this ICRC-103 returns (a list of) the whole approval that includes the allowance among other details like from/to and expiry.
- "get" instead of "list", this is a nitpick, no idea which one of the two would be most consistent across existing ICRC standards, probably requires checking existing ICRC standards in depth to pick one or the other.
For NFTs, approvals is appropriate because there is no partial transfer so you list outstanding approvals. For fungible tokens allowance seems more suitable because you don't list the original approvals but rather whatever is left to be transferred because some partial transfer_from
may have occurred... so that's more of an allowance.
I don't have strong feelings about get or list so I'm happy to go with get for consistency. WDYT?
For NFTs, approvals is appropriate because there is no partial transfer so you list outstanding approvals. For fungible tokens allowance seems more suitable because you don't list the original approvals but rather whatever is left to be transferred because some partial
transfer_from
may have occurred... so that's more of an allowance. I don't have strong feelings about get or list so I'm happy to go with get for consistency. WDYT?
Makes completely sense, also in ICRC-2 there's the allowance method while in ICRC-37 there's the is approved method. So to keep it consistent along those lines, allowances is indeed the better option.
Just double checked most ICRC standards, can't find any method at first glance that use "list" in the method name, so let's go with "get".
This is a draft for a standard to list existing allowances