From fae2f7ae5fd39c8eff4f1f45407f440068683861 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 3 Jul 2023 18:28:28 -0600 Subject: [PATCH 01/38] ARC-0200 draft --- ARCs/arc-0200.md | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 ARCs/arc-0200.md diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md new file mode 100644 index 000000000..f1f423412 --- /dev/null +++ b/ARCs/arc-0200.md @@ -0,0 +1,226 @@ +--- +arc: 200 +title: Algorand Smart Contract Token Specification +description: Base specification for tokens implemented as smart contracts +author: Nicholas Shellabarger (@temptemp3) +discussions-to: +status: Draft +type: Standards Track +category: Interface +created: 2023-07-03 +requires: 3, 4, 22, 28 +--- + +# Algorand Smart Contract Token Specification + +## Abstract + +This specifies an interface for tokens to be implemented on Algorand as smart contracts. +This interface defines a minimal interface for tokens to be held and transfered, to be augmented by other standard interfaces and custom methods. + + +## Motivation + +Currently most tokens in the Algorand ecosystem are implemented as ASAs. +However, to provide rich extra functionality, it can be desireable to implement tokens as a smart contract instead. +To foster an interoperable token ecosystem, it is necessary that the core interfaces for tokens be standardized. + + +## Specification +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in RFC-2119. + + +### Core Token specification + +A smart contract token that is compliant with this standard MUST implement the following interface: + +```json +{ + "name": "ARC-200", + "desc": "Smart Contract Token Base Interface", + "methods": [ + { + "name": "name", + "desc": "Returns the name of the token", + "readonly": true, + "args": [], + "returns": { "type": "bytes[32]", "desc": "The name of the token" } + }, + { + "name": "symbol", + "desc": "Returns the symbol of the token", + "readonly": true, + "args": [], + "returns": { "type": "bytes[8]", "desc": "The symbol of the token" } + }, + { + "name": "decimals", + "desc": "Returns the decimals of the token", + "readonly": true, + "args": [], + "returns": { "type": "uint8", "desc": "The decimals of the token" } + }, + { + "name": "totalSupply", + "desc": "Returns the total supply of the token", + "readonly": true, + "args": [], + "returns": { "type": "uint64", "desc": "The total supply of the token" } + }, + { + "name": "balanceOf", + "desc": "Returns the current balance of the owner the token", + "readonly": true, + "args": [ + { + "type": "address", + "name": "owner", + "desc": "The address of the owner of the token" + }, + ], + "returns": { "type": "address", "desc": "The current balance of the holder of the token" } + }, + { + "name": "transfer", + "desc": "Transfers tokens", + "readonly": false, + "args": [ + { + "type": "address", + "name": "to", + "desc": "The destination of the transfer" + }, + ], + "returns": { "type": "bool", "desc": "Success" } + }, + { + "name": "transferFrom", + "desc": "Transfers tokens from source to destination as approved spender", + "readonly": false, + "args": [ + { "type": "address", "name": "from" }, + { "type": "address", "name": "to" }, + ], + "returns": { "type": "bool", "desc": "Success" } + }, + { + "name": "approve", + "desc": "Approve spender for a token", + "readonly": false, + "args": [ + { "type": "address", "name": "spender" }, + { "type": "uint64", "name": "value" }, + ], + "returns": { "type": "bool", "desc": "Success" } + }, + { + "name": "allowance", + "desc": "Returns the current allowance of the spender of the tokens of the owner", + "readonly": true, + "args": [ + { "type": "address", "name": "owner" }, + { "type": "address", "name": "spender" } + ], + "returns": { "type": "uint64", "desc": "The remaining allowance" } + } + ], + "events": [ + { + "name": "Transfer", + "desc": "Transfer of tokens", + "args": [ + { + "type": "address", + "name": "from", + "desc": "The source of transfer of tokens" + }, + { + "type": "address", + "name": "to", + "desc": "The destination of transfer of tokens" + }, + { + "type": "uint64", + "name": "value", + "desc": "The amount of tokens transfered" + }, + { + "type": "uint64", + "name": "timestamp", + "desc": "Network seconds when tokens were transfered" + }, + ] + }, + { + "name": "Approval", + "desc": "Approval of tokens", + "args": [ + { + "type": "address", + "name": "owner", + "desc": "The owner of the tokens" + }, + { + "type": "address", + "name": "spender", + "desc": "The approved spender of tokens" + }, + { + "type": "uint64", + "name": "value", + "desc": "The amount of tokens approve" + }, + { + "type": "uint64", + "name": "timestamp", + "desc": "Network seconds when tokens were approved" + }, + ] + } + ] +} +``` + +Ownership of a token by a zero address indicates that a token is out of circulation indefinately. + +The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. +The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. +The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. +A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is first minted. +A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. + +The `Approval` event MUST be emitted when the `approve` method is called successfully. + +A value of zero for the `approve` method and the `Approval` event indicate no approval. +When a `Transfer` event emits following the `transferFrom` method, this may also indicates that the approved value for the token is decremented. . +The contract MUST allow multiple operators per owner. + +All methods in this standard that are marked as `readonly` MUST be read-only as defined by [ARC-22](./arc-0022.md). + +## Rationale + +This specification is based on ERC-20, with some differences. + +### Core Specification + +The core specification differs from ERC-20 by: + +* Transfer and Approval events contain an extra argument, namely timestamp + +## Backwards Compatibility + +This standard introduces a new kind of token that is incompatible with tokens defined as ASAs. +Applications that want to index, manage, or view tokens on Algorand will need to handle these new smart tokens as well as the already popular ASA implementation of tokens will need to add code to handle both, and existing smart contracts that handle ASA-based tokens will not work with these new smart contract tokens. + +While this is a severe backwards incompatibility, smart contract tokens are necessary to provide richer and more diverse functionality for tokens. + + +## Security Considerations + +The fact that anybody can create a new implementation of a smart contract tokens standard opens the door for many of those implementations to contain security bugs. +Additionally, malicious tokens implementations could contain hidden anti-features unexpected by users. +As with other smart contract domains, it is difficult for users to verify or understand security properties of smart contract tokens. +This is a tradeoff compared with ASA tokens, which share a smaller set of security properties that are easier to validate, to gain the possibility of adding novel features. + +## Copyright +Copyright and related rights waived via CCO. From 57fd90002edbc9498b0449534879d9d5be39890c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Tue, 4 Jul 2023 09:08:46 +0200 Subject: [PATCH 02/38] fix: Typo + add:discussion-to --- ARCs/arc-0200.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index f1f423412..7f7036241 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -3,7 +3,7 @@ arc: 200 title: Algorand Smart Contract Token Specification description: Base specification for tokens implemented as smart contracts author: Nicholas Shellabarger (@temptemp3) -discussions-to: +discussions-to: https://github.com/algorandfoundation/ARCs/issues/223 status: Draft type: Standards Track category: Interface @@ -16,13 +16,13 @@ requires: 3, 4, 22, 28 ## Abstract This specifies an interface for tokens to be implemented on Algorand as smart contracts. -This interface defines a minimal interface for tokens to be held and transfered, to be augmented by other standard interfaces and custom methods. +This interface defines a minimal interface for tokens to be held and transferred, to be augmented by other standard interfaces and custom methods. ## Motivation -Currently most tokens in the Algorand ecosystem are implemented as ASAs. -However, to provide rich extra functionality, it can be desireable to implement tokens as a smart contract instead. +Currently, most tokens in the Algorand ecosystem are implemented as ASAs. +However, to provide rich extra functionality, it can be desirable to implement tokens as a smart contract instead. To foster an interoperable token ecosystem, it is necessary that the core interfaces for tokens be standardized. @@ -69,7 +69,7 @@ A smart contract token that is compliant with this standard MUST implement the f }, { "name": "balanceOf", - "desc": "Returns the current balance of the owner the token", + "desc": "Returns the current balance of the owner of the token", "readonly": true, "args": [ { @@ -142,12 +142,12 @@ A smart contract token that is compliant with this standard MUST implement the f { "type": "uint64", "name": "value", - "desc": "The amount of tokens transfered" + "desc": "The amount of tokens transferred" }, { "type": "uint64", "name": "timestamp", - "desc": "Network seconds when tokens were transfered" + "desc": "Network seconds when tokens were transferred" }, ] }, @@ -181,7 +181,7 @@ 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 indefinately. +Ownership of a token by a zero address indicates that a token is out of circulation indefinitely. The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. @@ -191,8 +191,8 @@ A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a t The `Approval` event MUST be emitted when the `approve` method is called successfully. -A value of zero for the `approve` method and the `Approval` event indicate no approval. -When a `Transfer` event emits following the `transferFrom` method, this may also indicates that the approved value for the token is decremented. . +A value of zero for the `approve` method and the `Approval` event indicates no approval. +When a `Transfer` event emits following the `transferFrom` method, this may also indicate that the approved value for the token is decremented. The contract MUST allow multiple operators per owner. All methods in this standard that are marked as `readonly` MUST be read-only as defined by [ARC-22](./arc-0022.md). @@ -205,22 +205,22 @@ This specification is based on E The core specification differs from ERC-20 by: -* Transfer and Approval events contain an extra argument, namely timestamp +* Transfer and Approval events contain an extra argument, namely, timestamp ## Backwards Compatibility This standard introduces a new kind of token that is incompatible with tokens defined as ASAs. Applications that want to index, manage, or view tokens on Algorand will need to handle these new smart tokens as well as the already popular ASA implementation of tokens will need to add code to handle both, and existing smart contracts that handle ASA-based tokens will not work with these new smart contract tokens. -While this is a severe backwards incompatibility, smart contract tokens are necessary to provide richer and more diverse functionality for tokens. +While this is a severe backward incompatibility, smart contract tokens are necessary to provide richer and more diverse functionality for tokens. ## Security Considerations The fact that anybody can create a new implementation of a smart contract tokens standard opens the door for many of those implementations to contain security bugs. -Additionally, malicious tokens implementations could contain hidden anti-features unexpected by users. -As with other smart contract domains, it is difficult for users to verify or understand security properties of smart contract tokens. -This is a tradeoff compared with ASA tokens, which share a smaller set of security properties that are easier to validate, to gain the possibility of adding novel features. +Additionally, malicious token implementations could contain hidden anti-features unexpected by users. +As with other smart contract domains, it is difficult for users to verify or understand the security properties of smart contract tokens. +This is a tradeoff compared with ASA tokens, which share a smaller set of security properties that are easier to validate to gain the possibility of adding novel features. ## Copyright Copyright and related rights waived via CCO. From fafe2c2aef719de522f4a0d60b9e8f8ff3d16d81 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Wed, 5 Jul 2023 14:02:05 -0600 Subject: [PATCH 03/38] add missing args to ABI methods, use UInt256 --- ARCs/arc-0200.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 7f7036241..dfe1d7120 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -65,7 +65,7 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the total supply of the token", "readonly": true, "args": [], - "returns": { "type": "uint64", "desc": "The total supply of the token" } + "returns": { "type": "uint256", "desc": "The total supply of the token" } }, { "name": "balanceOf", @@ -78,7 +78,7 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "The address of the owner of the token" }, ], - "returns": { "type": "address", "desc": "The current balance of the holder of the token" } + "returns": { "type": "uint256", "desc": "The current balance of the holder of the token" } }, { "name": "transfer", @@ -90,6 +90,11 @@ A smart contract token that is compliant with this standard MUST implement the f "name": "to", "desc": "The destination of the transfer" }, + { + "type": "uint256", + "name": "value", + "desc": "Amount of tokens to transfer" + }, ], "returns": { "type": "bool", "desc": "Success" } }, @@ -98,8 +103,9 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ - { "type": "address", "name": "from" }, - { "type": "address", "name": "to" }, + { "type": "address", "name": "from", "desc": "The source of the transfer" }, + { "type": "address", "name": "to", "desc": "The destination of the transfer" }, + { "type": "uint256", "name": "value", "desc": "Amount of tokens to transfer"} ], "returns": { "type": "bool", "desc": "Success" } }, @@ -109,7 +115,7 @@ A smart contract token that is compliant with this standard MUST implement the f "readonly": false, "args": [ { "type": "address", "name": "spender" }, - { "type": "uint64", "name": "value" }, + { "type": "uint256", "name": "value" }, ], "returns": { "type": "bool", "desc": "Success" } }, @@ -121,7 +127,7 @@ A smart contract token that is compliant with this standard MUST implement the f { "type": "address", "name": "owner" }, { "type": "address", "name": "spender" } ], - "returns": { "type": "uint64", "desc": "The remaining allowance" } + "returns": { "type": "uint256", "desc": "The remaining allowance" } } ], "events": [ @@ -140,7 +146,7 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "The destination of transfer of tokens" }, { - "type": "uint64", + "type": "uint256", "name": "value", "desc": "The amount of tokens transferred" }, @@ -166,7 +172,7 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "The approved spender of tokens" }, { - "type": "uint64", + "type": "uint256", "name": "value", "desc": "The amount of tokens approve" }, From 6846734517272633ada443cdbf29d8fd7b7b6cfc Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Wed, 5 Jul 2023 16:25:01 -0600 Subject: [PATCH 04/38] remove timestamp from event args --- ARCs/arc-0200.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index dfe1d7120..e3c349a9d 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -150,11 +150,6 @@ A smart contract token that is compliant with this standard MUST implement the f "name": "value", "desc": "The amount of tokens transferred" }, - { - "type": "uint64", - "name": "timestamp", - "desc": "Network seconds when tokens were transferred" - }, ] }, { @@ -176,11 +171,6 @@ A smart contract token that is compliant with this standard MUST implement the f "name": "value", "desc": "The amount of tokens approve" }, - { - "type": "uint64", - "name": "timestamp", - "desc": "Network seconds when tokens were approved" - }, ] } ] @@ -205,13 +195,11 @@ All methods in this standard that are marked as `readonly` MUST be read-only as ## Rationale -This specification is based on ERC-20, with some differences. +This specification is based on ERC-20. ### Core Specification -The core specification differs from ERC-20 by: - -* Transfer and Approval events contain an extra argument, namely, timestamp +The core specification identical to ERC-20. ## Backwards Compatibility From 3a9e17bc7255a5d2f050812f9e50699d6f07b072 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 17 Jul 2023 09:02:59 -0600 Subject: [PATCH 05/38] fix method and event argument names --- ARCs/arc-0200.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index e3c349a9d..a5c917af6 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -87,7 +87,7 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "to", + "name": "_to", "desc": "The destination of the transfer" }, { @@ -103,9 +103,9 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ - { "type": "address", "name": "from", "desc": "The source of the transfer" }, - { "type": "address", "name": "to", "desc": "The destination of the transfer" }, - { "type": "uint256", "name": "value", "desc": "Amount of tokens to transfer"} + { "type": "address", "name": "_from", "desc": "The source of the transfer" }, + { "type": "address", "name": "_to", "desc": "The destination of the transfer" }, + { "type": "uint256", "name": "_value", "desc": "Amount of tokens to transfer"} ], "returns": { "type": "bool", "desc": "Success" } }, @@ -114,8 +114,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Approve spender for a token", "readonly": false, "args": [ - { "type": "address", "name": "spender" }, - { "type": "uint256", "name": "value" }, + { "type": "address", "name": "_spender" }, + { "type": "uint256", "name": "_value" }, ], "returns": { "type": "bool", "desc": "Success" } }, @@ -124,8 +124,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ - { "type": "address", "name": "owner" }, - { "type": "address", "name": "spender" } + { "type": "address", "name": "_owner" }, + { "type": "address", "name": "_spender" } ], "returns": { "type": "uint256", "desc": "The remaining allowance" } } @@ -137,17 +137,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from", + "name": "_from", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "to", + "name": "_to", "desc": "The destination of transfer of tokens" }, { "type": "uint256", - "name": "value", + "name": "_value", "desc": "The amount of tokens transferred" }, ] @@ -158,17 +158,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner", + "name": "_owner", "desc": "The owner of the tokens" }, { "type": "address", - "name": "spender", + "name": "_spender", "desc": "The approved spender of tokens" }, { "type": "uint256", - "name": "value", + "name": "_value", "desc": "The amount of tokens approve" }, ] @@ -179,11 +179,11 @@ 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. -The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. +The methods `transfer` and `transferFrom` method MUST error when the balance of `_from` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. -A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is first minted. -A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. +A `Transfer` event SHOULD be emitted, with `_from` being the zero address, when a token is first minted. +A `Transfer` event SHOULD be emitted, with `_to` being the zero address, when a token is destroyed. The `Approval` event MUST be emitted when the `approve` method is called successfully. From 998989c60421c6879595860905303629787ca7a7 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 17 Jul 2023 09:36:04 -0600 Subject: [PATCH 06/38] add arc200 prefix and core spec notes --- ARCs/arc-0200.md | 72 +++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index a5c917af6..48d995f21 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -40,35 +40,35 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Smart Contract Token Base Interface", "methods": [ { - "name": "name", + "name": "arc200_name", "desc": "Returns the name of the token", "readonly": true, "args": [], "returns": { "type": "bytes[32]", "desc": "The name of the token" } }, { - "name": "symbol", + "name": "arc200_symbol", "desc": "Returns the symbol of the token", "readonly": true, "args": [], "returns": { "type": "bytes[8]", "desc": "The symbol of the token" } }, { - "name": "decimals", + "name": "arc200_decimals", "desc": "Returns the decimals of the token", "readonly": true, "args": [], "returns": { "type": "uint8", "desc": "The decimals of the token" } }, { - "name": "totalSupply", + "name": "arc200_totalSupply", "desc": "Returns the total supply of the token", "readonly": true, "args": [], "returns": { "type": "uint256", "desc": "The total supply of the token" } }, { - "name": "balanceOf", + "name": "arc200_balanceOf", "desc": "Returns the current balance of the owner of the token", "readonly": true, "args": [ @@ -81,13 +81,13 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "uint256", "desc": "The current balance of the holder of the token" } }, { - "name": "transfer", + "name": "arc200_transfer", "desc": "Transfers tokens", "readonly": false, "args": [ { "type": "address", - "name": "_to", + "name": "recipient", "desc": "The destination of the transfer" }, { @@ -99,76 +99,76 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "transferFrom", + "name": "arc200_transferFrom", "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ - { "type": "address", "name": "_from", "desc": "The source of the transfer" }, - { "type": "address", "name": "_to", "desc": "The destination of the transfer" }, - { "type": "uint256", "name": "_value", "desc": "Amount of tokens to transfer"} + { "type": "address", "name": "sender", "desc": "The source of the transfer" }, + { "type": "address", "name": "recipient", "desc": "The destination of the transfer" }, + { "type": "uint256", "name": "value", "desc": "Amount of tokens to transfer"} ], "returns": { "type": "bool", "desc": "Success" } }, { - "name": "approve", + "name": "arc200_approve", "desc": "Approve spender for a token", "readonly": false, "args": [ - { "type": "address", "name": "_spender" }, - { "type": "uint256", "name": "_value" }, + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "value" }, ], "returns": { "type": "bool", "desc": "Success" } }, { - "name": "allowance", + "name": "arc200_allowance", "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ - { "type": "address", "name": "_owner" }, - { "type": "address", "name": "_spender" } + { "type": "address", "name": "owner" }, + { "type": "address", "name": "spender" } ], "returns": { "type": "uint256", "desc": "The remaining allowance" } } ], "events": [ { - "name": "Transfer", + "name": "ARC200_Transfer", "desc": "Transfer of tokens", "args": [ { "type": "address", - "name": "_from", + "name": "sender", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "_to", + "name": "recipient", "desc": "The destination of transfer of tokens" }, { "type": "uint256", - "name": "_value", + "name": "value", "desc": "The amount of tokens transferred" }, ] }, { - "name": "Approval", + "name": "ARC200_Approval", "desc": "Approval of tokens", "args": [ { "type": "address", - "name": "_owner", + "name": "owner", "desc": "The owner of the tokens" }, { "type": "address", - "name": "_spender", + "name": "spender", "desc": "The approved spender of tokens" }, { "type": "uint256", - "name": "_value", + "name": "value", "desc": "The amount of tokens approve" }, ] @@ -179,16 +179,16 @@ 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. -The methods `transfer` and `transferFrom` method MUST error when the balance of `_from` is insufficient. -The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. -The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. -A `Transfer` event SHOULD be emitted, with `_from` being the zero address, when a token is first minted. -A `Transfer` event SHOULD be emitted, with `_to` being the zero address, when a token is destroyed. +The methods `arc200_transfer` and `arc200_transferFrom` method MUST error when the balance of `sender` is insufficient. +The `arc200_transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. +The methods `arc200_transfer` and `arc200_transferFrom` MUST emit a `Transfer` event that a transfer is successful. +A `ARC200_Transfer` event SHOULD be emitted, with `sender` being the zero address, when a token is first minted. +A `ARC200_Transfer` event SHOULD be emitted, with `recipient` being the zero address, when a token is destroyed. -The `Approval` event MUST be emitted when the `approve` method is called successfully. +The `ARC200_Approval` event MUST be emitted when the `approve` method is called successfully. -A value of zero for the `approve` method and the `Approval` event indicates no approval. -When a `Transfer` event emits following the `transferFrom` method, this may also indicate that the approved value for the token is decremented. +A value of zero for the `arc200_approve` method and the `ARC200_Approval` event indicates no approval. +When a `ARC200_Transfer` event emits following the `arc200_transferFrom` method, this may also indicate that the approved value for the token is decremented. The contract MUST allow multiple operators per owner. All methods in this standard that are marked as `readonly` MUST be read-only as defined by [ARC-22](./arc-0022.md). @@ -199,7 +199,11 @@ This specification is based on E ### Core Specification -The core specification identical to ERC-20. +The core specification identical to ERC-20 with the exception of: + +* Method and event names are prefixed with `arc200_` and `AR200_` +* `transfer` and `transferFrom` method argumetns `_from` and `_to` are `spender` and `recipient`, respectfully +* Method and event argumetns are not prefixed with `_` ## Backwards Compatibility From 3083fe5e78413c2755dc66a413753bb611553725 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 17 Jul 2023 09:46:23 -0600 Subject: [PATCH 07/38] revert arc200 prefix --- ARCs/arc-0200.md | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 48d995f21..14f16aed3 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -40,35 +40,35 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Smart Contract Token Base Interface", "methods": [ { - "name": "arc200_name", + "name": "name", "desc": "Returns the name of the token", "readonly": true, "args": [], "returns": { "type": "bytes[32]", "desc": "The name of the token" } }, { - "name": "arc200_symbol", + "name": "symbol", "desc": "Returns the symbol of the token", "readonly": true, "args": [], "returns": { "type": "bytes[8]", "desc": "The symbol of the token" } }, { - "name": "arc200_decimals", + "name": "decimals", "desc": "Returns the decimals of the token", "readonly": true, "args": [], "returns": { "type": "uint8", "desc": "The decimals of the token" } }, { - "name": "arc200_totalSupply", + "name": "totalSupply", "desc": "Returns the total supply of the token", "readonly": true, "args": [], "returns": { "type": "uint256", "desc": "The total supply of the token" } }, { - "name": "arc200_balanceOf", + "name": "balanceOf", "desc": "Returns the current balance of the owner of the token", "readonly": true, "args": [ @@ -81,7 +81,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "uint256", "desc": "The current balance of the holder of the token" } }, { - "name": "arc200_transfer", + "name": "transfer", "desc": "Transfers tokens", "readonly": false, "args": [ @@ -99,7 +99,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "arc200_transferFrom", + "name": "transferFrom", "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ @@ -110,7 +110,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "arc200_approve", + "name": "approve", "desc": "Approve spender for a token", "readonly": false, "args": [ @@ -120,7 +120,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "arc200_allowance", + "name": "allowance", "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ @@ -132,7 +132,7 @@ A smart contract token that is compliant with this standard MUST implement the f ], "events": [ { - "name": "ARC200_Transfer", + "name": "Transfer", "desc": "Transfer of tokens", "args": [ { @@ -153,7 +153,7 @@ A smart contract token that is compliant with this standard MUST implement the f ] }, { - "name": "ARC200_Approval", + "name": "Approval", "desc": "Approval of tokens", "args": [ { @@ -179,16 +179,16 @@ 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. -The methods `arc200_transfer` and `arc200_transferFrom` method MUST error when the balance of `sender` is insufficient. -The `arc200_transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. -The methods `arc200_transfer` and `arc200_transferFrom` MUST emit a `Transfer` event that a transfer is successful. -A `ARC200_Transfer` event SHOULD be emitted, with `sender` being the zero address, when a token is first minted. -A `ARC200_Transfer` event SHOULD be emitted, with `recipient` being the zero address, when a token is destroyed. +The methods `transfer` and `transferFrom` method MUST error when the balance of `sender` is insufficient. +The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. +The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. +A `Transfer` event SHOULD be emitted, with `sender` being the zero address, when a token is first minted. +A `Transfer` event SHOULD be emitted, with `recipient` being the zero address, when a token is destroyed. -The `ARC200_Approval` event MUST be emitted when the `approve` method is called successfully. +The `Approval` event MUST be emitted when the `approve` method is called successfully. -A value of zero for the `arc200_approve` method and the `ARC200_Approval` event indicates no approval. -When a `ARC200_Transfer` event emits following the `arc200_transferFrom` method, this may also indicate that the approved value for the token is decremented. +A value of zero for the `approve` method and the `Approval` event indicates no approval. +When a `Transfer` event emits following the `transferFrom` method, this may also indicate that the approved value for the token is decremented. The contract MUST allow multiple operators per owner. All methods in this standard that are marked as `readonly` MUST be read-only as defined by [ARC-22](./arc-0022.md). @@ -201,7 +201,6 @@ This specification is based on E The core specification identical to ERC-20 with the exception of: -* Method and event names are prefixed with `arc200_` and `AR200_` * `transfer` and `transferFrom` method argumetns `_from` and `_to` are `spender` and `recipient`, respectfully * Method and event argumetns are not prefixed with `_` From bf3b75372ce9abed83b3cc9f4f54d5a4f8e1d1d1 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 17 Jul 2023 13:56:59 -0600 Subject: [PATCH 08/38] revert from/to, fix typo --- ARCs/arc-0200.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 14f16aed3..e7216ca44 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -87,7 +87,7 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "recipient", + "name": "to", "desc": "The destination of the transfer" }, { @@ -103,8 +103,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ - { "type": "address", "name": "sender", "desc": "The source of the transfer" }, - { "type": "address", "name": "recipient", "desc": "The destination of the transfer" }, + { "type": "address", "name": "from", "desc": "The source of the transfer" }, + { "type": "address", "name": "to", "desc": "The destination of the transfer" }, { "type": "uint256", "name": "value", "desc": "Amount of tokens to transfer"} ], "returns": { "type": "bool", "desc": "Success" } @@ -137,12 +137,12 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "sender", + "name": "from", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "recipient", + "name": "to", "desc": "The destination of transfer of tokens" }, { @@ -179,11 +179,11 @@ 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. -The methods `transfer` and `transferFrom` method MUST error when the balance of `sender` is insufficient. +The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. -A `Transfer` event SHOULD be emitted, with `sender` being the zero address, when a token is first minted. -A `Transfer` event SHOULD be emitted, with `recipient` being the zero address, when a token is destroyed. +A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is first minted. +A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. The `Approval` event MUST be emitted when the `approve` method is called successfully. @@ -201,8 +201,7 @@ This specification is based on E The core specification identical to ERC-20 with the exception of: -* `transfer` and `transferFrom` method argumetns `_from` and `_to` are `spender` and `recipient`, respectfully -* Method and event argumetns are not prefixed with `_` +* Method and event arguments are not prefixed with `_` ## Backwards Compatibility From e4309b489e2211277acba5f22797ece420626f77 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Thu, 20 Jul 2023 23:35:36 -0600 Subject: [PATCH 09/38] reward, fix argument names to be less common --- ARCs/arc-0200.md | 80 +++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index e7216ca44..0c269aee1 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -15,20 +15,15 @@ requires: 3, 4, 22, 28 ## Abstract -This specifies an interface for tokens to be implemented on Algorand as smart contracts. -This interface defines a minimal interface for tokens to be held and transferred, to be augmented by other standard interfaces and custom methods. - +This ARC (Algorand Request for Comments) specifies an interface for tokens to be implemented on Algorand as smart contracts. The interface defines a minimal interface required for tokens to be held and transferred, with the potential for further augmentation through additional standard interfaces and custom methods. ## Motivation -Currently, most tokens in the Algorand ecosystem are implemented as ASAs. -However, to provide rich extra functionality, it can be desirable to implement tokens as a smart contract instead. -To foster an interoperable token ecosystem, it is necessary that the core interfaces for tokens be standardized. - +Currently, most tokens in the Algorand ecosystem are represented by ASAs (Algorand Standard Assets). However, to provide rich extra functionality, it can be desirable implementing tokens as a smart contract instead. To foster an interoperable token ecosystem, it is necessary that the core interfaces for tokens be standardized. ## Specification -The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in RFC-2119. +The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in RFC-2119. ### Core Token specification @@ -74,11 +69,14 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner", + "name": "owner_", "desc": "The address of the owner of the token" - }, + } ], - "returns": { "type": "uint256", "desc": "The current balance of the holder of the token" } + "returns": { + "type": "uint256", + "desc": "The current balance of the holder of the token" + } }, { "name": "transfer", @@ -87,14 +85,14 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "to", + "name": "to_", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "Amount of tokens to transfer" - }, + } ], "returns": { "type": "bool", "desc": "Success" } }, @@ -103,9 +101,21 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ - { "type": "address", "name": "from", "desc": "The source of the transfer" }, - { "type": "address", "name": "to", "desc": "The destination of the transfer" }, - { "type": "uint256", "name": "value", "desc": "Amount of tokens to transfer"} + { + "type": "address", + "name": "from_", + "desc": "The source of the transfer" + }, + { + "type": "address", + "name": "to_", + "desc": "The destination of the transfer" + }, + { + "type": "uint256", + "name": "value_", + "desc": "Amount of tokens to transfer" + } ], "returns": { "type": "bool", "desc": "Success" } }, @@ -114,8 +124,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Approve spender for a token", "readonly": false, "args": [ - { "type": "address", "name": "spender" }, - { "type": "uint256", "name": "value" }, + { "type": "address", "name": "spender_" }, + { "type": "uint256", "name": "value_" } ], "returns": { "type": "bool", "desc": "Success" } }, @@ -124,8 +134,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ - { "type": "address", "name": "owner" }, - { "type": "address", "name": "spender" } + { "type": "address", "name": "owner_" }, + { "type": "address", "name": "spender_" } ], "returns": { "type": "uint256", "desc": "The remaining allowance" } } @@ -137,19 +147,19 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from", + "name": "from_", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "to", + "name": "to_", "desc": "The destination of transfer of tokens" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "The amount of tokens transferred" - }, + } ] }, { @@ -158,32 +168,32 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner", + "name": "owner_", "desc": "The owner of the tokens" }, { "type": "address", - "name": "spender", + "name": "spender_", "desc": "The approved spender of tokens" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "The amount of tokens approve" - }, + } ] } ] } ``` -Ownership of a token by a zero address indicates that a token is out of circulation indefinitely. +Ownership of a token by a zero address indicates that a token is out of circulation indefinitely, or otherwise burned or destroyed. -The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. +The methods `transfer` and `transferFrom` method MUST error when the balance of `from_` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. -A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is first minted. -A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. +A `Transfer` event SHOULD be emitted, with `from_` being the zero address, when a token is first minted. +A `Transfer` event SHOULD be emitted, with `to_` being the zero address, when a token is destroyed. The `Approval` event MUST be emitted when the `approve` method is called successfully. @@ -201,7 +211,7 @@ This specification is based on E The core specification identical to ERC-20 with the exception of: -* Method and event arguments are not prefixed with `_` +- Method and event arguments are appended, rather than prefixed, with \_. ## Backwards Compatibility @@ -210,7 +220,6 @@ Applications that want to index, manage, or view tokens on Algorand will need to While this is a severe backward incompatibility, smart contract tokens are necessary to provide richer and more diverse functionality for tokens. - ## Security Considerations The fact that anybody can create a new implementation of a smart contract tokens standard opens the door for many of those implementations to contain security bugs. @@ -219,4 +228,5 @@ As with other smart contract domains, it is difficult for users to verify or und This is a tradeoff compared with ASA tokens, which share a smaller set of security properties that are easier to validate to gain the possibility of adding novel features. ## Copyright + Copyright and related rights waived via CCO. From 715b2268cd3552f10d2a5053d6111303dae5ef8e Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 21 Jul 2023 11:56:17 -0600 Subject: [PATCH 10/38] Update ARCs/arc-0200.md simple is better Co-authored-by: John Jannotti --- 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 0c269aee1..eabf5498e 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -191,7 +191,7 @@ Ownership of a token by a zero address indicates that a token is out of circulat The methods `transfer` and `transferFrom` method MUST error when the balance of `from_` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. -The methods `transfer` and `transferFrom` MUST emit a `Transfer` event that a transfer is successful. +The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. A `Transfer` event SHOULD be emitted, with `from_` being the zero address, when a token is first minted. A `Transfer` event SHOULD be emitted, with `to_` being the zero address, when a token is destroyed. From 7f4c7cc6f278f96254b8d942e86d7f0dd9045c69 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 21 Jul 2023 11:58:14 -0600 Subject: [PATCH 11/38] Update ARCs/arc-0200.md Co-authored-by: John Jannotti --- 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 eabf5498e..4435cb2c5 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -192,7 +192,7 @@ Ownership of a token by a zero address indicates that a token is out of circulat The methods `transfer` and `transferFrom` method MUST error when the balance of `from_` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. -A `Transfer` event SHOULD be emitted, with `from_` being the zero address, when a token is first minted. +A `Transfer` event SHOULD be emitted, with `from_` being the zero address, when a token is minted. A `Transfer` event SHOULD be emitted, with `to_` being the zero address, when a token is destroyed. The `Approval` event MUST be emitted when the `approve` method is called successfully. From b5c7eb1cf690a3438b4e0097b3f3c3094995235f Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 21 Jul 2023 12:08:05 -0600 Subject: [PATCH 12/38] Update ARCs/arc-0200.md Nice Co-authored-by: John Jannotti --- 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 4435cb2c5..0e3221739 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -19,7 +19,7 @@ This ARC (Algorand Request for Comments) specifies an interface for tokens to be ## Motivation -Currently, most tokens in the Algorand ecosystem are represented by ASAs (Algorand Standard Assets). However, to provide rich extra functionality, it can be desirable implementing tokens as a smart contract instead. To foster an interoperable token ecosystem, it is necessary that the core interfaces for tokens be standardized. +Currently, most tokens in the Algorand ecosystem are represented by ASAs (Algorand Standard Assets). However, to provide rich extra functionality, it can be desirable to implement tokens as smart contracts instead. To foster an interoperable token ecosystem, it is necessary that the core interfaces for tokens be standardized. ## Specification From 42096750b42d914f126c7638946c1cb783504770 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 21 Jul 2023 13:04:47 -0600 Subject: [PATCH 13/38] fix arg names --- ARCs/arc-0200.md | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 0e3221739..9721343fa 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -69,7 +69,7 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner_", + "name": "owner", "desc": "The address of the owner of the token" } ], @@ -85,12 +85,12 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "to_", + "name": "to", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "Amount of tokens to transfer" } ], @@ -103,17 +103,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from_", + "name": "from", "desc": "The source of the transfer" }, { "type": "address", - "name": "to_", + "name": "to", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "Amount of tokens to transfer" } ], @@ -124,8 +124,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Approve spender for a token", "readonly": false, "args": [ - { "type": "address", "name": "spender_" }, - { "type": "uint256", "name": "value_" } + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "value" } ], "returns": { "type": "bool", "desc": "Success" } }, @@ -134,8 +134,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ - { "type": "address", "name": "owner_" }, - { "type": "address", "name": "spender_" } + { "type": "address", "name": "owner" }, + { "type": "address", "name": "spender" } ], "returns": { "type": "uint256", "desc": "The remaining allowance" } } @@ -147,17 +147,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from_", + "name": "from", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "to_", + "name": "to", "desc": "The destination of transfer of tokens" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "The amount of tokens transferred" } ] @@ -168,17 +168,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner_", + "name": "owner", "desc": "The owner of the tokens" }, { "type": "address", - "name": "spender_", + "name": "spender", "desc": "The approved spender of tokens" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "The amount of tokens approve" } ] @@ -189,11 +189,11 @@ 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 `transfer` and `transferFrom` method MUST error when the balance of `from_` is insufficient. +The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. -A `Transfer` event SHOULD be emitted, with `from_` being the zero address, when a token is minted. -A `Transfer` event SHOULD be emitted, with `to_` being the zero address, when a token is destroyed. +A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. +A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. The `Approval` event MUST be emitted when the `approve` method is called successfully. @@ -209,9 +209,7 @@ This specification is based on E ### Core Specification -The core specification identical to ERC-20 with the exception of: - -- Method and event arguments are appended, rather than prefixed, with \_. +The core specification identical to ERC-20. ## Backwards Compatibility From 125f2342c4ab3bbb3e73918223811840d2fdfb5e Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 21 Jul 2023 13:17:19 -0600 Subject: [PATCH 14/38] reword transferFrom approval --- ARCs/arc-0200.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 9721343fa..dafe79d1a 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -195,10 +195,11 @@ The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. -The `Approval` event MUST be emitted when the `approve` method is called successfully. +The `Approval` event MUST be emitted when an `approve` or `transferFrom` method is called successfully. A value of zero for the `approve` method and the `Approval` event indicates no approval. -When a `Transfer` event emits following the `transferFrom` method, this may also indicate that the approved value for the token is decremented. +The `transferFrom` method and the `Approval` event indicates the approval value after it is decremented. + The contract MUST allow multiple operators per owner. All methods in this standard that are marked as `readonly` MUST be read-only as defined by [ARC-22](./arc-0022.md). From a9174bc215e756fb12858db4c0657cc0b73d2527 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Fri, 21 Jul 2023 13:21:10 -0600 Subject: [PATCH 15/38] reword transferFrom spender error --- 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 dafe79d1a..ed680edd4 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 `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. -The `transferFrom` method MUST error unless called by an approved spender as defined by an extension defined in this ARC. +The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. In the case of the `transfer` method, from is implied as the `owner` of the token. +The `transferFrom` method MUST error unless called by an `spender` approved by an `owner`. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. From 9ec79b83e4d1c700887c9e9749da281d18629a68 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Tue, 25 Jul 2023 10:34:25 -0600 Subject: [PATCH 16/38] update arg names --- ARCs/arc-0200.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index ed680edd4..c05463427 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -69,7 +69,7 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner", + "name": "owner_", "desc": "The address of the owner of the token" } ], @@ -85,12 +85,12 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "to", + "name": "to_", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "Amount of tokens to transfer" } ], @@ -103,17 +103,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from", + "name": "from_", "desc": "The source of the transfer" }, { "type": "address", - "name": "to", + "name": "to_", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "Amount of tokens to transfer" } ], @@ -124,8 +124,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Approve spender for a token", "readonly": false, "args": [ - { "type": "address", "name": "spender" }, - { "type": "uint256", "name": "value" } + { "type": "address", "name": "spender_" }, + { "type": "uint256", "name": "value_" } ], "returns": { "type": "bool", "desc": "Success" } }, @@ -134,8 +134,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ - { "type": "address", "name": "owner" }, - { "type": "address", "name": "spender" } + { "type": "address", "name": "owner_" }, + { "type": "address", "name": "spender_" } ], "returns": { "type": "uint256", "desc": "The remaining allowance" } } @@ -147,17 +147,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from", + "name": "from_", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "to", + "name": "to_", "desc": "The destination of transfer of tokens" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "The amount of tokens transferred" } ] @@ -168,17 +168,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner", + "name": "owner_", "desc": "The owner of the tokens" }, { "type": "address", - "name": "spender", + "name": "spender_", "desc": "The approved spender of tokens" }, { "type": "uint256", - "name": "value", + "name": "value_", "desc": "The amount of tokens approve" } ] From 286c37f8a4325faaed73c877cadfc5862d9f7cfd Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Tue, 25 Jul 2023 10:37:12 -0600 Subject: [PATCH 17/38] revert --- ARCs/arc-0200.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index c05463427..ed680edd4 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -69,7 +69,7 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner_", + "name": "owner", "desc": "The address of the owner of the token" } ], @@ -85,12 +85,12 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "to_", + "name": "to", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "Amount of tokens to transfer" } ], @@ -103,17 +103,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from_", + "name": "from", "desc": "The source of the transfer" }, { "type": "address", - "name": "to_", + "name": "to", "desc": "The destination of the transfer" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "Amount of tokens to transfer" } ], @@ -124,8 +124,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Approve spender for a token", "readonly": false, "args": [ - { "type": "address", "name": "spender_" }, - { "type": "uint256", "name": "value_" } + { "type": "address", "name": "spender" }, + { "type": "uint256", "name": "value" } ], "returns": { "type": "bool", "desc": "Success" } }, @@ -134,8 +134,8 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ - { "type": "address", "name": "owner_" }, - { "type": "address", "name": "spender_" } + { "type": "address", "name": "owner" }, + { "type": "address", "name": "spender" } ], "returns": { "type": "uint256", "desc": "The remaining allowance" } } @@ -147,17 +147,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "from_", + "name": "from", "desc": "The source of transfer of tokens" }, { "type": "address", - "name": "to_", + "name": "to", "desc": "The destination of transfer of tokens" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "The amount of tokens transferred" } ] @@ -168,17 +168,17 @@ A smart contract token that is compliant with this standard MUST implement the f "args": [ { "type": "address", - "name": "owner_", + "name": "owner", "desc": "The owner of the tokens" }, { "type": "address", - "name": "spender_", + "name": "spender", "desc": "The approved spender of tokens" }, { "type": "uint256", - "name": "value_", + "name": "value", "desc": "The amount of tokens approve" } ] From d8d83ed4449834b68dd66b2438b109b9f6b0697b Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:04:23 -0600 Subject: [PATCH 18/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 ed680edd4..ccb48ebf6 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -35,7 +35,7 @@ A smart contract token that is compliant with this standard MUST implement the f "desc": "Smart Contract Token Base Interface", "methods": [ { - "name": "name", + "name": "arc200_name", "desc": "Returns the name of the token", "readonly": true, "args": [], From a17600a6a0be54aeb2fbfb7b720ef7bf583f105f Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:04:31 -0600 Subject: [PATCH 19/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 ccb48ebf6..e33ff8df6 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -42,7 +42,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bytes[32]", "desc": "The name of the token" } }, { - "name": "symbol", + "name": "arc200_symbol", "desc": "Returns the symbol of the token", "readonly": true, "args": [], From 01637791a6ddc58e58ae6863004ee8bceb33d0e0 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:04:42 -0600 Subject: [PATCH 20/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 e33ff8df6..ab80cc696 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -49,7 +49,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bytes[8]", "desc": "The symbol of the token" } }, { - "name": "decimals", + "name": "arc200_decimals", "desc": "Returns the decimals of the token", "readonly": true, "args": [], From 581c14aafb1f91c9121e889d3201ed956ec390d5 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:04:51 -0600 Subject: [PATCH 21/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 ab80cc696..f24784982 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -63,7 +63,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "uint256", "desc": "The total supply of the token" } }, { - "name": "balanceOf", + "name": "arc200_balanceOf", "desc": "Returns the current balance of the owner of the token", "readonly": true, "args": [ From b958a5fef62daecbd01f89776045313d062482f6 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:04:59 -0600 Subject: [PATCH 22/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 f24784982..9d894716e 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -195,7 +195,7 @@ The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. -The `Approval` event MUST be emitted when an `approve` or `transferFrom` method is called successfully. +The `arc200_Approval` event MUST be emitted when an `arc200_approve` or `arc200_transferFrom` method is called successfully. A value of zero for the `approve` method and the `Approval` event indicates no approval. The `transferFrom` method and the `Approval` event indicates the approval value after it is decremented. From 70d8ae474ff178ae1ecf681c4a6e32a5598dfe91 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:05:08 -0600 Subject: [PATCH 23/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 9d894716e..96dc6f9ed 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -193,7 +193,7 @@ The methods `transfer` and `transferFrom` method MUST error when the balance of The `transferFrom` method MUST error unless called by an `spender` approved by an `owner`. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. -A `Transfer` event SHOULD be emitted, with `to` being the zero address, when a token is destroyed. +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. From 27415c8c0fb3b9c2c0f8cc1c0d9840f038cb5ff6 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:05:15 -0600 Subject: [PATCH 24/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 96dc6f9ed..585566d86 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -198,7 +198,7 @@ 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. A value of zero for the `approve` method and the `Approval` event indicates no approval. -The `transferFrom` method and the `Approval` event indicates the approval value after it is decremented. +The `arc200_transferFrom` method and the `arc200_Approval` event indicates the approval value after it is decremented. The contract MUST allow multiple operators per owner. From 50d39f6bf367406089aa8550a2d66572471efca6 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:05:22 -0600 Subject: [PATCH 25/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 585566d86..7e9552ebf 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -197,7 +197,7 @@ 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. -A value of zero for the `approve` method and the `Approval` event indicates no approval. +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. The contract MUST allow multiple operators per owner. From 7427d29bd504dcdcfbef488ee9e0437685f34534 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:05:28 -0600 Subject: [PATCH 26/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 7e9552ebf..a982ef265 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -192,7 +192,7 @@ Ownership of a token by a zero address indicates that a token is out of circulat The methods `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. In the case of the `transfer` method, from is implied as the `owner` of the token. The `transferFrom` method MUST error unless called by an `spender` approved by an `owner`. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. -A `Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. +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. From 4e1209cd01162e199100652f7e96ed2bb26a35e4 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Sat, 5 Aug 2023 13:05:35 -0600 Subject: [PATCH 27/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 a982ef265..2ac11f0af 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -56,7 +56,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "uint8", "desc": "The decimals of the token" } }, { - "name": "totalSupply", + "name": "arc200_totalSupply", "desc": "Returns the total supply of the token", "readonly": true, "args": [], From b1e3a297cad3cd7f69ac592d3c32af92177c27c4 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:38:59 -0600 Subject: [PATCH 28/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 2ac11f0af..288a36c7e 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -79,7 +79,7 @@ A smart contract token that is compliant with this standard MUST implement the f } }, { - "name": "transfer", + "name": "arc200_transfer", "desc": "Transfers tokens", "readonly": false, "args": [ From 4b69dbeca29bae8db38047e8a6e612436ba7a54b Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:39:28 -0600 Subject: [PATCH 29/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 288a36c7e..1fd6d08a3 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -120,7 +120,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "approve", + "name": "arc200_approve", "desc": "Approve spender for a token", "readonly": false, "args": [ From 38debe32525fbd3ea8655d1e46c59470d9f74d04 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:39:36 -0600 Subject: [PATCH 30/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 1fd6d08a3..504d4d06c 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -130,7 +130,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "allowance", + "name": "arc200_allowance", "desc": "Returns the current allowance of the spender of the tokens of the owner", "readonly": true, "args": [ From 07a68a449aa38e1c1b6a6789a716199c5ba0eff5 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:39:45 -0600 Subject: [PATCH 31/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 504d4d06c..b083e279a 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -142,7 +142,7 @@ A smart contract token that is compliant with this standard MUST implement the f ], "events": [ { - "name": "Transfer", + "name": "arc200_Transfer", "desc": "Transfer of tokens", "args": [ { From 551c5667c27b799bbabd4f692c2970751a2aef53 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:39:52 -0600 Subject: [PATCH 32/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 b083e279a..11b16a18c 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -163,7 +163,7 @@ A smart contract token that is compliant with this standard MUST implement the f ] }, { - "name": "Approval", + "name": "arc200_Approval", "desc": "Approval of tokens", "args": [ { From b1bfde3a17302d7f39852677d1d05fde09c6b794 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:40:07 -0600 Subject: [PATCH 33/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 11b16a18c..184d55aa7 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -189,7 +189,7 @@ 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 `transfer` and `transferFrom` method MUST error when the balance of `from` is insufficient. In the case of the `transfer` method, from is implied as the `owner` of the token. +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 `transferFrom` method MUST error unless called by an `spender` approved by an `owner`. The methods `transfer` and `transferFrom` MUST emit a `Transfer` event. A `arc200_Transfer` event SHOULD be emitted, with `from` being the zero address, when a token is minted. From 90c9431fe7bf5d55aefe09f144fe96f115feabc2 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:40:16 -0600 Subject: [PATCH 34/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 184d55aa7..797bb0ffc 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -190,7 +190,7 @@ 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 `transferFrom` method MUST error unless called by an `spender` approved by an `owner`. +The `arc200_transferFrom` method MUST error unless called by an `spender` approved by an `owner`. The methods `transfer` and `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 eba7e87da72623d714713ba2751bcffb3d39d4d3 Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:40:22 -0600 Subject: [PATCH 35/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 797bb0ffc..ac15bce18 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -191,7 +191,7 @@ Ownership of a token by a zero address indicates that a token is out of circulat 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 `transfer` and `transferFrom` MUST emit a `Transfer` event. +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 e8946e127147236afd8fd0702a37b468c8af35fb Mon Sep 17 00:00:00 2001 From: Nicholas Shellabarger Date: Mon, 7 Aug 2023 11:40:38 -0600 Subject: [PATCH 36/38] Update ARCs/arc-0200.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stéphane --- 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 ac15bce18..8e701a7d8 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -97,7 +97,7 @@ A smart contract token that is compliant with this standard MUST implement the f "returns": { "type": "bool", "desc": "Success" } }, { - "name": "transferFrom", + "name": "arc200_transferFrom", "desc": "Transfers tokens from source to destination as approved spender", "readonly": false, "args": [ From 8fecd9127cfa70b49179a3e4b74212a0186b344b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Tue, 8 Aug 2023 09:55:01 +0200 Subject: [PATCH 37/38] Status to last Call --- ARCs/arc-0200.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index 8e701a7d8..a049906e3 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -4,7 +4,8 @@ title: Algorand Smart Contract Token Specification description: Base specification for tokens implemented as smart contracts author: Nicholas Shellabarger (@temptemp3) discussions-to: https://github.com/algorandfoundation/ARCs/issues/223 -status: Draft +status: Last Call +last-call-deadline: 2023-08-30 type: Standards Track category: Interface created: 2023-07-03 From f9dc882f0144cddc276705843f72db8bf8af42ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Mon, 4 Sep 2023 10:06:10 +0200 Subject: [PATCH 38/38] Update arc-0200.md to living --- ARCs/arc-0200.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ARCs/arc-0200.md b/ARCs/arc-0200.md index a049906e3..cee7ddc4d 100644 --- a/ARCs/arc-0200.md +++ b/ARCs/arc-0200.md @@ -4,8 +4,7 @@ title: Algorand Smart Contract Token Specification description: Base specification for tokens implemented as smart contracts author: Nicholas Shellabarger (@temptemp3) discussions-to: https://github.com/algorandfoundation/ARCs/issues/223 -status: Last Call -last-call-deadline: 2023-08-30 +status: Living type: Standards Track category: Interface created: 2023-07-03