Closed patricoferris closed 1 year ago
The amount is just the number of tokens. The token unit is arbitrary, and we get to make that.
I don't think we want to rename the amount field, as it's been clear that the FA2 contract has to be a standard FA2 contract so that it interoperates with other FA2 compatible views, and there the standard parameter is "amount" as per TZIP-12.
We could rename it in retire, but then it looks odd against the other fields in the contract.
The custodian contract we could make grams, and I have no strong opinion on that (work wise it's just a find and replace), but I'd dislike that the custodian retire method has a different signature from the FA2 contract personally, but I don't really mind.
This, as pointed out, is more of a client deciding what it means rather than doing anything specifically in the backend/contracts.
Currently whenever we retire offsets, we specify an
amount
to retire. This is some natural number. At the moment it would seem most of us were under the assumption this represented one tonne, but this would mean we couldn't offset smaller amounts (e.g. LHR-BFS is 113.86kg (0.11368 tonnes)).The suggestion is that the
amount
should actually reference grams rather than tonnes. From the michelson docs:I'm not knowledgable enough to comment on the implications of our amounts all shifting to the left by 6 digits, but hopefully that's not an issue. If we go for this we should:
amount
should maybe becomeamount_grams
The last thing we want to do is under-retire because of a programming error!