diff --git a/packages/abi/src/index.ts b/packages/abi/src/index.ts index 6537ee23d2..ce88f5b8e1 100644 --- a/packages/abi/src/index.ts +++ b/packages/abi/src/index.ts @@ -1 +1,23 @@ +export { abi as erc5719Abi } from './wallet/erc5719' +export { abi as erc1271Abi } from './wallet/erc1271' +export { abi as erc6492Abi } from './wallet/erc6492' +export { abi as factoryAbi } from './wallet/factory' +export { abi as mainModuleAbi } from './wallet/mainModule' +export { abi as mainModuleUpgradableAbi } from './wallet/mainModuleUpgradable' +export { abi as moduleHooksAbi } from './wallet/moduleHooks' +export { abi as sequenceUtilsAbi } from './wallet/sequenceUtils' +export { abi as requireFreshSignerAbi } from './wallet/libs/requireFreshSigners' +export { abi as walletProxyHookAbi } from './wallet/walletProxyHook' + export { walletContracts } from './wallet' + +export { ERC1155_ABI } from './tokens/erc1155' +export { ERC20_ABI } from './tokens/erc20' +export { ERC6909_ABI } from './tokens/erc6909' +export { ERC721_ABI } from './tokens/erc721' + +export { ERC1155_SALE_ABI } from './sale/erc1155Sale' +export { ERC721_SALE_ABI } from './sale/erc721Sale' + +export { ERC1155_SALE_ITEMS_ABI } from './saleItems/erc1155SaleItems' +export { ERC721_SALE_ITEMS_ABI } from './saleItems/erc721SaleItems' diff --git a/packages/abi/src/sale/erc1155Sale.ts b/packages/abi/src/sale/erc1155Sale.ts new file mode 100644 index 0000000000..c58b9f29ee --- /dev/null +++ b/packages/abi/src/sale/erc1155Sale.ts @@ -0,0 +1,352 @@ +export const ERC1155_SALE_ABI = [ + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'checkMerkleProof', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' } + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'items', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'itemsContract', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address' + }, + { name: 'maxTotal', type: 'uint256', internalType: 'uint256' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } + ], + outputs: [], + stateMutability: 'payable' + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'saleDetails', + inputs: [], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IERC721SaleFunctions.SaleDetails', + components: [ + { + name: 'supplyCap', + type: 'uint256', + internalType: 'uint256' + }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address' + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { + name: 'merkleRoot', + type: 'bytes32', + internalType: 'bytes32' + } + ] + } + ], + stateMutability: 'view' + }, + { + type: 'function', + name: 'setSaleDetails', + inputs: [ + { name: 'supplyCap', type: 'uint256', internalType: 'uint256' }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address' + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { name: 'merkleRoot', type: 'bytes32', internalType: 'bytes32' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'withdrawERC20', + inputs: [ + { name: 'token', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'withdrawETH', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'previousAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'newAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address' + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address' + } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address' + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address' + } + ], + anonymous: false + }, + { + type: 'event', + name: 'SaleDetailsUpdated', + inputs: [ + { + name: 'supplyCap', + type: 'uint256', + indexed: false, + internalType: 'uint256' + }, + { + name: 'cost', + type: 'uint256', + indexed: false, + internalType: 'uint256' + }, + { + name: 'paymentToken', + type: 'address', + indexed: false, + internalType: 'address' + }, + { + name: 'startTime', + type: 'uint64', + indexed: false, + internalType: 'uint64' + }, + { + name: 'endTime', + type: 'uint64', + indexed: false, + internalType: 'uint64' + }, + { + name: 'merkleRoot', + type: 'bytes32', + indexed: false, + internalType: 'bytes32' + } + ], + anonymous: false + }, + { + type: 'error', + name: 'InsufficientPayment', + inputs: [ + { name: 'currency', type: 'address', internalType: 'address' }, + { name: 'expected', type: 'uint256', internalType: 'uint256' }, + { name: 'actual', type: 'uint256', internalType: 'uint256' } + ] + }, + { + type: 'error', + name: 'InsufficientSupply', + inputs: [ + { + name: 'currentSupply', + type: 'uint256', + internalType: 'uint256' + }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { name: 'maxSupply', type: 'uint256', internalType: 'uint256' } + ] + }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, + { type: 'error', name: 'InvalidSaleDetails', inputs: [] }, + { + type: 'error', + name: 'MerkleProofInvalid', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' } + ] + }, + { type: 'error', name: 'SaleInactive', inputs: [] }, + { type: 'error', name: 'WithdrawFailed', inputs: [] } +] as const diff --git a/packages/abi/src/sale/erc721Sale.ts b/packages/abi/src/sale/erc721Sale.ts new file mode 100644 index 0000000000..480dc15f36 --- /dev/null +++ b/packages/abi/src/sale/erc721Sale.ts @@ -0,0 +1,352 @@ +export const ERC721_SALE_ABI = [ + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'checkMerkleProof', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' } + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'items', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'itemsContract', + inputs: [], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address' + }, + { name: 'maxTotal', type: 'uint256', internalType: 'uint256' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } + ], + outputs: [], + stateMutability: 'payable' + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'saleDetails', + inputs: [], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IERC721SaleFunctions.SaleDetails', + components: [ + { + name: 'supplyCap', + type: 'uint256', + internalType: 'uint256' + }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address' + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { + name: 'merkleRoot', + type: 'bytes32', + internalType: 'bytes32' + } + ] + } + ], + stateMutability: 'view' + }, + { + type: 'function', + name: 'setSaleDetails', + inputs: [ + { name: 'supplyCap', type: 'uint256', internalType: 'uint256' }, + { name: 'cost', type: 'uint256', internalType: 'uint256' }, + { + name: 'paymentToken', + type: 'address', + internalType: 'address' + }, + { name: 'startTime', type: 'uint64', internalType: 'uint64' }, + { name: 'endTime', type: 'uint64', internalType: 'uint64' }, + { name: 'merkleRoot', type: 'bytes32', internalType: 'bytes32' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'withdrawERC20', + inputs: [ + { name: 'token', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'withdrawETH', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'value', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'previousAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'newAdminRole', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address' + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address' + } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { + name: 'role', + type: 'bytes32', + indexed: true, + internalType: 'bytes32' + }, + { + name: 'account', + type: 'address', + indexed: true, + internalType: 'address' + }, + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address' + } + ], + anonymous: false + }, + { + type: 'event', + name: 'SaleDetailsUpdated', + inputs: [ + { + name: 'supplyCap', + type: 'uint256', + indexed: false, + internalType: 'uint256' + }, + { + name: 'cost', + type: 'uint256', + indexed: false, + internalType: 'uint256' + }, + { + name: 'paymentToken', + type: 'address', + indexed: false, + internalType: 'address' + }, + { + name: 'startTime', + type: 'uint64', + indexed: false, + internalType: 'uint64' + }, + { + name: 'endTime', + type: 'uint64', + indexed: false, + internalType: 'uint64' + }, + { + name: 'merkleRoot', + type: 'bytes32', + indexed: false, + internalType: 'bytes32' + } + ], + anonymous: false + }, + { + type: 'error', + name: 'InsufficientPayment', + inputs: [ + { name: 'currency', type: 'address', internalType: 'address' }, + { name: 'expected', type: 'uint256', internalType: 'uint256' }, + { name: 'actual', type: 'uint256', internalType: 'uint256' } + ] + }, + { + type: 'error', + name: 'InsufficientSupply', + inputs: [ + { + name: 'currentSupply', + type: 'uint256', + internalType: 'uint256' + }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { name: 'maxSupply', type: 'uint256', internalType: 'uint256' } + ] + }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, + { type: 'error', name: 'InvalidSaleDetails', inputs: [] }, + { + type: 'error', + name: 'MerkleProofInvalid', + inputs: [ + { name: 'root', type: 'bytes32', internalType: 'bytes32' }, + { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' }, + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'salt', type: 'bytes32', internalType: 'bytes32' } + ] + }, + { type: 'error', name: 'SaleInactive', inputs: [] }, + { type: 'error', name: 'WithdrawFailed', inputs: [] } +] as const diff --git a/packages/abi/src/saleItems/erc1155SaleItems.ts b/packages/abi/src/saleItems/erc1155SaleItems.ts new file mode 100644 index 0000000000..50913e907f --- /dev/null +++ b/packages/abi/src/saleItems/erc1155SaleItems.ts @@ -0,0 +1,377 @@ +export const ERC1155_SALE_ITEMS_ABI = [ + { type: 'constructor', inputs: [], stateMutability: 'nonpayable' }, + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'balanceOf', + inputs: [ + { name: '_owner', type: 'address', internalType: 'address' }, + { name: '_id', type: 'uint256', internalType: 'uint256' } + ], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'balanceOfBatch', + inputs: [ + { name: '_owners', type: 'address[]', internalType: 'address[]' }, + { name: '_ids', type: 'uint256[]', internalType: 'uint256[]' } + ], + outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'baseURI', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'batchBurn', + inputs: [ + { name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }, + { name: 'amounts', type: 'uint256[]', internalType: 'uint256[]' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'batchMint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }, + { name: 'amounts', type: 'uint256[]', internalType: 'uint256[]' }, + { name: 'data', type: 'bytes', internalType: 'bytes' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'burn', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'contractURI', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' } + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'tokenName', type: 'string', internalType: 'string' }, + { name: 'tokenBaseURI', type: 'string', internalType: 'string' }, + { name: 'tokenContractURI', type: 'string', internalType: 'string' }, + { name: 'royaltyReceiver', type: 'address', internalType: 'address' }, + { name: 'royaltyFeeNumerator', type: 'uint96', internalType: 'uint96' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'isApprovedForAll', + inputs: [ + { name: '_owner', type: 'address', internalType: 'address' }, + { name: '_operator', type: 'address', internalType: 'address' } + ], + outputs: [{ name: 'isOperator', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' }, + { name: 'data', type: 'bytes', internalType: 'bytes' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'name', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'royaltyInfo', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'salePrice', type: 'uint256', internalType: 'uint256' } + ], + outputs: [ + { name: '', type: 'address', internalType: 'address' }, + { name: '', type: 'uint256', internalType: 'uint256' } + ], + stateMutability: 'view' + }, + { + type: 'function', + name: 'safeBatchTransferFrom', + inputs: [ + { name: '_from', type: 'address', internalType: 'address' }, + { name: '_to', type: 'address', internalType: 'address' }, + { name: '_ids', type: 'uint256[]', internalType: 'uint256[]' }, + { name: '_amounts', type: 'uint256[]', internalType: 'uint256[]' }, + { name: '_data', type: 'bytes', internalType: 'bytes' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'safeTransferFrom', + inputs: [ + { name: '_from', type: 'address', internalType: 'address' }, + { name: '_to', type: 'address', internalType: 'address' }, + { name: '_id', type: 'uint256', internalType: 'uint256' }, + { name: '_amount', type: 'uint256', internalType: 'uint256' }, + { name: '_data', type: 'bytes', internalType: 'bytes' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setApprovalForAll', + inputs: [ + { name: '_operator', type: 'address', internalType: 'address' }, + { name: '_approved', type: 'bool', internalType: 'bool' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setBaseMetadataURI', + inputs: [{ name: 'tokenBaseURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setContractName', + inputs: [{ name: 'tokenName', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setContractURI', + inputs: [{ name: 'tokenContractURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setDefaultRoyalty', + inputs: [ + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setTokenRoyalty', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'tokenSupply', + inputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'totalSupply', + inputs: [], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'uri', + inputs: [{ name: '_id', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'event', + name: 'ApprovalForAll', + inputs: [ + { name: '_owner', type: 'address', indexed: true, internalType: 'address' }, + { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, + { name: '_approved', type: 'bool', indexed: false, internalType: 'bool' } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'previousAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'newAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' } + ], + anonymous: false + }, + { + type: 'event', + name: 'TransferBatch', + inputs: [ + { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, + { name: '_from', type: 'address', indexed: true, internalType: 'address' }, + { name: '_to', type: 'address', indexed: true, internalType: 'address' }, + { name: '_ids', type: 'uint256[]', indexed: false, internalType: 'uint256[]' }, + { name: '_amounts', type: 'uint256[]', indexed: false, internalType: 'uint256[]' } + ], + anonymous: false + }, + { + type: 'event', + name: 'TransferSingle', + inputs: [ + { name: '_operator', type: 'address', indexed: true, internalType: 'address' }, + { name: '_from', type: 'address', indexed: true, internalType: 'address' }, + { name: '_to', type: 'address', indexed: true, internalType: 'address' }, + { name: '_id', type: 'uint256', indexed: false, internalType: 'uint256' }, + { name: '_amount', type: 'uint256', indexed: false, internalType: 'uint256' } + ], + anonymous: false + }, + { + type: 'event', + name: 'URI', + inputs: [ + { name: '_uri', type: 'string', indexed: false, internalType: 'string' }, + { name: '_id', type: 'uint256', indexed: true, internalType: 'uint256' } + ], + anonymous: false + }, + { type: 'error', name: 'InvalidArrayLength', inputs: [] }, + { type: 'error', name: 'InvalidInitialization', inputs: [] } +] as const diff --git a/packages/abi/src/saleItems/erc721SaleItems.ts b/packages/abi/src/saleItems/erc721SaleItems.ts new file mode 100644 index 0000000000..615a2cfbec --- /dev/null +++ b/packages/abi/src/saleItems/erc721SaleItems.ts @@ -0,0 +1,440 @@ +export const ERC721_SALE_ITEMS_ABI = [ + { type: 'constructor', inputs: [], stateMutability: 'nonpayable' }, + { + type: 'function', + name: 'DEFAULT_ADMIN_ROLE', + inputs: [], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'approve', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'payable' + }, + { + type: 'function', + name: 'balanceOf', + inputs: [{ name: 'owner', type: 'address', internalType: 'address' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'batchBurn', + inputs: [{ name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'burn', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'contractURI', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'explicitOwnershipOf', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [ + { + name: '', + type: 'tuple', + internalType: 'struct IERC721A.TokenOwnership', + components: [ + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'startTimestamp', type: 'uint64', internalType: 'uint64' }, + { name: 'burned', type: 'bool', internalType: 'bool' }, + { name: 'extraData', type: 'uint24', internalType: 'uint24' } + ] + } + ], + stateMutability: 'view' + }, + { + type: 'function', + name: 'explicitOwnershipsOf', + inputs: [{ name: 'tokenIds', type: 'uint256[]', internalType: 'uint256[]' }], + outputs: [ + { + name: '', + type: 'tuple[]', + internalType: 'struct IERC721A.TokenOwnership[]', + components: [ + { name: 'addr', type: 'address', internalType: 'address' }, + { name: 'startTimestamp', type: 'uint64', internalType: 'uint64' }, + { name: 'burned', type: 'bool', internalType: 'bool' }, + { name: 'extraData', type: 'uint24', internalType: 'uint24' } + ] + } + ], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getApproved', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleAdmin', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMember', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'index', type: 'uint256', internalType: 'uint256' } + ], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'getRoleMemberCount', + inputs: [{ name: 'role', type: 'bytes32', internalType: 'bytes32' }], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'grantRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'hasRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'tokenName', type: 'string', internalType: 'string' }, + { name: 'tokenSymbol', type: 'string', internalType: 'string' }, + { name: 'tokenBaseURI', type: 'string', internalType: 'string' }, + { name: 'tokenContractURI', type: 'string', internalType: 'string' }, + { name: 'royaltyReceiver', type: 'address', internalType: 'address' }, + { name: 'royaltyFeeNumerator', type: 'uint96', internalType: 'uint96' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'isApprovedForAll', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'operator', type: 'address', internalType: 'address' } + ], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'mint', + inputs: [ + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'amount', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'name', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'ownerOf', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'address', internalType: 'address' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'renounceRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'revokeRole', + inputs: [ + { name: 'role', type: 'bytes32', internalType: 'bytes32' }, + { name: 'account', type: 'address', internalType: 'address' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'royaltyInfo', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'salePrice', type: 'uint256', internalType: 'uint256' } + ], + outputs: [ + { name: '', type: 'address', internalType: 'address' }, + { name: '', type: 'uint256', internalType: 'uint256' } + ], + stateMutability: 'view' + }, + { + type: 'function', + name: 'safeTransferFrom', + inputs: [ + { name: 'from', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'payable' + }, + { + type: 'function', + name: 'safeTransferFrom', + inputs: [ + { name: 'from', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: '_data', type: 'bytes', internalType: 'bytes' } + ], + outputs: [], + stateMutability: 'payable' + }, + { + type: 'function', + name: 'setApprovalForAll', + inputs: [ + { name: 'operator', type: 'address', internalType: 'address' }, + { name: 'approved', type: 'bool', internalType: 'bool' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setBaseMetadataURI', + inputs: [{ name: 'tokenBaseURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setContractURI', + inputs: [{ name: 'tokenContractURI', type: 'string', internalType: 'string' }], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setDefaultRoyalty', + inputs: [ + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setNameAndSymbol', + inputs: [ + { name: 'tokenName', type: 'string', internalType: 'string' }, + { name: 'tokenSymbol', type: 'string', internalType: 'string' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'setTokenRoyalty', + inputs: [ + { name: 'tokenId', type: 'uint256', internalType: 'uint256' }, + { name: 'receiver', type: 'address', internalType: 'address' }, + { name: 'feeNumerator', type: 'uint96', internalType: 'uint96' } + ], + outputs: [], + stateMutability: 'nonpayable' + }, + { + type: 'function', + name: 'supportsInterface', + inputs: [{ name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' }], + outputs: [{ name: '', type: 'bool', internalType: 'bool' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'symbol', + inputs: [], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'tokenURI', + inputs: [{ name: 'tokenId', type: 'uint256', internalType: 'uint256' }], + outputs: [{ name: '', type: 'string', internalType: 'string' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'tokensOfOwner', + inputs: [{ name: 'owner', type: 'address', internalType: 'address' }], + outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'tokensOfOwnerIn', + inputs: [ + { name: 'owner', type: 'address', internalType: 'address' }, + { name: 'start', type: 'uint256', internalType: 'uint256' }, + { name: 'stop', type: 'uint256', internalType: 'uint256' } + ], + outputs: [{ name: '', type: 'uint256[]', internalType: 'uint256[]' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'totalSupply', + inputs: [], + outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], + stateMutability: 'view' + }, + { + type: 'function', + name: 'transferFrom', + inputs: [ + { name: 'from', type: 'address', internalType: 'address' }, + { name: 'to', type: 'address', internalType: 'address' }, + { name: 'tokenId', type: 'uint256', internalType: 'uint256' } + ], + outputs: [], + stateMutability: 'payable' + }, + { + type: 'event', + name: 'Approval', + inputs: [ + { name: 'owner', type: 'address', indexed: true, internalType: 'address' }, + { name: 'approved', type: 'address', indexed: true, internalType: 'address' }, + { name: 'tokenId', type: 'uint256', indexed: true, internalType: 'uint256' } + ], + anonymous: false + }, + { + type: 'event', + name: 'ApprovalForAll', + inputs: [ + { name: 'owner', type: 'address', indexed: true, internalType: 'address' }, + { name: 'operator', type: 'address', indexed: true, internalType: 'address' }, + { name: 'approved', type: 'bool', indexed: false, internalType: 'bool' } + ], + anonymous: false + }, + { + type: 'event', + name: 'ConsecutiveTransfer', + inputs: [ + { name: 'fromTokenId', type: 'uint256', indexed: true, internalType: 'uint256' }, + { name: 'toTokenId', type: 'uint256', indexed: false, internalType: 'uint256' }, + { name: 'from', type: 'address', indexed: true, internalType: 'address' }, + { name: 'to', type: 'address', indexed: true, internalType: 'address' } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleAdminChanged', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'previousAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'newAdminRole', type: 'bytes32', indexed: true, internalType: 'bytes32' } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleGranted', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' } + ], + anonymous: false + }, + { + type: 'event', + name: 'RoleRevoked', + inputs: [ + { name: 'role', type: 'bytes32', indexed: true, internalType: 'bytes32' }, + { name: 'account', type: 'address', indexed: true, internalType: 'address' }, + { name: 'sender', type: 'address', indexed: true, internalType: 'address' } + ], + anonymous: false + }, + { + type: 'event', + name: 'Transfer', + inputs: [ + { name: 'from', type: 'address', indexed: true, internalType: 'address' }, + { name: 'to', type: 'address', indexed: true, internalType: 'address' }, + { name: 'tokenId', type: 'uint256', indexed: true, internalType: 'uint256' } + ], + anonymous: false + }, + { type: 'error', name: 'ApprovalCallerNotOwnerNorApproved', inputs: [] }, + { type: 'error', name: 'ApprovalQueryForNonexistentToken', inputs: [] }, + { type: 'error', name: 'BalanceQueryForZeroAddress', inputs: [] }, + { type: 'error', name: 'InvalidInitialization', inputs: [] }, + { type: 'error', name: 'InvalidQueryRange', inputs: [] }, + { type: 'error', name: 'MintERC2309QuantityExceedsLimit', inputs: [] }, + { type: 'error', name: 'MintToZeroAddress', inputs: [] }, + { type: 'error', name: 'MintZeroQuantity', inputs: [] }, + { type: 'error', name: 'OwnerQueryForNonexistentToken', inputs: [] }, + { type: 'error', name: 'OwnershipNotInitializedForExtraData', inputs: [] }, + { type: 'error', name: 'TransferCallerNotOwnerNorApproved', inputs: [] }, + { type: 'error', name: 'TransferFromIncorrectOwner', inputs: [] }, + { type: 'error', name: 'TransferToNonERC721ReceiverImplementer', inputs: [] }, + { type: 'error', name: 'TransferToZeroAddress', inputs: [] }, + { type: 'error', name: 'URIQueryForNonexistentToken', inputs: [] } +] as const diff --git a/packages/abi/src/tokens/erc1155.ts b/packages/abi/src/tokens/erc1155.ts index 1e20ce4050..12cd919679 100644 --- a/packages/abi/src/tokens/erc1155.ts +++ b/packages/abi/src/tokens/erc1155.ts @@ -1,3 +1,422 @@ -export const abi = [] - -export const returns = {} +// @openzeppelin/contracts@5.0.0/token/ERC1155/ERC1155.sol +export const ERC1155_ABI = [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'balance', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'ERC1155InsufficientBalance', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address' + } + ], + name: 'ERC1155InvalidApprover', + type: 'error' + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'idsLength', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'valuesLength', + type: 'uint256' + } + ], + name: 'ERC1155InvalidArrayLength', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address' + } + ], + name: 'ERC1155InvalidOperator', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address' + } + ], + name: 'ERC1155InvalidReceiver', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + } + ], + name: 'ERC1155InvalidSender', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + internalType: 'address', + name: 'owner', + type: 'address' + } + ], + name: 'ERC1155MissingApprovalForAll', + type: 'error' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'account', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool' + } + ], + name: 'ApprovalForAll', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address' + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]' + }, + { + indexed: false, + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]' + } + ], + name: 'TransferBatch', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address' + }, + { + indexed: false, + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256' + } + ], + name: 'TransferSingle', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'string', + name: 'value', + type: 'string' + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256' + } + ], + name: 'URI', + type: 'event' + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + } + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address[]', + name: 'accounts', + type: 'address[]' + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]' + } + ], + name: 'balanceOfBatch', + outputs: [ + { + internalType: 'uint256[]', + name: '', + type: 'uint256[]' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address' + }, + { + internalType: 'address', + name: 'operator', + type: 'address' + } + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address' + }, + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256[]', + name: 'ids', + type: 'uint256[]' + }, + { + internalType: 'uint256[]', + name: 'values', + type: 'uint256[]' + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes' + } + ], + name: 'safeBatchTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address' + }, + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256' + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes' + } + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool' + } + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4' + } + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + name: 'uri', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string' + } + ], + stateMutability: 'view', + type: 'function' + } +] as const diff --git a/packages/abi/src/tokens/erc20.ts b/packages/abi/src/tokens/erc20.ts index 1e20ce4050..6fd527a70b 100644 --- a/packages/abi/src/tokens/erc20.ts +++ b/packages/abi/src/tokens/erc20.ts @@ -1,3 +1,316 @@ -export const abi = [] - -export const returns = {} +// @openzeppelin/contracts@5.0.0/token/ERC20/ERC20.sol +export const ERC20_ABI = [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'allowance', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256' + } + ], + name: 'ERC20InsufficientAllowance', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'balance', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256' + } + ], + name: 'ERC20InsufficientBalance', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address' + } + ], + name: 'ERC20InvalidApprover', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address' + } + ], + name: 'ERC20InvalidReceiver', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + } + ], + name: 'ERC20InvalidSender', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + } + ], + name: 'ERC20InvalidSpender', + type: 'error' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256' + } + ], + name: 'Approval', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address' + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256' + } + ], + name: 'Transfer', + type: 'event' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + internalType: 'address', + name: 'spender', + type: 'address' + } + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256' + } + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address' + } + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'decimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256' + } + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address' + }, + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'value', + type: 'uint256' + } + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + } +] as const diff --git a/packages/abi/src/tokens/erc6909.ts b/packages/abi/src/tokens/erc6909.ts new file mode 100644 index 0000000000..c7a34b3a47 --- /dev/null +++ b/packages/abi/src/tokens/erc6909.ts @@ -0,0 +1,404 @@ +// @openzeppelin/contracts@5.0.0/token/ERC6909/ERC6909.sol +export const ERC6909_ABI = [ + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'allowance', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + } + ], + name: 'ERC6909InsufficientAllowance', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'balance', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'needed', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + } + ], + name: 'ERC6909InsufficientBalance', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address' + } + ], + name: 'ERC6909InvalidApprover', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address' + } + ], + name: 'ERC6909InvalidReceiver', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + } + ], + name: 'ERC6909InvalidSender', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + } + ], + name: 'ERC6909InvalidSpender', + type: 'error' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256' + } + ], + name: 'Approval', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool' + } + ], + name: 'OperatorSet', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'caller', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'receiver', + type: 'address' + }, + { + indexed: true, + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256' + } + ], + name: 'Transfer', + type: 'event' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + } + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256' + } + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + } + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + internalType: 'address', + name: 'spender', + type: 'address' + } + ], + name: 'isOperator', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address' + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool' + } + ], + name: 'setOperator', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4' + } + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256' + } + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + }, + { + internalType: 'address', + name: 'receiver', + type: 'address' + }, + { + internalType: 'uint256', + name: 'id', + type: 'uint256' + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256' + } + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'nonpayable', + type: 'function' + } +] as const diff --git a/packages/abi/src/tokens/erc721.ts b/packages/abi/src/tokens/erc721.ts index 1e20ce4050..3cbaf84a94 100644 --- a/packages/abi/src/tokens/erc721.ts +++ b/packages/abi/src/tokens/erc721.ts @@ -1,3 +1,441 @@ -export const abi = [] - -export const returns = {} +// @openzeppelin/contracts@5.0.0/token/ERC721/ERC721.sol +export const ERC721_ABI = [ + { + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + }, + { + internalType: 'address', + name: 'owner', + type: 'address' + } + ], + name: 'ERC721IncorrectOwner', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'ERC721InsufficientApproval', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'approver', + type: 'address' + } + ], + name: 'ERC721InvalidApprover', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address' + } + ], + name: 'ERC721InvalidOperator', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + } + ], + name: 'ERC721InvalidOwner', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'receiver', + type: 'address' + } + ], + name: 'ERC721InvalidReceiver', + type: 'error' + }, + { + inputs: [ + { + internalType: 'address', + name: 'sender', + type: 'address' + } + ], + name: 'ERC721InvalidSender', + type: 'error' + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'ERC721NonexistentToken', + type: 'error' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'approved', + type: 'address' + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'Approval', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool' + } + ], + name: 'ApprovalForAll', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address' + }, + { + indexed: true, + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'Transfer', + type: 'event' + }, + { + inputs: [ + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'approve', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + } + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'getApproved', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address' + }, + { + internalType: 'address', + name: 'operator', + type: 'address' + } + ], + name: 'isApprovedForAll', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'ownerOf', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address' + }, + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address' + }, + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes' + } + ], + name: 'safeTransferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'operator', + type: 'address' + }, + { + internalType: 'bool', + name: 'approved', + type: 'bool' + } + ], + name: 'setApprovalForAll', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'bytes4', + name: 'interfaceId', + type: 'bytes4' + } + ], + name: 'supportsInterface', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'tokenURI', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'from', + type: 'address' + }, + { + internalType: 'address', + name: 'to', + type: 'address' + }, + { + internalType: 'uint256', + name: 'tokenId', + type: 'uint256' + } + ], + name: 'transferFrom', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] as const diff --git a/packages/abi/src/wallet/erc1271.ts b/packages/abi/src/wallet/erc1271.ts index 14e0576117..f4d9835436 100644 --- a/packages/abi/src/wallet/erc1271.ts +++ b/packages/abi/src/wallet/erc1271.ts @@ -19,7 +19,7 @@ export const abi = [ payable: false, stateMutability: 'view' } -] +] as const export const returns = { isValidSignatureBytes32: '0x1626ba7e' diff --git a/packages/abi/src/wallet/erc5719.ts b/packages/abi/src/wallet/erc5719.ts index 2f9b43b6ab..a8ddda31a5 100644 --- a/packages/abi/src/wallet/erc5719.ts +++ b/packages/abi/src/wallet/erc5719.ts @@ -16,4 +16,4 @@ export const abi = [ stateMutability: 'view', type: 'function' } -] +] as const diff --git a/packages/abi/src/wallet/erc6492.ts b/packages/abi/src/wallet/erc6492.ts index dcaf022a50..a29b2ca61c 100644 --- a/packages/abi/src/wallet/erc6492.ts +++ b/packages/abi/src/wallet/erc6492.ts @@ -58,4 +58,4 @@ export const abi = [ stateMutability: 'nonpayable', type: 'function' } -] +] as const diff --git a/packages/abi/src/wallet/factory.ts b/packages/abi/src/wallet/factory.ts index df5ef5fc66..0727c3d89e 100644 --- a/packages/abi/src/wallet/factory.ts +++ b/packages/abi/src/wallet/factory.ts @@ -15,4 +15,4 @@ export const abi = [ payable: true, stateMutability: 'payable' } -] +] as const diff --git a/packages/abi/src/wallet/index.ts b/packages/abi/src/wallet/index.ts index 73a90929a5..7fd21f0661 100644 --- a/packages/abi/src/wallet/index.ts +++ b/packages/abi/src/wallet/index.ts @@ -9,6 +9,9 @@ import * as sequenceUtils from './sequenceUtils' import * as requireFreshSigner from './libs/requireFreshSigners' import * as walletProxyHook from './walletProxyHook' +/** + * @deprecated import directly from @0xsequence/abi/* instead, omitting "walletContracts" + */ export const walletContracts = { erc6492, erc5719, diff --git a/packages/abi/src/wallet/libs/requireFreshSigners.ts b/packages/abi/src/wallet/libs/requireFreshSigners.ts index ef8f78657c..ba2a133419 100644 --- a/packages/abi/src/wallet/libs/requireFreshSigners.ts +++ b/packages/abi/src/wallet/libs/requireFreshSigners.ts @@ -12,4 +12,4 @@ export const abi = [ stateMutability: 'nonpayable', type: 'function' } -] +] as const diff --git a/packages/abi/src/wallet/mainModule.ts b/packages/abi/src/wallet/mainModule.ts index e92fde8f1d..a4eeb9be50 100644 --- a/packages/abi/src/wallet/mainModule.ts +++ b/packages/abi/src/wallet/mainModule.ts @@ -155,4 +155,4 @@ export const abi = [ payable: false, stateMutability: 'nonpayable' } -] +] as const diff --git a/packages/abi/src/wallet/mainModuleUpgradable.ts b/packages/abi/src/wallet/mainModuleUpgradable.ts index e49298a38f..33c4ccb87a 100644 --- a/packages/abi/src/wallet/mainModuleUpgradable.ts +++ b/packages/abi/src/wallet/mainModuleUpgradable.ts @@ -25,4 +25,4 @@ export const abi = [ payable: false, stateMutability: 'view' } -] +] as const diff --git a/packages/abi/src/wallet/sequenceUtils.ts b/packages/abi/src/wallet/sequenceUtils.ts index 7b52c69c8a..578977299e 100644 --- a/packages/abi/src/wallet/sequenceUtils.ts +++ b/packages/abi/src/wallet/sequenceUtils.ts @@ -513,4 +513,4 @@ export const abi = [ stateMutability: 'view', type: 'function' } -] +] as const