From 3d341c30ad3babbb1770819a49d968640091f4e0 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 21 Oct 2023 14:20:06 -0600 Subject: [PATCH 1/8] Update arc-0200.md Fixed typo: bytes -> byte Propose changing arc200_decimals return type to uint64 for improved compatibility with reachc that may not have uint8 type exposed to smart contract developer. --- ARCs/arc-0200.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index cee7ddc4d..f02d663e7 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -39,21 +39,21 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the name of the token", "readonly": true, "args": [], - "returns": { "type": "bytes[32]", "desc": "The name of the token" } + "returns": { "type": "byte[32]", "desc": "The name of the token" } }, { "name": "arc200_symbol", "desc": "Returns the symbol of the token", "readonly": true, "args": [], - "returns": { "type": "bytes[8]", "desc": "The symbol of the token" } + "returns": { "type": "byte[8]", "desc": "The symbol of the token" } }, { "name": "arc200_decimals", "desc": "Returns the decimals of the token", "readonly": true, "args": [], - "returns": { "type": "uint8", "desc": "The decimals of the token" } + "returns": { "type": "uint64", "desc": "The decimals of the token" } }, { "name": "arc200_totalSupply", From 13ce9a15f09d5e90d08bd2234e798313bfb49361 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sun, 22 Oct 2023 15:00:03 -0600 Subject: [PATCH 2/8] Update arc-0200.md * Update return type for transfer, transferFrom, approve --- ARCs/arc-0200.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index f02d663e7..a3176983c 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -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": "bool", "desc": "Success" } + "returns": { "type": "void" } }, { "name": "arc200_transferFrom", @@ -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": "bool", "desc": "Success" } + "returns": { "type": "void" } }, { "name": "arc200_approve", @@ -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": "bool", "desc": "Success" } + "returns": { "type": "void" } }, { "name": "arc200_allowance", From 4074609604671d021fad1b9006d24d92329c3335 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sun, 22 Oct 2023 22:03:47 -0600 Subject: [PATCH 3/8] Update arc-0200.md Describe what byte return value for non-readonly methods should be --- ARCs/arc-0200.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index a3176983c..bf34a24cb 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -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", @@ -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", @@ -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", @@ -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. From fd01edc608ac80701d2bf60bd015a318d0dfd832 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sun, 22 Oct 2023 22:08:40 -0600 Subject: [PATCH 4/8] Update arc-0200.md Describe decimals method return value --- ARCs/arc-0200.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index bf34a24cb..910029ded 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -199,6 +199,7 @@ The `arc200_Approval` event MUST be emitted when an `arc200_approve` or `arc200_ The methods `arc200_transfer` `arc200_transferFrom`, and `arc200_approve` SHOULD return byte `1` on success and byte `0` on failure. +The method `arc200_decimals` SHOULD return a value less than or greater than uint64 `256` 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. From aff6a2bba5d6a946ed7f544d6b751e58ffe65e8b Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Thu, 26 Oct 2023 10:18:48 -0600 Subject: [PATCH 5/8] Update arc-0200.md Fix description of decimals --- ARCs/arc-0200.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 910029ded..acdd3858a 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -199,7 +199,7 @@ The `arc200_Approval` event MUST be emitted when an `arc200_approve` or `arc200_ The methods `arc200_transfer` `arc200_transferFrom`, and `arc200_approve` SHOULD return byte `1` on success and byte `0` on failure. -The method `arc200_decimals` SHOULD return a value less than or greater than uint64 `256` +The method `arc200_decimals` SHOULD return a value less than or equal to uint64 `256` 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. From d218b0e20fe3d1c2d188e413d57d4766c812cc75 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 27 Oct 2023 08:43:49 -0600 Subject: [PATCH 6/8] Update arc-0200.md --- ARCs/arc-0200.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index acdd3858a..c177ab052 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -53,7 +53,7 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the decimals of the token", "readonly": true, "args": [], - "returns": { "type": "uint64", "desc": "The decimals of the token" } + "returns": { "type": "uint8", "desc": "The decimals of the token" } }, { "name": "arc200_totalSupply", @@ -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": "byte", "description": "Success" } + "returns": { "type": "bool", "description": "Success" } }, { "name": "arc200_transferFrom", @@ -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": "byte", "description": "Success" } + "returns": { "type": "bool", "description": "Success" } }, { "name": "arc200_approve", @@ -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": "byte", "description": "Success" } + "returns": { "type": "bool", "description": "Success" } }, { "name": "arc200_allowance", @@ -197,10 +197,6 @@ A `arc200_Transfer` event SHOULD be emitted, with `to` being the zero address, w 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. - -The method `arc200_decimals` SHOULD return a value less than or equal to uint64 `256` - 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. From 0909a97e0e9f2e44e105d6bcbea5f3c261de9212 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 27 Oct 2023 08:44:49 -0600 Subject: [PATCH 7/8] Update arc-0200.md --- ARCs/arc-0200.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index c177ab052..ec314df6e 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -189,8 +189,8 @@ 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 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` 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` 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. From 2b4bf40eacf730acb38a51658a32a4ede244d9dd Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 27 Oct 2023 08:46:09 -0600 Subject: [PATCH 8/8] Update arc-0200.md --- ARCs/arc-0200.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index ec314df6e..9600a60f9 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -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": "bool", "description": "Success" } + "returns": { "type": "bool", "desc": "Success" } }, { "name": "arc200_transferFrom", @@ -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": "bool", "description": "Success" } + "returns": { "type": "bool", "desc": "Success" } }, { "name": "arc200_approve", @@ -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": "bool", "description": "Success" } + "returns": { "type": "bool", "desc": "Success" } }, { "name": "arc200_allowance",