Proto/CLST: fix get_total_supply view
To comply with the FA2.1 standard, the get_total_supply view should accept a token_id as input, and if the token_id does not exist, it should return zero.
Manually testing the MR
dune exec src/proto_alpha/lib_protocol/test/integration/main.exe -- --file test_clst.ml -m "get_total_supply view" or in sandbox:
octez-client run view get_total_supply on contract KT1WCsbJx996ebZfutAitHYsZ8FUZFsTdaD7 with input "0"
300000000000
octez-client run view get_total_supply on contract KT1WCsbJx996ebZfutAitHYsZ8FUZFsTdaD7 with input "1"
0
Checklist
- Document the interface of any function added or modified (see the coding guidelines)
- Document any change to the user interface, including configuration parameters (see node configuration)
- Provide automatic testing (see the testing guide).
-
For new features and bug fixes, add an item in the appropriate changelog (
docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the
Reviewersfield below. -
Select as
Assigneethe next person who should take action on that MR
Edited by Marina Polubelova