@lukso/lsp-smart-contracts 0.8.2 → 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.
- package/README.md +29 -8
- package/artifacts/LSP0ERC725Account.json +90 -50
- package/artifacts/LSP0ERC725AccountInit.json +90 -50
- package/artifacts/LSP11BasicSocialRecovery.json +2 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
- package/artifacts/LSP16UniversalFactory.json +31 -2
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +19 -35
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +13 -13
- package/artifacts/LSP4Compatibility.json +39 -40
- package/artifacts/LSP4DigitalAssetMetadata.json +39 -40
- package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +39 -40
- package/artifacts/LSP6KeyManager.json +107 -8
- package/artifacts/LSP6KeyManagerInit.json +119 -20
- package/artifacts/LSP7CappedSupply.json +78 -38
- package/artifacts/LSP7CappedSupplyInitAbstract.json +78 -38
- package/artifacts/LSP7CompatibleERC20.json +78 -38
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +78 -38
- package/artifacts/LSP7CompatibleERC20Mintable.json +80 -40
- package/artifacts/LSP7CompatibleERC20MintableInit.json +80 -40
- package/artifacts/LSP7DigitalAsset.json +78 -38
- package/artifacts/LSP7DigitalAssetInitAbstract.json +78 -38
- package/artifacts/LSP7Mintable.json +80 -40
- package/artifacts/LSP7MintableInit.json +80 -40
- package/artifacts/LSP8CappedSupply.json +39 -40
- package/artifacts/LSP8CappedSupplyInitAbstract.json +39 -40
- package/artifacts/LSP8CompatibleERC721.json +42 -43
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +42 -43
- package/artifacts/LSP8CompatibleERC721Mintable.json +44 -45
- package/artifacts/LSP8CompatibleERC721MintableInit.json +44 -45
- package/artifacts/LSP8IdentifiableDigitalAsset.json +39 -40
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +39 -40
- package/artifacts/LSP8Mintable.json +41 -42
- package/artifacts/LSP8MintableInit.json +41 -42
- package/artifacts/LSP9Vault.json +73 -55
- package/artifacts/LSP9VaultInit.json +73 -55
- package/artifacts/UniversalProfile.json +90 -50
- package/artifacts/UniversalProfileInit.json +90 -50
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +62 -0
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +36 -6
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +605 -219
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +31 -5
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +37 -3
- package/contracts/LSP0ERC725Account/LSP0Utils.sol +0 -1
- package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +71 -60
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +5 -7
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol +0 -1
- package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +27 -4
- package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +41 -84
- package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +8 -8
- package/contracts/LSP17ContractExtension/LSP17Extendable.sol +10 -5
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +0 -4
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +129 -77
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +45 -16
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +12 -0
- package/contracts/LSP20CallVerification/ILSP20CallVerification.sol +30 -0
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +83 -0
- package/contracts/LSP20CallVerification/LSP20Constants.sol +17 -0
- package/contracts/LSP20CallVerification/LSP20Errors.sol +15 -0
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +26 -12
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +0 -1
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +76 -66
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +12 -3
- package/contracts/LSP6KeyManager/LSP6Constants.sol +9 -3
- package/contracts/LSP6KeyManager/LSP6Errors.sol +22 -1
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +172 -29
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +270 -100
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +187 -67
- package/contracts/LSP6KeyManager/LSP6Utils.sol +31 -20
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +79 -30
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +5 -0
- package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +2 -2
- package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +24 -0
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +1 -2
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +1 -2
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +3 -5
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +3 -5
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +27 -29
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +1 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +1 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +5 -5
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +6 -6
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +2 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +2 -2
- package/contracts/LSP9Vault/ILSP9Vault.sol +27 -0
- package/contracts/LSP9Vault/LSP9Constants.sol +1 -1
- package/contracts/LSP9Vault/LSP9Vault.sol +11 -8
- package/contracts/LSP9Vault/LSP9VaultCore.sol +96 -71
- package/contracts/LSP9Vault/LSP9VaultInit.sol +2 -1
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +19 -7
- package/contracts/UniversalProfileInitAbstract.sol +5 -0
- package/devdocs/Create2Factory.json +16 -0
- package/devdocs/LSP0ERC725Account.json +200 -0
- package/devdocs/LSP0ERC725AccountInit.json +203 -0
- package/devdocs/LSP11BasicSocialRecovery.json +146 -0
- package/devdocs/LSP11BasicSocialRecoveryInit.json +146 -0
- package/devdocs/LSP16UniversalFactory.json +51 -0
- package/devdocs/LSP1UniversalReceiverDelegateUP.json +80 -0
- package/devdocs/LSP1UniversalReceiverDelegateVault.json +62 -0
- package/devdocs/LSP4Compatibility.json +79 -0
- package/devdocs/LSP4DigitalAssetMetadata.json +84 -0
- package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +77 -0
- package/devdocs/LSP6KeyManager.json +257 -0
- package/devdocs/LSP6KeyManagerInit.json +260 -0
- package/devdocs/LSP7CappedSupply.json +211 -0
- package/devdocs/LSP7CappedSupplyInitAbstract.json +206 -0
- package/devdocs/LSP7CompatibleERC20.json +225 -0
- package/devdocs/LSP7CompatibleERC20InitAbstract.json +218 -0
- package/devdocs/LSP7CompatibleERC20Mintable.json +217 -0
- package/devdocs/LSP7CompatibleERC20MintableInit.json +227 -0
- package/devdocs/LSP7DigitalAsset.json +210 -0
- package/devdocs/LSP7DigitalAssetInitAbstract.json +202 -0
- package/devdocs/LSP7Mintable.json +219 -0
- package/devdocs/LSP7MintableInit.json +220 -0
- package/devdocs/LSP8CappedSupply.json +232 -0
- package/devdocs/LSP8CappedSupplyInitAbstract.json +227 -0
- package/devdocs/LSP8CompatibleERC721.json +298 -0
- package/devdocs/LSP8CompatibleERC721InitAbstract.json +291 -0
- package/devdocs/LSP8CompatibleERC721Mintable.json +290 -0
- package/devdocs/LSP8CompatibleERC721MintableInit.json +300 -0
- package/devdocs/LSP8IdentifiableDigitalAsset.json +230 -0
- package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +223 -0
- package/devdocs/LSP8Mintable.json +242 -0
- package/devdocs/LSP8MintableInit.json +245 -0
- package/devdocs/LSP9Vault.json +171 -0
- package/devdocs/LSP9VaultInit.json +175 -0
- package/devdocs/UniversalProfile.json +199 -0
- package/devdocs/UniversalProfileInit.json +202 -0
- package/devdocs/UniversalReceiverAddressStore.json +9 -0
- package/dist/constants.cjs.js +31569 -0
- package/dist/constants.d.ts +31681 -0
- package/dist/constants.es.js +31550 -0
- package/package.json +70 -52
- package/userdocs/Create2Factory.json +5 -0
- package/userdocs/LSP0ERC725Account.json +47 -0
- package/userdocs/LSP0ERC725AccountInit.json +47 -0
- package/userdocs/LSP11BasicSocialRecovery.json +29 -0
- package/userdocs/LSP11BasicSocialRecoveryInit.json +29 -0
- package/userdocs/LSP16UniversalFactory.json +5 -0
- package/userdocs/LSP1UniversalReceiverDelegateUP.json +10 -0
- package/userdocs/LSP1UniversalReceiverDelegateVault.json +10 -0
- package/userdocs/LSP4Compatibility.json +20 -0
- package/userdocs/LSP4DigitalAssetMetadata.json +23 -0
- package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +20 -0
- package/userdocs/LSP6KeyManager.json +18 -0
- package/userdocs/LSP6KeyManagerInit.json +18 -0
- package/userdocs/LSP7CappedSupply.json +29 -0
- package/userdocs/LSP7CappedSupplyInitAbstract.json +26 -0
- package/userdocs/LSP7CompatibleERC20.json +35 -0
- package/userdocs/LSP7CompatibleERC20InitAbstract.json +32 -0
- package/userdocs/LSP7CompatibleERC20Mintable.json +32 -0
- package/userdocs/LSP7CompatibleERC20MintableInit.json +35 -0
- package/userdocs/LSP7DigitalAsset.json +29 -0
- package/userdocs/LSP7DigitalAssetInitAbstract.json +26 -0
- package/userdocs/LSP7Mintable.json +29 -0
- package/userdocs/LSP7MintableInit.json +29 -0
- package/userdocs/LSP8CappedSupply.json +23 -0
- package/userdocs/LSP8CappedSupplyInitAbstract.json +20 -0
- package/userdocs/LSP8CompatibleERC721.json +29 -0
- package/userdocs/LSP8CompatibleERC721InitAbstract.json +26 -0
- package/userdocs/LSP8CompatibleERC721Mintable.json +26 -0
- package/userdocs/LSP8CompatibleERC721MintableInit.json +29 -0
- package/userdocs/LSP8IdentifiableDigitalAsset.json +23 -0
- package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +20 -0
- package/userdocs/LSP8Mintable.json +23 -0
- package/userdocs/LSP8MintableInit.json +23 -0
- package/userdocs/LSP9Vault.json +38 -0
- package/userdocs/LSP9VaultInit.json +38 -0
- package/userdocs/UniversalProfile.json +50 -0
- package/userdocs/UniversalProfileInit.json +50 -0
- package/userdocs/UniversalReceiverAddressStore.json +5 -0
- package/CONTRIBUTING.md +0 -57
- package/common/constants.d.ts +0 -738
- package/common/constants.js +0 -785
- package/contracts/Utils/GasLib.sol +0 -17
- package/module/constants.d.ts +0 -738
- package/module/constants.js +0 -782
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Fabian Vogelsteller <frozeman>, Jean Cavallera (CJ42), Yamen Merhi (YamenMerhi)",
|
|
3
|
+
"details": "all the permissions can be set on the ERC725 Account using `setData(...)` with the keys constants below",
|
|
4
|
+
"errors": {
|
|
5
|
+
"AddressPermissionArrayIndexValueNotAnAddress(bytes32,bytes)": [
|
|
6
|
+
{
|
|
7
|
+
"details": "reverts when trying to set a value that is not 20 bytes long under AddressPermissions[index]",
|
|
8
|
+
"params": {
|
|
9
|
+
"dataKey": "the AddressPermissions[index] data key",
|
|
10
|
+
"invalidValue": "the invalid value that was attempted to be set under AddressPermissions[index]"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"BatchExecuteParamsLengthMismatch()": [
|
|
15
|
+
{
|
|
16
|
+
"details": "there should be the same number of elements for each array parameters in the following batch functions: - execute(uint256[],bytes[]) - executeRelayCall(bytes[],uint256[],uint256[],bytes[])"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"BatchExecuteRelayCallParamsLengthMismatch()": [
|
|
20
|
+
{
|
|
21
|
+
"details": "reverts when providing array parameters of different sizes to `executeRelayCall(bytes[],uint256[],bytes[])`"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"CallingKeyManagerNotAllowed()": [
|
|
25
|
+
{
|
|
26
|
+
"details": "reverts when calling the KeyManager through execute(..)"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"CannotSendValueToSetData()": [
|
|
30
|
+
{
|
|
31
|
+
"details": "reverts when sending value to the `setData(..)` functions"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"DelegateCallDisallowedViaKeyManager()": [
|
|
35
|
+
{
|
|
36
|
+
"details": "ERC725X operation type 4 (DELEGATECALL) is disallowed by default"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"ERC725Y_DataKeysValuesLengthMismatch()": [
|
|
40
|
+
{
|
|
41
|
+
"details": "reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"InvalidERC725Function(bytes4)": [
|
|
45
|
+
{
|
|
46
|
+
"details": "reverts when trying to run an invalid function on the linked target account via the Key Manager.",
|
|
47
|
+
"params": {
|
|
48
|
+
"invalidFunction": "the bytes4 selector of the invalid function"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"InvalidEncodedAllowedCalls(bytes)": [
|
|
53
|
+
{
|
|
54
|
+
"details": "reverts when `allowedCallsValue` is not properly encoded as a bytes28[CompactBytesArray] (CompactBytesArray of bytes28 entries). See LSP2 value type `CompactBytesArray` for details.",
|
|
55
|
+
"params": {
|
|
56
|
+
"allowedCallsValue": "the list of allowedCalls"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"InvalidEncodedAllowedERC725YDataKeys(bytes,string)": [
|
|
61
|
+
{
|
|
62
|
+
"details": "reverts when `value` is not encoded properly using the CompactBytesArray",
|
|
63
|
+
"params": {
|
|
64
|
+
"context": "a brief description of where the error occured",
|
|
65
|
+
"value": "the value to check for an CompactBytesArray"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"InvalidLSP6Target()": [
|
|
70
|
+
{
|
|
71
|
+
"details": "reverts when the address provided as a target (= account) linked to this KeyManager is invalid e.g. address(0)"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"InvalidPayload(bytes)": [
|
|
75
|
+
{
|
|
76
|
+
"details": "reverts when the payload is invalid."
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"InvalidRelayNonce(address,uint256,bytes)": [
|
|
80
|
+
{
|
|
81
|
+
"details": "reverts when the `signer` address retrieved from the `signature` has an invalid nonce: `invalidNonce`.",
|
|
82
|
+
"params": {
|
|
83
|
+
"invalidNonce": "the nonce retrieved for the `signer` address",
|
|
84
|
+
"signature": "the signature used to retrieve the `signer` address",
|
|
85
|
+
"signer": "the address of the signer"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"InvalidWhitelistedCall(address)": [
|
|
90
|
+
{
|
|
91
|
+
"details": "a `from` address is not allowed to have 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff in its list of AddressPermissions:AllowedCalls:<address>, as this allows any STANDARD:ADDRESS:FUNCTION. This is equivalent to granting the SUPER permission and should never be valid.",
|
|
92
|
+
"params": {
|
|
93
|
+
"from": "the address that has any allowed calls whitelisted."
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"LSP6BatchExcessiveValueSent(uint256,uint256)": [
|
|
98
|
+
{
|
|
99
|
+
"details": "reverts to avoid the KeyManager to holds some remaining funds sent to the following batch functions: - execute(uint256[],bytes[]) - executeRelayCall(bytes[],uint256[],uint256[],bytes[]) This error occurs when `msg.value` is more than the sum of all the values being forwarded on each payloads (`values[]` parameter from the batch functions above)."
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"LSP6BatchInsufficientValueSent(uint256,uint256)": [
|
|
103
|
+
{
|
|
104
|
+
"details": "the `msg.value` sent is not enough to cover the sum of all the values being forwarded on each payloads (`values[]` parameter) in the following batch functions: - execute(uint256[],bytes[]) - executeRelayCall(bytes[],uint256[],uint256[],bytes[])"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"NoCallsAllowed(address)": [
|
|
108
|
+
{
|
|
109
|
+
"details": "reverts if there are no allowed calls set for `from`",
|
|
110
|
+
"params": {
|
|
111
|
+
"from": "the address that has no AllowedCalls"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"NoERC725YDataKeysAllowed(address)": [
|
|
116
|
+
{
|
|
117
|
+
"details": "reverts if there are no AllowedERC725YDataKeys set for the caller",
|
|
118
|
+
"params": {
|
|
119
|
+
"from": "the address that has no AllowedERC725YDataKeys"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"NoPermissionsSet(address)": [
|
|
124
|
+
{
|
|
125
|
+
"details": "reverts when address `from` does not have any permissions set on the account linked to this Key Manager",
|
|
126
|
+
"params": {
|
|
127
|
+
"from": "the address that does not have permissions"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"NotAllowedCall(address,address,bytes4)": [
|
|
132
|
+
{
|
|
133
|
+
"details": "reverts when `from` is not authorised to make the call because of a not allowed standard, address or function.",
|
|
134
|
+
"params": {
|
|
135
|
+
"from": "address making the request",
|
|
136
|
+
"selector": "if `to` is a contract, the bytes4 selector of the function that `from` is trying to call. If no function is called (e.g: a native token transfer), selector = 0x00000000",
|
|
137
|
+
"to": "the address of an EOA or contract that `from` is trying to interact with"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"NotAllowedERC725YDataKey(address,bytes32)": [
|
|
142
|
+
{
|
|
143
|
+
"details": "reverts when address `from` is not authorised to set the key `disallowedKey` on the linked account",
|
|
144
|
+
"params": {
|
|
145
|
+
"disallowedKey": "a bytes32 key that `from` is not authorised to set on the ERC725Y storage",
|
|
146
|
+
"from": "address making the request"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"NotAuthorised(address,string)": [
|
|
151
|
+
{
|
|
152
|
+
"details": "reverts when address `from` is not authorised to perform `permission` on the linked account",
|
|
153
|
+
"params": {
|
|
154
|
+
"from": "address not-authorised",
|
|
155
|
+
"permission": "permission required"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"NotRecognisedPermissionKey(bytes32)": [
|
|
160
|
+
{
|
|
161
|
+
"details": "reverts when `dataKey` is a bytes32 that does not adhere to any of the permission data keys specified by the LSP6 standard",
|
|
162
|
+
"params": {
|
|
163
|
+
"dataKey": "the dataKey that does not match with any of the standard LSP6 permission data keys"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"RelayCallBeforeStartTime()": [
|
|
168
|
+
{
|
|
169
|
+
"details": "reverts when relay call start timestamp is bigger than the current timestamp"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"RelayCallExpired()": [
|
|
173
|
+
{
|
|
174
|
+
"details": "reverts when the period to execute the relay call has expired"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"kind": "dev",
|
|
179
|
+
"methods": {
|
|
180
|
+
"constructor": {
|
|
181
|
+
"details": "initialize (= lock) base implementation contract on deployment"
|
|
182
|
+
},
|
|
183
|
+
"execute(bytes)": {
|
|
184
|
+
"details": "the ERC725Account will return some data on successful call, or revert on failure",
|
|
185
|
+
"params": {
|
|
186
|
+
"payload": "the payload to execute. Obtained in web3 via encodeABI()"
|
|
187
|
+
},
|
|
188
|
+
"returns": {
|
|
189
|
+
"_0": "the data being returned by the ERC725 Account"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"executeBatch(uint256[],bytes[])": {
|
|
193
|
+
"details": "batch `execute(bytes)`"
|
|
194
|
+
},
|
|
195
|
+
"executeRelayCall(bytes,uint256,uint256,bytes)": {
|
|
196
|
+
"details": "allows anybody to execute given they have a signed message from an executor",
|
|
197
|
+
"params": {
|
|
198
|
+
"nonce": "the address' nonce (in a specific `_channel`), obtained via `getNonce(...)`. Used to prevent replay attack",
|
|
199
|
+
"payload": "obtained via encodeABI() in web3",
|
|
200
|
+
"signature": "bytes32 ethereum signature",
|
|
201
|
+
"validityTimestamps": "two `uint128` timestamps concatenated, the first timestamp determines from when the payload can be executed, the second timestamp delimits the end of the validity of the payload. If `validityTimestamps` is 0, the checks regardin the timestamps are skipped"
|
|
202
|
+
},
|
|
203
|
+
"returns": {
|
|
204
|
+
"_0": "the data being returned by the ERC725 Account"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"executeRelayCallBatch(bytes[],uint256[],uint256[],uint256[],bytes[])": {
|
|
208
|
+
"details": "batch `executeRelayCall(...)`"
|
|
209
|
+
},
|
|
210
|
+
"getNonce(address,uint128)": {
|
|
211
|
+
"details": "use channel ID = 0 for sequential nonces, any other number for out-of-order execution (= execution in parallel)",
|
|
212
|
+
"params": {
|
|
213
|
+
"channelId": "the channel id to retrieve the nonce from",
|
|
214
|
+
"from": "the caller or signer address"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"initialize(address)": {
|
|
218
|
+
"params": {
|
|
219
|
+
"target_": "The address of the ER725Account to control"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"isValidSignature(bytes32,bytes)": {
|
|
223
|
+
"details": "Should return whether the signature provided is valid for the provided data",
|
|
224
|
+
"params": {
|
|
225
|
+
"hash": "Hash of the data to be signed",
|
|
226
|
+
"signature": "Signature byte array associated with _data"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"lsp20VerifyCall(address,uint256,bytes)": {
|
|
230
|
+
"params": {
|
|
231
|
+
"caller": "The address who called the function on the msg.sender",
|
|
232
|
+
"receivedCalldata": "The receivedCalldata sent by the caller to the msg.sender",
|
|
233
|
+
"value": "The value sent by the caller to the function called on the msg.sender"
|
|
234
|
+
},
|
|
235
|
+
"returns": {
|
|
236
|
+
"_0": "MUST return the first 3 bytes of `lsp20VerifyCall(address,uint256,bytes)` function selector if the call to the function is allowed, concatened with a byte that determines if the lsp20VerifyCallResult function should be called after the original function call. The byte that invoke the lsp20VerifyCallResult function is strictly `0x01`."
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"lsp20VerifyCallResult(bytes32,bytes)": {
|
|
240
|
+
"params": {
|
|
241
|
+
"callHash": "The keccak256 of the parameters of {lsp20VerifyCall} concatenated",
|
|
242
|
+
"result": "The value result of the function called on the msg.sender"
|
|
243
|
+
},
|
|
244
|
+
"returns": {
|
|
245
|
+
"_0": "MUST return the lsp20VerifyCallResult function selector if the call to the function is allowed"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"supportsInterface(bytes4)": {
|
|
249
|
+
"details": "See {IERC165-supportsInterface}."
|
|
250
|
+
},
|
|
251
|
+
"target()": {
|
|
252
|
+
"details": "this can be a contract that implements - ERC725X only - ERC725Y only - any ERC725 based contract (so implementing both ERC725X and ERC725Y)",
|
|
253
|
+
"returns": {
|
|
254
|
+
"_0": "the address of the linked account"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"title": "Proxy implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage",
|
|
259
|
+
"version": 1
|
|
260
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"details": "LSP7 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
|
+
"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
|
+
"params": {
|
|
110
|
+
"tokenSupplyCap_": "The Token max supply"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"decimals()": {
|
|
114
|
+
"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}."
|
|
115
|
+
},
|
|
116
|
+
"decreaseAllowance(address,uint256)": {
|
|
117
|
+
"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`.",
|
|
118
|
+
"params": {
|
|
119
|
+
"operator": "the operator to decrease allowance for `msg.sender`",
|
|
120
|
+
"substractedAmount": "the amount to decrease by in the operator's allowance."
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"getData(bytes32)": {
|
|
124
|
+
"params": {
|
|
125
|
+
"dataKey": "The key which value to retrieve"
|
|
126
|
+
},
|
|
127
|
+
"returns": {
|
|
128
|
+
"dataValue": "The data stored at the key"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"getDataBatch(bytes32[])": {
|
|
132
|
+
"params": {
|
|
133
|
+
"dataKeys": "The array of keys which values to retrieve"
|
|
134
|
+
},
|
|
135
|
+
"returns": {
|
|
136
|
+
"dataValues": "The array of data stored at multiple keys"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"increaseAllowance(address,uint256)": {
|
|
140
|
+
"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.",
|
|
141
|
+
"params": {
|
|
142
|
+
"addedAmount": "the additional amount to add on top of the current operator's allowance",
|
|
143
|
+
"operator": "the operator to increase the allowance for `msg.sender`"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"owner()": {
|
|
147
|
+
"details": "Returns the address of the current owner."
|
|
148
|
+
},
|
|
149
|
+
"renounceOwnership()": {
|
|
150
|
+
"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."
|
|
151
|
+
},
|
|
152
|
+
"revokeOperator(address)": {
|
|
153
|
+
"details": "Removes `operator` address as an operator of callers tokens. See {authorizedAmountFor}. Requirements - `operator` cannot be the zero address. Emits a {RevokedOperator} event.",
|
|
154
|
+
"params": {
|
|
155
|
+
"operator": "The address to revoke as an operator."
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"setData(bytes32,bytes)": {
|
|
159
|
+
"params": {
|
|
160
|
+
"dataKey": "The key to retrieve stored value",
|
|
161
|
+
"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."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"setDataBatch(bytes32[],bytes[])": {
|
|
165
|
+
"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.",
|
|
166
|
+
"params": {
|
|
167
|
+
"dataKeys": "The array of data keys for values to set",
|
|
168
|
+
"dataValues": "The array of values to set"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"supportsInterface(bytes4)": {
|
|
172
|
+
"details": "See {IERC165-supportsInterface}."
|
|
173
|
+
},
|
|
174
|
+
"tokenSupplyCap()": {
|
|
175
|
+
"details": "Returns the number of tokens that can be minted",
|
|
176
|
+
"returns": {
|
|
177
|
+
"_0": "The number of tokens that can be minted"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"totalSupply()": {
|
|
181
|
+
"details": "Returns the number of existing tokens.",
|
|
182
|
+
"returns": {
|
|
183
|
+
"_0": "The number of existing tokens"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"transfer(address,address,uint256,bool,bytes)": {
|
|
187
|
+
"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.",
|
|
188
|
+
"params": {
|
|
189
|
+
"allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
|
|
190
|
+
"amount": "The amount of tokens to transfer.",
|
|
191
|
+
"data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
|
|
192
|
+
"from": "The sending address.",
|
|
193
|
+
"to": "The receiving address."
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"transferBatch(address[],address[],uint256[],bool[],bytes[])": {
|
|
197
|
+
"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.",
|
|
198
|
+
"params": {
|
|
199
|
+
"allowNonLSP1Recipient": "When set to TRUE, to may be any address but when set to FALSE to must be a contract that supports LSP1 UniversalReceiver",
|
|
200
|
+
"amount": "The amount of tokens to transfer.",
|
|
201
|
+
"data": "Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses.",
|
|
202
|
+
"from": "The list of sending addresses.",
|
|
203
|
+
"to": "The list of receiving addresses."
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"transferOwnership(address)": {
|
|
207
|
+
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"version": 1
|
|
211
|
+
}
|