Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@imtbl/contracts",
"version": "3.1.0",
"version": "3.1.1",
"description": "Immutable Smart Contracts",
"author": "Immutable",
"license": "Apache-2.0",
Expand Down
364 changes: 364 additions & 0 deletions src/abis.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,367 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GuardedMulticaller
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

export const GuardedMulticallerAbi = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be exported in src/index.ts as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.
Added

{
type: 'constructor',
inputs: [
{ name: '_owner', internalType: 'address', type: 'address' },
{ name: '_name', internalType: 'string', type: 'string' },
{ name: '_version', internalType: 'string', type: 'string' },
],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [],
name: 'DEFAULT_ADMIN_ROLE',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'MULTICALL_SIGNER_ROLE',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [],
name: 'eip712Domain',
outputs: [
{ name: 'fields', internalType: 'bytes1', type: 'bytes1' },
{ name: 'name', internalType: 'string', type: 'string' },
{ name: 'version', internalType: 'string', type: 'string' },
{ name: 'chainId', internalType: 'uint256', type: 'uint256' },
{ name: 'verifyingContract', internalType: 'address', type: 'address' },
{ name: 'salt', internalType: 'bytes32', type: 'bytes32' },
{ name: 'extensions', internalType: 'uint256[]', type: 'uint256[]' },
],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{ name: '_multicallSigner', internalType: 'address', type: 'address' },
{ name: '_reference', internalType: 'bytes32', type: 'bytes32' },
{ name: '_targets', internalType: 'address[]', type: 'address[]' },
{ name: '_data', internalType: 'bytes[]', type: 'bytes[]' },
{ name: '_deadline', internalType: 'uint256', type: 'uint256' },
{ name: '_signature', internalType: 'bytes', type: 'bytes' },
],
name: 'execute',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [{ name: 'role', internalType: 'bytes32', type: 'bytes32' }],
name: 'getRoleAdmin',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [{ name: '_user', internalType: 'address', type: 'address' }],
name: 'grantMulticallSignerRole',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'grantRole',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [{ name: '_reference', internalType: 'bytes32', type: 'bytes32' }],
name: 'hasBeenExecuted',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'hasRole',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [{ name: '_data', internalType: 'bytes[]', type: 'bytes[]' }],
name: 'hashBytesArray',
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
stateMutability: 'pure',
},
{
type: 'function',
inputs: [
{ name: '_target', internalType: 'address', type: 'address' },
{ name: '_functionSelector', internalType: 'bytes4', type: 'bytes4' },
],
name: 'isFunctionPermitted',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{
type: 'function',
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'renounceRole',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [{ name: '_user', internalType: 'address', type: 'address' }],
name: 'revokeMulticallSignerRole',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32' },
{ name: 'account', internalType: 'address', type: 'address' },
],
name: 'revokeRole',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [
{
name: '_functionPermits',
internalType: 'struct GuardedMulticaller.FunctionPermit[]',
type: 'tuple[]',
components: [
{ name: 'target', internalType: 'address', type: 'address' },
{ name: 'functionSelector', internalType: 'bytes4', type: 'bytes4' },
{ name: 'permitted', internalType: 'bool', type: 'bool' },
],
},
],
name: 'setFunctionPermits',
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
name: 'supportsInterface',
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
stateMutability: 'view',
},
{ type: 'event', anonymous: false, inputs: [], name: 'EIP712DomainChanged' },
{
type: 'event',
anonymous: false,
inputs: [
{
name: '_target',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: '_functionSelector',
internalType: 'bytes4',
type: 'bytes4',
indexed: false,
},
{
name: '_permitted',
internalType: 'bool',
type: 'bool',
indexed: false,
},
],
name: 'FunctionPermitted',
},
{
type: 'event',
anonymous: false,
inputs: [
{
name: '_multicallSigner',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: '_reference',
internalType: 'bytes32',
type: 'bytes32',
indexed: true,
},
{
name: '_targets',
internalType: 'address[]',
type: 'address[]',
indexed: false,
},
{
name: '_data',
internalType: 'bytes[]',
type: 'bytes[]',
indexed: false,
},
{
name: '_deadline',
internalType: 'uint256',
type: 'uint256',
indexed: false,
},
],
name: 'Multicalled',
},
{
type: 'event',
anonymous: false,
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32', indexed: true },
{
name: 'previousAdminRole',
internalType: 'bytes32',
type: 'bytes32',
indexed: true,
},
{
name: 'newAdminRole',
internalType: 'bytes32',
type: 'bytes32',
indexed: true,
},
],
name: 'RoleAdminChanged',
},
{
type: 'event',
anonymous: false,
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32', indexed: true },
{
name: 'account',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'sender',
internalType: 'address',
type: 'address',
indexed: true,
},
],
name: 'RoleGranted',
},
{
type: 'event',
anonymous: false,
inputs: [
{ name: 'role', internalType: 'bytes32', type: 'bytes32', indexed: true },
{
name: 'account',
internalType: 'address',
type: 'address',
indexed: true,
},
{
name: 'sender',
internalType: 'address',
type: 'address',
indexed: true,
},
],
name: 'RoleRevoked',
},
{
type: 'error',
inputs: [
{ name: '_addressLength', internalType: 'uint256', type: 'uint256' },
{ name: '_dataLength', internalType: 'uint256', type: 'uint256' },
],
name: 'AddressDataArrayLengthsMismatch',
},
{ type: 'error', inputs: [], name: 'EmptyAddressArray' },
{ type: 'error', inputs: [], name: 'EmptyFunctionPermitArray' },
{
type: 'error',
inputs: [{ name: '_deadline', internalType: 'uint256', type: 'uint256' }],
name: 'Expired',
},
{
type: 'error',
inputs: [
{ name: '_target', internalType: 'address', type: 'address' },
{ name: '_data', internalType: 'bytes', type: 'bytes' },
],
name: 'FailedCall',
},
{
type: 'error',
inputs: [
{ name: '_target', internalType: 'address', type: 'address' },
{ name: '_data', internalType: 'bytes', type: 'bytes' },
],
name: 'InvalidCallData',
},
{
type: 'error',
inputs: [{ name: '_reference', internalType: 'bytes32', type: 'bytes32' }],
name: 'InvalidReference',
},
{ type: 'error', inputs: [], name: 'InvalidShortString' },
{
type: 'error',
inputs: [{ name: '_target', internalType: 'address', type: 'address' }],
name: 'NonContractAddress',
},
{
type: 'error',
inputs: [{ name: '_reference', internalType: 'bytes32', type: 'bytes32' }],
name: 'ReusedReference',
},
{
type: 'error',
inputs: [{ name: 'str', internalType: 'string', type: 'string' }],
name: 'StringTooLong',
},
{
type: 'error',
inputs: [
{ name: '_target', internalType: 'address', type: 'address' },
{ name: '_data', internalType: 'bytes', type: 'bytes' },
],
name: 'UnauthorizedFunction',
},
{
type: 'error',
inputs: [{ name: '_signature', internalType: 'bytes', type: 'bytes' }],
name: 'UnauthorizedSignature',
},
{
type: 'error',
inputs: [
{ name: '_multicallSigner', internalType: 'address', type: 'address' },
],
name: 'UnauthorizedSigner',
},
] as const

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GuardedMulticaller2
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

export {
GuardedMulticallerAbi,
GuardedMulticaller2Abi,
ImmutableERC721Abi,
ImmutableERC721MintByIdAbi,
Expand Down