@cartesi/devnet 2.0.0-alpha.2 → 2.0.0-alpha.4

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 (94) hide show
  1. package/anvil_state.json +1 -0
  2. package/deployments/TestMultiToken.json +585 -0
  3. package/deployments/TestNFT.json +590 -0
  4. package/deployments/TestToken.json +730 -0
  5. package/deployments/cartesiRollups.ApplicationFactory.json +164 -0
  6. package/deployments/cartesiRollups.AuthorityFactory.json +110 -0
  7. package/deployments/cartesiRollups.ERC1155BatchPortal.json +79 -0
  8. package/deployments/cartesiRollups.ERC1155SinglePortal.json +79 -0
  9. package/deployments/cartesiRollups.ERC20Portal.json +74 -0
  10. package/deployments/cartesiRollups.ERC721Portal.json +74 -0
  11. package/deployments/cartesiRollups.EtherPortal.json +64 -0
  12. package/deployments/cartesiRollups.InputBox.json +146 -0
  13. package/deployments/cartesiRollups.QuorumFactory.json +110 -0
  14. package/deployments/cartesiRollups.SafeERC20Transfer.json +49 -0
  15. package/deployments/cartesiRollups.SelfHostedApplicationFactory.json +158 -0
  16. package/package.json +10 -33
  17. package/build/anvil_state.json +0 -1
  18. package/deployments/localhost/.chainId +0 -1
  19. package/deployments/localhost/ApplicationFactory.json +0 -227
  20. package/deployments/localhost/AuthorityFactory.json +0 -188
  21. package/deployments/localhost/ERC1155BatchPortal.json +0 -133
  22. package/deployments/localhost/ERC1155SinglePortal.json +0 -132
  23. package/deployments/localhost/ERC20Portal.json +0 -132
  24. package/deployments/localhost/ERC721Portal.json +0 -126
  25. package/deployments/localhost/EtherPortal.json +0 -121
  26. package/deployments/localhost/InputBox.json +0 -213
  27. package/deployments/localhost/QuorumFactory.json +0 -188
  28. package/deployments/localhost/SafeERC20Transfer.json +0 -118
  29. package/deployments/localhost/SelfHostedApplicationFactory.json +0 -227
  30. package/deployments/localhost/TestMultiToken.json +0 -829
  31. package/deployments/localhost/TestNFT.json +0 -891
  32. package/deployments/localhost/TestToken.json +0 -1079
  33. package/dist/deploy/01_token.js +0 -15
  34. package/dist/deploy/02_nft.js +0 -15
  35. package/dist/deploy/03_multitoken.js +0 -15
  36. package/dist/deploy/04_4337.js +0 -342
  37. package/dist/src/aa/constants.d.ts +0 -31
  38. package/dist/src/aa/constants.d.ts.map +0 -1
  39. package/dist/src/aa/constants.js +0 -65
  40. package/dist/src/tasks/deploy-anvil.d.ts +0 -6
  41. package/dist/src/tasks/deploy-anvil.d.ts.map +0 -1
  42. package/dist/src/tasks/deploy-anvil.js +0 -40
  43. package/export/abi/localhost.json +0 -2837
  44. package/export/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +0 -128
  45. package/export/artifacts/@openzeppelin/contracts/access/manager/AccessManaged.sol/AccessManaged.json +0 -137
  46. package/export/artifacts/@openzeppelin/contracts/access/manager/AuthorityUtils.sol/AuthorityUtils.json +0 -32
  47. package/export/artifacts/@openzeppelin/contracts/access/manager/IAccessManaged.sol/IAccessManaged.json +0 -133
  48. package/export/artifacts/@openzeppelin/contracts/access/manager/IAccessManager.sol/IAccessManager.json +0 -1240
  49. package/export/artifacts/@openzeppelin/contracts/access/manager/IAuthority.sol/IAuthority.json +0 -60
  50. package/export/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +0 -401
  51. package/export/artifacts/@openzeppelin/contracts/interfaces/IERC5267.sol/IERC5267.json +0 -84
  52. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json +0 -190
  53. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json +0 -165
  54. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json +0 -197
  55. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/ERC1155.sol/ERC1155.json +0 -553
  56. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/IERC1155.sol/IERC1155.json +0 -362
  57. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol/IERC1155Receiver.json +0 -156
  58. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol/IERC1155MetadataURI.json +0 -385
  59. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/utils/ERC1155Utils.sol/ERC1155Utils.json +0 -34
  60. package/export/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +0 -436
  61. package/export/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +0 -242
  62. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json +0 -472
  63. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol/ERC20Pausable.json +0 -502
  64. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol/ERC20Permit.json +0 -695
  65. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +0 -293
  66. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json +0 -114
  67. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +0 -595
  68. package/export/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +0 -363
  69. package/export/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +0 -66
  70. package/export/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +0 -630
  71. package/export/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +0 -421
  72. package/export/artifacts/@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol/ERC721Utils.json +0 -33
  73. package/export/artifacts/@openzeppelin/contracts/utils/Arrays.sol/Arrays.json +0 -61
  74. package/export/artifacts/@openzeppelin/contracts/utils/Comparators.sol/Comparators.json +0 -34
  75. package/export/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +0 -24
  76. package/export/artifacts/@openzeppelin/contracts/utils/Nonces.sol/Nonces.json +0 -73
  77. package/export/artifacts/@openzeppelin/contracts/utils/Panic.sol/Panic.json +0 -65
  78. package/export/artifacts/@openzeppelin/contracts/utils/Pausable.sol/Pausable.json +0 -103
  79. package/export/artifacts/@openzeppelin/contracts/utils/ShortStrings.sol/ShortStrings.json +0 -55
  80. package/export/artifacts/@openzeppelin/contracts/utils/SlotDerivation.sol/SlotDerivation.json +0 -42
  81. package/export/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +0 -41
  82. package/export/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +0 -63
  83. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json +0 -84
  84. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/EIP712.sol/EIP712.json +0 -105
  85. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol/MessageHashUtils.json +0 -36
  86. package/export/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +0 -50
  87. package/export/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +0 -50
  88. package/export/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +0 -60
  89. package/export/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +0 -174
  90. package/export/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +0 -37
  91. package/export/artifacts/@openzeppelin/contracts/utils/types/Time.sol/Time.json +0 -41
  92. package/export/artifacts/contracts/TestMultiToken.sol/TestMultiToken.json +0 -750
  93. package/export/artifacts/contracts/TestNFT.sol/TestNFT.json +0 -779
  94. package/export/artifacts/contracts/TestToken.sol/TestToken.json +0 -963
@@ -1,293 +0,0 @@
1
- {
2
- "contractName": "IERC20Metadata",
3
- "sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
4
- "abi": [
5
- {
6
- "anonymous": false,
7
- "inputs": [
8
- {
9
- "indexed": true,
10
- "internalType": "address",
11
- "name": "owner",
12
- "type": "address"
13
- },
14
- {
15
- "indexed": true,
16
- "internalType": "address",
17
- "name": "spender",
18
- "type": "address"
19
- },
20
- {
21
- "indexed": false,
22
- "internalType": "uint256",
23
- "name": "value",
24
- "type": "uint256"
25
- }
26
- ],
27
- "name": "Approval",
28
- "type": "event"
29
- },
30
- {
31
- "anonymous": false,
32
- "inputs": [
33
- {
34
- "indexed": true,
35
- "internalType": "address",
36
- "name": "from",
37
- "type": "address"
38
- },
39
- {
40
- "indexed": true,
41
- "internalType": "address",
42
- "name": "to",
43
- "type": "address"
44
- },
45
- {
46
- "indexed": false,
47
- "internalType": "uint256",
48
- "name": "value",
49
- "type": "uint256"
50
- }
51
- ],
52
- "name": "Transfer",
53
- "type": "event"
54
- },
55
- {
56
- "inputs": [
57
- {
58
- "internalType": "address",
59
- "name": "owner",
60
- "type": "address"
61
- },
62
- {
63
- "internalType": "address",
64
- "name": "spender",
65
- "type": "address"
66
- }
67
- ],
68
- "name": "allowance",
69
- "outputs": [
70
- {
71
- "internalType": "uint256",
72
- "name": "",
73
- "type": "uint256"
74
- }
75
- ],
76
- "stateMutability": "view",
77
- "type": "function"
78
- },
79
- {
80
- "inputs": [
81
- {
82
- "internalType": "address",
83
- "name": "spender",
84
- "type": "address"
85
- },
86
- {
87
- "internalType": "uint256",
88
- "name": "value",
89
- "type": "uint256"
90
- }
91
- ],
92
- "name": "approve",
93
- "outputs": [
94
- {
95
- "internalType": "bool",
96
- "name": "",
97
- "type": "bool"
98
- }
99
- ],
100
- "stateMutability": "nonpayable",
101
- "type": "function"
102
- },
103
- {
104
- "inputs": [
105
- {
106
- "internalType": "address",
107
- "name": "account",
108
- "type": "address"
109
- }
110
- ],
111
- "name": "balanceOf",
112
- "outputs": [
113
- {
114
- "internalType": "uint256",
115
- "name": "",
116
- "type": "uint256"
117
- }
118
- ],
119
- "stateMutability": "view",
120
- "type": "function"
121
- },
122
- {
123
- "inputs": [],
124
- "name": "decimals",
125
- "outputs": [
126
- {
127
- "internalType": "uint8",
128
- "name": "",
129
- "type": "uint8"
130
- }
131
- ],
132
- "stateMutability": "view",
133
- "type": "function"
134
- },
135
- {
136
- "inputs": [],
137
- "name": "name",
138
- "outputs": [
139
- {
140
- "internalType": "string",
141
- "name": "",
142
- "type": "string"
143
- }
144
- ],
145
- "stateMutability": "view",
146
- "type": "function"
147
- },
148
- {
149
- "inputs": [],
150
- "name": "symbol",
151
- "outputs": [
152
- {
153
- "internalType": "string",
154
- "name": "",
155
- "type": "string"
156
- }
157
- ],
158
- "stateMutability": "view",
159
- "type": "function"
160
- },
161
- {
162
- "inputs": [],
163
- "name": "totalSupply",
164
- "outputs": [
165
- {
166
- "internalType": "uint256",
167
- "name": "",
168
- "type": "uint256"
169
- }
170
- ],
171
- "stateMutability": "view",
172
- "type": "function"
173
- },
174
- {
175
- "inputs": [
176
- {
177
- "internalType": "address",
178
- "name": "to",
179
- "type": "address"
180
- },
181
- {
182
- "internalType": "uint256",
183
- "name": "value",
184
- "type": "uint256"
185
- }
186
- ],
187
- "name": "transfer",
188
- "outputs": [
189
- {
190
- "internalType": "bool",
191
- "name": "",
192
- "type": "bool"
193
- }
194
- ],
195
- "stateMutability": "nonpayable",
196
- "type": "function"
197
- },
198
- {
199
- "inputs": [
200
- {
201
- "internalType": "address",
202
- "name": "from",
203
- "type": "address"
204
- },
205
- {
206
- "internalType": "address",
207
- "name": "to",
208
- "type": "address"
209
- },
210
- {
211
- "internalType": "uint256",
212
- "name": "value",
213
- "type": "uint256"
214
- }
215
- ],
216
- "name": "transferFrom",
217
- "outputs": [
218
- {
219
- "internalType": "bool",
220
- "name": "",
221
- "type": "bool"
222
- }
223
- ],
224
- "stateMutability": "nonpayable",
225
- "type": "function"
226
- }
227
- ],
228
- "bytecode": "0x",
229
- "deployedBytecode": "0x",
230
- "linkReferences": {},
231
- "deployedLinkReferences": {},
232
- "devdoc": {
233
- "details": "Interface for the optional metadata functions from the ERC-20 standard.",
234
- "events": {
235
- "Approval(address,address,uint256)": {
236
- "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
237
- },
238
- "Transfer(address,address,uint256)": {
239
- "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
240
- }
241
- },
242
- "kind": "dev",
243
- "methods": {
244
- "allowance(address,address)": {
245
- "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
246
- },
247
- "approve(address,uint256)": {
248
- "details": "Sets a `value` amount of tokens as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
249
- },
250
- "balanceOf(address)": {
251
- "details": "Returns the value of tokens owned by `account`."
252
- },
253
- "decimals()": {
254
- "details": "Returns the decimals places of the token."
255
- },
256
- "name()": {
257
- "details": "Returns the name of the token."
258
- },
259
- "symbol()": {
260
- "details": "Returns the symbol of the token."
261
- },
262
- "totalSupply()": {
263
- "details": "Returns the value of tokens in existence."
264
- },
265
- "transfer(address,uint256)": {
266
- "details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
267
- },
268
- "transferFrom(address,address,uint256)": {
269
- "details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
270
- }
271
- },
272
- "version": 1
273
- },
274
- "userdoc": {
275
- "kind": "user",
276
- "methods": {},
277
- "version": 1
278
- },
279
- "evm": {
280
- "gasEstimates": null,
281
- "methodIdentifiers": {
282
- "allowance(address,address)": "dd62ed3e",
283
- "approve(address,uint256)": "095ea7b3",
284
- "balanceOf(address)": "70a08231",
285
- "decimals()": "313ce567",
286
- "name()": "06fdde03",
287
- "symbol()": "95d89b41",
288
- "totalSupply()": "18160ddd",
289
- "transfer(address,uint256)": "a9059cbb",
290
- "transferFrom(address,address,uint256)": "23b872dd"
291
- }
292
- }
293
- }
@@ -1,114 +0,0 @@
1
- {
2
- "contractName": "IERC20Permit",
3
- "sourceName": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol",
4
- "abi": [
5
- {
6
- "inputs": [],
7
- "name": "DOMAIN_SEPARATOR",
8
- "outputs": [
9
- {
10
- "internalType": "bytes32",
11
- "name": "",
12
- "type": "bytes32"
13
- }
14
- ],
15
- "stateMutability": "view",
16
- "type": "function"
17
- },
18
- {
19
- "inputs": [
20
- {
21
- "internalType": "address",
22
- "name": "owner",
23
- "type": "address"
24
- }
25
- ],
26
- "name": "nonces",
27
- "outputs": [
28
- {
29
- "internalType": "uint256",
30
- "name": "",
31
- "type": "uint256"
32
- }
33
- ],
34
- "stateMutability": "view",
35
- "type": "function"
36
- },
37
- {
38
- "inputs": [
39
- {
40
- "internalType": "address",
41
- "name": "owner",
42
- "type": "address"
43
- },
44
- {
45
- "internalType": "address",
46
- "name": "spender",
47
- "type": "address"
48
- },
49
- {
50
- "internalType": "uint256",
51
- "name": "value",
52
- "type": "uint256"
53
- },
54
- {
55
- "internalType": "uint256",
56
- "name": "deadline",
57
- "type": "uint256"
58
- },
59
- {
60
- "internalType": "uint8",
61
- "name": "v",
62
- "type": "uint8"
63
- },
64
- {
65
- "internalType": "bytes32",
66
- "name": "r",
67
- "type": "bytes32"
68
- },
69
- {
70
- "internalType": "bytes32",
71
- "name": "s",
72
- "type": "bytes32"
73
- }
74
- ],
75
- "name": "permit",
76
- "outputs": [],
77
- "stateMutability": "nonpayable",
78
- "type": "function"
79
- }
80
- ],
81
- "bytecode": "0x",
82
- "deployedBytecode": "0x",
83
- "linkReferences": {},
84
- "deployedLinkReferences": {},
85
- "devdoc": {
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
- "kind": "dev",
88
- "methods": {
89
- "DOMAIN_SEPARATOR()": {
90
- "details": "Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}."
91
- },
92
- "nonces(address)": {
93
- "details": "Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times."
94
- },
95
- "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
96
- "details": "Sets `value` as the allowance of `spender` over ``owner``'s tokens, given ``owner``'s signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here. Emits an {Approval} event. Requirements: - `spender` cannot be the zero address. - `deadline` must be a timestamp in the future. - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments. - the signature must use ``owner``'s current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above."
97
- }
98
- },
99
- "version": 1
100
- },
101
- "userdoc": {
102
- "kind": "user",
103
- "methods": {},
104
- "version": 1
105
- },
106
- "evm": {
107
- "gasEstimates": null,
108
- "methodIdentifiers": {
109
- "DOMAIN_SEPARATOR()": "3644e515",
110
- "nonces(address)": "7ecebe00",
111
- "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf"
112
- }
113
- }
114
- }