@lukso/lsp-smart-contracts 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/README.md +15 -7
  2. package/artifacts/LSP0ERC725Account.json +62 -68
  3. package/artifacts/LSP0ERC725AccountInit.json +62 -68
  4. package/artifacts/LSP11BasicSocialRecovery.json +2 -2
  5. package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
  6. package/artifacts/LSP1UniversalReceiverDelegateUP.json +2 -2
  7. package/artifacts/LSP1UniversalReceiverDelegateVault.json +2 -2
  8. package/artifacts/LSP4Compatibility.json +32 -38
  9. package/artifacts/LSP4DigitalAssetMetadata.json +32 -38
  10. package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +32 -38
  11. package/artifacts/LSP6KeyManager.json +29 -15
  12. package/artifacts/LSP6KeyManagerInit.json +29 -15
  13. package/artifacts/LSP7CappedSupply.json +71 -36
  14. package/artifacts/LSP7CappedSupplyInitAbstract.json +71 -36
  15. package/artifacts/LSP7CompatibleERC20.json +71 -36
  16. package/artifacts/LSP7CompatibleERC20InitAbstract.json +71 -36
  17. package/artifacts/LSP7CompatibleERC20Mintable.json +73 -38
  18. package/artifacts/LSP7CompatibleERC20MintableInit.json +73 -38
  19. package/artifacts/LSP7DigitalAsset.json +71 -36
  20. package/artifacts/LSP7DigitalAssetInitAbstract.json +71 -36
  21. package/artifacts/LSP7Mintable.json +73 -38
  22. package/artifacts/LSP7MintableInit.json +73 -38
  23. package/artifacts/LSP8CappedSupply.json +32 -38
  24. package/artifacts/LSP8CappedSupplyInitAbstract.json +32 -38
  25. package/artifacts/LSP8CompatibleERC721.json +35 -41
  26. package/artifacts/LSP8CompatibleERC721InitAbstract.json +35 -41
  27. package/artifacts/LSP8CompatibleERC721Mintable.json +37 -43
  28. package/artifacts/LSP8CompatibleERC721MintableInit.json +37 -43
  29. package/artifacts/LSP8IdentifiableDigitalAsset.json +32 -38
  30. package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +32 -38
  31. package/artifacts/LSP8Mintable.json +34 -40
  32. package/artifacts/LSP8MintableInit.json +34 -40
  33. package/artifacts/LSP9Vault.json +61 -67
  34. package/artifacts/LSP9VaultInit.json +61 -67
  35. package/artifacts/UniversalProfile.json +62 -68
  36. package/artifacts/UniversalProfileInit.json +62 -68
  37. package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +45 -10
  38. package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
  39. package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +36 -6
  40. package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +361 -124
  41. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +30 -4
  42. package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +37 -3
  43. package/contracts/LSP0ERC725Account/LSP0Utils.sol +0 -1
  44. package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +30 -15
  45. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +0 -1
  46. package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol +0 -1
  47. package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +5 -7
  48. package/contracts/LSP17ContractExtension/LSP17Extendable.sol +10 -5
  49. package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +0 -4
  50. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +91 -34
  51. package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +27 -8
  52. package/contracts/LSP20CallVerification/LSP20CallVerification.sol +18 -9
  53. package/contracts/LSP20CallVerification/LSP20Constants.sol +17 -0
  54. package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +26 -12
  55. package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +0 -1
  56. package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +32 -16
  57. package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +11 -2
  58. package/contracts/LSP6KeyManager/LSP6Constants.sol +5 -5
  59. package/contracts/LSP6KeyManager/LSP6Errors.sol +10 -6
  60. package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +140 -68
  61. package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
  62. package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +30 -38
  63. package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +153 -60
  64. package/contracts/LSP6KeyManager/LSP6Utils.sol +1 -5
  65. package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +67 -13
  66. package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
  67. package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +2 -2
  68. package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +24 -0
  69. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +1 -2
  70. package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +1 -2
  71. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +3 -5
  72. package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +3 -5
  73. package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +15 -12
  74. package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +1 -1
  75. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +1 -2
  76. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +1 -2
  77. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +5 -5
  78. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +6 -6
  79. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +2 -2
  80. package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +2 -2
  81. package/contracts/LSP9Vault/ILSP9Vault.sol +9 -1
  82. package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
  83. package/contracts/LSP9Vault/LSP9Vault.sol +0 -6
  84. package/contracts/LSP9Vault/LSP9VaultCore.sol +17 -15
  85. package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -1
  86. package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +8 -5
  87. package/contracts/UniversalProfileInitAbstract.sol +5 -0
  88. package/devdocs/Create2Factory.json +16 -0
  89. package/devdocs/LSP0ERC725Account.json +200 -0
  90. package/devdocs/LSP0ERC725AccountInit.json +203 -0
  91. package/devdocs/LSP11BasicSocialRecovery.json +146 -0
  92. package/devdocs/LSP11BasicSocialRecoveryInit.json +146 -0
  93. package/devdocs/LSP16UniversalFactory.json +51 -0
  94. package/devdocs/LSP1UniversalReceiverDelegateUP.json +80 -0
  95. package/devdocs/LSP1UniversalReceiverDelegateVault.json +62 -0
  96. package/devdocs/LSP4Compatibility.json +79 -0
  97. package/devdocs/LSP4DigitalAssetMetadata.json +84 -0
  98. package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +77 -0
  99. package/devdocs/LSP6KeyManager.json +257 -0
  100. package/devdocs/LSP6KeyManagerInit.json +260 -0
  101. package/devdocs/LSP7CappedSupply.json +211 -0
  102. package/devdocs/LSP7CappedSupplyInitAbstract.json +206 -0
  103. package/devdocs/LSP7CompatibleERC20.json +225 -0
  104. package/devdocs/LSP7CompatibleERC20InitAbstract.json +218 -0
  105. package/devdocs/LSP7CompatibleERC20Mintable.json +217 -0
  106. package/devdocs/LSP7CompatibleERC20MintableInit.json +227 -0
  107. package/devdocs/LSP7DigitalAsset.json +210 -0
  108. package/devdocs/LSP7DigitalAssetInitAbstract.json +202 -0
  109. package/devdocs/LSP7Mintable.json +219 -0
  110. package/devdocs/LSP7MintableInit.json +220 -0
  111. package/devdocs/LSP8CappedSupply.json +232 -0
  112. package/devdocs/LSP8CappedSupplyInitAbstract.json +227 -0
  113. package/devdocs/LSP8CompatibleERC721.json +298 -0
  114. package/devdocs/LSP8CompatibleERC721InitAbstract.json +291 -0
  115. package/devdocs/LSP8CompatibleERC721Mintable.json +290 -0
  116. package/devdocs/LSP8CompatibleERC721MintableInit.json +300 -0
  117. package/devdocs/LSP8IdentifiableDigitalAsset.json +230 -0
  118. package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +223 -0
  119. package/devdocs/LSP8Mintable.json +242 -0
  120. package/devdocs/LSP8MintableInit.json +245 -0
  121. package/devdocs/LSP9Vault.json +171 -0
  122. package/devdocs/LSP9VaultInit.json +175 -0
  123. package/devdocs/UniversalProfile.json +199 -0
  124. package/devdocs/UniversalProfileInit.json +202 -0
  125. package/devdocs/UniversalReceiverAddressStore.json +9 -0
  126. package/dist/constants.cjs.js +31569 -0
  127. package/dist/constants.d.ts +31681 -0
  128. package/dist/constants.es.js +31550 -0
  129. package/package.json +69 -52
  130. package/userdocs/Create2Factory.json +5 -0
  131. package/userdocs/LSP0ERC725Account.json +47 -0
  132. package/userdocs/LSP0ERC725AccountInit.json +47 -0
  133. package/userdocs/LSP11BasicSocialRecovery.json +29 -0
  134. package/userdocs/LSP11BasicSocialRecoveryInit.json +29 -0
  135. package/userdocs/LSP16UniversalFactory.json +5 -0
  136. package/userdocs/LSP1UniversalReceiverDelegateUP.json +10 -0
  137. package/userdocs/LSP1UniversalReceiverDelegateVault.json +10 -0
  138. package/userdocs/LSP4Compatibility.json +20 -0
  139. package/userdocs/LSP4DigitalAssetMetadata.json +23 -0
  140. package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +20 -0
  141. package/userdocs/LSP6KeyManager.json +18 -0
  142. package/userdocs/LSP6KeyManagerInit.json +18 -0
  143. package/userdocs/LSP7CappedSupply.json +29 -0
  144. package/userdocs/LSP7CappedSupplyInitAbstract.json +26 -0
  145. package/userdocs/LSP7CompatibleERC20.json +35 -0
  146. package/userdocs/LSP7CompatibleERC20InitAbstract.json +32 -0
  147. package/userdocs/LSP7CompatibleERC20Mintable.json +32 -0
  148. package/userdocs/LSP7CompatibleERC20MintableInit.json +35 -0
  149. package/userdocs/LSP7DigitalAsset.json +29 -0
  150. package/userdocs/LSP7DigitalAssetInitAbstract.json +26 -0
  151. package/userdocs/LSP7Mintable.json +29 -0
  152. package/userdocs/LSP7MintableInit.json +29 -0
  153. package/userdocs/LSP8CappedSupply.json +23 -0
  154. package/userdocs/LSP8CappedSupplyInitAbstract.json +20 -0
  155. package/userdocs/LSP8CompatibleERC721.json +29 -0
  156. package/userdocs/LSP8CompatibleERC721InitAbstract.json +26 -0
  157. package/userdocs/LSP8CompatibleERC721Mintable.json +26 -0
  158. package/userdocs/LSP8CompatibleERC721MintableInit.json +29 -0
  159. package/userdocs/LSP8IdentifiableDigitalAsset.json +23 -0
  160. package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +20 -0
  161. package/userdocs/LSP8Mintable.json +23 -0
  162. package/userdocs/LSP8MintableInit.json +23 -0
  163. package/userdocs/LSP9Vault.json +38 -0
  164. package/userdocs/LSP9VaultInit.json +38 -0
  165. package/userdocs/UniversalProfile.json +50 -0
  166. package/userdocs/UniversalProfileInit.json +50 -0
  167. package/userdocs/UniversalReceiverAddressStore.json +5 -0
  168. package/CONTRIBUTING.md +0 -57
  169. package/common/constants.d.ts +0 -461
  170. package/common/constants.js +0 -789
  171. package/contracts/Utils/GasLib.sol +0 -17
  172. package/module/constants.d.ts +0 -461
  173. package/module/constants.js +0 -786
@@ -0,0 +1,220 @@
1
+ {
2
+ "details": "LSP7 extension, mintable.",
3
+ "errors": {
4
+ "ERC725Y_DataKeysValuesEmptyArray()": [
5
+ {
6
+ "details": "reverts when one of the array parameter provided to `setDataBatch` is an empty array"
7
+ }
8
+ ],
9
+ "ERC725Y_DataKeysValuesLengthMismatch()": [
10
+ {
11
+ "details": "reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch."
12
+ }
13
+ ],
14
+ "ERC725Y_MsgValueDisallowed()": [
15
+ {
16
+ "details": "reverts when sending value to the `setData(..)` functions"
17
+ }
18
+ ],
19
+ "LSP4TokenNameNotEditable()": [
20
+ {
21
+ "details": "Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
22
+ }
23
+ ],
24
+ "LSP4TokenSymbolNotEditable()": [
25
+ {
26
+ "details": "Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
27
+ }
28
+ ],
29
+ "LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)": [
30
+ {
31
+ "details": "reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than the `authorizedAmount`."
32
+ }
33
+ ],
34
+ "LSP7AmountExceedsBalance(uint256,address,uint256)": [
35
+ {
36
+ "details": "reverts when sending an `amount` of tokens larger than the current `balance` of the `tokenOwner`."
37
+ }
38
+ ],
39
+ "LSP7CannotSendToSelf()": [
40
+ {
41
+ "details": "reverts when specifying the same address for `from` or `to` in a token transfer."
42
+ }
43
+ ],
44
+ "LSP7CannotSendWithAddressZero()": [
45
+ {
46
+ "details": "reverts when one tries to send tokens to or from the zero address."
47
+ }
48
+ ],
49
+ "LSP7CannotUseAddressZeroAsOperator()": [
50
+ {
51
+ "details": "reverts when trying to set the zero address as an operator."
52
+ }
53
+ ],
54
+ "LSP7DecreasedAllowanceBelowZero()": [
55
+ {
56
+ "details": "Reverts when trying to decrease an operator's allowance to more than his current allowance"
57
+ }
58
+ ],
59
+ "LSP7InvalidTransferBatch()": [
60
+ {
61
+ "details": "reverts when the parameters used for `transferBatch` have different lengths."
62
+ }
63
+ ],
64
+ "LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)": [
65
+ {
66
+ "details": "reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
67
+ }
68
+ ],
69
+ "LSP7NotifyTokenReceiverIsEOA(address)": [
70
+ {
71
+ "details": "reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
72
+ }
73
+ ],
74
+ "LSP7TokenOwnerCannotBeOperator()": [
75
+ {
76
+ "details": "reverts when trying to authorize or revoke the token's owner as an operator."
77
+ }
78
+ ]
79
+ },
80
+ "kind": "dev",
81
+ "methods": {
82
+ "authorizeOperator(address,uint256)": {
83
+ "details": "To avoid front-running and Allowance Double-Spend Exploit when increasing or decreasing the authorized amount of an operator, it is advised to: 1. call {revokeOperator} first, and 2. then re-call {authorizeOperator} with the new amount for more information, see: https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/",
84
+ "params": {
85
+ "amount": "The amount of tokens operator has access to.",
86
+ "operator": "The address to authorize as an operator."
87
+ }
88
+ },
89
+ "authorizedAmountFor(address,address)": {
90
+ "details": "Returns amount of tokens `operator` address has access to from `tokenOwner`. Operators can send and burn tokens on behalf of their owners. The tokenOwner is their own operator.",
91
+ "params": {
92
+ "operator": "The address to query operator status for.",
93
+ "tokenOwner": "The token owner."
94
+ },
95
+ "returns": {
96
+ "_0": "The amount of tokens `operator` address has access to from `tokenOwner`."
97
+ }
98
+ },
99
+ "balanceOf(address)": {
100
+ "details": "Returns the number of tokens owned by `tokenOwner`.",
101
+ "params": {
102
+ "tokenOwner": "The address to query"
103
+ },
104
+ "returns": {
105
+ "_0": "The number of tokens owned by this address"
106
+ }
107
+ },
108
+ "constructor": {
109
+ "details": "initialize (= lock) base implementation contract on deployment"
110
+ },
111
+ "decimals()": {
112
+ "details": "Returns the number of decimals used to get its user representation If the contract represents a NFT then 0 SHOULD be used, otherwise 18 is the common value NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {balanceOf} and {transfer}."
113
+ },
114
+ "decreaseAllowance(address,uint256)": {
115
+ "details": "Atomically decreases the allowance granted to `operator` by the caller. This is an alternative approach to {authorizeOperator} that can be used as a mitigation for problems described in {ILSP7DigitalAsset} Emits: - an {AuthorizedOperator} event indicating the updated allowance after decreasing it. - a {RevokeOperator} event if `substractedAmount` is the full allowance, indicating `operator` does not have any allowance left for `msg.sender`.Requirements: - `operator` cannot be the zero address. - operator` must have allowance for the caller of at least `substractedAmount`.",
116
+ "params": {
117
+ "operator": "the operator to decrease allowance for `msg.sender`",
118
+ "substractedAmount": "the amount to decrease by in the operator's allowance."
119
+ }
120
+ },
121
+ "getData(bytes32)": {
122
+ "params": {
123
+ "dataKey": "The key which value to retrieve"
124
+ },
125
+ "returns": {
126
+ "dataValue": "The data stored at the key"
127
+ }
128
+ },
129
+ "getDataBatch(bytes32[])": {
130
+ "params": {
131
+ "dataKeys": "The array of keys which values to retrieve"
132
+ },
133
+ "returns": {
134
+ "dataValues": "The array of data stored at multiple keys"
135
+ }
136
+ },
137
+ "increaseAllowance(address,uint256)": {
138
+ "details": "Atomically increases the allowance granted to `operator` by the caller. This is an alternative approach to {authorizeOperator} that can be used as a mitigation for problems described in {ILSP7DigitalAsset}. Emits an {AuthorizedOperator} event indicating the updated allowance.Requirements: - `operator` cannot be the same address as `msg.sender` - `operator` cannot be the zero address.",
139
+ "params": {
140
+ "addedAmount": "the additional amount to add on top of the current operator's allowance",
141
+ "operator": "the operator to increase the allowance for `msg.sender`"
142
+ }
143
+ },
144
+ "initialize(string,string,address,bool)": {
145
+ "params": {
146
+ "isNonDivisible_": "Specify if the LSP7 token is a fungible or non-fungible token",
147
+ "name_": "The name of the token",
148
+ "newOwner_": "The owner of the the token-Metadata",
149
+ "symbol_": "The symbol of the token"
150
+ }
151
+ },
152
+ "mint(address,uint256,bool,bytes)": {
153
+ "details": "Mints `amount` tokens and transfers it to `to`. Requirements: - `to` cannot be the zero address. Emits a {Transfer} event.",
154
+ "params": {
155
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
156
+ "amount": "The amount to mint",
157
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
158
+ "to": "The address to mint tokens"
159
+ }
160
+ },
161
+ "owner()": {
162
+ "details": "Returns the address of the current owner."
163
+ },
164
+ "renounceOwnership()": {
165
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
166
+ },
167
+ "revokeOperator(address)": {
168
+ "details": "Removes `operator` address as an operator of callers tokens. See {authorizedAmountFor}. Requirements - `operator` cannot be the zero address. Emits a {RevokedOperator} event.",
169
+ "params": {
170
+ "operator": "The address to revoke as an operator."
171
+ }
172
+ },
173
+ "setData(bytes32,bytes)": {
174
+ "params": {
175
+ "dataKey": "The key to retrieve stored value",
176
+ "dataValue": "The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event."
177
+ }
178
+ },
179
+ "setDataBatch(bytes32[],bytes[])": {
180
+ "details": "Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event.",
181
+ "params": {
182
+ "dataKeys": "The array of data keys for values to set",
183
+ "dataValues": "The array of values to set"
184
+ }
185
+ },
186
+ "supportsInterface(bytes4)": {
187
+ "details": "See {IERC165-supportsInterface}."
188
+ },
189
+ "totalSupply()": {
190
+ "details": "Returns the number of existing tokens.",
191
+ "returns": {
192
+ "_0": "The number of existing tokens"
193
+ }
194
+ },
195
+ "transfer(address,address,uint256,bool,bytes)": {
196
+ "details": "Transfers `amount` of tokens from `from` to `to`. The `allowNonLSP1Recipient` parameter will be used when notifying the token sender and receiver. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `amount` tokens must be owned by `from`. - If the caller is not `from`, it must be an operator for `from` with access to at least `amount` tokens. Emits a {Transfer} event.",
197
+ "params": {
198
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
199
+ "amount": "The amount of tokens to transfer.",
200
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
201
+ "from": "The sending address.",
202
+ "to": "The receiving address."
203
+ }
204
+ },
205
+ "transferBatch(address[],address[],uint256[],bool[],bytes[])": {
206
+ "details": "Transfers many tokens based on the list `from`, `to`, `amount`. If any transfer fails the call will revert. Requirements: - `from`, `to`, `amount` lists are the same length. - no values in `from` can be the zero address. - no values in `to` can be the zero address. - each `amount` tokens must be owned by `from`. - If the caller is not `from`, it must be an operator for `from` with access to at least `amount` tokens. Emits {Transfer} events.",
207
+ "params": {
208
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
209
+ "amount": "The amount of tokens to transfer.",
210
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
211
+ "from": "The list of sending addresses.",
212
+ "to": "The list of receiving addresses."
213
+ }
214
+ },
215
+ "transferOwnership(address)": {
216
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
217
+ }
218
+ },
219
+ "version": 1
220
+ }
@@ -0,0 +1,232 @@
1
+ {
2
+ "details": "LSP8 extension, adds token supply cap.",
3
+ "errors": {
4
+ "ERC725Y_DataKeysValuesEmptyArray()": [
5
+ {
6
+ "details": "reverts when one of the array parameter provided to `setDataBatch` is an empty array"
7
+ }
8
+ ],
9
+ "ERC725Y_DataKeysValuesLengthMismatch()": [
10
+ {
11
+ "details": "reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch."
12
+ }
13
+ ],
14
+ "ERC725Y_MsgValueDisallowed()": [
15
+ {
16
+ "details": "reverts when sending value to the `setData(..)` functions"
17
+ }
18
+ ],
19
+ "LSP4TokenNameNotEditable()": [
20
+ {
21
+ "details": "Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
22
+ }
23
+ ],
24
+ "LSP4TokenSymbolNotEditable()": [
25
+ {
26
+ "details": "Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
27
+ }
28
+ ],
29
+ "LSP8CannotSendToAddressZero()": [
30
+ {
31
+ "details": "reverts when trying to send token to the zero address."
32
+ }
33
+ ],
34
+ "LSP8CannotSendToSelf()": [
35
+ {
36
+ "details": "reverts when specifying the same address for `from` and `to` in a token transfer."
37
+ }
38
+ ],
39
+ "LSP8CannotUseAddressZeroAsOperator()": [
40
+ {
41
+ "details": "reverts when trying to set the zero address as an operator."
42
+ }
43
+ ],
44
+ "LSP8InvalidTransferBatch()": [
45
+ {
46
+ "details": "reverts when the parameters used for `transferBatch` have different lengths."
47
+ }
48
+ ],
49
+ "LSP8NonExistentTokenId(bytes32)": [
50
+ {
51
+ "details": "reverts when `tokenId` has not been minted."
52
+ }
53
+ ],
54
+ "LSP8NonExistingOperator(address,bytes32)": [
55
+ {
56
+ "details": "reverts when `operator` is not an operator for the `tokenId`."
57
+ }
58
+ ],
59
+ "LSP8NotTokenOperator(bytes32,address)": [
60
+ {
61
+ "details": "reverts when `caller` is not an allowed operator for `tokenId`."
62
+ }
63
+ ],
64
+ "LSP8NotTokenOwner(address,bytes32,address)": [
65
+ {
66
+ "details": "reverts when `caller` is not the `tokenOwner` of the `tokenId`."
67
+ }
68
+ ],
69
+ "LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)": [
70
+ {
71
+ "details": "reverts if the `tokenReceiver` does not implement LSP1 when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
72
+ }
73
+ ],
74
+ "LSP8NotifyTokenReceiverIsEOA(address)": [
75
+ {
76
+ "details": "reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`."
77
+ }
78
+ ],
79
+ "LSP8OperatorAlreadyAuthorized(address,bytes32)": [
80
+ {
81
+ "details": "reverts when `operator` is already authorized for the `tokenId`."
82
+ }
83
+ ],
84
+ "LSP8TokenOwnerCannotBeOperator()": [
85
+ {
86
+ "details": "reverts when trying to authorize or revoke the token's owner as an operator."
87
+ }
88
+ ]
89
+ },
90
+ "kind": "dev",
91
+ "methods": {
92
+ "authorizeOperator(address,bytes32)": {
93
+ "details": "Makes `operator` address an operator of `tokenId`. See {isOperatorFor}. Requirements - `tokenId` must exist. - caller must be current `tokenOwner` of `tokenId`. - `operator` cannot be the zero address. Emits an {AuthorizedOperator} event.",
94
+ "params": {
95
+ "operator": "The address to authorize as an operator.",
96
+ "tokenId": "The tokenId operator has access to."
97
+ }
98
+ },
99
+ "balanceOf(address)": {
100
+ "details": "Returns the number of tokens owned by `tokenOwner`.",
101
+ "params": {
102
+ "tokenOwner": "The address to query"
103
+ },
104
+ "returns": {
105
+ "_0": "The number of tokens owned by this address"
106
+ }
107
+ },
108
+ "constructor": {
109
+ "params": {
110
+ "tokenSupplyCap_": "The Token max supply"
111
+ }
112
+ },
113
+ "getData(bytes32)": {
114
+ "params": {
115
+ "dataKey": "The key which value to retrieve"
116
+ },
117
+ "returns": {
118
+ "dataValue": "The data stored at the key"
119
+ }
120
+ },
121
+ "getDataBatch(bytes32[])": {
122
+ "params": {
123
+ "dataKeys": "The array of keys which values to retrieve"
124
+ },
125
+ "returns": {
126
+ "dataValues": "The array of data stored at multiple keys"
127
+ }
128
+ },
129
+ "getOperatorsOf(bytes32)": {
130
+ "details": "Returns all `operator` addresses of `tokenId`. Requirements - `tokenId` must exist.",
131
+ "params": {
132
+ "tokenId": "The tokenId to query"
133
+ },
134
+ "returns": {
135
+ "_0": "The list of operators for the `tokenId`"
136
+ }
137
+ },
138
+ "isOperatorFor(address,bytes32)": {
139
+ "details": "Returns whether `operator` address is an operator of `tokenId`. Operators can send and burn tokens on behalf of their owners. The tokenOwner is their own operator. Requirements - `tokenId` must exist.",
140
+ "params": {
141
+ "operator": "The address to query",
142
+ "tokenId": "The tokenId to query"
143
+ },
144
+ "returns": {
145
+ "_0": "True if the owner of `tokenId` is `operator` address, false otherwise"
146
+ }
147
+ },
148
+ "owner()": {
149
+ "details": "Returns the address of the current owner."
150
+ },
151
+ "renounceOwnership()": {
152
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
153
+ },
154
+ "revokeOperator(address,bytes32)": {
155
+ "details": "Removes `operator` address as an operator of `tokenId`. See {isOperatorFor}. Requirements - `tokenId` must exist. - caller must be current `tokenOwner` of `tokenId`. - `operator` cannot be the zero address. Emits a {RevokedOperator} event.",
156
+ "params": {
157
+ "operator": "The address to revoke as an operator.",
158
+ "tokenId": "The tokenId `operator` is revoked from operating"
159
+ }
160
+ },
161
+ "setData(bytes32,bytes)": {
162
+ "params": {
163
+ "dataKey": "The key to retrieve stored value",
164
+ "dataValue": "The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event."
165
+ }
166
+ },
167
+ "setDataBatch(bytes32[],bytes[])": {
168
+ "details": "Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event.",
169
+ "params": {
170
+ "dataKeys": "The array of data keys for values to set",
171
+ "dataValues": "The array of values to set"
172
+ }
173
+ },
174
+ "supportsInterface(bytes4)": {
175
+ "details": "See {IERC165-supportsInterface}."
176
+ },
177
+ "tokenIdsOf(address)": {
178
+ "details": "Returns the list of `tokenIds` for the `tokenOwner` address.",
179
+ "params": {
180
+ "tokenOwner": "The address to query owned tokens"
181
+ },
182
+ "returns": {
183
+ "_0": "List of owned tokens by `tokenOwner` address"
184
+ }
185
+ },
186
+ "tokenOwnerOf(bytes32)": {
187
+ "details": "Returns the `tokenOwner` address of the `tokenId` token. Requirements: - `tokenId` must exist.",
188
+ "params": {
189
+ "tokenId": "The tokenId to query"
190
+ },
191
+ "returns": {
192
+ "_0": "The address owning the `tokenId`"
193
+ }
194
+ },
195
+ "tokenSupplyCap()": {
196
+ "details": "Returns the number of tokens that can be minted.",
197
+ "returns": {
198
+ "_0": "The token max supply"
199
+ }
200
+ },
201
+ "totalSupply()": {
202
+ "details": "Returns the number of existing tokens.",
203
+ "returns": {
204
+ "_0": "The number of existing tokens"
205
+ }
206
+ },
207
+ "transfer(address,address,bytes32,bool,bytes)": {
208
+ "details": "Transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `from` and `to` cannot be the same address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be an operator of `tokenId`. Emits a {Transfer} event.",
209
+ "params": {
210
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
211
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
212
+ "from": "The sending address.",
213
+ "to": "The receiving address.",
214
+ "tokenId": "The tokenId to transfer."
215
+ }
216
+ },
217
+ "transferBatch(address[],address[],bytes32[],bool[],bytes[])": {
218
+ "details": "Transfers many tokens based on the list `from`, `to`, `tokenId`. If any transfer fails the call will revert. Requirements: - `from`, `to`, `tokenId` lists are the same length. - no values in `from` can be the zero address. - no values in `to` can be the zero address. - `from` and `to` cannot be the same address at the same index of each lists. - each `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be an operator of each `tokenId`. Emits {Transfer} events.",
219
+ "params": {
220
+ "allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
221
+ "data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
222
+ "from": "The list of sending addresses.",
223
+ "to": "The list of receiving addresses.",
224
+ "tokenId": "The list of tokenId to transfer."
225
+ }
226
+ },
227
+ "transferOwnership(address)": {
228
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
229
+ }
230
+ },
231
+ "version": 1
232
+ }