@cartesi/devnet 1.8.0 → 2.0.0-alpha.1

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 (67) hide show
  1. package/build/anvil_state.json +1 -1
  2. package/deployments/localhost/ApplicationFactory.json +227 -0
  3. package/deployments/localhost/AuthorityFactory.json +55 -44
  4. package/deployments/localhost/ERC1155BatchPortal.json +26 -26
  5. package/deployments/localhost/ERC1155SinglePortal.json +25 -25
  6. package/deployments/localhost/ERC20Portal.json +35 -23
  7. package/deployments/localhost/ERC721Portal.json +23 -23
  8. package/deployments/localhost/EtherPortal.json +21 -21
  9. package/deployments/localhost/InputBox.json +64 -58
  10. package/deployments/localhost/QuorumFactory.json +188 -0
  11. package/deployments/localhost/SafeERC20Transfer.json +118 -0
  12. package/deployments/localhost/SelfHostedApplicationFactory.json +71 -70
  13. package/deployments/localhost/TestMultiToken.json +18 -18
  14. package/deployments/localhost/TestNFT.json +24 -24
  15. package/deployments/localhost/TestToken.json +28 -28
  16. package/export/abi/localhost.json +234 -602
  17. package/export/artifacts/@openzeppelin/contracts/access/manager/IAccessManager.sol/IAccessManager.json +11 -22
  18. package/export/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +4 -4
  19. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json +1 -1
  20. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json +1 -1
  21. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json +2 -2
  22. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/ERC1155.sol/ERC1155.json +1 -1
  23. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/IERC1155.sol/IERC1155.json +4 -4
  24. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol/IERC1155Receiver.json +3 -3
  25. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol/IERC1155MetadataURI.json +4 -4
  26. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/utils/ERC1155Utils.sol/ERC1155Utils.json +34 -0
  27. package/export/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +2 -2
  28. package/export/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +1 -1
  29. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json +1 -1
  30. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol/ERC20Pausable.json +2 -2
  31. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol/ERC20Permit.json +3 -3
  32. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +1 -1
  33. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json +1 -1
  34. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +2 -2
  35. package/export/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +4 -4
  36. package/export/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +2 -2
  37. package/export/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +2 -2
  38. package/export/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +3 -3
  39. package/export/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.json +33 -0
  40. package/export/artifacts/@openzeppelin/contracts/utils/Arrays.sol/Arrays.json +26 -3
  41. package/export/artifacts/@openzeppelin/contracts/utils/Comparators.sol/Comparators.json +34 -0
  42. package/export/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.json +65 -0
  43. package/export/artifacts/@openzeppelin/contracts/utils/ShortStrings.sol/ShortStrings.json +2 -2
  44. package/export/artifacts/@openzeppelin/contracts/utils/SlotDerivation.sol/SlotDerivation.json +42 -0
  45. package/export/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +4 -3
  46. package/export/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +3 -2
  47. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json +2 -2
  48. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/EIP712.sol/EIP712.json +2 -2
  49. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol/MessageHashUtils.json +3 -3
  50. package/export/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +1 -1
  51. package/export/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +2 -2
  52. package/export/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +11 -16
  53. package/export/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +4 -3
  54. package/export/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +4 -3
  55. package/export/artifacts/@openzeppelin/contracts/utils/types/Time.sol/Time.json +2 -2
  56. package/export/artifacts/contracts/TestMultiToken.sol/TestMultiToken.json +3 -3
  57. package/export/artifacts/contracts/TestNFT.sol/TestNFT.json +4 -4
  58. package/export/artifacts/contracts/TestToken.sol/TestToken.json +3 -3
  59. package/package.json +11 -11
  60. package/deployments/localhost/AuthorityHistoryPairFactory.json +0 -276
  61. package/deployments/localhost/Bitmask.json +0 -44
  62. package/deployments/localhost/CartesiDAppFactory.json +0 -231
  63. package/deployments/localhost/CartesiMathV2.json +0 -213
  64. package/deployments/localhost/DAppAddressRelay.json +0 -102
  65. package/deployments/localhost/HistoryFactory.json +0 -177
  66. package/deployments/localhost/MerkleV2.json +0 -217
  67. package/deployments/localhost/UnrolledCordic.json +0 -54
@@ -40,17 +40,6 @@
40
40
  "name": "AccessManagerInvalidInitialAdmin",
41
41
  "type": "error"
42
42
  },
43
- {
44
- "inputs": [
45
- {
46
- "internalType": "address",
47
- "name": "account",
48
- "type": "address"
49
- }
50
- ],
51
- "name": "AccessManagerLockedAccount",
52
- "type": "error"
53
- },
54
43
  {
55
44
  "inputs": [
56
45
  {
@@ -581,22 +570,22 @@
581
570
  "outputs": [
582
571
  {
583
572
  "internalType": "uint48",
584
- "name": "",
573
+ "name": "since",
585
574
  "type": "uint48"
586
575
  },
587
576
  {
588
577
  "internalType": "uint32",
589
- "name": "",
578
+ "name": "currentDelay",
590
579
  "type": "uint32"
591
580
  },
592
581
  {
593
582
  "internalType": "uint32",
594
- "name": "",
583
+ "name": "pendingDelay",
595
584
  "type": "uint32"
596
585
  },
597
586
  {
598
587
  "internalType": "uint48",
599
- "name": "",
588
+ "name": "effect",
600
589
  "type": "uint48"
601
590
  }
602
591
  ],
@@ -781,12 +770,12 @@
781
770
  "outputs": [
782
771
  {
783
772
  "internalType": "bool",
784
- "name": "",
773
+ "name": "isMember",
785
774
  "type": "bool"
786
775
  },
787
776
  {
788
777
  "internalType": "uint32",
789
- "name": "",
778
+ "name": "executionDelay",
790
779
  "type": "uint32"
791
780
  }
792
781
  ],
@@ -930,12 +919,12 @@
930
919
  "outputs": [
931
920
  {
932
921
  "internalType": "bytes32",
933
- "name": "",
922
+ "name": "operationId",
934
923
  "type": "bytes32"
935
924
  },
936
925
  {
937
926
  "internalType": "uint32",
938
- "name": "",
927
+ "name": "nonce",
939
928
  "type": "uint32"
940
929
  }
941
930
  ],
@@ -1120,7 +1109,7 @@
1120
1109
  "kind": "dev",
1121
1110
  "methods": {
1122
1111
  "canCall(address,address,bytes4)": {
1123
- "details": "Check if an address (`caller`) is authorised to call a given function on a given contract directly (with no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} & {execute} workflow. This function is usually called by the targeted contract to control immediate execution of restricted functions. Therefore we only return true if the call can be performed without any delay. If the call is subject to a previously set delay (not zero), then the function should return false and the caller should schedule the operation for future execution. If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise the operation can be executed if and only if delay is greater than 0. NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail to identify the indirect workflow, and will consider calls that require a delay to be forbidden. NOTE: This function does not report the permissions of this manager itself. These are defined by the {_canCallSelf} function instead."
1112
+ "details": "Check if an address (`caller`) is authorised to call a given function on a given contract directly (with no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} & {execute} workflow. This function is usually called by the targeted contract to control immediate execution of restricted functions. Therefore we only return true if the call can be performed without any delay. If the call is subject to a previously set delay (not zero), then the function should return false and the caller should schedule the operation for future execution. If `immediate` is true, the delay can be disregarded and the operation can be immediately executed, otherwise the operation can be executed if and only if delay is greater than 0. NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail to identify the indirect workflow, and will consider calls that require a delay to be forbidden. NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the {AccessManager} documentation."
1124
1113
  },
1125
1114
  "cancel(address,address,bytes)": {
1126
1115
  "details": "Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled operation that is cancelled. Requirements: - the caller must be the proposer, a guardian of the targeted function, or a global admin Emits a {OperationCanceled} event."
@@ -1168,7 +1157,7 @@
1168
1157
  "details": "Hashing function for delayed operations."
1169
1158
  },
1170
1159
  "isTargetClosed(address)": {
1171
- "details": "Get whether the contract is closed disabling any access. Otherwise role permissions are applied."
1160
+ "details": "Get whether the contract is closed disabling any access. Otherwise role permissions are applied. NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract."
1172
1161
  },
1173
1162
  "labelRole(uint64,string)": {
1174
1163
  "details": "Give a label to a role, for improved role discoverability by UIs. Requirements: - the caller must be a global admin Emits a {RoleLabel} event."
@@ -1198,7 +1187,7 @@
1198
1187
  "details": "Set the delay for changing the configuration of a given target contract. Requirements: - the caller must be a global admin Emits a {TargetAdminDelayUpdated} event."
1199
1188
  },
1200
1189
  "setTargetClosed(address,bool)": {
1201
- "details": "Set the closed flag for a contract. Requirements: - the caller must be a global admin Emits a {TargetClosed} event."
1190
+ "details": "Set the closed flag for a contract. Closing the manager itself won't disable access to admin methods to avoid locking the contract. Requirements: - the caller must be a global admin Emits a {TargetClosed} event."
1202
1191
  },
1203
1192
  "setTargetFunctionRole(address,bytes4[],uint64)": {
1204
1193
  "details": "Set the role required to call functions identified by the `selectors` in the `target` contract. Requirements: - the caller must be a global admin Emits a {TargetFunctionRoleUpdated} event per selector."
@@ -360,7 +360,7 @@
360
360
  "details": "Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist."
361
361
  },
362
362
  "safeTransferFrom(address,address,uint256)": {
363
- "details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
363
+ "details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC-721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
364
364
  },
365
365
  "safeTransferFrom(address,address,uint256,bytes)": {
366
366
  "details": "Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
@@ -369,13 +369,13 @@
369
369
  "details": "Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the address zero. Emits an {ApprovalForAll} event."
370
370
  },
371
371
  "supportsInterface(bytes4)": {
372
- "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
372
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
373
373
  },
374
374
  "transferFrom(address,address,uint256)": {
375
- "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
375
+ "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
376
376
  }
377
377
  },
378
- "title": "EIP-721 Metadata Update Extension",
378
+ "title": "ERC-721 Metadata Update Extension",
379
379
  "version": 1
380
380
  },
381
381
  "userdoc": {
@@ -110,7 +110,7 @@
110
110
  "linkReferences": {},
111
111
  "deployedLinkReferences": {},
112
112
  "devdoc": {
113
- "details": "Standard ERC1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.",
113
+ "details": "Standard ERC-1155 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.",
114
114
  "errors": {
115
115
  "ERC1155InsufficientBalance(address,uint256,uint256,uint256)": [
116
116
  {
@@ -94,7 +94,7 @@
94
94
  "linkReferences": {},
95
95
  "deployedLinkReferences": {},
96
96
  "devdoc": {
97
- "details": "Standard ERC20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.",
97
+ "details": "Standard ERC-20 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.",
98
98
  "errors": {
99
99
  "ERC20InsufficientAllowance(address,uint256,uint256)": [
100
100
  {
@@ -111,7 +111,7 @@
111
111
  "linkReferences": {},
112
112
  "deployedLinkReferences": {},
113
113
  "devdoc": {
114
- "details": "Standard ERC721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.",
114
+ "details": "Standard ERC-721 Errors Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.",
115
115
  "errors": {
116
116
  "ERC721IncorrectOwner(address,uint256,address)": [
117
117
  {
@@ -150,7 +150,7 @@
150
150
  ],
151
151
  "ERC721InvalidOwner(address)": [
152
152
  {
153
- "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.",
153
+ "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. Used in balance queries.",
154
154
  "params": {
155
155
  "owner": "Address of the current owner of a token."
156
156
  }
@@ -527,7 +527,7 @@
527
527
  "details": "See {IERC165-supportsInterface}."
528
528
  },
529
529
  "uri(uint256)": {
530
- "details": "See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID."
530
+ "details": "See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID."
531
531
  }
532
532
  },
533
533
  "version": 1
@@ -301,7 +301,7 @@
301
301
  "linkReferences": {},
302
302
  "deployedLinkReferences": {},
303
303
  "devdoc": {
304
- "details": "Required interface of an ERC1155 compliant contract, as defined in the https://eips.ethereum.org/EIPS/eip-1155[EIP].",
304
+ "details": "Required interface of an ERC-1155 compliant contract, as defined in the https://eips.ethereum.org/EIPS/eip-1155[ERC].",
305
305
  "events": {
306
306
  "ApprovalForAll(address,address,bool)": {
307
307
  "details": "Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`."
@@ -319,7 +319,7 @@
319
319
  "kind": "dev",
320
320
  "methods": {
321
321
  "balanceOf(address,uint256)": {
322
- "details": "Returns the value of tokens of token type `id` owned by `account`. Requirements: - `account` cannot be the zero address."
322
+ "details": "Returns the value of tokens of token type `id` owned by `account`."
323
323
  },
324
324
  "balanceOfBatch(address[],uint256[])": {
325
325
  "details": "xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. Requirements: - `accounts` and `ids` must have the same length."
@@ -334,10 +334,10 @@
334
334
  "details": "Transfers a `value` amount of tokens of type `id` from `from` to `to`. WARNING: This function can potentially allow a reentrancy attack when transferring tokens to an untrusted contract, when invoking {onERC1155Received} on the receiver. Ensure to follow the checks-effects-interactions pattern and consider employing reentrancy guards when interacting with untrusted contracts. Emits a {TransferSingle} event. Requirements: - `to` cannot be the zero address. - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. - `from` must have a balance of tokens of type `id` of at least `value` amount. - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value."
335
335
  },
336
336
  "setApprovalForAll(address,bool)": {
337
- "details": "Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, Emits an {ApprovalForAll} event. Requirements: - `operator` cannot be the caller."
337
+ "details": "Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, Emits an {ApprovalForAll} event. Requirements: - `operator` cannot be the zero address."
338
338
  },
339
339
  "supportsInterface(bytes4)": {
340
- "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
340
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
341
341
  }
342
342
  },
343
343
  "version": 1
@@ -109,7 +109,7 @@
109
109
  "kind": "dev",
110
110
  "methods": {
111
111
  "onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)": {
112
- "details": "Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81, or its own function selector).",
112
+ "details": "Handles the receipt of a multiple ERC-1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. NOTE: To accept the transfer(s), this must return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` (i.e. 0xbc197c81, or its own function selector).",
113
113
  "params": {
114
114
  "data": "Additional data with no specified format",
115
115
  "from": "The address which previously owned the token",
@@ -122,7 +122,7 @@
122
122
  }
123
123
  },
124
124
  "onERC1155Received(address,address,uint256,uint256,bytes)": {
125
- "details": "Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61, or its own function selector).",
125
+ "details": "Handles the receipt of a single ERC-1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. NOTE: To accept the transfer, this must return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` (i.e. 0xf23a6e61, or its own function selector).",
126
126
  "params": {
127
127
  "data": "Additional data with no specified format",
128
128
  "from": "The address which previously owned the token",
@@ -135,7 +135,7 @@
135
135
  }
136
136
  },
137
137
  "supportsInterface(bytes4)": {
138
- "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
138
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
139
139
  }
140
140
  },
141
141
  "version": 1
@@ -320,7 +320,7 @@
320
320
  "linkReferences": {},
321
321
  "deployedLinkReferences": {},
322
322
  "devdoc": {
323
- "details": "Interface of the optional ERC1155MetadataExtension interface, as defined in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].",
323
+ "details": "Interface of the optional ERC1155MetadataExtension interface, as defined in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[ERC].",
324
324
  "events": {
325
325
  "ApprovalForAll(address,address,bool)": {
326
326
  "details": "Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`."
@@ -338,7 +338,7 @@
338
338
  "kind": "dev",
339
339
  "methods": {
340
340
  "balanceOf(address,uint256)": {
341
- "details": "Returns the value of tokens of token type `id` owned by `account`. Requirements: - `account` cannot be the zero address."
341
+ "details": "Returns the value of tokens of token type `id` owned by `account`."
342
342
  },
343
343
  "balanceOfBatch(address[],uint256[])": {
344
344
  "details": "xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. Requirements: - `accounts` and `ids` must have the same length."
@@ -353,10 +353,10 @@
353
353
  "details": "Transfers a `value` amount of tokens of type `id` from `from` to `to`. WARNING: This function can potentially allow a reentrancy attack when transferring tokens to an untrusted contract, when invoking {onERC1155Received} on the receiver. Ensure to follow the checks-effects-interactions pattern and consider employing reentrancy guards when interacting with untrusted contracts. Emits a {TransferSingle} event. Requirements: - `to` cannot be the zero address. - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. - `from` must have a balance of tokens of type `id` of at least `value` amount. - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value."
354
354
  },
355
355
  "setApprovalForAll(address,bool)": {
356
- "details": "Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, Emits an {ApprovalForAll} event. Requirements: - `operator` cannot be the caller."
356
+ "details": "Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, Emits an {ApprovalForAll} event. Requirements: - `operator` cannot be the zero address."
357
357
  },
358
358
  "supportsInterface(bytes4)": {
359
- "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
359
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
360
360
  },
361
361
  "uri(uint256)": {
362
362
  "details": "Returns the URI for token type `id`. If the `\\{id\\}` substring is present in the URI, it must be replaced by clients with the actual token type ID."
@@ -0,0 +1,34 @@
1
+ {
2
+ "contractName": "ERC1155Utils",
3
+ "sourceName": "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Utils.sol",
4
+ "abi": [],
5
+ "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220255c949d78be7339d87a22c216446ed957cb9df9a7647c4915f7f1278df2568264736f6c63430008140033",
6
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220255c949d78be7339d87a22c216446ed957cb9df9a7647c4915f7f1278df2568264736f6c63430008140033",
7
+ "linkReferences": {},
8
+ "deployedLinkReferences": {},
9
+ "devdoc": {
10
+ "details": "Library that provide common ERC-1155 utility functions. See https://eips.ethereum.org/EIPS/eip-1155[ERC-1155]. _Available since v5.1._",
11
+ "kind": "dev",
12
+ "methods": {},
13
+ "version": 1
14
+ },
15
+ "userdoc": {
16
+ "kind": "user",
17
+ "methods": {},
18
+ "version": 1
19
+ },
20
+ "evm": {
21
+ "gasEstimates": {
22
+ "creation": {
23
+ "codeDepositCost": "17200",
24
+ "executionCost": "97",
25
+ "totalCost": "17297"
26
+ },
27
+ "internal": {
28
+ "checkOnERC1155BatchReceived(address,address,address,uint256[] memory,uint256[] memory,bytes memory)": "infinite",
29
+ "checkOnERC1155Received(address,address,address,uint256,uint256,bytes memory)": "infinite"
30
+ }
31
+ },
32
+ "methodIdentifiers": {}
33
+ }
34
+ }
@@ -316,7 +316,7 @@
316
316
  "linkReferences": {},
317
317
  "deployedLinkReferences": {},
318
318
  "devdoc": {
319
- "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification.",
319
+ "details": "Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC-20 applications.",
320
320
  "errors": {
321
321
  "ERC20InsufficientAllowance(address,uint256,uint256)": [
322
322
  {
@@ -409,7 +409,7 @@
409
409
  "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."
410
410
  },
411
411
  "transferFrom(address,address,uint256)": {
412
- "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
412
+ "details": "See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
413
413
  }
414
414
  },
415
415
  "version": 1
@@ -191,7 +191,7 @@
191
191
  "linkReferences": {},
192
192
  "deployedLinkReferences": {},
193
193
  "devdoc": {
194
- "details": "Interface of the ERC20 standard as defined in the EIP.",
194
+ "details": "Interface of the ERC-20 standard as defined in the ERC.",
195
195
  "events": {
196
196
  "Approval(address,address,uint256)": {
197
197
  "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
@@ -443,7 +443,7 @@
443
443
  "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."
444
444
  },
445
445
  "transferFrom(address,address,uint256)": {
446
- "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
446
+ "details": "See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
447
447
  }
448
448
  },
449
449
  "version": 1
@@ -365,7 +365,7 @@
365
365
  "linkReferences": {},
366
366
  "deployedLinkReferences": {},
367
367
  "devdoc": {
368
- "details": "ERC20 token with pausable token transfers, minting and burning. Useful for scenarios such as preventing trades until the end of an evaluation period, or having an emergency switch for freezing all token transfers in the event of a large bug. IMPORTANT: This contract does not include public pause and unpause functions. In addition to inheriting this contract, you must define both functions, invoking the {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate access control, e.g. using {AccessControl} or {Ownable}. Not doing so will make the contract pause mechanism of the contract unreachable, and thus unusable.",
368
+ "details": "ERC-20 token with pausable token transfers, minting and burning. Useful for scenarios such as preventing trades until the end of an evaluation period, or having an emergency switch for freezing all token transfers in the event of a large bug. IMPORTANT: This contract does not include public pause and unpause functions. In addition to inheriting this contract, you must define both functions, invoking the {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate access control, e.g. using {AccessControl} or {Ownable}. Not doing so will make the contract pause mechanism of the contract unreachable, and thus unusable.",
369
369
  "errors": {
370
370
  "ERC20InsufficientAllowance(address,uint256,uint256)": [
371
371
  {
@@ -474,7 +474,7 @@
474
474
  "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."
475
475
  },
476
476
  "transferFrom(address,address,uint256)": {
477
- "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
477
+ "details": "See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
478
478
  }
479
479
  },
480
480
  "version": 1
@@ -526,7 +526,7 @@
526
526
  "linkReferences": {},
527
527
  "deployedLinkReferences": {},
528
528
  "devdoc": {
529
- "details": "Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all.",
529
+ "details": "Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all.",
530
530
  "errors": {
531
531
  "ECDSAInvalidSignature()": [
532
532
  {
@@ -637,7 +637,7 @@
637
637
  "details": "See {IERC20-balanceOf}."
638
638
  },
639
639
  "constructor": {
640
- "details": "Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`. It's a good idea to use the same `name` that is defined as the ERC20 token name."
640
+ "details": "Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`. It's a good idea to use the same `name` that is defined as the ERC-20 token name."
641
641
  },
642
642
  "decimals()": {
643
643
  "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
@@ -664,7 +664,7 @@
664
664
  "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `value`."
665
665
  },
666
666
  "transferFrom(address,address,uint256)": {
667
- "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
667
+ "details": "See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `value`. - the caller must have allowance for ``from``'s tokens of at least `value`."
668
668
  }
669
669
  },
670
670
  "version": 1
@@ -230,7 +230,7 @@
230
230
  "linkReferences": {},
231
231
  "deployedLinkReferences": {},
232
232
  "devdoc": {
233
- "details": "Interface for the optional metadata functions from the ERC20 standard.",
233
+ "details": "Interface for the optional metadata functions from the ERC-20 standard.",
234
234
  "events": {
235
235
  "Approval(address,address,uint256)": {
236
236
  "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
@@ -83,7 +83,7 @@
83
83
  "linkReferences": {},
84
84
  "deployedLinkReferences": {},
85
85
  "devdoc": {
86
- "details": "Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all. ==== Security Considerations There are two important considerations concerning the use of `permit`. The first is that a valid permit signature expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be considered as an intention to spend the allowance in any specific way. The second is that because permits have built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be generally recommended is: ```solidity function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} doThing(..., value); } function doThing(..., uint256 value) public { token.safeTransferFrom(msg.sender, address(this), value); ... } ``` Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also {SafeERC20-safeTransferFrom}). Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so contracts should have entry points that don't rely on permit.",
86
+ "details": "Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't need to send a transaction, and thus is not required to hold Ether at all. ==== Security Considerations There are two important considerations concerning the use of `permit`. The first is that a valid permit signature expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be considered as an intention to spend the allowance in any specific way. The second is that because permits have built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be generally recommended is: ```solidity function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} doThing(..., value); } function doThing(..., uint256 value) public { token.safeTransferFrom(msg.sender, address(this), value); ... } ``` Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also {SafeERC20-safeTransferFrom}). Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so contracts should have entry points that don't rely on permit.",
87
87
  "kind": "dev",
88
88
  "methods": {
89
89
  "DOMAIN_SEPARATOR()": {
@@ -441,7 +441,7 @@
441
441
  "linkReferences": {},
442
442
  "deployedLinkReferences": {},
443
443
  "devdoc": {
444
- "details": "Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including the Metadata extension, but not including the Enumerable extension, which is available separately as {ERC721Enumerable}.",
444
+ "details": "Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including the Metadata extension, but not including the Enumerable extension, which is available separately as {ERC721Enumerable}.",
445
445
  "errors": {
446
446
  "ERC721IncorrectOwner(address,uint256,address)": [
447
447
  {
@@ -480,7 +480,7 @@
480
480
  ],
481
481
  "ERC721InvalidOwner(address)": [
482
482
  {
483
- "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.",
483
+ "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. Used in balance queries.",
484
484
  "params": {
485
485
  "owner": "Address of the current owner of a token."
486
486
  }
@@ -293,7 +293,7 @@
293
293
  "linkReferences": {},
294
294
  "deployedLinkReferences": {},
295
295
  "devdoc": {
296
- "details": "Required interface of an ERC721 compliant contract.",
296
+ "details": "Required interface of an ERC-721 compliant contract.",
297
297
  "events": {
298
298
  "Approval(address,address,uint256)": {
299
299
  "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token."
@@ -323,7 +323,7 @@
323
323
  "details": "Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist."
324
324
  },
325
325
  "safeTransferFrom(address,address,uint256)": {
326
- "details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
326
+ "details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC-721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
327
327
  },
328
328
  "safeTransferFrom(address,address,uint256,bytes)": {
329
329
  "details": "Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
@@ -332,10 +332,10 @@
332
332
  "details": "Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the address zero. Emits an {ApprovalForAll} event."
333
333
  },
334
334
  "supportsInterface(bytes4)": {
335
- "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
335
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
336
336
  },
337
337
  "transferFrom(address,address,uint256)": {
338
- "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
338
+ "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
339
339
  }
340
340
  },
341
341
  "version": 1
@@ -42,14 +42,14 @@
42
42
  "linkReferences": {},
43
43
  "deployedLinkReferences": {},
44
44
  "devdoc": {
45
- "details": "Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.",
45
+ "details": "Interface for any contract that wants to support safeTransfers from ERC-721 asset contracts.",
46
46
  "kind": "dev",
47
47
  "methods": {
48
48
  "onERC721Received(address,address,uint256,bytes)": {
49
49
  "details": "Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`."
50
50
  }
51
51
  },
52
- "title": "ERC721 token receiver interface",
52
+ "title": "ERC-721 token receiver interface",
53
53
  "version": 1
54
54
  },
55
55
  "userdoc": {
@@ -473,7 +473,7 @@
473
473
  "linkReferences": {},
474
474
  "deployedLinkReferences": {},
475
475
  "devdoc": {
476
- "details": "ERC721 token with storage based token URI management.",
476
+ "details": "ERC-721 token with storage based token URI management.",
477
477
  "errors": {
478
478
  "ERC721IncorrectOwner(address,uint256,address)": [
479
479
  {
@@ -512,7 +512,7 @@
512
512
  ],
513
513
  "ERC721InvalidOwner(address)": [
514
514
  {
515
- "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.",
515
+ "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. Used in balance queries.",
516
516
  "params": {
517
517
  "owner": "Address of the current owner of a token."
518
518
  }
@@ -371,7 +371,7 @@
371
371
  "details": "Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist."
372
372
  },
373
373
  "safeTransferFrom(address,address,uint256)": {
374
- "details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
374
+ "details": "Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients are aware of the ERC-721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
375
375
  },
376
376
  "safeTransferFrom(address,address,uint256,bytes)": {
377
377
  "details": "Safely transfers `tokenId` token from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must exist and be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. Emits a {Transfer} event."
@@ -380,7 +380,7 @@
380
380
  "details": "Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the address zero. Emits an {ApprovalForAll} event."
381
381
  },
382
382
  "supportsInterface(bytes4)": {
383
- "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
383
+ "details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
384
384
  },
385
385
  "symbol()": {
386
386
  "details": "Returns the token collection symbol."
@@ -389,7 +389,7 @@
389
389
  "details": "Returns the Uniform Resource Identifier (URI) for `tokenId` token."
390
390
  },
391
391
  "transferFrom(address,address,uint256)": {
392
- "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
392
+ "details": "Transfers `tokenId` token from `from` to `to`. WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must understand this adds an external call which potentially creates a reentrancy vulnerability. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."
393
393
  }
394
394
  },
395
395
  "title": "ERC-721 Non-Fungible Token Standard, optional metadata extension",
@@ -0,0 +1,33 @@
1
+ {
2
+ "contractName": "ERC721Utils",
3
+ "sourceName": "@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol",
4
+ "abi": [],
5
+ "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122040941742a40788c4d1b2003eda69b0305cb644f191b42548f85c80c28b226a0264736f6c63430008140033",
6
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122040941742a40788c4d1b2003eda69b0305cb644f191b42548f85c80c28b226a0264736f6c63430008140033",
7
+ "linkReferences": {},
8
+ "deployedLinkReferences": {},
9
+ "devdoc": {
10
+ "details": "Library that provide common ERC-721 utility functions. See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. _Available since v5.1._",
11
+ "kind": "dev",
12
+ "methods": {},
13
+ "version": 1
14
+ },
15
+ "userdoc": {
16
+ "kind": "user",
17
+ "methods": {},
18
+ "version": 1
19
+ },
20
+ "evm": {
21
+ "gasEstimates": {
22
+ "creation": {
23
+ "codeDepositCost": "17200",
24
+ "executionCost": "97",
25
+ "totalCost": "17297"
26
+ },
27
+ "internal": {
28
+ "checkOnERC721Received(address,address,address,uint256,bytes memory)": "infinite"
29
+ }
30
+ },
31
+ "methodIdentifiers": {}
32
+ }
33
+ }