-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
🐛 Bug
The example body
currently shown at https://fullnode.mainnet.aptoslabs.com/v1/spec#/operations/view is completely unusable.
The reason is:
The current body
in the view section is:
{
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
}

The main issue is that it's using 0x1::aptos_coin::transfer
as the view function ID, which is incorrect.
In addition, the arguments are invalid — the type argument should be 0x1::aptos_coin::AptosCoin
or adjusted to query the balance of an FA instead.
Overall, this can easily cause confusion for developers.
Suggested Fix
In the spec file here, it's currently using EntryFunctionId, which is incorrect for a view.
It should instead define a new ViewFunctionId and update this section to use ViewFunctionId accordingly.
Expected Impact
As far as we can tell, this issue only affects the spec documentation and standard usage guides. There don't appear to be any other components that depend directly on this.