Skip to content

Commit 66e1286

Browse files
authored
Add guarded multicaller to abis (#307)
* Add guarded multicaller to abis * Add reference to guarded multicaller
1 parent 8284202 commit 66e1286

3 files changed

Lines changed: 366 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@imtbl/contracts",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "Immutable Smart Contracts",
55
"author": "Immutable",
66
"license": "Apache-2.0",

src/abis.ts

Lines changed: 364 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,367 @@
1+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2+
// GuardedMulticaller
3+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4+
5+
export const GuardedMulticallerAbi = [
6+
{
7+
type: 'constructor',
8+
inputs: [
9+
{ name: '_owner', internalType: 'address', type: 'address' },
10+
{ name: '_name', internalType: 'string', type: 'string' },
11+
{ name: '_version', internalType: 'string', type: 'string' },
12+
],
13+
stateMutability: 'nonpayable',
14+
},
15+
{
16+
type: 'function',
17+
inputs: [],
18+
name: 'DEFAULT_ADMIN_ROLE',
19+
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
20+
stateMutability: 'view',
21+
},
22+
{
23+
type: 'function',
24+
inputs: [],
25+
name: 'MULTICALL_SIGNER_ROLE',
26+
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
27+
stateMutability: 'view',
28+
},
29+
{
30+
type: 'function',
31+
inputs: [],
32+
name: 'eip712Domain',
33+
outputs: [
34+
{ name: 'fields', internalType: 'bytes1', type: 'bytes1' },
35+
{ name: 'name', internalType: 'string', type: 'string' },
36+
{ name: 'version', internalType: 'string', type: 'string' },
37+
{ name: 'chainId', internalType: 'uint256', type: 'uint256' },
38+
{ name: 'verifyingContract', internalType: 'address', type: 'address' },
39+
{ name: 'salt', internalType: 'bytes32', type: 'bytes32' },
40+
{ name: 'extensions', internalType: 'uint256[]', type: 'uint256[]' },
41+
],
42+
stateMutability: 'view',
43+
},
44+
{
45+
type: 'function',
46+
inputs: [
47+
{ name: '_multicallSigner', internalType: 'address', type: 'address' },
48+
{ name: '_reference', internalType: 'bytes32', type: 'bytes32' },
49+
{ name: '_targets', internalType: 'address[]', type: 'address[]' },
50+
{ name: '_data', internalType: 'bytes[]', type: 'bytes[]' },
51+
{ name: '_deadline', internalType: 'uint256', type: 'uint256' },
52+
{ name: '_signature', internalType: 'bytes', type: 'bytes' },
53+
],
54+
name: 'execute',
55+
outputs: [],
56+
stateMutability: 'nonpayable',
57+
},
58+
{
59+
type: 'function',
60+
inputs: [{ name: 'role', internalType: 'bytes32', type: 'bytes32' }],
61+
name: 'getRoleAdmin',
62+
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
63+
stateMutability: 'view',
64+
},
65+
{
66+
type: 'function',
67+
inputs: [{ name: '_user', internalType: 'address', type: 'address' }],
68+
name: 'grantMulticallSignerRole',
69+
outputs: [],
70+
stateMutability: 'nonpayable',
71+
},
72+
{
73+
type: 'function',
74+
inputs: [
75+
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
76+
{ name: 'account', internalType: 'address', type: 'address' },
77+
],
78+
name: 'grantRole',
79+
outputs: [],
80+
stateMutability: 'nonpayable',
81+
},
82+
{
83+
type: 'function',
84+
inputs: [{ name: '_reference', internalType: 'bytes32', type: 'bytes32' }],
85+
name: 'hasBeenExecuted',
86+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
87+
stateMutability: 'view',
88+
},
89+
{
90+
type: 'function',
91+
inputs: [
92+
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
93+
{ name: 'account', internalType: 'address', type: 'address' },
94+
],
95+
name: 'hasRole',
96+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
97+
stateMutability: 'view',
98+
},
99+
{
100+
type: 'function',
101+
inputs: [{ name: '_data', internalType: 'bytes[]', type: 'bytes[]' }],
102+
name: 'hashBytesArray',
103+
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
104+
stateMutability: 'pure',
105+
},
106+
{
107+
type: 'function',
108+
inputs: [
109+
{ name: '_target', internalType: 'address', type: 'address' },
110+
{ name: '_functionSelector', internalType: 'bytes4', type: 'bytes4' },
111+
],
112+
name: 'isFunctionPermitted',
113+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
114+
stateMutability: 'view',
115+
},
116+
{
117+
type: 'function',
118+
inputs: [
119+
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
120+
{ name: 'account', internalType: 'address', type: 'address' },
121+
],
122+
name: 'renounceRole',
123+
outputs: [],
124+
stateMutability: 'nonpayable',
125+
},
126+
{
127+
type: 'function',
128+
inputs: [{ name: '_user', internalType: 'address', type: 'address' }],
129+
name: 'revokeMulticallSignerRole',
130+
outputs: [],
131+
stateMutability: 'nonpayable',
132+
},
133+
{
134+
type: 'function',
135+
inputs: [
136+
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
137+
{ name: 'account', internalType: 'address', type: 'address' },
138+
],
139+
name: 'revokeRole',
140+
outputs: [],
141+
stateMutability: 'nonpayable',
142+
},
143+
{
144+
type: 'function',
145+
inputs: [
146+
{
147+
name: '_functionPermits',
148+
internalType: 'struct GuardedMulticaller.FunctionPermit[]',
149+
type: 'tuple[]',
150+
components: [
151+
{ name: 'target', internalType: 'address', type: 'address' },
152+
{ name: 'functionSelector', internalType: 'bytes4', type: 'bytes4' },
153+
{ name: 'permitted', internalType: 'bool', type: 'bool' },
154+
],
155+
},
156+
],
157+
name: 'setFunctionPermits',
158+
outputs: [],
159+
stateMutability: 'nonpayable',
160+
},
161+
{
162+
type: 'function',
163+
inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
164+
name: 'supportsInterface',
165+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
166+
stateMutability: 'view',
167+
},
168+
{ type: 'event', anonymous: false, inputs: [], name: 'EIP712DomainChanged' },
169+
{
170+
type: 'event',
171+
anonymous: false,
172+
inputs: [
173+
{
174+
name: '_target',
175+
internalType: 'address',
176+
type: 'address',
177+
indexed: true,
178+
},
179+
{
180+
name: '_functionSelector',
181+
internalType: 'bytes4',
182+
type: 'bytes4',
183+
indexed: false,
184+
},
185+
{
186+
name: '_permitted',
187+
internalType: 'bool',
188+
type: 'bool',
189+
indexed: false,
190+
},
191+
],
192+
name: 'FunctionPermitted',
193+
},
194+
{
195+
type: 'event',
196+
anonymous: false,
197+
inputs: [
198+
{
199+
name: '_multicallSigner',
200+
internalType: 'address',
201+
type: 'address',
202+
indexed: true,
203+
},
204+
{
205+
name: '_reference',
206+
internalType: 'bytes32',
207+
type: 'bytes32',
208+
indexed: true,
209+
},
210+
{
211+
name: '_targets',
212+
internalType: 'address[]',
213+
type: 'address[]',
214+
indexed: false,
215+
},
216+
{
217+
name: '_data',
218+
internalType: 'bytes[]',
219+
type: 'bytes[]',
220+
indexed: false,
221+
},
222+
{
223+
name: '_deadline',
224+
internalType: 'uint256',
225+
type: 'uint256',
226+
indexed: false,
227+
},
228+
],
229+
name: 'Multicalled',
230+
},
231+
{
232+
type: 'event',
233+
anonymous: false,
234+
inputs: [
235+
{ name: 'role', internalType: 'bytes32', type: 'bytes32', indexed: true },
236+
{
237+
name: 'previousAdminRole',
238+
internalType: 'bytes32',
239+
type: 'bytes32',
240+
indexed: true,
241+
},
242+
{
243+
name: 'newAdminRole',
244+
internalType: 'bytes32',
245+
type: 'bytes32',
246+
indexed: true,
247+
},
248+
],
249+
name: 'RoleAdminChanged',
250+
},
251+
{
252+
type: 'event',
253+
anonymous: false,
254+
inputs: [
255+
{ name: 'role', internalType: 'bytes32', type: 'bytes32', indexed: true },
256+
{
257+
name: 'account',
258+
internalType: 'address',
259+
type: 'address',
260+
indexed: true,
261+
},
262+
{
263+
name: 'sender',
264+
internalType: 'address',
265+
type: 'address',
266+
indexed: true,
267+
},
268+
],
269+
name: 'RoleGranted',
270+
},
271+
{
272+
type: 'event',
273+
anonymous: false,
274+
inputs: [
275+
{ name: 'role', internalType: 'bytes32', type: 'bytes32', indexed: true },
276+
{
277+
name: 'account',
278+
internalType: 'address',
279+
type: 'address',
280+
indexed: true,
281+
},
282+
{
283+
name: 'sender',
284+
internalType: 'address',
285+
type: 'address',
286+
indexed: true,
287+
},
288+
],
289+
name: 'RoleRevoked',
290+
},
291+
{
292+
type: 'error',
293+
inputs: [
294+
{ name: '_addressLength', internalType: 'uint256', type: 'uint256' },
295+
{ name: '_dataLength', internalType: 'uint256', type: 'uint256' },
296+
],
297+
name: 'AddressDataArrayLengthsMismatch',
298+
},
299+
{ type: 'error', inputs: [], name: 'EmptyAddressArray' },
300+
{ type: 'error', inputs: [], name: 'EmptyFunctionPermitArray' },
301+
{
302+
type: 'error',
303+
inputs: [{ name: '_deadline', internalType: 'uint256', type: 'uint256' }],
304+
name: 'Expired',
305+
},
306+
{
307+
type: 'error',
308+
inputs: [
309+
{ name: '_target', internalType: 'address', type: 'address' },
310+
{ name: '_data', internalType: 'bytes', type: 'bytes' },
311+
],
312+
name: 'FailedCall',
313+
},
314+
{
315+
type: 'error',
316+
inputs: [
317+
{ name: '_target', internalType: 'address', type: 'address' },
318+
{ name: '_data', internalType: 'bytes', type: 'bytes' },
319+
],
320+
name: 'InvalidCallData',
321+
},
322+
{
323+
type: 'error',
324+
inputs: [{ name: '_reference', internalType: 'bytes32', type: 'bytes32' }],
325+
name: 'InvalidReference',
326+
},
327+
{ type: 'error', inputs: [], name: 'InvalidShortString' },
328+
{
329+
type: 'error',
330+
inputs: [{ name: '_target', internalType: 'address', type: 'address' }],
331+
name: 'NonContractAddress',
332+
},
333+
{
334+
type: 'error',
335+
inputs: [{ name: '_reference', internalType: 'bytes32', type: 'bytes32' }],
336+
name: 'ReusedReference',
337+
},
338+
{
339+
type: 'error',
340+
inputs: [{ name: 'str', internalType: 'string', type: 'string' }],
341+
name: 'StringTooLong',
342+
},
343+
{
344+
type: 'error',
345+
inputs: [
346+
{ name: '_target', internalType: 'address', type: 'address' },
347+
{ name: '_data', internalType: 'bytes', type: 'bytes' },
348+
],
349+
name: 'UnauthorizedFunction',
350+
},
351+
{
352+
type: 'error',
353+
inputs: [{ name: '_signature', internalType: 'bytes', type: 'bytes' }],
354+
name: 'UnauthorizedSignature',
355+
},
356+
{
357+
type: 'error',
358+
inputs: [
359+
{ name: '_multicallSigner', internalType: 'address', type: 'address' },
360+
],
361+
name: 'UnauthorizedSigner',
362+
},
363+
] as const
364+
1365
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2366
// GuardedMulticaller2
3367
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
export {
9+
GuardedMulticallerAbi,
910
GuardedMulticaller2Abi,
1011
ImmutableERC721Abi,
1112
ImmutableERC721MintByIdAbi,

0 commit comments

Comments
 (0)