diff --git a/abi/generated.ts b/abi/generated.ts index 25668731..e0637bf3 100644 --- a/abi/generated.ts +++ b/abi/generated.ts @@ -2416,3 +2416,353 @@ export const immutableErc721MintByIdAbi = [ name: 'TransferToNotInAllowlist', }, ] as const + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// PaymentSplitter +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +export const paymentSplitterAbi = [ + { + type: 'constructor', + inputs: [ + { name: 'admin', internalType: 'address', type: 'address' }, + { name: 'registrar', internalType: 'address', type: 'address' }, + { name: 'fundsAdmin', internalType: 'address', type: 'address' }, + ], + stateMutability: 'nonpayable', + }, + { type: 'receive', stateMutability: 'payable' }, + { + type: 'function', + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'RELEASE_FUNDS_ROLE', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'TOKEN_REGISTRAR_ROLE', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + { name: 'tokens', internalType: 'contract IERC20[]', type: 'address[]' }, + ], + name: 'addToAllowlist', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [], + name: 'erc20Allowlist', + outputs: [ + { name: '', internalType: 'contract IERC20[]', type: 'address[]' }, + ], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{ name: 'role', internalType: 'bytes32', type: 'bytes32' }], + name: 'getRoleAdmin', + outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + { name: 'role', internalType: 'bytes32', type: 'bytes32' }, + { name: 'index', internalType: 'uint256', type: 'uint256' }, + ], + name: 'getRoleMember', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{ name: 'role', internalType: 'bytes32', type: 'bytes32' }], + name: 'getRoleMemberCount', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{ name: 'user', internalType: 'address', type: 'address' }], + name: 'grantReleaseFundsRole', + 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: '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: 'payees', internalType: 'address payable[]', type: 'address[]' }, + { name: 'shares_', internalType: 'uint256[]', type: 'uint256[]' }, + ], + name: 'overridePayees', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [{ name: 'index', internalType: 'uint256', type: 'uint256' }], + name: 'payee', + outputs: [{ name: '', internalType: 'address', type: 'address' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{ name: 'account', internalType: 'address', type: 'address' }], + name: 'releasable', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [ + { name: 'token', internalType: 'contract IERC20', type: 'address' }, + { name: 'account', internalType: 'address', type: 'address' }, + ], + name: 'releasable', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'releaseAll', + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + inputs: [ + { name: 'token', internalType: 'contract IERC20', type: 'address' }, + ], + name: 'removeFromAllowlist', + outputs: [], + stateMutability: 'nonpayable', + }, + { + 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: 'revokeReleaseFundsRole', + 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: 'account', internalType: 'address', type: 'address' }], + name: 'shares', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ name: '', internalType: 'bool', type: 'bool' }], + stateMutability: 'view', + }, + { + type: 'function', + inputs: [], + name: 'totalShares', + outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }], + stateMutability: 'view', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'token', + internalType: 'contract IERC20', + type: 'address', + indexed: true, + }, + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'ERC20PaymentReleased', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'account', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'shares', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'PayeeAdded', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'from', + internalType: 'address', + type: 'address', + indexed: false, + }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'PaymentReceived', + }, + { + type: 'event', + anonymous: false, + inputs: [ + { name: 'to', internalType: 'address', type: 'address', indexed: false }, + { + name: 'amount', + internalType: 'uint256', + type: 'uint256', + indexed: false, + }, + ], + name: 'PaymentReleased', + }, + { + 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: 'PaymentSplitterLengthMismatchSharesPayees', + }, + { type: 'error', inputs: [], name: 'PaymentSplitterNoPayeesAdded' }, + { type: 'error', inputs: [], name: 'PaymentSplitterPayeeZeroShares' }, + { type: 'error', inputs: [], name: 'PaymentSplitterPayeeZerothAddress' }, + { + type: 'error', + inputs: [], + name: 'PaymentSplitterSharesAlreadyExistForPayee', + }, +] as const diff --git a/abi/index.ts b/abi/index.ts index efe9383b..1230252d 100644 --- a/abi/index.ts +++ b/abi/index.ts @@ -3,6 +3,13 @@ import { immutableErc721Abi as ImmutableERC721Abi, immutableErc721MintByIdAbi as ImmutableERC721MintByIdAbi, immutableErc1155Abi as ImmutableERC1155Abi, + paymentSplitterAbi as PaymentSplitterAbi, } from "./generated"; -export { GuardedMulticallerAbi, ImmutableERC721Abi, ImmutableERC721MintByIdAbi, ImmutableERC1155Abi }; +export { + GuardedMulticallerAbi, + ImmutableERC721Abi, + ImmutableERC721MintByIdAbi, + ImmutableERC1155Abi, + PaymentSplitterAbi, +}; diff --git a/wagmi.config.ts b/wagmi.config.ts index 533e0c5b..da002317 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -5,6 +5,7 @@ import GuardedMulticaller from "./foundry-out/GuardedMulticaller.sol/GuardedMult import ImmutableERC721 from "./foundry-out/ImmutableERC721.sol/ImmutableERC721.json"; import ImmutableERC721MintByID from "./foundry-out/ImmutableERC721MintByID.sol/ImmutableERC721MintByID.json"; import ImmutableERC1155 from "./foundry-out/ImmutableERC1155.sol/ImmutableERC1155.json"; +import PaymentSplitter from "./foundry-out/PaymentSplitter.sol/PaymentSplitter.json"; // https://github.com/wevm/viem/discussions/1009 export default defineConfig({ @@ -26,5 +27,9 @@ export default defineConfig({ name: "ImmutableERC1155", abi: ImmutableERC1155.abi as Abi, }, + { + name: "PaymentSplitter", + abi: PaymentSplitter.abi as Abi, + }, ], });