Which block type to use when burning via ICRC2 TransferFrom? 1burn or 2xfer

i just noticed that there’s a #BadBurn error in TransferFrom candid spec, which implies that if a spender transfers on behalf of someone to the minter account, it is considered as burning. I’m confused to which blocktype should i use? 1burn or 2xfer? I’m asking because to is not specified in 1burn but both from and to are musts in 2xfer… and if it’s 2xfer it feels weird to me because i dont specify the minter account in 1burn but now in 2xfer i have to?

Use 2xfer for icrc2_transfer_from blocks. Use for 1xfer for icrc1_transfer blocks.

Does that help?

Hmmm…this is a good question. 2xfer is going To capture the most info but won’t be tagged as a burn by everyone unless they recognize the minting account, maybe we need a 2burn? What happens on the cycle ledger in the case of a burn with transferFrom? @Severin

In the motoko libraries i think the burn will occur because it passes the item trough to icrc1…I think…not at my computer.

We don’t allow that, and we don’t even have a minting account. We do have, however, have e.g. create_canister_from, which creates a burn block with a from field

I’m not into the standards, so maybe I’m missing something obvious…

yea this was my implementation before noticing the #BadBurn error.
I think it made more sense to allow everyone but the minter to be involved in TransferFrom operation due to the 2xfer blocktype properties.

Anyway, I’m gonna revert to my old implementation. Thank you.