@waku/rln 0.1.4-d27db21.0 → 0.1.5-76f86de.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/CHANGELOG.md +19 -0
- package/README.md +5 -0
- package/bundle/index.js +1 -1
- package/bundle/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js +1 -1
- package/bundle/node_modules/@ethersproject/abi/lib.esm/interface.js +1 -1
- package/bundle/node_modules/@ethersproject/abstract-provider/lib.esm/index.js +1 -1
- package/bundle/node_modules/@ethersproject/abstract-signer/lib.esm/index.js +11 -11
- package/bundle/node_modules/@ethersproject/bytes/lib.esm/_version.js +1 -1
- package/bundle/node_modules/@ethersproject/contracts/lib.esm/index.js +7 -7
- package/bundle/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js +2 -2
- package/bundle/node_modules/@ethersproject/hash/lib.esm/typed-data.js +2 -2
- package/bundle/node_modules/@ethersproject/keccak256/node_modules/js-sha3/src/sha3.js +1 -1
- package/bundle/node_modules/@ethersproject/logger/lib.esm/_version.js +1 -1
- package/bundle/node_modules/@ethersproject/properties/lib.esm/index.js +1 -1
- package/bundle/node_modules/@ethersproject/providers/lib.esm/base-provider.js +44 -44
- package/bundle/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js +8 -8
- package/bundle/node_modules/@ethersproject/rlp/lib.esm/_version.js +1 -1
- package/bundle/node_modules/@ethersproject/transactions/lib.esm/index.js +1 -1
- package/bundle/node_modules/@ethersproject/web/lib.esm/geturl.js +1 -1
- package/bundle/node_modules/@ethersproject/web/lib.esm/index.js +2 -2
- package/bundle/node_modules/@multiformats/multiaddr/dist/src/multiaddr.js +1 -0
- package/bundle/node_modules/@noble/hashes/esm/sha3.js +1 -1
- package/bundle/node_modules/bn.js/lib/bn.js +1 -1
- package/bundle/packages/core/dist/lib/connection_manager/connection_manager.js +6 -6
- package/bundle/packages/rln/dist/contract/abi.js +502 -248
- package/bundle/packages/rln/dist/contract/constants.js +4 -5
- package/bundle/packages/rln/dist/contract/rln_contract.js +121 -37
- package/bundle/packages/rln/dist/keystore/keystore.js +2 -1
- package/bundle/packages/rln/dist/rln.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/checksum.js +2 -2
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/cipher.js +3 -3
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/class.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/functional.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/kdf.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/password.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/schema-validation-generated.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/schema-validation.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/aes.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/scrypt.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/_assert.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/_sha2.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/_u64.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/cryptoBrowser.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/hmac.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/pbkdf2.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/scrypt.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/sha256.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/sha512.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/utils.js +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/codec.test-utils.d.ts +36 -0
- package/dist/codec.test-utils.js +56 -0
- package/dist/codec.test-utils.js.map +1 -0
- package/dist/contract/abi.d.ts +21 -17
- package/dist/contract/abi.js +502 -248
- package/dist/contract/abi.js.map +1 -1
- package/dist/contract/constants.d.ts +22 -18
- package/dist/contract/constants.js +3 -3
- package/dist/contract/constants.js.map +1 -1
- package/dist/contract/rln_contract.d.ts +10 -3
- package/dist/contract/rln_contract.js +120 -36
- package/dist/contract/rln_contract.js.map +1 -1
- package/dist/contract/test-setup.d.ts +26 -0
- package/dist/contract/test-setup.js +56 -0
- package/dist/contract/test-setup.js.map +1 -0
- package/dist/contract/test-utils.d.ts +39 -0
- package/dist/contract/test-utils.js +118 -0
- package/dist/contract/test-utils.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/keystore/keystore.js +2 -1
- package/dist/keystore/keystore.js.map +1 -1
- package/dist/keystore/types.d.ts +1 -0
- package/dist/rln.d.ts +1 -1
- package/dist/rln.js +4 -4
- package/dist/rln.js.map +1 -1
- package/package.json +1 -1
- package/src/codec.test-utils.ts +80 -0
- package/src/contract/abi.ts +502 -248
- package/src/contract/constants.ts +3 -3
- package/src/contract/rln_contract.ts +158 -46
- package/src/contract/test-setup.ts +86 -0
- package/src/contract/test-utils.ts +179 -0
- package/src/index.ts +13 -2
- package/src/keystore/keystore.ts +2 -1
- package/src/keystore/types.ts +1 -0
- package/src/rln.ts +5 -5
@@ -1,393 +1,647 @@
|
|
1
1
|
const RLN_ABI = [
|
2
|
+
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
|
2
3
|
{
|
3
|
-
|
4
|
-
|
5
|
-
|
4
|
+
inputs: [
|
5
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
6
|
+
],
|
7
|
+
name: "CannotEraseActiveMembership",
|
8
|
+
type: "error"
|
6
9
|
},
|
10
|
+
{ inputs: [], name: "CannotExceedMaxTotalRateLimit", type: "error" },
|
7
11
|
{
|
8
|
-
|
9
|
-
|
10
|
-
|
12
|
+
inputs: [
|
13
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
14
|
+
],
|
15
|
+
name: "CannotExtendNonGracePeriodMembership",
|
16
|
+
type: "error"
|
11
17
|
},
|
12
18
|
{
|
13
|
-
type: "error",
|
14
|
-
name: "InvalidIdCommitment",
|
15
19
|
inputs: [
|
16
|
-
{
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
]
|
20
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
21
|
+
],
|
22
|
+
name: "InvalidIdCommitment",
|
23
|
+
type: "error"
|
21
24
|
},
|
25
|
+
{ inputs: [], name: "InvalidMembershipRateLimit", type: "error" },
|
22
26
|
{
|
23
|
-
|
27
|
+
inputs: [
|
28
|
+
{ internalType: "uint256", name: "startIndex", type: "uint256" },
|
29
|
+
{ internalType: "uint256", name: "endIndex", type: "uint256" }
|
30
|
+
],
|
24
31
|
name: "InvalidPaginationQuery",
|
32
|
+
type: "error"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
inputs: [
|
36
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
37
|
+
],
|
38
|
+
name: "MembershipDoesNotExist",
|
39
|
+
type: "error"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
inputs: [
|
43
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
44
|
+
],
|
45
|
+
name: "NonHolderCannotEraseGracePeriodMembership",
|
46
|
+
type: "error"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
inputs: [
|
50
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
51
|
+
],
|
52
|
+
name: "NonHolderCannotExtend",
|
53
|
+
type: "error"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
anonymous: false,
|
25
57
|
inputs: [
|
26
58
|
{
|
27
|
-
|
28
|
-
|
59
|
+
indexed: false,
|
60
|
+
internalType: "address",
|
61
|
+
name: "previousAdmin",
|
62
|
+
type: "address"
|
29
63
|
},
|
30
64
|
{
|
31
|
-
|
32
|
-
|
65
|
+
indexed: false,
|
66
|
+
internalType: "address",
|
67
|
+
name: "newAdmin",
|
68
|
+
type: "address"
|
33
69
|
}
|
34
|
-
]
|
70
|
+
],
|
71
|
+
name: "AdminChanged",
|
72
|
+
type: "event"
|
35
73
|
},
|
36
74
|
{
|
37
|
-
|
38
|
-
|
39
|
-
inputs: [],
|
40
|
-
outputs: [
|
75
|
+
anonymous: false,
|
76
|
+
inputs: [
|
41
77
|
{
|
42
|
-
|
43
|
-
|
78
|
+
indexed: true,
|
79
|
+
internalType: "address",
|
80
|
+
name: "beacon",
|
81
|
+
type: "address"
|
44
82
|
}
|
45
83
|
],
|
46
|
-
|
84
|
+
name: "BeaconUpgraded",
|
85
|
+
type: "event"
|
47
86
|
},
|
48
87
|
{
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
outputs: [
|
53
|
-
{
|
54
|
-
name: "",
|
55
|
-
type: "uint8"
|
56
|
-
}
|
88
|
+
anonymous: false,
|
89
|
+
inputs: [
|
90
|
+
{ indexed: false, internalType: "uint8", name: "version", type: "uint8" }
|
57
91
|
],
|
58
|
-
|
92
|
+
name: "Initialized",
|
93
|
+
type: "event"
|
59
94
|
},
|
60
95
|
{
|
61
|
-
|
62
|
-
|
63
|
-
inputs: [],
|
64
|
-
outputs: [
|
96
|
+
anonymous: false,
|
97
|
+
inputs: [
|
65
98
|
{
|
66
|
-
|
99
|
+
indexed: false,
|
100
|
+
internalType: "uint256",
|
101
|
+
name: "idCommitment",
|
67
102
|
type: "uint256"
|
68
|
-
}
|
103
|
+
},
|
104
|
+
{
|
105
|
+
indexed: false,
|
106
|
+
internalType: "uint32",
|
107
|
+
name: "membershipRateLimit",
|
108
|
+
type: "uint32"
|
109
|
+
},
|
110
|
+
{ indexed: false, internalType: "uint32", name: "index", type: "uint32" }
|
69
111
|
],
|
70
|
-
|
112
|
+
name: "MembershipErased",
|
113
|
+
type: "event"
|
71
114
|
},
|
72
115
|
{
|
73
|
-
|
74
|
-
|
75
|
-
inputs: [],
|
76
|
-
outputs: [
|
116
|
+
anonymous: false,
|
117
|
+
inputs: [
|
77
118
|
{
|
78
|
-
|
119
|
+
indexed: false,
|
120
|
+
internalType: "uint256",
|
121
|
+
name: "idCommitment",
|
122
|
+
type: "uint256"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
indexed: false,
|
126
|
+
internalType: "uint32",
|
127
|
+
name: "membershipRateLimit",
|
79
128
|
type: "uint32"
|
80
|
-
}
|
129
|
+
},
|
130
|
+
{ indexed: false, internalType: "uint32", name: "index", type: "uint32" }
|
81
131
|
],
|
82
|
-
|
132
|
+
name: "MembershipExpired",
|
133
|
+
type: "event"
|
83
134
|
},
|
84
135
|
{
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
136
|
+
anonymous: false,
|
137
|
+
inputs: [
|
138
|
+
{
|
139
|
+
indexed: false,
|
140
|
+
internalType: "uint256",
|
141
|
+
name: "idCommitment",
|
142
|
+
type: "uint256"
|
143
|
+
},
|
144
|
+
{
|
145
|
+
indexed: false,
|
146
|
+
internalType: "uint32",
|
147
|
+
name: "membershipRateLimit",
|
148
|
+
type: "uint32"
|
149
|
+
},
|
150
|
+
{ indexed: false, internalType: "uint32", name: "index", type: "uint32" },
|
89
151
|
{
|
90
|
-
|
152
|
+
indexed: false,
|
153
|
+
internalType: "uint256",
|
154
|
+
name: "newGracePeriodStartTimestamp",
|
91
155
|
type: "uint256"
|
92
156
|
}
|
93
157
|
],
|
94
|
-
|
158
|
+
name: "MembershipExtended",
|
159
|
+
type: "event"
|
95
160
|
},
|
96
161
|
{
|
97
|
-
|
98
|
-
|
99
|
-
inputs: [],
|
100
|
-
outputs: [
|
162
|
+
anonymous: false,
|
163
|
+
inputs: [
|
101
164
|
{
|
102
|
-
|
103
|
-
|
104
|
-
|
165
|
+
indexed: false,
|
166
|
+
internalType: "uint256",
|
167
|
+
name: "idCommitment",
|
168
|
+
type: "uint256"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
indexed: false,
|
172
|
+
internalType: "uint256",
|
173
|
+
name: "membershipRateLimit",
|
174
|
+
type: "uint256"
|
175
|
+
},
|
176
|
+
{ indexed: false, internalType: "uint32", name: "index", type: "uint32" }
|
105
177
|
],
|
106
|
-
|
178
|
+
name: "MembershipRegistered",
|
179
|
+
type: "event"
|
107
180
|
},
|
108
181
|
{
|
109
|
-
|
110
|
-
name: "depositsToWithdraw",
|
182
|
+
anonymous: false,
|
111
183
|
inputs: [
|
112
184
|
{
|
113
|
-
|
185
|
+
indexed: true,
|
186
|
+
internalType: "address",
|
187
|
+
name: "previousOwner",
|
114
188
|
type: "address"
|
115
189
|
},
|
116
190
|
{
|
117
|
-
|
191
|
+
indexed: true,
|
192
|
+
internalType: "address",
|
193
|
+
name: "newOwner",
|
118
194
|
type: "address"
|
119
195
|
}
|
120
196
|
],
|
121
|
-
|
197
|
+
name: "OwnershipTransferred",
|
198
|
+
type: "event"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
anonymous: false,
|
202
|
+
inputs: [
|
122
203
|
{
|
123
|
-
|
124
|
-
|
204
|
+
indexed: true,
|
205
|
+
internalType: "address",
|
206
|
+
name: "implementation",
|
207
|
+
type: "address"
|
125
208
|
}
|
126
209
|
],
|
127
|
-
|
210
|
+
name: "Upgraded",
|
211
|
+
type: "event"
|
212
|
+
},
|
213
|
+
{
|
214
|
+
inputs: [],
|
215
|
+
name: "MAX_MEMBERSHIP_SET_SIZE",
|
216
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
217
|
+
stateMutability: "view",
|
218
|
+
type: "function"
|
219
|
+
},
|
220
|
+
{
|
221
|
+
inputs: [],
|
222
|
+
name: "MERKLE_TREE_DEPTH",
|
223
|
+
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
|
224
|
+
stateMutability: "view",
|
225
|
+
type: "function"
|
226
|
+
},
|
227
|
+
{
|
228
|
+
inputs: [],
|
229
|
+
name: "Q",
|
230
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
231
|
+
stateMutability: "view",
|
232
|
+
type: "function"
|
233
|
+
},
|
234
|
+
{
|
235
|
+
inputs: [],
|
236
|
+
name: "activeDurationForNewMemberships",
|
237
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
238
|
+
stateMutability: "view",
|
239
|
+
type: "function"
|
240
|
+
},
|
241
|
+
{
|
242
|
+
inputs: [],
|
243
|
+
name: "currentTotalRateLimit",
|
244
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
245
|
+
stateMutability: "view",
|
246
|
+
type: "function"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
inputs: [],
|
250
|
+
name: "deployedBlockNumber",
|
251
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
252
|
+
stateMutability: "view",
|
253
|
+
type: "function"
|
128
254
|
},
|
129
255
|
{
|
130
|
-
type: "function",
|
131
|
-
name: "eraseMemberships",
|
132
256
|
inputs: [
|
133
|
-
{
|
134
|
-
|
135
|
-
type: "uint256[]"
|
136
|
-
}
|
257
|
+
{ internalType: "address", name: "holder", type: "address" },
|
258
|
+
{ internalType: "address", name: "token", type: "address" }
|
137
259
|
],
|
138
|
-
|
139
|
-
|
260
|
+
name: "depositsToWithdraw",
|
261
|
+
outputs: [{ internalType: "uint256", name: "balance", type: "uint256" }],
|
262
|
+
stateMutability: "view",
|
263
|
+
type: "function"
|
140
264
|
},
|
141
265
|
{
|
142
|
-
|
266
|
+
inputs: [
|
267
|
+
{ internalType: "uint256[]", name: "idCommitments", type: "uint256[]" }
|
268
|
+
],
|
143
269
|
name: "eraseMemberships",
|
270
|
+
outputs: [],
|
271
|
+
stateMutability: "nonpayable",
|
272
|
+
type: "function"
|
273
|
+
},
|
274
|
+
{
|
144
275
|
inputs: [
|
145
|
-
{
|
146
|
-
|
147
|
-
type: "uint256[]"
|
148
|
-
},
|
149
|
-
{
|
150
|
-
name: "eraseFromMembershipSet",
|
151
|
-
type: "bool"
|
152
|
-
}
|
276
|
+
{ internalType: "uint256[]", name: "idCommitments", type: "uint256[]" },
|
277
|
+
{ internalType: "bool", name: "eraseFromMembershipSet", type: "bool" }
|
153
278
|
],
|
279
|
+
name: "eraseMemberships",
|
154
280
|
outputs: [],
|
155
|
-
stateMutability: "nonpayable"
|
281
|
+
stateMutability: "nonpayable",
|
282
|
+
type: "function"
|
156
283
|
},
|
157
284
|
{
|
158
|
-
type: "function",
|
159
|
-
name: "extendMemberships",
|
160
285
|
inputs: [
|
161
|
-
{
|
162
|
-
name: "idCommitments",
|
163
|
-
type: "uint256[]"
|
164
|
-
}
|
286
|
+
{ internalType: "uint256[]", name: "idCommitments", type: "uint256[]" }
|
165
287
|
],
|
288
|
+
name: "extendMemberships",
|
166
289
|
outputs: [],
|
167
|
-
stateMutability: "nonpayable"
|
290
|
+
stateMutability: "nonpayable",
|
291
|
+
type: "function"
|
168
292
|
},
|
169
293
|
{
|
170
|
-
type: "function",
|
171
|
-
name: "getMembershipInfo",
|
172
294
|
inputs: [
|
173
|
-
{
|
174
|
-
name: "idCommitment",
|
175
|
-
type: "uint256"
|
176
|
-
}
|
295
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
177
296
|
],
|
297
|
+
name: "getMembershipInfo",
|
178
298
|
outputs: [
|
299
|
+
{ internalType: "uint32", name: "", type: "uint32" },
|
300
|
+
{ internalType: "uint32", name: "", type: "uint32" },
|
301
|
+
{ internalType: "uint256", name: "", type: "uint256" }
|
302
|
+
],
|
303
|
+
stateMutability: "view",
|
304
|
+
type: "function"
|
305
|
+
},
|
306
|
+
{
|
307
|
+
inputs: [{ internalType: "uint40", name: "index", type: "uint40" }],
|
308
|
+
name: "getMerkleProof",
|
309
|
+
outputs: [{ internalType: "uint256[20]", name: "", type: "uint256[20]" }],
|
310
|
+
stateMutability: "view",
|
311
|
+
type: "function"
|
312
|
+
},
|
313
|
+
{
|
314
|
+
inputs: [
|
315
|
+
{ internalType: "uint32", name: "startIndex", type: "uint32" },
|
316
|
+
{ internalType: "uint32", name: "endIndex", type: "uint32" }
|
317
|
+
],
|
318
|
+
name: "getRateCommitmentsInRangeBoundsInclusive",
|
319
|
+
outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
|
320
|
+
stateMutability: "view",
|
321
|
+
type: "function"
|
322
|
+
},
|
323
|
+
{
|
324
|
+
inputs: [],
|
325
|
+
name: "gracePeriodDurationForNewMemberships",
|
326
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
327
|
+
stateMutability: "view",
|
328
|
+
type: "function"
|
329
|
+
},
|
330
|
+
{
|
331
|
+
inputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
332
|
+
name: "indicesOfLazilyErasedMemberships",
|
333
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
334
|
+
stateMutability: "view",
|
335
|
+
type: "function"
|
336
|
+
},
|
337
|
+
{
|
338
|
+
inputs: [
|
339
|
+
{ internalType: "address", name: "_priceCalculator", type: "address" },
|
340
|
+
{ internalType: "uint32", name: "_maxTotalRateLimit", type: "uint32" },
|
179
341
|
{
|
180
|
-
|
342
|
+
internalType: "uint32",
|
343
|
+
name: "_minMembershipRateLimit",
|
181
344
|
type: "uint32"
|
182
345
|
},
|
183
346
|
{
|
184
|
-
|
347
|
+
internalType: "uint32",
|
348
|
+
name: "_maxMembershipRateLimit",
|
185
349
|
type: "uint32"
|
186
350
|
},
|
187
|
-
{
|
188
|
-
|
189
|
-
type: "uint256"
|
190
|
-
}
|
351
|
+
{ internalType: "uint32", name: "_activeDuration", type: "uint32" },
|
352
|
+
{ internalType: "uint32", name: "_gracePeriod", type: "uint32" }
|
191
353
|
],
|
192
|
-
|
354
|
+
name: "initialize",
|
355
|
+
outputs: [],
|
356
|
+
stateMutability: "nonpayable",
|
357
|
+
type: "function"
|
193
358
|
},
|
194
359
|
{
|
195
|
-
type: "function",
|
196
|
-
name: "getMerkleProof",
|
197
360
|
inputs: [
|
198
|
-
{
|
199
|
-
name: "index",
|
200
|
-
type: "uint40"
|
201
|
-
}
|
361
|
+
{ internalType: "uint256", name: "_idCommitment", type: "uint256" }
|
202
362
|
],
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
363
|
+
name: "isExpired",
|
364
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
365
|
+
stateMutability: "view",
|
366
|
+
type: "function"
|
367
|
+
},
|
368
|
+
{
|
369
|
+
inputs: [
|
370
|
+
{ internalType: "uint256", name: "_idCommitment", type: "uint256" }
|
208
371
|
],
|
209
|
-
|
372
|
+
name: "isInGracePeriod",
|
373
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
374
|
+
stateMutability: "view",
|
375
|
+
type: "function"
|
376
|
+
},
|
377
|
+
{
|
378
|
+
inputs: [
|
379
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
380
|
+
],
|
381
|
+
name: "isInMembershipSet",
|
382
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
383
|
+
stateMutability: "view",
|
384
|
+
type: "function"
|
210
385
|
},
|
211
386
|
{
|
212
|
-
type: "function",
|
213
|
-
name: "getRateCommitmentsInRangeBoundsInclusive",
|
214
387
|
inputs: [
|
388
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
389
|
+
],
|
390
|
+
name: "isValidIdCommitment",
|
391
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
392
|
+
stateMutability: "pure",
|
393
|
+
type: "function"
|
394
|
+
},
|
395
|
+
{
|
396
|
+
inputs: [{ internalType: "uint32", name: "rateLimit", type: "uint32" }],
|
397
|
+
name: "isValidMembershipRateLimit",
|
398
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
399
|
+
stateMutability: "view",
|
400
|
+
type: "function"
|
401
|
+
},
|
402
|
+
{
|
403
|
+
inputs: [],
|
404
|
+
name: "maxMembershipRateLimit",
|
405
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
406
|
+
stateMutability: "view",
|
407
|
+
type: "function"
|
408
|
+
},
|
409
|
+
{
|
410
|
+
inputs: [],
|
411
|
+
name: "maxTotalRateLimit",
|
412
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
413
|
+
stateMutability: "view",
|
414
|
+
type: "function"
|
415
|
+
},
|
416
|
+
{
|
417
|
+
inputs: [
|
418
|
+
{ internalType: "uint256", name: "_idCommitment", type: "uint256" }
|
419
|
+
],
|
420
|
+
name: "membershipExpirationTimestamp",
|
421
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
422
|
+
stateMutability: "view",
|
423
|
+
type: "function"
|
424
|
+
},
|
425
|
+
{
|
426
|
+
inputs: [
|
427
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" }
|
428
|
+
],
|
429
|
+
name: "memberships",
|
430
|
+
outputs: [
|
431
|
+
{ internalType: "uint256", name: "depositAmount", type: "uint256" },
|
432
|
+
{ internalType: "uint32", name: "activeDuration", type: "uint32" },
|
215
433
|
{
|
216
|
-
|
217
|
-
|
434
|
+
internalType: "uint256",
|
435
|
+
name: "gracePeriodStartTimestamp",
|
436
|
+
type: "uint256"
|
218
437
|
},
|
219
|
-
{
|
220
|
-
|
221
|
-
|
222
|
-
}
|
438
|
+
{ internalType: "uint32", name: "gracePeriodDuration", type: "uint32" },
|
439
|
+
{ internalType: "uint32", name: "rateLimit", type: "uint32" },
|
440
|
+
{ internalType: "uint32", name: "index", type: "uint32" },
|
441
|
+
{ internalType: "address", name: "holder", type: "address" },
|
442
|
+
{ internalType: "address", name: "token", type: "address" }
|
223
443
|
],
|
444
|
+
stateMutability: "view",
|
445
|
+
type: "function"
|
446
|
+
},
|
447
|
+
{
|
448
|
+
inputs: [],
|
449
|
+
name: "merkleTree",
|
224
450
|
outputs: [
|
225
|
-
{
|
226
|
-
|
227
|
-
type: "uint256[]"
|
228
|
-
}
|
451
|
+
{ internalType: "uint40", name: "maxIndex", type: "uint40" },
|
452
|
+
{ internalType: "uint40", name: "numberOfLeaves", type: "uint40" }
|
229
453
|
],
|
230
|
-
stateMutability: "view"
|
454
|
+
stateMutability: "view",
|
455
|
+
type: "function"
|
456
|
+
},
|
457
|
+
{
|
458
|
+
inputs: [],
|
459
|
+
name: "minMembershipRateLimit",
|
460
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
461
|
+
stateMutability: "view",
|
462
|
+
type: "function"
|
463
|
+
},
|
464
|
+
{
|
465
|
+
inputs: [],
|
466
|
+
name: "nextFreeIndex",
|
467
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
468
|
+
stateMutability: "view",
|
469
|
+
type: "function"
|
470
|
+
},
|
471
|
+
{
|
472
|
+
inputs: [],
|
473
|
+
name: "owner",
|
474
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
475
|
+
stateMutability: "view",
|
476
|
+
type: "function"
|
231
477
|
},
|
232
478
|
{
|
233
|
-
type: "function",
|
234
|
-
name: "gracePeriodDurationForNewMemberships",
|
235
479
|
inputs: [],
|
480
|
+
name: "priceCalculator",
|
236
481
|
outputs: [
|
237
|
-
{
|
238
|
-
name: "",
|
239
|
-
type: "uint32"
|
240
|
-
}
|
482
|
+
{ internalType: "contract IPriceCalculator", name: "", type: "address" }
|
241
483
|
],
|
242
|
-
stateMutability: "view"
|
484
|
+
stateMutability: "view",
|
485
|
+
type: "function"
|
486
|
+
},
|
487
|
+
{
|
488
|
+
inputs: [],
|
489
|
+
name: "proxiableUUID",
|
490
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
491
|
+
stateMutability: "view",
|
492
|
+
type: "function"
|
243
493
|
},
|
244
494
|
{
|
245
|
-
type: "function",
|
246
|
-
name: "initialize",
|
247
495
|
inputs: [
|
496
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" },
|
497
|
+
{ internalType: "uint32", name: "rateLimit", type: "uint32" },
|
248
498
|
{
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
{
|
253
|
-
name: "_maxTotalRateLimit",
|
254
|
-
type: "uint32"
|
255
|
-
},
|
256
|
-
{
|
257
|
-
name: "_minMembershipRateLimit",
|
258
|
-
type: "uint32"
|
259
|
-
},
|
260
|
-
{
|
261
|
-
name: "_maxMembershipRateLimit",
|
262
|
-
type: "uint32"
|
263
|
-
},
|
264
|
-
{
|
265
|
-
name: "_activeDuration",
|
266
|
-
type: "uint32"
|
267
|
-
},
|
268
|
-
{
|
269
|
-
name: "_gracePeriod",
|
270
|
-
type: "uint32"
|
499
|
+
internalType: "uint256[]",
|
500
|
+
name: "idCommitmentsToErase",
|
501
|
+
type: "uint256[]"
|
271
502
|
}
|
272
503
|
],
|
504
|
+
name: "register",
|
273
505
|
outputs: [],
|
274
|
-
stateMutability: "nonpayable"
|
506
|
+
stateMutability: "nonpayable",
|
507
|
+
type: "function"
|
275
508
|
},
|
276
509
|
{
|
277
|
-
type: "function",
|
278
|
-
name: "isExpired",
|
279
510
|
inputs: [
|
280
|
-
{
|
281
|
-
|
282
|
-
|
511
|
+
{ internalType: "address", name: "owner", type: "address" },
|
512
|
+
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
513
|
+
{ internalType: "uint8", name: "v", type: "uint8" },
|
514
|
+
{ internalType: "bytes32", name: "r", type: "bytes32" },
|
515
|
+
{ internalType: "bytes32", name: "s", type: "bytes32" },
|
516
|
+
{ internalType: "uint256", name: "idCommitment", type: "uint256" },
|
517
|
+
{ internalType: "uint32", name: "rateLimit", type: "uint32" },
|
518
|
+
{
|
519
|
+
internalType: "uint256[]",
|
520
|
+
name: "idCommitmentsToErase",
|
521
|
+
type: "uint256[]"
|
283
522
|
}
|
284
523
|
],
|
285
|
-
|
524
|
+
name: "registerWithPermit",
|
525
|
+
outputs: [],
|
526
|
+
stateMutability: "nonpayable",
|
527
|
+
type: "function"
|
528
|
+
},
|
529
|
+
{
|
530
|
+
inputs: [],
|
531
|
+
name: "renounceOwnership",
|
532
|
+
outputs: [],
|
533
|
+
stateMutability: "nonpayable",
|
534
|
+
type: "function"
|
535
|
+
},
|
536
|
+
{
|
537
|
+
inputs: [],
|
538
|
+
name: "root",
|
539
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
540
|
+
stateMutability: "view",
|
541
|
+
type: "function"
|
542
|
+
},
|
543
|
+
{
|
544
|
+
inputs: [
|
286
545
|
{
|
287
|
-
|
288
|
-
|
546
|
+
internalType: "uint32",
|
547
|
+
name: "_activeDurationForNewMembership",
|
548
|
+
type: "uint32"
|
289
549
|
}
|
290
550
|
],
|
291
|
-
|
551
|
+
name: "setActiveDuration",
|
552
|
+
outputs: [],
|
553
|
+
stateMutability: "nonpayable",
|
554
|
+
type: "function"
|
292
555
|
},
|
293
556
|
{
|
294
|
-
type: "function",
|
295
|
-
name: "register",
|
296
557
|
inputs: [
|
297
558
|
{
|
298
|
-
|
299
|
-
|
300
|
-
},
|
301
|
-
{
|
302
|
-
name: "rateLimit",
|
559
|
+
internalType: "uint32",
|
560
|
+
name: "_gracePeriodDurationForNewMembership",
|
303
561
|
type: "uint32"
|
304
|
-
},
|
305
|
-
{
|
306
|
-
name: "idCommitmentsToErase",
|
307
|
-
type: "uint256[]"
|
308
562
|
}
|
309
563
|
],
|
564
|
+
name: "setGracePeriodDuration",
|
310
565
|
outputs: [],
|
311
|
-
stateMutability: "nonpayable"
|
566
|
+
stateMutability: "nonpayable",
|
567
|
+
type: "function"
|
312
568
|
},
|
313
569
|
{
|
314
|
-
type: "function",
|
315
|
-
name: "registerWithPermit",
|
316
570
|
inputs: [
|
317
571
|
{
|
318
|
-
|
319
|
-
|
320
|
-
},
|
321
|
-
{
|
322
|
-
name: "deadline",
|
323
|
-
type: "uint256"
|
324
|
-
},
|
325
|
-
{
|
326
|
-
name: "v",
|
327
|
-
type: "uint8"
|
328
|
-
},
|
329
|
-
{
|
330
|
-
name: "r",
|
331
|
-
type: "bytes32"
|
332
|
-
},
|
333
|
-
{
|
334
|
-
name: "s",
|
335
|
-
type: "bytes32"
|
336
|
-
},
|
337
|
-
{
|
338
|
-
name: "idCommitment",
|
339
|
-
type: "uint256"
|
340
|
-
},
|
341
|
-
{
|
342
|
-
name: "rateLimit",
|
572
|
+
internalType: "uint32",
|
573
|
+
name: "_maxMembershipRateLimit",
|
343
574
|
type: "uint32"
|
344
|
-
},
|
345
|
-
{
|
346
|
-
name: "idCommitmentsToErase",
|
347
|
-
type: "uint256[]"
|
348
575
|
}
|
349
576
|
],
|
577
|
+
name: "setMaxMembershipRateLimit",
|
350
578
|
outputs: [],
|
351
|
-
stateMutability: "nonpayable"
|
579
|
+
stateMutability: "nonpayable",
|
580
|
+
type: "function"
|
352
581
|
},
|
353
582
|
{
|
354
|
-
type: "event",
|
355
|
-
name: "MembershipRegistered",
|
356
583
|
inputs: [
|
357
|
-
{
|
358
|
-
name: "idCommitment",
|
359
|
-
type: "uint256",
|
360
|
-
indexed: false
|
361
|
-
},
|
362
|
-
{
|
363
|
-
name: "rateLimit",
|
364
|
-
type: "uint32",
|
365
|
-
indexed: false
|
366
|
-
},
|
367
|
-
{
|
368
|
-
name: "index",
|
369
|
-
type: "uint256",
|
370
|
-
indexed: false
|
371
|
-
}
|
584
|
+
{ internalType: "uint32", name: "_maxTotalRateLimit", type: "uint32" }
|
372
585
|
],
|
373
|
-
|
586
|
+
name: "setMaxTotalRateLimit",
|
587
|
+
outputs: [],
|
588
|
+
stateMutability: "nonpayable",
|
589
|
+
type: "function"
|
374
590
|
},
|
375
591
|
{
|
376
|
-
type: "event",
|
377
|
-
name: "MembershipRemoved",
|
378
592
|
inputs: [
|
379
593
|
{
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
},
|
384
|
-
{
|
385
|
-
name: "index",
|
386
|
-
type: "uint256",
|
387
|
-
indexed: false
|
594
|
+
internalType: "uint32",
|
595
|
+
name: "_minMembershipRateLimit",
|
596
|
+
type: "uint32"
|
388
597
|
}
|
389
598
|
],
|
390
|
-
|
599
|
+
name: "setMinMembershipRateLimit",
|
600
|
+
outputs: [],
|
601
|
+
stateMutability: "nonpayable",
|
602
|
+
type: "function"
|
603
|
+
},
|
604
|
+
{
|
605
|
+
inputs: [
|
606
|
+
{ internalType: "address", name: "_priceCalculator", type: "address" }
|
607
|
+
],
|
608
|
+
name: "setPriceCalculator",
|
609
|
+
outputs: [],
|
610
|
+
stateMutability: "nonpayable",
|
611
|
+
type: "function"
|
612
|
+
},
|
613
|
+
{
|
614
|
+
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
615
|
+
name: "transferOwnership",
|
616
|
+
outputs: [],
|
617
|
+
stateMutability: "nonpayable",
|
618
|
+
type: "function"
|
619
|
+
},
|
620
|
+
{
|
621
|
+
inputs: [
|
622
|
+
{ internalType: "address", name: "newImplementation", type: "address" }
|
623
|
+
],
|
624
|
+
name: "upgradeTo",
|
625
|
+
outputs: [],
|
626
|
+
stateMutability: "nonpayable",
|
627
|
+
type: "function"
|
628
|
+
},
|
629
|
+
{
|
630
|
+
inputs: [
|
631
|
+
{ internalType: "address", name: "newImplementation", type: "address" },
|
632
|
+
{ internalType: "bytes", name: "data", type: "bytes" }
|
633
|
+
],
|
634
|
+
name: "upgradeToAndCall",
|
635
|
+
outputs: [],
|
636
|
+
stateMutability: "payable",
|
637
|
+
type: "function"
|
638
|
+
},
|
639
|
+
{
|
640
|
+
inputs: [{ internalType: "address", name: "token", type: "address" }],
|
641
|
+
name: "withdraw",
|
642
|
+
outputs: [],
|
643
|
+
stateMutability: "nonpayable",
|
644
|
+
type: "function"
|
391
645
|
}
|
392
646
|
];
|
393
647
|
|