@paimaexample/evm-contracts 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +7 -0
  2. package/deno.json +28 -0
  3. package/docs/templates/contract.hbs +144 -0
  4. package/docs/templates/helpers.js +61 -0
  5. package/docs/templates/page.hbs +7 -0
  6. package/docs/templates/properties.js +76 -0
  7. package/hardhat.config.ts +11 -0
  8. package/index.js +1 -0
  9. package/mod.ts +0 -0
  10. package/package.json +13 -0
  11. package/remappings.txt +1 -0
  12. package/src/companions/ERC165Contract.json +21 -0
  13. package/src/companions/ERC165Contract.ts +21 -0
  14. package/src/companions/ERC20Contract.json +222 -0
  15. package/src/companions/ERC20Contract.ts +222 -0
  16. package/src/companions/ERC6551RegistryContract.json +128 -0
  17. package/src/companions/ERC6551RegistryContract.ts +128 -0
  18. package/src/companions/ERC721Contract.json +248 -0
  19. package/src/companions/ERC721Contract.ts +222 -0
  20. package/src/companions/IERC1155Contract.json +295 -0
  21. package/src/companions/IERC1155Contract.ts +295 -0
  22. package/src/companions/OldERC6551RegistryContract.json +133 -0
  23. package/src/companions/OldERC6551RegistryContract.ts +133 -0
  24. package/src/companions/PaimaERC721Contract.json +787 -0
  25. package/src/companions/PaimaERC721Contract.ts +787 -0
  26. package/src/companions/PaimaL2Contract.json +134 -0
  27. package/src/companions/PaimaL2Contract.ts +134 -0
  28. package/src/companions/README.md +5 -0
  29. package/src/contracts/AnnotatedMintNft.sol +171 -0
  30. package/src/contracts/BaseState.sol +16 -0
  31. package/src/contracts/ERC1967.sol +43 -0
  32. package/src/contracts/Erc20NftSale.sol +186 -0
  33. package/src/contracts/GenericPayment.sol +60 -0
  34. package/src/contracts/NativeNftSale.sol +97 -0
  35. package/src/contracts/PaimaL2Contract.sol +54 -0
  36. package/src/contracts/Proxy/Erc20NftSaleProxy.sol +79 -0
  37. package/src/contracts/Proxy/GenericPaymentProxy.sol +64 -0
  38. package/src/contracts/Proxy/NativeNftSaleProxy.sol +72 -0
  39. package/src/contracts/Proxy/OrderbookDexProxy.sol +27 -0
  40. package/src/contracts/README.md +72 -0
  41. package/src/contracts/State.sol +25 -0
  42. package/src/contracts/dev/ERC721Dev.sol +13 -0
  43. package/src/contracts/dev/Erc20Dev.sol +13 -0
  44. package/src/contracts/dev/NativeNftSaleUpgradeDev.sol +9 -0
  45. package/src/contracts/dev/NftSaleUpgradeDev.sol +12 -0
  46. package/src/contracts/dev/NftTypeMapper.sol +38 -0
  47. package/src/contracts/dev/Token.sol +15 -0
  48. package/src/contracts/dev/UpgradeDev.sol +10 -0
  49. package/src/contracts/orderbook/IOrderbookDex.sol +215 -0
  50. package/src/contracts/orderbook/OrderbookDex.sol +435 -0
  51. package/src/contracts/token/IERC4906Agnostic.sol +17 -0
  52. package/src/contracts/token/IInverseAppProjected1155.sol +40 -0
  53. package/src/contracts/token/IInverseAppProjectedNft.sol +38 -0
  54. package/src/contracts/token/IInverseBaseProjected1155.sol +25 -0
  55. package/src/contracts/token/IInverseBaseProjectedNft.sol +29 -0
  56. package/src/contracts/token/IInverseProjected1155.sol +38 -0
  57. package/src/contracts/token/IInverseProjectedNft.sol +41 -0
  58. package/src/contracts/token/ITokenUri.sol +10 -0
  59. package/src/contracts/token/IUri.sol +13 -0
  60. package/src/contracts/token/InverseAppProjected1155.sol +218 -0
  61. package/src/contracts/token/InverseAppProjectedNft.sol +192 -0
  62. package/src/contracts/token/InverseBaseProjected1155.sol +170 -0
  63. package/src/contracts/token/InverseBaseProjectedNft.sol +158 -0
  64. package/src/plugin/common.ts +35 -0
  65. package/src/plugin/deployment.ts +161 -0
  66. package/src/plugin/mod.ts +6 -0
  67. package/src/plugin/paimaL2.ts +202 -0
  68. package/src/recommendedHardhat.ts +86 -0
  69. package/test/lib/StdInvariant.sol +96 -0
  70. package/test/lib/cheatcodes.sol +89 -0
  71. package/test/lib/console.sol +1884 -0
  72. package/test/lib/ctest.sol +678 -0
  73. package/test/src/InverseAppProjected1155.t.sol +207 -0
  74. package/test/src/InverseAppProjectedNft.t.sol +164 -0
  75. package/test/src/InverseBaseProjected1155.t.sol +171 -0
  76. package/test/src/InverseBaseProjectedNft.t.sol +141 -0
  77. package/test/src/OrderbookDex.t.sol +710 -0
  78. package/test/src/OrderbookDexInvariant.t.sol +426 -0
  79. package/test/src/PaimaL2ContractTest.sol +115 -0
@@ -0,0 +1,133 @@
1
+ export default [
2
+ {
3
+ inputs: [],
4
+ name: "InitializationFailed",
5
+ type: "error",
6
+ },
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ {
11
+ indexed: false,
12
+ internalType: "address",
13
+ name: "account",
14
+ type: "address",
15
+ },
16
+ {
17
+ indexed: false,
18
+ internalType: "address",
19
+ name: "implementation",
20
+ type: "address",
21
+ },
22
+ {
23
+ indexed: false,
24
+ internalType: "uint256",
25
+ name: "chainId",
26
+ type: "uint256",
27
+ },
28
+ {
29
+ indexed: false,
30
+ internalType: "address",
31
+ name: "tokenContract",
32
+ type: "address",
33
+ },
34
+ {
35
+ indexed: false,
36
+ internalType: "uint256",
37
+ name: "tokenId",
38
+ type: "uint256",
39
+ },
40
+ {
41
+ indexed: false,
42
+ internalType: "uint256",
43
+ name: "salt",
44
+ type: "uint256",
45
+ },
46
+ ],
47
+ name: "AccountCreated",
48
+ type: "event",
49
+ },
50
+ {
51
+ inputs: [
52
+ {
53
+ internalType: "address",
54
+ name: "implementation",
55
+ type: "address",
56
+ },
57
+ {
58
+ internalType: "uint256",
59
+ name: "chainId",
60
+ type: "uint256",
61
+ },
62
+ {
63
+ internalType: "address",
64
+ name: "tokenContract",
65
+ type: "address",
66
+ },
67
+ {
68
+ internalType: "uint256",
69
+ name: "tokenId",
70
+ type: "uint256",
71
+ },
72
+ {
73
+ internalType: "uint256",
74
+ name: "salt",
75
+ type: "uint256",
76
+ },
77
+ ],
78
+ name: "account",
79
+ outputs: [
80
+ {
81
+ internalType: "address",
82
+ name: "",
83
+ type: "address",
84
+ },
85
+ ],
86
+ stateMutability: "view",
87
+ type: "function",
88
+ },
89
+ {
90
+ inputs: [
91
+ {
92
+ internalType: "address",
93
+ name: "implementation",
94
+ type: "address",
95
+ },
96
+ {
97
+ internalType: "uint256",
98
+ name: "chainId",
99
+ type: "uint256",
100
+ },
101
+ {
102
+ internalType: "address",
103
+ name: "tokenContract",
104
+ type: "address",
105
+ },
106
+ {
107
+ internalType: "uint256",
108
+ name: "tokenId",
109
+ type: "uint256",
110
+ },
111
+ {
112
+ internalType: "uint256",
113
+ name: "salt",
114
+ type: "uint256",
115
+ },
116
+ {
117
+ internalType: "bytes",
118
+ name: "initData",
119
+ type: "bytes",
120
+ },
121
+ ],
122
+ name: "createAccount",
123
+ outputs: [
124
+ {
125
+ internalType: "address",
126
+ name: "",
127
+ type: "address",
128
+ },
129
+ ],
130
+ stateMutability: "nonpayable",
131
+ type: "function",
132
+ },
133
+ ] as const;