Skip to content

Commit

Permalink
Update arc-0200.md
Browse files Browse the repository at this point in the history
Describe what byte return value for non-readonly methods should be
  • Loading branch information
temptemp3 authored Oct 23, 2023
1 parent 13ce9a1 commit 4074609
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ARCs/arc-0200.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ A smart contract token that is compliant with this standard MUST implement the f
"desc": "Amount of tokens to transfer"
}
],
"returns": { "type": "void" }
"returns": { "type": "byte", "description": "Success" }
},
{
"name": "arc200_transferFrom",
Expand All @@ -117,7 +117,7 @@ A smart contract token that is compliant with this standard MUST implement the f
"desc": "Amount of tokens to transfer"
}
],
"returns": { "type": "void" }
"returns": { "type": "byte", "description": "Success" }
},
{
"name": "arc200_approve",
Expand All @@ -127,7 +127,7 @@ A smart contract token that is compliant with this standard MUST implement the f
{ "type": "address", "name": "spender" },
{ "type": "uint256", "name": "value" }
],
"returns": { "type": "void" }
"returns": { "type": "byte", "description": "Success" }
},
{
"name": "arc200_allowance",
Expand Down Expand Up @@ -189,14 +189,17 @@ A smart contract token that is compliant with this standard MUST implement the f

Ownership of a token by a zero address indicates that a token is out of circulation indefinitely, or otherwise burned or destroyed.

The methods `arc200_transfer` and `arc200_transferFrom` method MUST error when the balance of `from` is insufficient. In the case of the `arc200_transfer` method, from is implied as the `owner` of the token.
The `arc200_transferFrom` method MUST error unless called by an `spender` approved by an `owner`.
The methods `arc200_transfer` and `arc200_transferFrom` method MAY error when the balance of `from` is insufficient. In the case of the `arc200_transfer` method, from is implied as the `owner` of the token.
The `arc200_transferFrom` method MAY error unless called by an `spender` approved by an `owner`.
The methods `arc200_transfer` and `arc200_transferFrom` MUST emit a `Transfer` event.
A `arc200_Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted.
A `arc200_Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed.

The `arc200_Approval` event MUST be emitted when an `arc200_approve` or `arc200_transferFrom` method is called successfully.

The methods `arc200_transfer` `arc200_transferFrom`, and `arc200_approve` SHOULD return byte `1` on success and byte `0` on failure.


A value of zero for the `arc200_approve` method and the `arc200_Approval` event indicates no approval.
The `arc200_transferFrom` method and the `arc200_Approval` event indicates the approval value after it is decremented.

Expand Down

0 comments on commit 4074609

Please sign in to comment.