From a8584c4a4fe5fb81ec1c7b1e817c5783ec5fda01 Mon Sep 17 00:00:00 2001 From: Haodi <82733821@qq.com> Date: Sat, 13 Apr 2024 02:06:30 +0800 Subject: [PATCH 1/2] Support permissionless (#137) * change sdk and support permissionless * conflict --------- Co-authored-by: lutty --- packages/core-sdk/src/abi/config.ts | 62 - packages/core-sdk/src/abi/generated.ts | 17413 ++++------------ .../src/abi/json/AccessController.abi.ts | 78 - .../src/abi/json/DisputeModule.abi.ts | 148 - packages/core-sdk/src/abi/json/Errors.abi.ts | 1216 -- packages/core-sdk/src/abi/json/Errors.json | 1216 -- .../core-sdk/src/abi/json/IERC1155.abi.ts | 76 - .../src/abi/json/IIPAssetRegistry.abi.ts | 123 - .../src/abi/json/ILicenseToken.abi.ts | 65 - .../src/abi/json/IPAccountImpl.abi.ts | 75 - .../src/abi/json/IPILicenseTemplate.abi.ts | 229 - .../src/abi/json/IRoyaltyModule.abi.ts | 30 - .../src/abi/json/IRoyaltyPolicyLAP.abi.ts | 69 - .../src/abi/json/IpRoyaltyVault.abi.ts | 93 - .../src/abi/json/LicenseRegistry.abi.ts | 30 - .../src/abi/json/LicensingModule.abi.ts | 174 - .../abi/json/PILPolicyFrameworkManager.abi.ts | 115 - packages/core-sdk/src/abi/sdkEntities.json | 54 - packages/core-sdk/src/client.ts | 68 +- packages/core-sdk/src/resources/dispute.ts | 62 +- packages/core-sdk/src/resources/ipAccount.ts | 63 +- packages/core-sdk/src/resources/ipAsset.ts | 96 +- packages/core-sdk/src/resources/license.ts | 156 +- packages/core-sdk/src/resources/permission.ts | 70 +- packages/core-sdk/src/resources/royalty.ts | 58 +- packages/core-sdk/src/types/config.ts | 22 +- packages/core-sdk/src/types/options.ts | 4 + packages/core-sdk/src/utils/env.ts | 60 - packages/core-sdk/test/config.ts | 60 - .../core-sdk/test/integration/config.test.ts | 54 +- .../core-sdk/test/integration/dispute.test.ts | 4 +- .../test/integration/ipAccount.test.ts | 4 +- .../test/integration/permission.test.ts | 5 +- .../storyTestNet/ipAsset.storyTest.test.ts | 10 - .../storyTestNet/license.storyTest.test.ts | 67 +- .../test/integration/testABI.tenderly.ts | 60 - packages/core-sdk/test/unit/client.test.ts | 38 +- .../test/unit/resources/dispute.test.ts | 31 +- .../test/unit/resources/ipAccount.test.ts | 18 +- .../test/unit/resources/ipAsset.test.ts | 3 +- .../test/unit/resources/permission.test.ts | 9 +- .../core-sdk/test/unit/utils/utils.test.ts | 6 +- .../wagmi-generater/resolveProxyContracts.ts | 64 + packages/wagmi-generater/sdk.ts | 224 +- packages/wagmi-generater/wagmi.config.ts | 183 +- 45 files changed, 5420 insertions(+), 17345 deletions(-) delete mode 100644 packages/core-sdk/src/abi/config.ts delete mode 100644 packages/core-sdk/src/abi/json/AccessController.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/DisputeModule.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/Errors.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/Errors.json delete mode 100644 packages/core-sdk/src/abi/json/IERC1155.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/IIPAssetRegistry.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/ILicenseToken.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/IPAccountImpl.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/IPILicenseTemplate.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/IRoyaltyModule.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/IRoyaltyPolicyLAP.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/IpRoyaltyVault.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/LicenseRegistry.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/LicensingModule.abi.ts delete mode 100644 packages/core-sdk/src/abi/json/PILPolicyFrameworkManager.abi.ts delete mode 100644 packages/core-sdk/src/abi/sdkEntities.json delete mode 100644 packages/core-sdk/src/utils/env.ts delete mode 100644 packages/core-sdk/test/config.ts delete mode 100644 packages/core-sdk/test/integration/testABI.tenderly.ts create mode 100644 packages/wagmi-generater/resolveProxyContracts.ts diff --git a/packages/core-sdk/src/abi/config.ts b/packages/core-sdk/src/abi/config.ts deleted file mode 100644 index 9dfc7a79..00000000 --- a/packages/core-sdk/src/abi/config.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { getAddress } from "viem"; - -import IERC1155ABI from "./json/IERC1155.abi"; -import AccessControllerABI from "./json/AccessController.abi"; -import DisputeModuleABI from "./json/DisputeModule.abi"; -import IPAccountImplABI from "./json/IPAccountImpl.abi"; -import IPAssetRegistryABI from "./json/IIPAssetRegistry.abi"; -import LicensingModuleABI from "./json/LicensingModule.abi"; -import PILicenseTemplateABI from "./json/IPILicenseTemplate.abi"; -import IRoyaltyPolicyLAPABI from "./json/IRoyaltyPolicyLAP.abi"; -import IpRoyaltyVaultABI from "./json/IpRoyaltyVault.abi"; -import IRoyaltyModuleABI from "./json/IRoyaltyModule.abi"; -import ErrorsABI from "./json/Errors.abi"; -import { contractAddress } from "../utils/env"; -import { SupportedChainIds } from "../types/config"; - -export const IPAccountABI = [...IPAccountImplABI, ...ErrorsABI]; - -export const getIPAssetRegistryConfig = (chain: SupportedChainIds) => ({ - abi: IPAssetRegistryABI, - address: getAddress(contractAddress[chain].IPAssetRegistry), -}); -export const getAccessControllerConfig = (chain: SupportedChainIds) => ({ - abi: [...AccessControllerABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].AccessController), -}); -export const getDisputeModuleConfig = (chain: SupportedChainIds) => ({ - abi: [...DisputeModuleABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].DisputeModule), -}); -export const getLicenseRegistryConfig = (chain: SupportedChainIds) => ({ - abi: IERC1155ABI, - address: getAddress(contractAddress[chain].LicenseRegistry), -}); -export const getLicensingModuleConfig = (chain: SupportedChainIds) => ({ - abi: [...LicensingModuleABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].LicensingModule), -}); - -export const getPILicenseTemplateConfig = (chain: SupportedChainIds) => ({ - abi: [...PILicenseTemplateABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].PILicenseTemplate), -}); -export const getRoyaltyPolicyLAPConfig = (chain: SupportedChainIds) => ({ - abi: [...IRoyaltyPolicyLAPABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].RoyaltyPolicyLAP), -}); - -export const getRoyaltyVaultImplConfig = (chain: SupportedChainIds) => ({ - abi: [...IpRoyaltyVaultABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].IpRoyaltyVaultImpl), -}); - -export const getRoyaltyModuleConfig = (chain: SupportedChainIds) => ({ - abi: [...IRoyaltyModuleABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].RoyaltyModule), -}); - -export const getLicenseTemplateConfig = (chain: SupportedChainIds) => ({ - abi: [...PILicenseTemplateABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].PILicenseTemplate), -}); diff --git a/packages/core-sdk/src/abi/generated.ts b/packages/core-sdk/src/abi/generated.ts index 66dbeef9..e9e7f3d1 100644 --- a/packages/core-sdk/src/abi/generated.ts +++ b/packages/core-sdk/src/abi/generated.ts @@ -1,21 +1,28 @@ import { Address, - PublicClient, - WalletClient, - WatchContractEventReturnType, + Abi, + Account, + Chain, + ContractFunctionArgs, + ContractFunctionName, + WriteContractParameters, WriteContractReturnType, + PublicClient, Hex, + decodeEventLog, + WatchContractEventReturnType, + TransactionReceipt, } from "viem"; + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AccessController ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * + */ export const accessControllerAbi = [ - { - type: "constructor", - inputs: [{ name: "governance", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", inputs: [ @@ -47,6 +54,18 @@ export const accessControllerAbi = [ }, { type: "error", inputs: [], name: "AccessController__PermissionIsNotValid" }, { type: "error", inputs: [], name: "AccessController__SignerIsZeroAddress" }, + { + type: "error", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "AddressEmptyCode", + }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", + }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, + { type: "error", inputs: [], name: "FailedInnerCall" }, { type: "error", inputs: [], name: "Governance__InconsistentState" }, { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { type: "error", inputs: [], name: "Governance__ProtocolPaused" }, @@ -56,6 +75,14 @@ export const accessControllerAbi = [ name: "Governance__UnsupportedInterface", }, { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", + }, { type: "event", anonymous: false, @@ -69,6 +96,19 @@ export const accessControllerAbi = [ ], name: "GovernanceUpdated", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, { type: "event", anonymous: false, @@ -103,17 +143,23 @@ export const accessControllerAbi = [ name: "PermissionSet", }, { - type: "function", - inputs: [], - name: "IP_ACCOUNT_REGISTRY", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + type: "event", + anonymous: false, + inputs: [ + { + name: "implementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", }, { type: "function", inputs: [], - name: "MODULE_REGISTRY", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { @@ -147,11 +193,18 @@ export const accessControllerAbi = [ outputs: [{ name: "", internalType: "uint8", type: "uint8" }], stateMutability: "view", }, + { + type: "function", + inputs: [{ name: "governance", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [], - name: "governance", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { @@ -160,7 +213,7 @@ export const accessControllerAbi = [ { name: "ipAccountRegistry", internalType: "address", type: "address" }, { name: "moduleRegistry", internalType: "address", type: "address" }, ], - name: "initialize", + name: "setAddresses", outputs: [], stateMutability: "nonpayable", }, @@ -216,61 +269,115 @@ export const accessControllerAbi = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, ] as const; -export const accessControllerAddress = "0x92c87ae0a0a4b8629ad028e55183CC2b7eC057D3" as const; +/** + * + */ +export const accessControllerAddress = { + 1513: "0x7e253Df9b0fC872746877Fa362b2cAf32712d770", +} as const; +/** + * + */ export const accessControllerConfig = { address: accessControllerAddress, abi: accessControllerAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// AncestorsVaultLAP +// DisputeModule ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const ancestorsVaultLapAbi = [ +/** + * + */ +export const disputeModuleAbi = [ { type: "constructor", - inputs: [{ name: "royaltyPolicyLAP", internalType: "address", type: "address" }], + inputs: [ + { name: "controller", internalType: "address", type: "address" }, + { name: "assetRegistry", internalType: "address", type: "address" }, + ], stateMutability: "nonpayable", }, + { + type: "error", + inputs: [{ name: "ipAccount", internalType: "address", type: "address" }], + name: "AccessControlled__NotIpAccount", + }, + { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, { type: "error", inputs: [{ name: "target", internalType: "address", type: "address" }], name: "AddressEmptyCode", }, + { type: "error", inputs: [], name: "DisputeModule__NotAbleToResolve" }, + { type: "error", inputs: [], name: "DisputeModule__NotDisputeInitiator" }, + { type: "error", inputs: [], name: "DisputeModule__NotInDisputeState" }, + { type: "error", inputs: [], name: "DisputeModule__NotRegisteredIpId" }, { type: "error", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "AddressInsufficientBalance", + inputs: [], + name: "DisputeModule__NotWhitelistedArbitrationPolicy", }, - { type: "error", inputs: [], name: "AncestorsVaultLAP__AlreadyClaimed" }, { type: "error", inputs: [], - name: "AncestorsVaultLAP__ClaimerNotAnAncestor", + name: "DisputeModule__NotWhitelistedArbitrationRelayer", }, - { type: "error", inputs: [], name: "AncestorsVaultLAP__ERC20BalanceNotZero" }, - { type: "error", inputs: [], name: "AncestorsVaultLAP__ETHBalanceNotZero" }, { type: "error", inputs: [], - name: "AncestorsVaultLAP__InvalidAncestorsHash", + name: "DisputeModule__NotWhitelistedDisputeTag", }, - { type: "error", inputs: [], name: "AncestorsVaultLAP__InvalidClaimer" }, - { type: "error", inputs: [], name: "AncestorsVaultLAP__TransferFailed" }, + { type: "error", inputs: [], name: "DisputeModule__ZeroArbitrationPolicy" }, + { type: "error", inputs: [], name: "DisputeModule__ZeroArbitrationRelayer" }, + { type: "error", inputs: [], name: "DisputeModule__ZeroDisputeTag" }, { type: "error", inputs: [], - name: "AncestorsVaultLAP__ZeroRoyaltyPolicyLAP", + name: "DisputeModule__ZeroLinkToDisputeEvidence", + }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, { type: "error", inputs: [], name: "FailedInnerCall" }, + { type: "error", inputs: [], name: "Governance__InconsistentState" }, + { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, + { + type: "error", + inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], + name: "Governance__UnsupportedInterface", + }, + { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "NotInitializing" }, { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, { type: "error", - inputs: [{ name: "token", internalType: "address", type: "address" }], - name: "SafeERC20FailedOperation", + inputs: [{ name: "str", internalType: "string", type: "string" }], + name: "StringTooLong", + }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { type: "event", @@ -283,401 +390,74 @@ export const ancestorsVaultLapAbi = [ indexed: false, }, { - name: "claimerIpId", + name: "arbitrationPolicy", internalType: "address", type: "address", indexed: false, }, - { - name: "withdrawETH", - internalType: "bool", - type: "bool", - indexed: false, - }, - { - name: "tokens", - internalType: "contract ERC20[]", - type: "address[]", - indexed: false, - }, ], - name: "Claimed", - }, - { - type: "function", - inputs: [], - name: "ROYALTY_POLICY_LAP", - outputs: [{ name: "", internalType: "contract IRoyaltyPolicyLAP", type: "address" }], - stateMutability: "view", + name: "ArbitrationPolicySet", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "claimerIpId", internalType: "address", type: "address" }, - { name: "ancestors", internalType: "address[]", type: "address[]" }, { - name: "ancestorsRoyalties", - internalType: "uint32[]", - type: "uint32[]", + name: "arbitrationPolicy", + internalType: "address", + type: "address", + indexed: false, }, - { name: "withdrawETH", internalType: "bool", type: "bool" }, - { name: "tokens", internalType: "contract ERC20[]", type: "address[]" }, - ], - name: "claim", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "claimerIpId", internalType: "address", type: "address" }, - ], - name: "isClaimed", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint256[]", type: "uint256[]" }, - { name: "", internalType: "uint256[]", type: "uint256[]" }, - { name: "", internalType: "bytes", type: "bytes" }, - ], - name: "onERC1155BatchReceived", - outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, + { name: "allowed", internalType: "bool", type: "bool", indexed: false }, ], - name: "onERC1155Received", - outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + name: "ArbitrationPolicyWhitelistUpdated", }, -] as const; - -export const ancestorsVaultLapAddress = "0x280f8921E36d6Af2E03AD84EC8194ad1b6B4799c" as const; - -export const ancestorsVaultLapConfig = { - address: ancestorsVaultLapAddress, - abi: ancestorsVaultLapAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ArbitrationPolicySP -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const arbitrationPolicySpAbi = [ { - type: "constructor", + type: "event", + anonymous: false, inputs: [ - { name: "_disputeModule", internalType: "address", type: "address" }, - { name: "_paymentToken", internalType: "address", type: "address" }, - { name: "_arbitrationPrice", internalType: "uint256", type: "uint256" }, - { name: "_governable", internalType: "address", type: "address" }, + { + name: "arbitrationPolicy", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "arbitrationRelayer", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "allowed", internalType: "bool", type: "bool", indexed: false }, ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "AddressEmptyCode", - }, - { - type: "error", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "AddressInsufficientBalance", - }, - { type: "error", inputs: [], name: "ArbitrationPolicySP__NotDisputeModule" }, - { type: "error", inputs: [], name: "ArbitrationPolicySP__ZeroDisputeModule" }, - { type: "error", inputs: [], name: "ArbitrationPolicySP__ZeroPaymentToken" }, - { type: "error", inputs: [], name: "FailedInnerCall" }, - { type: "error", inputs: [], name: "Governance__InconsistentState" }, - { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, - { - type: "error", - inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], - name: "Governance__UnsupportedInterface", - }, - { type: "error", inputs: [], name: "Governance__ZeroAddress" }, - { - type: "error", - inputs: [{ name: "token", internalType: "address", type: "address" }], - name: "SafeERC20FailedOperation", + name: "ArbitrationRelayerWhitelistUpdated", }, { type: "event", anonymous: false, inputs: [ { - name: "newGovernance", + name: "arbitrationPolicy", internalType: "address", type: "address", - indexed: true, + indexed: false, }, ], - name: "GovernanceUpdated", + name: "DefaultArbitrationPolicyUpdated", }, { type: "event", anonymous: false, inputs: [ { - name: "amount", + name: "disputeId", internalType: "uint256", type: "uint256", indexed: false, }, + { name: "data", internalType: "bytes", type: "bytes", indexed: false }, ], - name: "GovernanceWithdrew", - }, - { - type: "function", - inputs: [], - name: "ARBITRATION_PRICE", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "DISPUTE_MODULE", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "PAYMENT_TOKEN", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "getGovernance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governanceWithdraw", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "caller", internalType: "address", type: "address" }, - { name: "disputeId", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "onDisputeCancel", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "disputeId", internalType: "uint256", type: "uint256" }, - { name: "decision", internalType: "bool", type: "bool" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "onDisputeJudgement", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "caller", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "onRaiseDispute", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], - name: "setGovernance", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -export const arbitrationPolicySpAddress = "0xCc3dDa466A18C4F20Bc0750756B92E2f23741Fd3" as const; - -export const arbitrationPolicySpConfig = { - address: arbitrationPolicySpAddress, - abi: arbitrationPolicySpAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// DisputeModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const disputeModuleAbi = [ - { - type: "constructor", - inputs: [ - { name: "_controller", internalType: "address", type: "address" }, - { name: "_assetRegistry", internalType: "address", type: "address" }, - { name: "_governance", internalType: "address", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [{ name: "ipAccount", internalType: "address", type: "address" }], - name: "AccessControlled__NotIpAccount", - }, - { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, - { type: "error", inputs: [], name: "DisputeModule__NotAbleToResolve" }, - { type: "error", inputs: [], name: "DisputeModule__NotDisputeInitiator" }, - { type: "error", inputs: [], name: "DisputeModule__NotInDisputeState" }, - { type: "error", inputs: [], name: "DisputeModule__NotRegisteredIpId" }, - { - type: "error", - inputs: [], - name: "DisputeModule__NotWhitelistedArbitrationPolicy", - }, - { - type: "error", - inputs: [], - name: "DisputeModule__NotWhitelistedArbitrationRelayer", - }, - { - type: "error", - inputs: [], - name: "DisputeModule__NotWhitelistedDisputeTag", - }, - { type: "error", inputs: [], name: "DisputeModule__ZeroArbitrationPolicy" }, - { type: "error", inputs: [], name: "DisputeModule__ZeroArbitrationRelayer" }, - { type: "error", inputs: [], name: "DisputeModule__ZeroDisputeTag" }, - { - type: "error", - inputs: [], - name: "DisputeModule__ZeroLinkToDisputeEvidence", - }, - { type: "error", inputs: [], name: "Governance__InconsistentState" }, - { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, - { - type: "error", - inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], - name: "Governance__UnsupportedInterface", - }, - { type: "error", inputs: [], name: "Governance__ZeroAddress" }, - { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, - { - type: "error", - inputs: [{ name: "str", internalType: "string", type: "string" }], - name: "StringTooLong", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "ipId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "arbitrationPolicy", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "ArbitrationPolicySet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "arbitrationPolicy", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "allowed", internalType: "bool", type: "bool", indexed: false }, - ], - name: "ArbitrationPolicyWhitelistUpdated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "arbitrationPolicy", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "arbitrationRelayer", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "allowed", internalType: "bool", type: "bool", indexed: false }, - ], - name: "ArbitrationRelayerWhitelistUpdated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "arbitrationPolicy", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "DefaultArbitrationPolicyUpdated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "disputeId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { name: "data", internalType: "bytes", type: "bytes", indexed: false }, - ], - name: "DisputeCancelled", + name: "DisputeCancelled", }, { type: "event", @@ -764,6 +544,19 @@ export const disputeModuleAbi = [ ], name: "GovernanceUpdated", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, { type: "event", anonymous: false, @@ -773,6 +566,19 @@ export const disputeModuleAbi = [ ], name: "TagWhitelistUpdated", }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "implementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, { type: "function", inputs: [], @@ -807,11 +613,18 @@ export const disputeModuleAbi = [ outputs: [{ name: "", internalType: "contract IIPAssetRegistry", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [{ name: "ipId", internalType: "address", type: "address" }], name: "arbitrationPolicies", - outputs: [{ name: "arbitrationPolicy", internalType: "address", type: "address" }], + outputs: [{ name: "policy", internalType: "address", type: "address" }], stateMutability: "view", }, { @@ -865,10 +678,10 @@ export const disputeModuleAbi = [ }, { type: "function", - inputs: [], - name: "governance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", + inputs: [{ name: "_governance", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", @@ -910,11 +723,18 @@ export const disputeModuleAbi = [ }, { type: "function", - inputs: [ - { name: "targetIpId", internalType: "address", type: "address" }, - { name: "linkToDisputeEvidence", internalType: "string", type: "string" }, - { name: "targetTag", internalType: "bytes32", type: "bytes32" }, - { name: "data", internalType: "bytes", type: "bytes" }, + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "targetIpId", internalType: "address", type: "address" }, + { name: "linkToDisputeEvidence", internalType: "string", type: "string" }, + { name: "targetTag", internalType: "bytes32", type: "bytes32" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], name: "raiseDispute", outputs: [{ name: "", internalType: "uint256", type: "uint256" }], @@ -969,6 +789,16 @@ export const disputeModuleAbi = [ outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, { type: "function", inputs: [ @@ -1002,230 +832,28 @@ export const disputeModuleAbi = [ }, ] as const; -export const disputeModuleAddress = "0x0Ac6fdA124b05D2daA5E9De7059c866EE1CE7Bcb" as const; +/** + * + */ +export const disputeModuleAddress = { + 1513: "0x6d54456Ae5DCbDC0C9E2713cC8E650fE4f445c7C", +} as const; +/** + * + */ export const disputeModuleConfig = { address: disputeModuleAddress, abi: disputeModuleAbi, } as const; -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Governance -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const governanceAbi = [ - { - type: "constructor", - inputs: [{ name: "admin", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { type: "error", inputs: [], name: "AccessControlBadConfirmation" }, - { - type: "error", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "neededRole", internalType: "bytes32", type: "bytes32" }, - ], - name: "AccessControlUnauthorizedAccount", - }, - { - type: "error", - inputs: [], - name: "Governance__NewStateIsTheSameWithOldState", - }, - { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, - { type: "error", inputs: [], name: "Governance__ZeroAddress" }, - { - 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: "event", - anonymous: false, - inputs: [ - { - name: "account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "prevState", - internalType: "enum GovernanceLib.ProtocolState", - type: "uint8", - indexed: false, - }, - { - name: "newState", - internalType: "enum GovernanceLib.ProtocolState", - type: "uint8", - indexed: false, - }, - { - name: "timestamp", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "StateSet", - }, - { - type: "function", - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], - 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: "getState", - outputs: [ - { - name: "", - internalType: "enum GovernanceLib.ProtocolState", - type: "uint8", - }, - ], - stateMutability: "view", - }, - { - 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: "role", internalType: "bytes32", type: "bytes32" }, - { name: "callerConfirmation", internalType: "address", type: "address" }, - ], - name: "renounceRole", - 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: "newState", - internalType: "enum GovernanceLib.ProtocolState", - type: "uint8", - }, - ], - name: "setState", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, -] as const; - -export const governanceAddress = "0x6D8070F7726769bEd136bc7007B3deA695f7047A" as const; - -export const governanceConfig = { - address: governanceAddress, - abi: governanceAbi, -} as const; - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IPAccountImpl ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * + */ export const ipAccountImplAbi = [ { type: "constructor", @@ -1304,6 +932,46 @@ export const ipAccountImplAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [ + { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "bytes32", type: "bytes32" }, + ], + name: "addressData", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "bytes32", type: "bytes32" }, + ], + name: "boolData", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "bytes32", type: "bytes32" }, + ], + name: "bytes32Data", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "bytes32", type: "bytes32" }, + ], + name: "bytesData", + outputs: [{ name: "", internalType: "bytes", type: "bytes" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -1329,6 +997,40 @@ export const ipAccountImplAbi = [ outputs: [{ name: "result", internalType: "bytes", type: "bytes" }], stateMutability: "payable", }, + { + type: "function", + inputs: [{ name: "key", internalType: "bytes32", type: "bytes32" }], + name: "getBytes", + outputs: [{ name: "", internalType: "bytes", type: "bytes" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "namespace", internalType: "bytes32", type: "bytes32" }, + { name: "key", internalType: "bytes32", type: "bytes32" }, + ], + name: "getBytes", + outputs: [{ name: "", internalType: "bytes", type: "bytes" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [ + { name: "namespace", internalType: "bytes32", type: "bytes32" }, + { name: "key", internalType: "bytes32", type: "bytes32" }, + ], + name: "getBytes32", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "key", internalType: "bytes32", type: "bytes32" }], + name: "getBytes32", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, { type: "function", inputs: [ @@ -1386,160 +1088,100 @@ export const ipAccountImplAbi = [ }, { type: "function", - inputs: [], - name: "state", - 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: "pure", - }, - { - type: "function", - inputs: [], - name: "token", - outputs: [ - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - ], - stateMutability: "view", - }, - { type: "receive", stateMutability: "payable" }, -] as const; - -export const ipAccountImplAddress = "0xddcBD4309f0545fa8cC99137bC621620e017bdBe" as const; - -export const ipAccountImplConfig = { - address: ipAccountImplAddress, - abi: ipAccountImplAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IPAccountRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const ipAccountRegistryAbi = [ - { - type: "constructor", inputs: [ - { name: "erc6551Registry", internalType: "address", type: "address" }, - { name: "ipAccountImpl", internalType: "address", type: "address" }, + { name: "key", internalType: "bytes32", type: "bytes32" }, + { name: "value", internalType: "bytes", type: "bytes" }, ], + name: "setBytes", + outputs: [], stateMutability: "nonpayable", }, - { type: "error", inputs: [], name: "IPAccountRegistry_InvalidIpAccountImpl" }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "account", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "implementation", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "chainId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "tokenContract", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, + { name: "key", internalType: "bytes32", type: "bytes32" }, + { name: "value", internalType: "bytes32", type: "bytes32" }, ], - name: "IPAccountRegistered", + name: "setBytes32", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "ERC6551_PUBLIC_REGISTRY", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "state", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "IP_ACCOUNT_IMPL", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [ + { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "bytes32", type: "bytes32" }, + ], + name: "stringData", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "IP_ACCOUNT_SALT", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "getIPAccountImpl", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "chainId", internalType: "uint256", type: "uint256" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, + name: "token", + outputs: [ + { name: "", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "address", type: "address" }, + { name: "", internalType: "uint256", type: "uint256" }, ], - name: "ipAccount", - outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "chainId", internalType: "uint256", type: "uint256" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, + { name: "", internalType: "bytes32", type: "bytes32" }, + { name: "", internalType: "bytes32", type: "bytes32" }, ], - name: "registerIpAccount", - outputs: [{ name: "ipAccountAddress", internalType: "address", type: "address" }], - stateMutability: "nonpayable", + name: "uint256Data", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, + { type: "receive", stateMutability: "payable" }, ] as const; -export const ipAccountRegistryAddress = "0x16129393444e5BEb435501Dea41D5ECfB10b76F0" as const; +/** + * + */ +export const ipAccountImplAddress = { + 1513: "0x38cAfD16502B1d61c6399A18d6Fa1Ea8CEca3678", +} as const; -export const ipAccountRegistryConfig = { - address: ipAccountRegistryAddress, - abi: ipAccountRegistryAbi, +/** + * + */ +export const ipAccountImplConfig = { + address: ipAccountImplAddress, + abi: ipAccountImplAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // IPAssetRegistry ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/** + * + */ export const ipAssetRegistryAbi = [ { type: "constructor", inputs: [ { name: "erc6551Registry", internalType: "address", type: "address" }, { name: "ipAccountImpl", internalType: "address", type: "address" }, - { name: "moduleRegistry", internalType: "address", type: "address" }, { name: "governance", internalType: "address", type: "address" }, ], stateMutability: "nonpayable", @@ -1554,33 +1196,23 @@ export const ipAssetRegistryAbi = [ { type: "error", inputs: [], name: "Governance__ZeroAddress" }, { type: "error", inputs: [], name: "IPAccountRegistry_InvalidIpAccountImpl" }, { type: "error", inputs: [], name: "IPAssetRegistry__AlreadyRegistered" }, - { type: "error", inputs: [], name: "IPAssetRegistry__InvalidAccount" }, - { type: "error", inputs: [], name: "IPAssetRegistry__NotYetRegistered" }, { type: "error", - inputs: [], - name: "IPAssetRegistry__RegistrantUnauthorized", - }, - { type: "error", inputs: [], name: "IPAssetRegistry__Unauthorized" }, - { - type: "event", - anonymous: false, inputs: [ - { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "operator", - internalType: "address", - type: "address", - indexed: true, - }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, + { name: "contractAddress", internalType: "address", type: "address" }, + { name: "tokenId", internalType: "uint256", type: "uint256" }, ], - name: "ApprovalForAll", + name: "IPAssetRegistry__InvalidToken", + }, + { + type: "error", + inputs: [{ name: "contractAddress", internalType: "address", type: "address" }], + name: "IPAssetRegistry__UnsupportedIERC721", + }, + { + type: "error", + inputs: [{ name: "contractAddress", internalType: "address", type: "address" }], + name: "IPAssetRegistry__UnsupportedIERC721Metadata", }, { type: "event", @@ -1660,66 +1292,17 @@ export const ipAssetRegistryAbi = [ type: "uint256", indexed: true, }, + { name: "name", internalType: "string", type: "string", indexed: false }, + { name: "uri", internalType: "string", type: "string", indexed: false }, { - name: "resolver", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "provider", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "metadata", - internalType: "bytes", - type: "bytes", + name: "registrationDate", + internalType: "uint256", + type: "uint256", indexed: false, }, ], name: "IPRegistered", }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "ipId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "resolver", - internalType: "address", - type: "address", - indexed: false, - }, - ], - name: "IPResolverSet", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "ipId", internalType: "address", type: "address", indexed: true }, - { - name: "metadataProvider", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "metadata", - internalType: "bytes", - type: "bytes", - indexed: false, - }, - ], - name: "MetadataSet", - }, { type: "function", inputs: [], @@ -1741,26 +1324,6 @@ export const ipAssetRegistryAbi = [ outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, - { - type: "function", - inputs: [], - name: "MODULE_REGISTRY", - outputs: [{ name: "", internalType: "contract IModuleRegistry", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "REGISTRATION_MODULE", - outputs: [ - { - name: "", - internalType: "contract IRegistrationModule", - type: "address", - }, - ], - stateMutability: "view", - }, { type: "function", inputs: [], @@ -1804,16 +1367,6 @@ export const ipAssetRegistryAbi = [ outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, - { - type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "operator", internalType: "address", type: "address" }, - ], - name: "isApprovedForAll", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, { type: "function", inputs: [{ name: "id", internalType: "address", type: "address" }], @@ -1821,55 +1374,14 @@ export const ipAssetRegistryAbi = [ outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, - { - type: "function", - inputs: [{ name: "id", internalType: "address", type: "address" }], - name: "metadata", - outputs: [{ name: "", internalType: "bytes", type: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "id", internalType: "address", type: "address" }], - name: "metadataProvider", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "metadataProvider", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "chainId", internalType: "uint256", type: "uint256" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "resolverAddr", internalType: "address", type: "address" }, - { name: "createAccount", internalType: "bool", type: "bool" }, - { name: "metadata_", internalType: "bytes", type: "bytes" }, - ], - name: "register", - outputs: [{ name: "ipId_", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, { type: "function", inputs: [ - { name: "licenseIds", internalType: "uint256[]", type: "uint256[]" }, - { name: "royaltyContext", internalType: "bytes", type: "bytes" }, - { name: "chainId", internalType: "uint256", type: "uint256" }, { name: "tokenContract", internalType: "address", type: "address" }, { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "resolverAddr", internalType: "address", type: "address" }, - { name: "createAccount", internalType: "bool", type: "bool" }, - { name: "metadata_", internalType: "bytes", type: "bytes" }, ], name: "register", - outputs: [{ name: "ipId_", internalType: "address", type: "address" }], + outputs: [{ name: "id", internalType: "address", type: "address" }], stateMutability: "nonpayable", }, { @@ -1883,23 +1395,6 @@ export const ipAssetRegistryAbi = [ outputs: [{ name: "ipAccountAddress", internalType: "address", type: "address" }], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [{ name: "id", internalType: "address", type: "address" }], - name: "resolver", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], @@ -1907,41 +1402,6 @@ export const ipAssetRegistryAbi = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - inputs: [ - { name: "id", internalType: "address", type: "address" }, - { name: "provider", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "setMetadata", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newMetadataProvider", internalType: "address", type: "address" }], - name: "setMetadataProvider", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "registrationModule", internalType: "address", type: "address" }], - name: "setRegistrationModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "id", internalType: "address", type: "address" }, - { name: "resolverAddr", internalType: "address", type: "address" }, - ], - name: "setResolver", - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", inputs: [], @@ -1951,710 +1411,832 @@ export const ipAssetRegistryAbi = [ }, ] as const; -export const ipAssetRegistryAddress = "0xAAe9e83F8cE8832270AF033c609e233686f0E0eB" as const; +/** + * + */ +export const ipAssetRegistryAddress = { + 1513: "0x862de97662a1231FFc14038eC1BE93aB129D2169", +} as const; +/** + * + */ export const ipAssetRegistryConfig = { address: ipAssetRegistryAddress, abi: ipAssetRegistryAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IPAssetRenderer +// IpRoyaltyVaultImpl ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const ipAssetRendererAbi = [ +/** + * + */ +export const ipRoyaltyVaultImplAbi = [ { type: "constructor", inputs: [ - { name: "assetRegistry", internalType: "address", type: "address" }, - { name: "licenseRegistry", internalType: "address", type: "address" }, - { name: "royaltyModule", internalType: "address", type: "address" }, + { name: "royaltyPolicyLAP", internalType: "address", type: "address" }, + { name: "disputeModule", internalType: "address", type: "address" }, ], stateMutability: "nonpayable", }, + { type: "error", inputs: [], name: "IpRoyaltyVault__AlreadyClaimed" }, + { type: "error", inputs: [], name: "IpRoyaltyVault__ClaimerNotAnAncestor" }, + { type: "error", inputs: [], name: "IpRoyaltyVault__IpTagged" }, + { type: "error", inputs: [], name: "IpRoyaltyVault__NotRoyaltyPolicyLAP" }, { type: "error", + inputs: [], + name: "IpRoyaltyVault__SnapshotIntervalTooShort", + }, + { type: "error", inputs: [], name: "IpRoyaltyVault__ZeroDisputeModule" }, + { type: "error", inputs: [], name: "IpRoyaltyVault__ZeroIpId" }, + { type: "error", inputs: [], name: "IpRoyaltyVault__ZeroRoyaltyPolicyLAP" }, + { + type: "event", + anonymous: false, inputs: [ - { name: "value", internalType: "uint256", type: "uint256" }, - { name: "length", internalType: "uint256", type: "uint256" }, + { + name: "owner", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "spender", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "value", + internalType: "uint256", + type: "uint256", + indexed: false, + }, ], - name: "StringsInsufficientHexLength", + name: "Approval", + }, + { + type: "event", + anonymous: false, + inputs: [{ name: "version", internalType: "uint8", type: "uint8", indexed: false }], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "claimer", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "token", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "RevenueTokenClaimed", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "ancestorIpId", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "royaltyTokensCollected", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "RoyaltyTokensCollected", + }, + { + type: "event", + anonymous: false, + inputs: [{ name: "id", internalType: "uint256", type: "uint256", indexed: false }], + name: "Snapshot", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "snapshotId", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "snapshotTimestamp", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + { + name: "unclaimedTokens", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + ], + name: "SnapshotCompleted", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "from", internalType: "address", type: "address", indexed: true }, + { name: "to", internalType: "address", type: "address", indexed: true }, + { + name: "value", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "Transfer", }, { type: "function", inputs: [], - name: "IP_ASSET_REGISTRY", - outputs: [{ name: "", internalType: "contract IPAssetRegistry", type: "address" }], + name: "DISPUTE_MODULE", + outputs: [{ name: "", internalType: "contract IDisputeModule", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "LICENSE_REGISTRY", - outputs: [{ name: "", internalType: "contract LicenseRegistry", type: "address" }], + name: "ROYALTY_POLICY_LAP", + outputs: [{ name: "", internalType: "contract IRoyaltyPolicyLAP", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "ROYALTY_MODULE", - outputs: [{ name: "", internalType: "contract RoyaltyModule", type: "address" }], - stateMutability: "view", + inputs: [{ name: "token", internalType: "address", type: "address" }], + name: "addIpRoyaltyVaultTokens", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "description", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [ + { name: "owner", internalType: "address", type: "address" }, + { name: "spender", internalType: "address", type: "address" }, + ], + name: "allowance", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "hash", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [{ name: "token", internalType: "address", type: "address" }], + name: "ancestorsVaultAmount", + outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + inputs: [ + { name: "spender", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "approve", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "owner", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "account", internalType: "address", type: "address" }], + name: "balanceOf", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "registrant", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [ + { name: "account", internalType: "address", type: "address" }, + { name: "snapshotId", internalType: "uint256", type: "uint256" }, + ], + name: "balanceOfAt", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "registrationDate", - outputs: [{ name: "", internalType: "uint64", type: "uint64" }], + inputs: [ + { name: "snapshotIds", internalType: "uint256[]", type: "uint256[]" }, + { name: "token", internalType: "address", type: "address" }, + ], + name: "claimRevenueBySnapshotBatch", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "snapshotId", internalType: "uint256", type: "uint256" }, + { name: "tokens", internalType: "address[]", type: "address[]" }, + ], + name: "claimRevenueByTokenBatch", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "token", internalType: "address", type: "address" }], + name: "claimVaultAmount", + outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "tokenURI", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [ + { name: "snapshotId", internalType: "uint256", type: "uint256" }, + { name: "token", internalType: "address", type: "address" }, + ], + name: "claimableAtSnapshot", + outputs: [{ name: "amount", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "uri", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [ + { name: "account", internalType: "address", type: "address" }, + { name: "snapshotId", internalType: "uint256", type: "uint256" }, + { name: "token", internalType: "address", type: "address" }, + ], + name: "claimableRevenue", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, -] as const; - -export const ipAssetRendererAddress = "0x39cCE13916e7bfdeFa462D360d551aEcc6D82311" as const; - -export const ipAssetRendererConfig = { - address: ipAssetRendererAddress, - abi: ipAssetRendererAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IPMetadataProvider -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const ipMetadataProviderAbi = [ { - type: "constructor", - inputs: [{ name: "ipAssetRegistry", internalType: "address", type: "address" }], + type: "function", + inputs: [{ name: "ancestorIpId", internalType: "address", type: "address" }], + name: "collectRoyaltyTokens", + outputs: [], stateMutability: "nonpayable", }, - { type: "error", inputs: [], name: "MetadataProvider__IPAssetOwnerInvalid" }, { - type: "error", + type: "function", inputs: [], - name: "MetadataProvider__MetadataNotCompatible", + name: "decimals", + outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + stateMutability: "view", }, - { type: "error", inputs: [], name: "MetadataProvider__RegistrantInvalid" }, - { type: "error", inputs: [], name: "MetadataProvider__Unauthorized" }, { - type: "error", + type: "function", + inputs: [ + { name: "spender", internalType: "address", type: "address" }, + { name: "subtractedValue", internalType: "uint256", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", + }, + { + type: "function", inputs: [], - name: "MetadataProvider__UpgradeProviderInvalid", + name: "getVaultTokens", + outputs: [{ name: "", internalType: "address[]", type: "address[]" }], + stateMutability: "view", }, - { type: "error", inputs: [], name: "MetadataProvider__UpgradeUnavailable" }, { - type: "event", - anonymous: false, + type: "function", inputs: [ - { - name: "ipId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "metadata", - internalType: "bytes", - type: "bytes", - indexed: false, - }, + { name: "spender", internalType: "address", type: "address" }, + { name: "addedValue", internalType: "uint256", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "name", internalType: "string", type: "string" }, + { name: "symbol", internalType: "string", type: "string" }, + { name: "supply", internalType: "uint32", type: "uint32" }, + { name: "unclaimedTokens", internalType: "uint32", type: "uint32" }, + { name: "ipIdAddress", internalType: "address", type: "address" }, ], - name: "MetadataSet", + name: "initialize", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [], - name: "IP_ASSET_REGISTRY", - outputs: [{ name: "", internalType: "contract IIPAssetRegistry", type: "address" }], + name: "ipId", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "getMetadata", - outputs: [{ name: "", internalType: "bytes", type: "bytes" }], + inputs: [ + { name: "snapshotId", internalType: "uint256", type: "uint256" }, + { name: "claimer", internalType: "address", type: "address" }, + { name: "token", internalType: "address", type: "address" }, + ], + name: "isClaimedAtSnapshot", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "hash", - outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + inputs: [{ name: "ancestorIpId", internalType: "address", type: "address" }], + name: "isClaimedByAncestor", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "metadata", - outputs: [ - { - name: "", - internalType: "struct IP.MetadataV1", - type: "tuple", - components: [ - { name: "name", internalType: "string", type: "string" }, - { name: "hash", internalType: "bytes32", type: "bytes32" }, - { name: "registrationDate", internalType: "uint64", type: "uint64" }, - { name: "registrant", internalType: "address", type: "address" }, - { name: "uri", internalType: "string", type: "string" }, - ], - }, - ], + inputs: [], + name: "lastSnapshotTimestamp", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], + inputs: [], name: "name", outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "registrant", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [], + name: "snapshot", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "symbol", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "registrationDate", - outputs: [{ name: "", internalType: "uint64", type: "uint64" }], + inputs: [], + name: "totalSupply", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "metadata", internalType: "bytes", type: "bytes" }, - ], - name: "setMetadata", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "snapshotId", internalType: "uint256", type: "uint256" }], + name: "totalSupplyAt", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "provider", internalType: "address", type: "address" }], - name: "setUpgradeProvider", - outputs: [], + inputs: [ + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "transfer", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "ipId", internalType: "address payable", type: "address" }, - { name: "metadata", internalType: "bytes", type: "bytes" }, + { name: "from", internalType: "address", type: "address" }, + { name: "to", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "upgrade", - outputs: [], + name: "transferFrom", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "upgradeProvider", - outputs: [{ name: "", internalType: "contract IMetadataProvider", type: "address" }], + inputs: [{ name: "snapshotId", internalType: "uint256", type: "uint256" }], + name: "unclaimedAtSnapshot", + outputs: [{ name: "tokenAmount", internalType: "uint32", type: "uint32" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "uri", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [], + name: "unclaimedRoyaltyTokens", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], stateMutability: "view", }, ] as const; -export const ipMetadataProviderAddress = "0x0A97aD19FEF318F0ACA888574b64A35402C8aDDB" as const; +/** + * + */ +export const ipRoyaltyVaultImplAddress = { + 1513: "0x8Be22cc2D13ADF496a417D9C616dA4a253c68Af8", +} as const; -export const ipMetadataProviderConfig = { - address: ipMetadataProviderAddress, - abi: ipMetadataProviderAbi, +/** + * + */ +export const ipRoyaltyVaultImplConfig = { + address: ipRoyaltyVaultImplAddress, + abi: ipRoyaltyVaultImplAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// IPResolver +// LicenseRegistry ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const ipResolverAbi = [ - { - type: "constructor", - inputs: [ - { name: "accessController", internalType: "address", type: "address" }, - { name: "ipAssetRegistry", internalType: "address", type: "address" }, - ], - stateMutability: "nonpayable", - }, +/** + * + */ +export const licenseRegistryAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", - inputs: [{ name: "ipAccount", internalType: "address", type: "address" }], - name: "AccessControlled__NotIpAccount", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "AddressEmptyCode", }, - { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, { - type: "event", - anonymous: false, - inputs: [ - { name: "ipId", internalType: "address", type: "address", indexed: true }, - { name: "key", internalType: "string", type: "string", indexed: true }, - { name: "value", internalType: "string", type: "string", indexed: false }, - ], - name: "KeyValueSet", + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, + { type: "error", inputs: [], name: "FailedInnerCall" }, + { type: "error", inputs: [], name: "Governance__InconsistentState" }, + { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { - type: "function", - inputs: [], - name: "ACCESS_CONTROLLER", - outputs: [{ name: "", internalType: "contract IAccessController", type: "address" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], + name: "Governance__UnsupportedInterface", }, + { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, { - type: "function", + type: "error", inputs: [], - name: "IP_ACCOUNT_REGISTRY", - outputs: [ - { - name: "", - internalType: "contract IIPAccountRegistry", - type: "address", - }, - ], - stateMutability: "view", + name: "LicenseRegistry__CallerNotLicensingModule", }, { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "childIpId", internalType: "address", type: "address" }], + name: "LicenseRegistry__DerivativeAlreadyRegistered", }, { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "key", internalType: "string", type: "string" }, - { name: "val", internalType: "string", type: "string" }, - ], - name: "setValue", - outputs: [], - stateMutability: "nonpayable", + type: "error", + inputs: [{ name: "childIpId", internalType: "address", type: "address" }], + name: "LicenseRegistry__DerivativeIpAlreadyHasLicense", }, { - type: "function", - inputs: [{ name: "id", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + type: "error", + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "LicenseRegistry__DerivativeIsParent", }, { - type: "function", + type: "error", inputs: [ { name: "ipId", internalType: "address", type: "address" }, - { name: "key", internalType: "string", type: "string" }, + { name: "index", internalType: "uint256", type: "uint256" }, + { name: "length", internalType: "uint256", type: "uint256" }, ], - name: "value", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + name: "LicenseRegistry__IndexOutOfBounds", }, -] as const; - -export const ipResolverAddress = "0xeAEd88BEbF00acac8EFE9ED426cDDD2Dc9f8CB78" as const; - -export const ipResolverConfig = { - address: ipResolverAddress, - abi: ipResolverAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// LicenseRegistry -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const licenseRegistryAbi = [ { - type: "constructor", - inputs: [ - { name: "governance", internalType: "address", type: "address" }, - { name: "url", internalType: "string", type: "string" }, - ], - stateMutability: "nonpayable", + type: "error", + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "LicenseRegistry__IpExpired", }, { type: "error", inputs: [ - { name: "sender", internalType: "address", type: "address" }, - { name: "balance", internalType: "uint256", type: "uint256" }, - { name: "needed", internalType: "uint256", type: "uint256" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "ERC1155InsufficientBalance", - }, - { - type: "error", - inputs: [{ name: "approver", internalType: "address", type: "address" }], - name: "ERC1155InvalidApprover", + name: "LicenseRegistry__LicenseTermsNotExists", }, + { type: "error", inputs: [], name: "LicenseRegistry__NoParentIp" }, { type: "error", - inputs: [ - { name: "idsLength", internalType: "uint256", type: "uint256" }, - { name: "valuesLength", internalType: "uint256", type: "uint256" }, - ], - name: "ERC1155InvalidArrayLength", + inputs: [{ name: "licenseTemplate", internalType: "address", type: "address" }], + name: "LicenseRegistry__NotLicenseTemplate", }, { type: "error", - inputs: [{ name: "operator", internalType: "address", type: "address" }], - name: "ERC1155InvalidOperator", + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "LicenseRegistry__ParentIpExpired", }, { type: "error", - inputs: [{ name: "receiver", internalType: "address", type: "address" }], - name: "ERC1155InvalidReceiver", + inputs: [ + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + ], + name: "LicenseRegistry__ParentIpHasNoLicenseTerms", }, { type: "error", - inputs: [{ name: "sender", internalType: "address", type: "address" }], - name: "ERC1155InvalidSender", + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "LicenseRegistry__ParentIpTagged", }, { type: "error", inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "owner", internalType: "address", type: "address" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, ], - name: "ERC1155MissingApprovalForAll", + name: "LicenseRegistry__ParentIpUnmachedLicenseTemplate", }, - { type: "error", inputs: [], name: "Governance__InconsistentState" }, - { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { type: "error", - inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], - name: "Governance__UnsupportedInterface", + inputs: [{ name: "licenseTemplate", internalType: "address", type: "address" }], + name: "LicenseRegistry__UnregisteredLicenseTemplate", }, - { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "LicenseRegistry__ZeroDisputeModule" }, + { type: "error", inputs: [], name: "LicenseRegistry__ZeroLicensingModule" }, { type: "error", inputs: [], - name: "LicenseRegistry__CallerNotLicensingModule", + name: "LicensingModule__DerivativesCannotAddLicenseTerms", }, - { type: "error", inputs: [], name: "LicenseRegistry__NotTransferable" }, - { type: "error", inputs: [], name: "LicenseRegistry__RevokedLicense" }, - { type: "error", inputs: [], name: "LicenseRegistry__ZeroDisputeModule" }, - { type: "error", inputs: [], name: "LicenseRegistry__ZeroLicensingModule" }, { type: "error", inputs: [ - { name: "value", internalType: "uint256", type: "uint256" }, - { name: "length", internalType: "uint256", type: "uint256" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "StringsInsufficientHexLength", + name: "LicensingModule__LicenseTermsNotFound", + }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, + { + type: "error", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { type: "event", anonymous: false, inputs: [ + { name: "ipId", internalType: "address", type: "address", indexed: true }, { - name: "account", - internalType: "address", - type: "address", - indexed: true, + name: "expireTime", + internalType: "uint256", + type: "uint256", + indexed: false, }, + ], + name: "ExpirationTimeSet", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "operator", + name: "newGovernance", internalType: "address", type: "address", indexed: true, }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, ], - name: "ApprovalForAll", + name: "GovernanceUpdated", }, { type: "event", anonymous: false, inputs: [ { - name: "_fromTokenId", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "_toTokenId", - internalType: "uint256", - type: "uint256", + name: "version", + internalType: "uint64", + type: "uint64", indexed: false, }, ], - name: "BatchMetadataUpdate", + name: "Initialized", }, { type: "event", anonymous: false, inputs: [ { - name: "newGovernance", + name: "licenseTemplate", internalType: "address", type: "address", indexed: true, }, ], - name: "GovernanceUpdated", + name: "LicenseTemplateRegistered", }, { type: "event", anonymous: false, inputs: [ + { name: "ipId", internalType: "address", type: "address", indexed: true }, { - name: "creator", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "receiver", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "licenseId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - { - name: "licenseData", - internalType: "struct Licensing.License", + name: "mintingLicenseConfig", + internalType: "struct Licensing.MintingLicenseConfig", type: "tuple", components: [ - { name: "policyId", internalType: "uint256", type: "uint256" }, - { name: "licensorIpId", internalType: "address", type: "address" }, - { name: "transferable", internalType: "bool", type: "bool" }, + { name: "isSet", internalType: "bool", type: "bool" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { + name: "mintingFeeModule", + internalType: "address", + type: "address", + }, + { + name: "receiverCheckModule", + internalType: "address", + type: "address", + }, + { name: "receiverCheckData", internalType: "bytes", type: "bytes" }, ], indexed: false, }, ], - name: "LicenseMinted", + name: "MintingLicenseConfigSetForIP", }, { type: "event", anonymous: false, inputs: [ + { name: "ipId", internalType: "address", type: "address", indexed: true }, { - name: "operator", + name: "licenseTemplate", internalType: "address", type: "address", indexed: true, }, - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { - name: "ids", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, { - name: "values", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, + name: "licenseTermsId", + internalType: "uint256", + type: "uint256", + indexed: true, }, ], - name: "TransferBatch", + name: "MintingLicenseConfigSetLicense", }, { type: "event", anonymous: false, inputs: [ { - name: "operator", + name: "implementation", internalType: "address", type: "address", indexed: true, }, - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, - { name: "id", internalType: "uint256", type: "uint256", indexed: false }, - { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, - }, ], - name: "TransferSingle", - }, - { - type: "event", - anonymous: false, - inputs: [ - { name: "value", internalType: "string", type: "string", indexed: false }, - { name: "id", internalType: "uint256", type: "uint256", indexed: true }, - ], - name: "URI", + name: "Upgraded", }, { type: "function", inputs: [], - name: "DISPUTE_MODULE", - outputs: [{ name: "", internalType: "contract IDisputeModule", type: "address" }], + name: "EXPIRATION_TIME", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "LICENSING_MODULE", - outputs: [{ name: "", internalType: "contract ILicensingModule", type: "address" }], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "id", internalType: "uint256", type: "uint256" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "attachLicenseTermsToIp", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [], + name: "disputeModule", + outputs: [{ name: "", internalType: "contract IDisputeModule", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "accounts", internalType: "address[]", type: "address[]" }, - { name: "ids", internalType: "uint256[]", type: "uint256[]" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "balanceOfBatch", - outputs: [{ name: "", internalType: "uint256[]", type: "uint256[]" }], + name: "exists", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "holder", internalType: "address", type: "address" }, - { name: "licenseIds", internalType: "uint256[]", type: "uint256[]" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "index", internalType: "uint256", type: "uint256" }, ], - name: "burnLicenses", - outputs: [], - stateMutability: "nonpayable", + name: "getAttachedLicenseTerms", + outputs: [ + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + ], + stateMutability: "view", }, { type: "function", - inputs: [], - name: "getGovernance", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "getAttachedLicenseTermsCount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "governance", - outputs: [{ name: "", internalType: "address", type: "address" }], + name: "getDefaultLicenseTerms", + outputs: [ + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + ], stateMutability: "view", }, { type: "function", - inputs: [], - name: "imageUrl", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [ + { name: "parentIpId", internalType: "address", type: "address" }, + { name: "index", internalType: "uint256", type: "uint256" }, + ], + name: "getDerivativeIp", + outputs: [{ name: "childIpId", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "operator", internalType: "address", type: "address" }, - ], - name: "isApprovedForAll", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [{ name: "parentIpId", internalType: "address", type: "address" }], + name: "getDerivativeIpCount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "licenseId", internalType: "uint256", type: "uint256" }], - name: "isLicenseRevoked", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "getExpireTime", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "licenseId", internalType: "uint256", type: "uint256" }, - { name: "holder", internalType: "address", type: "address" }, - ], - name: "isLicensee", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "getGovernance", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "licenseId", internalType: "uint256", type: "uint256" }], - name: "license", + inputs: [ + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + ], + name: "getMintingLicenseConfig", outputs: [ { name: "", - internalType: "struct Licensing.License", + internalType: "struct Licensing.MintingLicenseConfig", type: "tuple", components: [ - { name: "policyId", internalType: "uint256", type: "uint256" }, - { name: "licensorIpId", internalType: "address", type: "address" }, - { name: "transferable", internalType: "bool", type: "bool" }, + { name: "isSet", internalType: "bool", type: "bool" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { + name: "mintingFeeModule", + internalType: "address", + type: "address", + }, + { + name: "receiverCheckModule", + internalType: "address", + type: "address", + }, + { name: "receiverCheckData", internalType: "bytes", type: "bytes" }, ], }, ], @@ -2662,78 +2244,100 @@ export const licenseRegistryAbi = [ }, { type: "function", - inputs: [{ name: "licenseId", internalType: "uint256", type: "uint256" }], - name: "licensorIpId", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [ + { name: "childIpId", internalType: "address", type: "address" }, + { name: "index", internalType: "uint256", type: "uint256" }, + ], + name: "getParentIp", + outputs: [{ name: "parentIpId", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "childIpId", internalType: "address", type: "address" }], + name: "getParentIpCount", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "parentIpId", internalType: "address", type: "address" }], + name: "hasDerivativeIps", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "policyId", internalType: "uint256", type: "uint256" }, - { name: "licensorIpId_", internalType: "address", type: "address" }, - { name: "transferable", internalType: "bool", type: "bool" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - { name: "receiver", internalType: "address", type: "address" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "mintLicense", - outputs: [{ name: "licenseId", internalType: "uint256", type: "uint256" }], + name: "hasIpAttachedLicenseTerms", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "governance", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "mintedLicenses", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "childIpId", internalType: "address", type: "address" }], + name: "isDerivativeIp", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "licenseTemplate", internalType: "address", type: "address" }], + name: "isRegisteredLicenseTemplate", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "licensingModule", + outputs: [{ name: "", internalType: "contract ILicensingModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "licenseId", internalType: "uint256", type: "uint256" }], - name: "policyIdForLicense", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "ids", internalType: "uint256[]", type: "uint256[]" }, - { name: "values", internalType: "uint256[]", type: "uint256[]" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "childIpId", internalType: "address", type: "address" }, + { name: "parentIpIds", internalType: "address[]", type: "address[]" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsIds", internalType: "uint256[]", type: "uint256[]" }, ], - name: "safeBatchTransferFrom", + name: "registerDerivativeIp", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "id", internalType: "uint256", type: "uint256" }, - { name: "value", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, - ], - name: "safeTransferFrom", + inputs: [{ name: "licenseTemplate", internalType: "address", type: "address" }], + name: "registerLicenseTemplate", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, + { name: "newLicenseTemplate", internalType: "address", type: "address" }, + { name: "newLicenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "setApprovalForAll", + name: "setDefaultLicenseTerms", outputs: [], stateMutability: "nonpayable", }, @@ -2746,15 +2350,18 @@ export const licenseRegistryAbi = [ }, { type: "function", - inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], - name: "setGovernance", + inputs: [ + { name: "ipId", internalType: "address", type: "address" }, + { name: "expireTime", internalType: "uint256", type: "uint256" }, + ], + name: "setExpireTime", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "url", internalType: "string", type: "string" }], - name: "setLicensingImageUrl", + inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], + name: "setGovernance", outputs: [], stateMutability: "nonpayable", }, @@ -2767,47 +2374,141 @@ export const licenseRegistryAbi = [ }, { type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [ + { name: "ipId", internalType: "address", type: "address" }, + { + name: "mintingLicenseConfig", + internalType: "struct Licensing.MintingLicenseConfig", + type: "tuple", + components: [ + { name: "isSet", internalType: "bool", type: "bool" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { + name: "mintingFeeModule", + internalType: "address", + type: "address", + }, + { + name: "receiverCheckModule", + internalType: "address", + type: "address", + }, + { name: "receiverCheckData", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "setMintingLicenseConfigForIp", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + inputs: [ + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + { + name: "mintingLicenseConfig", + internalType: "struct Licensing.MintingLicenseConfig", + type: "tuple", + components: [ + { name: "isSet", internalType: "bool", type: "bool" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { + name: "mintingFeeModule", + internalType: "address", + type: "address", + }, + { + name: "receiverCheckModule", + internalType: "address", + type: "address", + }, + { name: "receiverCheckData", internalType: "bytes", type: "bytes" }, + ], + }, + ], + name: "setMintingLicenseConfigForLicense", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "id", internalType: "uint256", type: "uint256" }], - name: "uri", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", }, -] as const; - -export const licenseRegistryAddress = "0x410d2332270cEb9Ca78b7E2c3720046b3ef2D8Ba" as const; - -export const licenseRegistryConfig = { - address: licenseRegistryAddress, - abi: licenseRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// LicensingModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const licensingModuleAbi = [ { - type: "constructor", + type: "function", + inputs: [ + { name: "licensorIpId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + { name: "isMintedByIpOwner", internalType: "bool", type: "bool" }, + ], + name: "verifyMintLicenseToken", + outputs: [ + { + name: "", + internalType: "struct Licensing.MintingLicenseConfig", + type: "tuple", + components: [ + { name: "isSet", internalType: "bool", type: "bool" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { + name: "mintingFeeModule", + internalType: "address", + type: "address", + }, + { + name: "receiverCheckModule", + internalType: "address", + type: "address", + }, + { name: "receiverCheckData", internalType: "bytes", type: "bytes" }, + ], + }, + ], + stateMutability: "view", + }, +] as const; + +/** + * + */ +export const licenseRegistryAddress = { + 1513: "0x0c3D467537FAd845a78728CEdc3D9447338c5422", +} as const; + +/** + * + */ +export const licenseRegistryConfig = { + address: licenseRegistryAddress, + abi: licenseRegistryAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// LicensingModule +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * + */ +export const licensingModuleAbi = [ + { + type: "constructor", inputs: [ { name: "accessController", internalType: "address", type: "address" }, { name: "ipAccountRegistry", internalType: "address", type: "address" }, { name: "royaltyModule", internalType: "address", type: "address" }, { name: "registry", internalType: "address", type: "address" }, { name: "disputeModule", internalType: "address", type: "address" }, + { name: "licenseToken", internalType: "address", type: "address" }, ], stateMutability: "nonpayable", }, @@ -2819,65 +2520,76 @@ export const licensingModuleAbi = [ { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, { type: "error", - inputs: [], - name: "LicensingModule__CallerNotLicensorAndPolicyNotSet", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "AddressEmptyCode", }, { type: "error", - inputs: [], - name: "LicensingModule__DerivativesCannotAddPolicy", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", }, - { type: "error", inputs: [], name: "LicensingModule__DisputedIpId" }, - { type: "error", inputs: [], name: "LicensingModule__EmptyLicenseUrl" }, - { type: "error", inputs: [], name: "LicensingModule__FrameworkNotFound" }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, + { type: "error", inputs: [], name: "FailedInnerCall" }, + { type: "error", inputs: [], name: "Governance__InconsistentState" }, + { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { type: "error", - inputs: [], - name: "LicensingModule__IncompatibleLicensorCommercialPolicy", + inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], + name: "Governance__UnsupportedInterface", }, + { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "LicensingModule__DisputedIpId" }, { type: "error", - inputs: [], - name: "LicensingModule__InvalidPolicyFramework", + inputs: [ + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { + name: "anotherRoyaltyPolicy", + internalType: "address", + type: "address", + }, + ], + name: "LicensingModule__IncompatibleRoyaltyPolicy", }, - { type: "error", inputs: [], name: "LicensingModule__LicensorNotRegistered" }, - { type: "error", inputs: [], name: "LicensingModule__LinkParentParamFailed" }, - { type: "error", inputs: [], name: "LicensingModule__LinkingRevokedLicense" }, - { type: "error", inputs: [], name: "LicensingModule__MintAmountZero" }, { type: "error", - inputs: [], - name: "LicensingModule__MintLicenseParamFailed", + inputs: [{ name: "childIpId", internalType: "address", type: "address" }], + name: "LicensingModule__LicenseNotCompatibleForDerivative", }, { type: "error", - inputs: [], - name: "LicensingModule__MintingFeeTokenNotWhitelisted", + inputs: [ + { name: "ipLength", internalType: "uint256", type: "uint256" }, + { name: "licenseTermsLength", internalType: "uint256", type: "uint256" }, + ], + name: "LicensingModule__LicenseTermsLengthMismatch", }, - { type: "error", inputs: [], name: "LicensingModule__NotLicensee" }, { type: "error", - inputs: [], - name: "LicensingModule__ParentIdEqualThanChild", + inputs: [ + { name: "childIpId", internalType: "address", type: "address" }, + { name: "licenseTokenIds", internalType: "uint256[]", type: "uint256[]" }, + ], + name: "LicensingModule__LicenseTokenNotCompatibleForDerivative", }, + { type: "error", inputs: [], name: "LicensingModule__MintAmountZero" }, + { type: "error", inputs: [], name: "LicensingModule__NoLicenseToken" }, + { type: "error", inputs: [], name: "LicensingModule__NoParentIp" }, { type: "error", - inputs: [], - name: "LicensingModule__PolicyAlreadySetForIpId", + inputs: [{ name: "receiver", internalType: "address", type: "address" }], + name: "LicensingModule__ReceiverCheckFailed", }, - { type: "error", inputs: [], name: "LicensingModule__PolicyNotFound" }, { type: "error", inputs: [], name: "LicensingModule__ReceiverZeroAddress" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", - inputs: [], - name: "LicensingModule__RegisterPolicyFrameworkMismatch", - }, - { - type: "error", - inputs: [], - name: "LicensingModule__RoyaltyPolicyNotWhitelisted", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, - { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, { type: "event", anonymous: false, @@ -2888,116 +2600,152 @@ export const licensingModuleAbi = [ type: "address", indexed: true, }, - { name: "ipId", internalType: "address", type: "address", indexed: true }, + { + name: "childIpId", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "licenseTokenIds", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, { name: "parentIpIds", internalType: "address[]", type: "address[]", indexed: false, }, + { + name: "licenseTermsIds", + internalType: "uint256[]", + type: "uint256[]", + indexed: false, + }, + { + name: "licenseTemplate", + internalType: "address", + type: "address", + indexed: false, + }, ], - name: "IpIdLinkedToParents", + name: "DerivativeRegistered", }, { type: "event", anonymous: false, inputs: [ { - name: "caller", + name: "newGovernance", internalType: "address", type: "address", indexed: true, }, - { name: "ipId", internalType: "address", type: "address", indexed: true }, - { - name: "policyId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - { - name: "index", - internalType: "uint256", - type: "uint256", - indexed: false, - }, + ], + name: "GovernanceUpdated", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "isInherited", - internalType: "bool", - type: "bool", + name: "version", + internalType: "uint64", + type: "uint64", indexed: false, }, ], - name: "PolicyAddedToIpId", + name: "Initialized", }, { type: "event", anonymous: false, inputs: [ { - name: "framework", + name: "caller", internalType: "address", type: "address", indexed: true, }, - { name: "name", internalType: "string", type: "string", indexed: false }, + { name: "ipId", internalType: "address", type: "address", indexed: true }, { - name: "licenseTextUrl", - internalType: "string", - type: "string", + name: "licenseTemplate", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "licenseTermsId", + internalType: "uint256", + type: "uint256", indexed: false, }, ], - name: "PolicyFrameworkRegistered", + name: "LicenseTermsAttached", }, { type: "event", anonymous: false, inputs: [ { - name: "policyId", - internalType: "uint256", - type: "uint256", + name: "caller", + internalType: "address", + type: "address", indexed: true, }, { - name: "policyFrameworkManager", + name: "licensorIpId", internalType: "address", type: "address", indexed: true, }, { - name: "frameworkData", - internalType: "bytes", - type: "bytes", + name: "licenseTemplate", + internalType: "address", + type: "address", indexed: false, }, { - name: "royaltyPolicy", - internalType: "address", - type: "address", + name: "licenseTermsId", + internalType: "uint256", + type: "uint256", + indexed: true, + }, + { + name: "amount", + internalType: "uint256", + type: "uint256", indexed: false, }, { - name: "royaltyData", - internalType: "bytes", - type: "bytes", + name: "receiver", + internalType: "address", + type: "address", indexed: false, }, { - name: "mintingFee", + name: "startLicenseTokenId", internalType: "uint256", type: "uint256", indexed: false, }, + ], + name: "LicenseTokensMinted", + }, + { + type: "event", + anonymous: false, + inputs: [ { - name: "mintingFeeToken", + name: "implementation", internalType: "address", type: "address", - indexed: false, + indexed: true, }, ], - name: "PolicyRegistered", + name: "Upgraded", }, { type: "function", @@ -3026,6 +2774,13 @@ export const licensingModuleAbi = [ ], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "LICENSE_NFT", + outputs: [{ name: "", internalType: "contract ILicenseToken", type: "address" }], + stateMutability: "view", + }, { type: "function", inputs: [], @@ -3040,740 +2795,748 @@ export const licensingModuleAbi = [ outputs: [{ name: "", internalType: "contract RoyaltyModule", type: "address" }], stateMutability: "view", }, + { + type: "function", + inputs: [], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, { type: "function", inputs: [ { name: "ipId", internalType: "address", type: "address" }, - { name: "polId", internalType: "uint256", type: "uint256" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, ], - name: "addPolicyToIp", - outputs: [{ name: "indexOnIpId", internalType: "uint256", type: "uint256" }], + name: "attachLicenseTerms", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { - name: "pol", - internalType: "struct Licensing.Policy", - type: "tuple", - components: [ - { name: "isLicenseTransferable", internalType: "bool", type: "bool" }, - { name: "policyFramework", internalType: "address", type: "address" }, - { name: "frameworkData", internalType: "bytes", type: "bytes" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "royaltyData", internalType: "bytes", type: "bytes" }, - { name: "mintingFee", internalType: "uint256", type: "uint256" }, - { name: "mintingFeeToken", internalType: "address", type: "address" }, - ], - }, - ], - name: "getPolicyId", - outputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], + inputs: [], + name: "getGovernance", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "policyFramework", internalType: "address", type: "address" }], - name: "isFrameworkRegistered", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [{ name: "governance", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "parentIpId", internalType: "address", type: "address" }, - { name: "childIpId", internalType: "address", type: "address" }, + { name: "licensorIpId", internalType: "address", type: "address" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + { name: "receiver", internalType: "address", type: "address" }, + { name: "royaltyContext", internalType: "bytes", type: "bytes" }, ], - name: "isParent", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], - name: "isPolicyDefined", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + name: "mintLicenseTokens", + outputs: [{ name: "startLicenseTokenId", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "isInherited", internalType: "bool", type: "bool" }, - { name: "ipId", internalType: "address", type: "address" }, - { name: "policyId", internalType: "uint256", type: "uint256" }, - ], - name: "isPolicyIdSetForIp", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "policyId", internalType: "uint256", type: "uint256" }, - ], - name: "isPolicyInherited", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "licenseIds", internalType: "uint256[]", type: "uint256[]" }, { name: "childIpId", internalType: "address", type: "address" }, + { name: "parentIpIds", internalType: "address[]", type: "address[]" }, + { name: "licenseTermsIds", internalType: "uint256[]", type: "uint256[]" }, + { name: "licenseTemplate", internalType: "address", type: "address" }, { name: "royaltyContext", internalType: "bytes", type: "bytes" }, ], - name: "linkIpToParents", + name: "registerDerivative", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "policyId", internalType: "uint256", type: "uint256" }, - { name: "licensorIpId", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - { name: "receiver", internalType: "address", type: "address" }, + { name: "childIpId", internalType: "address", type: "address" }, + { name: "licenseTokenIds", internalType: "uint256[]", type: "uint256[]" }, { name: "royaltyContext", internalType: "bytes", type: "bytes" }, ], - name: "mintLicense", - outputs: [{ name: "licenseId", internalType: "uint256", type: "uint256" }], + name: "registerDerivativeWithLicenseTokens", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], + name: "setGovernance", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "parentIpIds", - outputs: [{ name: "", internalType: "address[]", type: "address[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], - name: "policy", - outputs: [ - { - name: "pol", - internalType: "struct Licensing.Policy", - type: "tuple", - components: [ - { name: "isLicenseTransferable", internalType: "bool", type: "bool" }, - { name: "policyFramework", internalType: "address", type: "address" }, - { name: "frameworkData", internalType: "bytes", type: "bytes" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "royaltyData", internalType: "bytes", type: "bytes" }, - { name: "mintingFee", internalType: "uint256", type: "uint256" }, - { name: "mintingFeeToken", internalType: "address", type: "address" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "framework", internalType: "address", type: "address" }, - { name: "ipId", internalType: "address", type: "address" }, - ], - name: "policyAggregatorData", - outputs: [{ name: "", internalType: "bytes", type: "bytes" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "isInherited", internalType: "bool", type: "bool" }, - { name: "ipId", internalType: "address", type: "address" }, - { name: "index", internalType: "uint256", type: "uint256" }, - ], - name: "policyForIpAtIndex", - outputs: [ - { - name: "", - internalType: "struct Licensing.Policy", - type: "tuple", - components: [ - { name: "isLicenseTransferable", internalType: "bool", type: "bool" }, - { name: "policyFramework", internalType: "address", type: "address" }, - { name: "frameworkData", internalType: "bytes", type: "bytes" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "royaltyData", internalType: "bytes", type: "bytes" }, - { name: "mintingFee", internalType: "uint256", type: "uint256" }, - { name: "mintingFeeToken", internalType: "address", type: "address" }, - ], - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "isInherited", internalType: "bool", type: "bool" }, - { name: "ipId", internalType: "address", type: "address" }, - { name: "index", internalType: "uint256", type: "uint256" }, - ], - name: "policyIdForIpAtIndex", - outputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "isInherited", internalType: "bool", type: "bool" }, - { name: "ipId", internalType: "address", type: "address" }, - ], - name: "policyIdsForIp", - outputs: [{ name: "policyIds", internalType: "uint256[]", type: "uint256[]" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "policyId", internalType: "uint256", type: "uint256" }, - ], - name: "policyStatus", - outputs: [ - { name: "index", internalType: "uint256", type: "uint256" }, - { name: "isInherited", internalType: "bool", type: "bool" }, - { name: "active", internalType: "bool", type: "bool" }, - ], + inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [ - { - name: "pol", - internalType: "struct Licensing.Policy", - type: "tuple", - components: [ - { name: "isLicenseTransferable", internalType: "bool", type: "bool" }, - { name: "policyFramework", internalType: "address", type: "address" }, - { name: "frameworkData", internalType: "bytes", type: "bytes" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "royaltyData", internalType: "bytes", type: "bytes" }, - { name: "mintingFee", internalType: "uint256", type: "uint256" }, - { name: "mintingFeeToken", internalType: "address", type: "address" }, - ], - }, + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, ], - name: "registerPolicy", - outputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "manager", internalType: "address", type: "address" }], - name: "registerPolicyFrameworkManager", + name: "upgradeToAndCall", outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "totalParentsForIpId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "totalPolicies", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "isInherited", internalType: "bool", type: "bool" }, - { name: "ipId", internalType: "address", type: "address" }, - ], - name: "totalPoliciesForIp", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + stateMutability: "payable", }, ] as const; -export const licensingModuleAddress = "0x2A88056985814dcBb72aFA50B95893359B6262f5" as const; +/** + * + */ +export const licensingModuleAddress = { + 1513: "0xEeDDE5529122b621105798860F235c28FD3aBA40", +} as const; +/** + * + */ export const licensingModuleConfig = { address: licensingModuleAddress, abi: licensingModuleAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MockERC20 +// ModuleRegistry ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const mockErc20Abi = [ +/** + * + */ +export const moduleRegistryAbi = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { type: "error", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "allowance", internalType: "uint256", type: "uint256" }, - { name: "needed", internalType: "uint256", type: "uint256" }, - ], - name: "ERC20InsufficientAllowance", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "AddressEmptyCode", }, { type: "error", - inputs: [ - { name: "sender", internalType: "address", type: "address" }, - { name: "balance", internalType: "uint256", type: "uint256" }, - { name: "needed", internalType: "uint256", type: "uint256" }, - ], - name: "ERC20InsufficientBalance", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, + { type: "error", inputs: [], name: "FailedInnerCall" }, + { type: "error", inputs: [], name: "Governance__InconsistentState" }, + { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { type: "error", - inputs: [{ name: "approver", internalType: "address", type: "address" }], - name: "ERC20InvalidApprover", + inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], + name: "Governance__UnsupportedInterface", }, + { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "ModuleRegistry__InterfaceIdZero" }, { type: "error", - inputs: [{ name: "receiver", internalType: "address", type: "address" }], - name: "ERC20InvalidReceiver", + inputs: [], + name: "ModuleRegistry__ModuleAddressNotContract", + }, + { + type: "error", + inputs: [], + name: "ModuleRegistry__ModuleAddressZeroAddress", + }, + { + type: "error", + inputs: [], + name: "ModuleRegistry__ModuleAlreadyRegistered", + }, + { type: "error", inputs: [], name: "ModuleRegistry__ModuleNotRegistered" }, + { + type: "error", + inputs: [], + name: "ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId", + }, + { + type: "error", + inputs: [], + name: "ModuleRegistry__ModuleTypeAlreadyRegistered", }, + { type: "error", inputs: [], name: "ModuleRegistry__ModuleTypeEmptyString" }, { type: "error", - inputs: [{ name: "sender", internalType: "address", type: "address" }], - name: "ERC20InvalidSender", + inputs: [], + name: "ModuleRegistry__ModuleTypeNotRegistered", }, + { type: "error", inputs: [], name: "ModuleRegistry__NameAlreadyRegistered" }, + { type: "error", inputs: [], name: "ModuleRegistry__NameDoesNotMatch" }, + { type: "error", inputs: [], name: "ModuleRegistry__NameEmptyString" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", - inputs: [{ name: "spender", internalType: "address", type: "address" }], - name: "ERC20InvalidSpender", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { type: "event", anonymous: false, inputs: [ { - name: "owner", + name: "newGovernance", internalType: "address", type: "address", indexed: true, }, + ], + name: "GovernanceUpdated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, + ], + name: "Initialized", + }, + { + type: "event", + anonymous: false, + inputs: [ + { name: "name", internalType: "string", type: "string", indexed: false }, { - name: "spender", + name: "module", internalType: "address", type: "address", indexed: true, }, { - name: "value", - internalType: "uint256", - type: "uint256", + name: "moduleTypeInterfaceId", + internalType: "bytes4", + type: "bytes4", + indexed: true, + }, + { + name: "moduleType", + internalType: "string", + type: "string", indexed: false, }, ], - name: "Approval", + name: "ModuleAdded", }, { type: "event", anonymous: false, inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, + { name: "name", internalType: "string", type: "string", indexed: false }, { - name: "value", - internalType: "uint256", - type: "uint256", - indexed: false, + name: "module", + internalType: "address", + type: "address", + indexed: true, }, ], - name: "Transfer", + name: "ModuleRemoved", }, { - type: "function", + type: "event", + anonymous: false, inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "spender", internalType: "address", type: "address" }, + { + name: "implementation", + internalType: "address", + type: "address", + indexed: true, + }, ], - name: "allowance", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + name: "Upgraded", + }, + { + type: "function", + inputs: [], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "spender", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", + inputs: [], + name: "getGovernance", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + inputs: [{ name: "name", internalType: "string", type: "string" }], + name: "getModule", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", + inputs: [{ name: "moduleAddress", internalType: "address", type: "address" }], + name: "getModuleType", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", }, { type: "function", - inputs: [], - name: "decimals", - outputs: [{ name: "", internalType: "uint8", type: "uint8" }], + inputs: [{ name: "moduleType", internalType: "string", type: "string" }], + name: "getModuleTypeInterfaceId", + outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "mint", + inputs: [{ name: "governance_", internalType: "address", type: "address" }], + name: "initialize", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [{ name: "moduleAddress", internalType: "address", type: "address" }], + name: "isRegistered", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "symbol", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "totalSupply", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", + inputs: [ + { name: "name", internalType: "string", type: "string" }, + { name: "moduleAddress", internalType: "address", type: "address" }, + ], + name: "registerModule", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, + { name: "name", internalType: "string", type: "string" }, + { name: "moduleAddress", internalType: "address", type: "address" }, + { name: "moduleType", internalType: "string", type: "string" }, ], - name: "transfer", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + name: "registerModule", + outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "value", internalType: "uint256", type: "uint256" }, + { name: "name", internalType: "string", type: "string" }, + { name: "interfaceId", internalType: "bytes4", type: "bytes4" }, ], - name: "transferFrom", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + name: "registerModuleType", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "name", internalType: "string", type: "string" }], + name: "removeModule", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "name", internalType: "string", type: "string" }], + name: "removeModuleType", + outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], + name: "setGovernance", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + }, ] as const; -export const mockErc20Address = "0x3271778AdE44EfeC9e11b7160827921b6d614AF1" as const; +/** + * + */ +export const moduleRegistryAddress = { + 1513: "0xf2965E3B6251905Dd1E8671077760D07b0408cf2", +} as const; -export const mockErc20Config = { - address: mockErc20Address, - abi: mockErc20Abi, +/** + * + */ +export const moduleRegistryConfig = { + address: moduleRegistryAddress, + abi: moduleRegistryAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MockERC721 +// PILicenseTemplate ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const mockErc721Abi = [ +/** + * + */ +export const piLicenseTemplateAbi = [ { type: "constructor", - inputs: [{ name: "name", internalType: "string", type: "string" }], + inputs: [ + { name: "accessController", internalType: "address", type: "address" }, + { name: "ipAccountRegistry", internalType: "address", type: "address" }, + { name: "licenseRegistry", internalType: "address", type: "address" }, + { name: "royaltyModule", internalType: "address", type: "address" }, + { name: "licenseToken", internalType: "address", type: "address" }, + ], stateMutability: "nonpayable", }, { type: "error", - inputs: [ - { name: "sender", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "owner", internalType: "address", type: "address" }, - ], - name: "ERC721IncorrectOwner", + inputs: [{ name: "ipAccount", internalType: "address", type: "address" }], + name: "AccessControlled__NotIpAccount", }, + { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "NotInitializing" }, { type: "error", - inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "ERC721InsufficientApproval", + inputs: [], + name: "PILicenseTemplate__CommercialDisabled_CantAddAttribution", + }, + { + type: "error", + inputs: [], + name: "PILicenseTemplate__CommercialDisabled_CantAddCommercializers", }, { type: "error", - inputs: [{ name: "approver", internalType: "address", type: "address" }], - name: "ERC721InvalidApprover", + inputs: [], + name: "PILicenseTemplate__CommercialDisabled_CantAddRevShare", }, { type: "error", - inputs: [{ name: "operator", internalType: "address", type: "address" }], - name: "ERC721InvalidOperator", + inputs: [], + name: "PILicenseTemplate__CommercialDisabled_CantAddRoyaltyPolicy", }, { type: "error", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "ERC721InvalidOwner", + inputs: [], + name: "PILicenseTemplate__CommercialEnabled_RoyaltyPolicyRequired", }, { type: "error", - inputs: [{ name: "receiver", internalType: "address", type: "address" }], - name: "ERC721InvalidReceiver", + inputs: [{ name: "checker", internalType: "address", type: "address" }], + name: "PILicenseTemplate__CommercializerCheckerDoesNotSupportHook", + }, + { + type: "error", + inputs: [], + name: "PILicenseTemplate__CurrencyTokenNotWhitelisted", + }, + { + type: "error", + inputs: [], + name: "PILicenseTemplate__DerivativesDisabled_CantAddApproval", + }, + { + type: "error", + inputs: [], + name: "PILicenseTemplate__DerivativesDisabled_CantAddAttribution", + }, + { + type: "error", + inputs: [], + name: "PILicenseTemplate__DerivativesDisabled_CantAddReciprocal", + }, + { + type: "error", + inputs: [], + name: "PILicenseTemplate__RoyaltyPolicyNotWhitelisted", }, { type: "error", - inputs: [{ name: "sender", internalType: "address", type: "address" }], - name: "ERC721InvalidSender", + inputs: [], + name: "PILicenseTemplate__RoyaltyPolicyRequiresCurrencyToken", }, + { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, { type: "error", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "ERC721NonexistentToken", + inputs: [ + { name: "value", internalType: "uint256", type: "uint256" }, + { name: "length", internalType: "uint256", type: "uint256" }, + ], + name: "StringsInsufficientHexLength", }, { type: "event", anonymous: false, inputs: [ { - name: "owner", - internalType: "address", - type: "address", + name: "licenseTokenId", + internalType: "uint256", + type: "uint256", indexed: true, }, + { name: "ipId", internalType: "address", type: "address", indexed: true }, { - name: "approved", + name: "caller", internalType: "address", type: "address", indexed: true, }, - { - name: "tokenId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, + { name: "approved", internalType: "bool", type: "bool", indexed: false }, ], - name: "Approval", + name: "DerivativeApproved", }, { type: "event", anonymous: false, inputs: [ { - name: "owner", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "operator", - internalType: "address", - type: "address", - indexed: true, + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, ], - name: "ApprovalForAll", + name: "Initialized", }, { type: "event", anonymous: false, inputs: [ - { name: "from", internalType: "address", type: "address", indexed: true }, - { name: "to", internalType: "address", type: "address", indexed: true }, { - name: "tokenId", + name: "licenseTermsId", internalType: "uint256", type: "uint256", indexed: true, }, + { + name: "licenseTemplate", + internalType: "address", + type: "address", + indexed: true, + }, + { + name: "licenseTerms", + internalType: "bytes", + type: "bytes", + indexed: false, + }, ], - name: "Transfer", - }, - { - type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "approve", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "owner", internalType: "address", type: "address" }], - name: "balanceOf", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "burn", - outputs: [], - stateMutability: "nonpayable", + name: "LicenseTermsRegistered", }, { type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "getApproved", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [], + name: "ACCESS_CONTROLLER", + outputs: [{ name: "", internalType: "contract IAccessController", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "owner", internalType: "address", type: "address" }, - { name: "operator", internalType: "address", type: "address" }, + inputs: [], + name: "IP_ACCOUNT_REGISTRY", + outputs: [ + { + name: "", + internalType: "contract IIPAccountRegistry", + type: "address", + }, ], - name: "isApprovedForAll", - outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "to", internalType: "address", type: "address" }], - name: "mint", - outputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", + inputs: [], + name: "LICENSE_NFT", + outputs: [{ name: "", internalType: "contract ILicenseToken", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "mintId", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", + inputs: [], + name: "LICENSE_REGISTRY", + outputs: [{ name: "", internalType: "contract ILicenseRegistry", type: "address" }], + stateMutability: "view", }, { type: "function", inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "ROYALTY_MODULE", + outputs: [{ name: "", internalType: "contract IRoyaltyModule", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "ownerOf", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "licenseTermsId", internalType: "uint256", type: "uint256" }], + name: "exists", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, + { name: "licenseTermsIds", internalType: "uint256[]", type: "uint256[]" }, + { name: "start", internalType: "uint256", type: "uint256" }, ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", + name: "getEarlierExpireTime", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + { name: "start", internalType: "uint256", type: "uint256" }, ], - name: "safeTransferFrom", - outputs: [], - stateMutability: "nonpayable", + name: "getExpireTime", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", inputs: [ - { name: "operator", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, - ], - name: "setApprovalForAll", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + { + name: "terms", + internalType: "struct PILTerms", + type: "tuple", + components: [ + { name: "transferable", internalType: "bool", type: "bool" }, + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { name: "expiration", internalType: "uint256", type: "uint256" }, + { name: "commercialUse", internalType: "bool", type: "bool" }, + { name: "commercialAttribution", internalType: "bool", type: "bool" }, + { + name: "commercializerChecker", + internalType: "address", + type: "address", + }, + { + name: "commercializerCheckerData", + internalType: "bytes", + type: "bytes", + }, + { + name: "commercialRevShare", + internalType: "uint32", + type: "uint32", + }, + { + name: "commercialRevCelling", + internalType: "uint256", + type: "uint256", + }, + { name: "derivativesAllowed", internalType: "bool", type: "bool" }, + { + name: "derivativesAttribution", + internalType: "bool", + type: "bool", + }, + { name: "derivativesApproval", internalType: "bool", type: "bool" }, + { name: "derivativesReciprocal", internalType: "bool", type: "bool" }, + { + name: "derivativeRevCelling", + internalType: "uint256", + type: "uint256", + }, + { name: "currency", internalType: "address", type: "address" }, + ], + }, + ], + name: "getLicenseTermsId", + outputs: [ + { + name: "selectedLicenseTermsId", + internalType: "uint256", + type: "uint256", + }, + ], stateMutability: "view", }, { type: "function", inputs: [], - name: "symbol", + name: "getMetadataURI", outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "tokenId", internalType: "uint256", type: "uint256" }], - name: "tokenURI", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [{ name: "licenseTermsId", internalType: "uint256", type: "uint256" }], + name: "getRoyaltyPolicy", + outputs: [ + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { name: "royaltyData", internalType: "bytes", type: "bytes" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { name: "currency", internalType: "address", type: "address" }, + ], stateMutability: "view", }, { type: "function", inputs: [ - { name: "from", internalType: "address", type: "address" }, - { name: "to", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, + { name: "name", internalType: "string", type: "string" }, + { name: "metadataURI", internalType: "string", type: "string" }, ], - name: "transferFrom", + name: "initialize", outputs: [], stateMutability: "nonpayable", }, -] as const; - -export const mockErc721Address = "0xCdBa568f1f4e16a6c6CBC8F509eCc87972Fef09f" as const; - -export const mockErc721Config = { - address: mockErc721Address, - abi: mockErc721Abi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// MockTokenGatedHook -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const mockTokenGatedHookAbi = [ + { + type: "function", + inputs: [ + { name: "licenseTokenId", internalType: "uint256", type: "uint256" }, + { name: "childIpId", internalType: "address", type: "address" }, + ], + name: "isDerivativeApproved", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "licenseTermsId", internalType: "uint256", type: "uint256" }], + name: "isLicenseTransferable", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, { type: "function", inputs: [], @@ -3781,6 +3544,72 @@ export const mockTokenGatedHookAbi = [ outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, + { + type: "function", + inputs: [ + { + name: "terms", + internalType: "struct PILTerms", + type: "tuple", + components: [ + { name: "transferable", internalType: "bool", type: "bool" }, + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { name: "mintingFee", internalType: "uint256", type: "uint256" }, + { name: "expiration", internalType: "uint256", type: "uint256" }, + { name: "commercialUse", internalType: "bool", type: "bool" }, + { name: "commercialAttribution", internalType: "bool", type: "bool" }, + { + name: "commercializerChecker", + internalType: "address", + type: "address", + }, + { + name: "commercializerCheckerData", + internalType: "bytes", + type: "bytes", + }, + { + name: "commercialRevShare", + internalType: "uint32", + type: "uint32", + }, + { + name: "commercialRevCelling", + internalType: "uint256", + type: "uint256", + }, + { name: "derivativesAllowed", internalType: "bool", type: "bool" }, + { + name: "derivativesAttribution", + internalType: "bool", + type: "bool", + }, + { name: "derivativesApproval", internalType: "bool", type: "bool" }, + { name: "derivativesReciprocal", internalType: "bool", type: "bool" }, + { + name: "derivativeRevCelling", + internalType: "uint256", + type: "uint256", + }, + { name: "currency", internalType: "address", type: "address" }, + ], + }, + ], + name: "registerLicenseTerms", + outputs: [{ name: "id", internalType: "uint256", type: "uint256" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "licenseTokenId", internalType: "uint256", type: "uint256" }, + { name: "childIpId", internalType: "address", type: "address" }, + { name: "approved", internalType: "bool", type: "bool" }, + ], + name: "setApproval", + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], @@ -3790,40 +3619,99 @@ export const mockTokenGatedHookAbi = [ }, { type: "function", - inputs: [{ name: "configData", internalType: "bytes", type: "bytes" }], - name: "validateConfig", - outputs: [], + inputs: [{ name: "licenseTermsId", internalType: "uint256", type: "uint256" }], + name: "toJson", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "totalRegisteredLicenseTerms", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "licenseTermsIds", internalType: "uint256[]", type: "uint256[]" }], + name: "verifyCompatibleLicenses", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "caller", internalType: "address", type: "address" }, - { name: "data", internalType: "bytes", type: "bytes" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + { name: "licensee", internalType: "address", type: "address" }, + { name: "licensorIpId", internalType: "address", type: "address" }, + { name: "", internalType: "uint256", type: "uint256" }, ], - name: "verify", + name: "verifyMintLicenseToken", outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "childIpId", internalType: "address", type: "address" }, + { name: "parentIpId", internalType: "address", type: "address" }, + { name: "licenseTermsId", internalType: "uint256", type: "uint256" }, + { name: "licensee", internalType: "address", type: "address" }, + ], + name: "verifyRegisterDerivative", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [ + { name: "childIpId", internalType: "address", type: "address" }, + { name: "parentIpIds", internalType: "address[]", type: "address[]" }, + { name: "licenseTermsIds", internalType: "uint256[]", type: "uint256[]" }, + { name: "childIpOwner", internalType: "address", type: "address" }, + ], + name: "verifyRegisterDerivativeForAllParents", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "nonpayable", }, ] as const; -export const mockTokenGatedHookAddress = "0x008B5D8Db85100E143729453784e9F077B2279fA" as const; +/** + * + */ +export const piLicenseTemplateAddress = { + 1513: "0xd0Be223ae9719bBD93447ecf5289319CCf8cA227", +} as const; -export const mockTokenGatedHookConfig = { - address: mockTokenGatedHookAddress, - abi: mockTokenGatedHookAbi, +/** + * + */ +export const piLicenseTemplateConfig = { + address: piLicenseTemplateAddress, + abi: piLicenseTemplateAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ModuleRegistry +// RoyaltyModule ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const moduleRegistryAbi = [ +/** + * + */ +export const royaltyModuleAbi = [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { - type: "constructor", - inputs: [{ name: "governance", internalType: "address", type: "address" }], - stateMutability: "nonpayable", + type: "error", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "AddressEmptyCode", + }, + { + type: "error", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, + { type: "error", inputs: [], name: "FailedInnerCall" }, { type: "error", inputs: [], name: "Governance__InconsistentState" }, { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { @@ -3832,42 +3720,43 @@ export const moduleRegistryAbi = [ name: "Governance__UnsupportedInterface", }, { type: "error", inputs: [], name: "Governance__ZeroAddress" }, - { type: "error", inputs: [], name: "ModuleRegistry__InterfaceIdZero" }, - { - type: "error", - inputs: [], - name: "ModuleRegistry__ModuleAddressNotContract", - }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, { type: "error", inputs: [], - name: "ModuleRegistry__ModuleAddressZeroAddress", + name: "RoyaltyModule__CanOnlyMintSelectedPolicy", }, { type: "error", inputs: [], - name: "ModuleRegistry__ModuleAlreadyRegistered", + name: "RoyaltyModule__IncompatibleRoyaltyPolicy", }, - { type: "error", inputs: [], name: "ModuleRegistry__ModuleNotRegistered" }, + { type: "error", inputs: [], name: "RoyaltyModule__IpIsTagged" }, + { type: "error", inputs: [], name: "RoyaltyModule__NoParentsOnLinking" }, + { type: "error", inputs: [], name: "RoyaltyModule__NoRoyaltyPolicySet" }, + { type: "error", inputs: [], name: "RoyaltyModule__NotAllowedCaller" }, { type: "error", inputs: [], - name: "ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId", + name: "RoyaltyModule__NotWhitelistedRoyaltyPolicy", }, { type: "error", inputs: [], - name: "ModuleRegistry__ModuleTypeAlreadyRegistered", + name: "RoyaltyModule__NotWhitelistedRoyaltyToken", }, - { type: "error", inputs: [], name: "ModuleRegistry__ModuleTypeEmptyString" }, + { type: "error", inputs: [], name: "RoyaltyModule__ZeroDisputeModule" }, + { type: "error", inputs: [], name: "RoyaltyModule__ZeroLicensingModule" }, + { type: "error", inputs: [], name: "RoyaltyModule__ZeroRoyaltyPolicy" }, + { type: "error", inputs: [], name: "RoyaltyModule__ZeroRoyaltyToken" }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", - inputs: [], - name: "ModuleRegistry__ModuleTypeNotRegistered", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, - { type: "error", inputs: [], name: "ModuleRegistry__NameAlreadyRegistered" }, - { type: "error", inputs: [], name: "ModuleRegistry__NameDoesNotMatch" }, - { type: "error", inputs: [], name: "ModuleRegistry__NameEmptyString" }, { type: "event", anonymous: false, @@ -3885,126 +3774,252 @@ export const moduleRegistryAbi = [ type: "event", anonymous: false, inputs: [ - { name: "name", internalType: "string", type: "string", indexed: false }, { - name: "module", - internalType: "address", - type: "address", - indexed: true, - }, - { - name: "moduleTypeInterfaceId", - internalType: "bytes4", - type: "bytes4", - indexed: true, - }, - { - name: "moduleType", - internalType: "string", - type: "string", + name: "version", + internalType: "uint64", + type: "uint64", indexed: false, }, ], - name: "ModuleAdded", + name: "Initialized", }, { type: "event", anonymous: false, inputs: [ - { name: "name", internalType: "string", type: "string", indexed: false }, { - name: "module", + name: "receiverIpId", internalType: "address", type: "address", - indexed: true, + indexed: false, }, - ], - name: "ModuleRemoved", - }, - { - type: "function", - inputs: [], - name: "getGovernance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { + { + name: "payerAddress", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "token", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "LicenseMintingFeePaid", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "receiverIpId", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "payerIpId", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "sender", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "token", + internalType: "address", + type: "address", + indexed: false, + }, + { + name: "amount", + internalType: "uint256", + type: "uint256", + indexed: false, + }, + ], + name: "RoyaltyPaid", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "royaltyPolicy", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "allowed", internalType: "bool", type: "bool", indexed: false }, + ], + name: "RoyaltyPolicyWhitelistUpdated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "token", + internalType: "address", + type: "address", + indexed: false, + }, + { name: "allowed", internalType: "bool", type: "bool", indexed: false }, + ], + name: "RoyaltyTokenWhitelistUpdated", + }, + { + type: "event", + anonymous: false, + inputs: [ + { + name: "implementation", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "Upgraded", + }, + { type: "function", - inputs: [{ name: "name", internalType: "string", type: "string" }], - name: "getModule", + inputs: [], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ name: "", internalType: "string", type: "string" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [], + name: "disputeModule", outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "moduleAddress", internalType: "address", type: "address" }], - name: "getModuleType", - outputs: [{ name: "", internalType: "string", type: "string" }], + inputs: [], + name: "getGovernance", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "moduleType", internalType: "string", type: "string" }], - name: "getModuleTypeInterfaceId", - outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }], + inputs: [{ name: "_governance", internalType: "address", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + inputs: [{ name: "royaltyPolicy", internalType: "address", type: "address" }], + name: "isWhitelistedRoyaltyPolicy", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "token", internalType: "address", type: "address" }], + name: "isWhitelistedRoyaltyToken", + outputs: [{ name: "", internalType: "bool", type: "bool" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "governance", + name: "licensingModule", outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "moduleAddress", internalType: "address", type: "address" }], - name: "isRegistered", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "name", + outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [ - { name: "name", internalType: "string", type: "string" }, - { name: "moduleAddress", internalType: "address", type: "address" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { name: "licenseData", internalType: "bytes", type: "bytes" }, + { name: "externalData", internalType: "bytes", type: "bytes" }, ], - name: "registerModule", + name: "onLicenseMinting", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "name", internalType: "string", type: "string" }, - { name: "moduleAddress", internalType: "address", type: "address" }, - { name: "moduleType", internalType: "string", type: "string" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { name: "parentIpIds", internalType: "address[]", type: "address[]" }, + { name: "licenseData", internalType: "bytes[]", type: "bytes[]" }, + { name: "externalData", internalType: "bytes", type: "bytes" }, ], - name: "registerModule", + name: "onLinkToParents", outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "name", internalType: "string", type: "string" }, - { name: "interfaceId", internalType: "bytes4", type: "bytes4" }, + { name: "receiverIpId", internalType: "address", type: "address" }, + { name: "payerAddress", internalType: "address", type: "address" }, + { + name: "licenseRoyaltyPolicy", + internalType: "address", + type: "address", + }, + { name: "token", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], - name: "registerModuleType", + name: "payLicenseMintingFee", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "name", internalType: "string", type: "string" }], - name: "removeModule", + inputs: [ + { name: "receiverIpId", internalType: "address", type: "address" }, + { name: "payerIpId", internalType: "address", type: "address" }, + { name: "token", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, + ], + name: "payRoyaltyOnBehalf", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "name", internalType: "string", type: "string" }], - name: "removeModuleType", + inputs: [], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "royaltyPolicies", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", + }, + { + type: "function", + inputs: [{ name: "dispute", internalType: "address", type: "address" }], + name: "setDisputeModule", outputs: [], stateMutability: "nonpayable", }, @@ -4015,11099 +4030,2743 @@ export const moduleRegistryAbi = [ outputs: [], stateMutability: "nonpayable", }, -] as const; - -export const moduleRegistryAddress = "0xB8617E2FC9dbFd51781B8D281b725976E3B43f9d" as const; - -export const moduleRegistryConfig = { - address: moduleRegistryAddress, - abi: moduleRegistryAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// PILPolicyFrameworkManager -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const pilPolicyFrameworkManagerAbi = [ { - type: "constructor", - inputs: [ - { name: "accessController", internalType: "address", type: "address" }, - { name: "ipAccountRegistry", internalType: "address", type: "address" }, - { name: "licensing", internalType: "address", type: "address" }, - { name: "name_", internalType: "string", type: "string" }, - { name: "licenseUrl_", internalType: "string", type: "string" }, - ], + type: "function", + inputs: [{ name: "licensing", internalType: "address", type: "address" }], + name: "setLicensingModule", + outputs: [], stateMutability: "nonpayable", }, { - type: "error", - inputs: [{ name: "ipAccount", internalType: "address", type: "address" }], - name: "AccessControlled__NotIpAccount", - }, - { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, - { - type: "error", - inputs: [], - name: "LicensingModuleAware__CallerNotLicensingModule", + type: "function", + inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], + name: "supportsInterface", + outputs: [{ name: "", internalType: "bool", type: "bool" }], + stateMutability: "view", }, { - type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialDisabled_CantAddAttribution", + type: "function", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", }, { - type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialDisabled_CantAddCommercializers", + type: "function", + inputs: [ + { name: "royaltyPolicy", internalType: "address", type: "address" }, + { name: "allowed", internalType: "bool", type: "bool" }, + ], + name: "whitelistRoyaltyPolicy", + outputs: [], + stateMutability: "nonpayable", }, { - type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialDisabled_CantAddMintingFee", - }, - { - type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialDisabled_CantAddMintingFeeToken", + type: "function", + inputs: [ + { name: "token", internalType: "address", type: "address" }, + { name: "allowed", internalType: "bool", type: "bool" }, + ], + name: "whitelistRoyaltyToken", + outputs: [], + stateMutability: "nonpayable", }, +] as const; + +/** + * + */ +export const royaltyModuleAddress = { + 1513: "0x551AD8CD7893003cE00500aC2aCF1E327763D9f6", +} as const; + +/** + * + */ +export const royaltyModuleConfig = { + address: royaltyModuleAddress, + abi: royaltyModuleAbi, +} as const; + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// RoyaltyPolicyLAP +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * + */ +export const royaltyPolicyLapAbi = [ { - type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialDisabled_CantAddRevShare", + type: "constructor", + inputs: [ + { name: "royaltyModule", internalType: "address", type: "address" }, + { name: "licensingModule", internalType: "address", type: "address" }, + ], + stateMutability: "nonpayable", }, { type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialDisabled_CantAddRoyaltyPolicy", + inputs: [{ name: "target", internalType: "address", type: "address" }], + name: "AddressEmptyCode", }, { type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialEnabled_RoyaltyPolicyRequired", + inputs: [{ name: "account", internalType: "address", type: "address" }], + name: "AddressInsufficientBalance", }, { type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__CommercialValueMismatch", + inputs: [{ name: "implementation", internalType: "address", type: "address" }], + name: "ERC1967InvalidImplementation", }, + { type: "error", inputs: [], name: "ERC1967NonPayable" }, + { type: "error", inputs: [], name: "FailedInnerCall" }, + { type: "error", inputs: [], name: "Governance__InconsistentState" }, + { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, { type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__DerivativesDisabled_CantAddApproval", + inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], + name: "Governance__UnsupportedInterface", }, + { type: "error", inputs: [], name: "Governance__ZeroAddress" }, + { type: "error", inputs: [], name: "InvalidInitialization" }, + { type: "error", inputs: [], name: "NotInitializing" }, + { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, + { type: "error", inputs: [], name: "RoyaltyPolicyLAP__AboveAncestorsLimit" }, + { type: "error", inputs: [], name: "RoyaltyPolicyLAP__AboveParentLimit" }, { type: "error", inputs: [], - name: "PILPolicyFrameworkManager__DerivativesDisabled_CantAddAttribution", + name: "RoyaltyPolicyLAP__AboveRoyaltyStackLimit", }, { type: "error", inputs: [], - name: "PILPolicyFrameworkManager__DerivativesDisabled_CantAddReciprocal", + name: "RoyaltyPolicyLAP__InvalidParentRoyaltiesLength", }, { type: "error", inputs: [], - name: "PILPolicyFrameworkManager__ReciprocalButDifferentPolicyIds", + name: "RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense", }, + { type: "error", inputs: [], name: "RoyaltyPolicyLAP__NotRoyaltyModule" }, + { type: "error", inputs: [], name: "RoyaltyPolicyLAP__UnlinkableToParents" }, { type: "error", inputs: [], - name: "PILPolicyFrameworkManager__ReciprocalValueMismatch", + name: "RoyaltyPolicyLAP__ZeroIpRoyaltyVaultBeacon", }, + { type: "error", inputs: [], name: "RoyaltyPolicyLAP__ZeroLicensingModule" }, + { type: "error", inputs: [], name: "RoyaltyPolicyLAP__ZeroRoyaltyModule" }, { type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__RightsNotFound", + inputs: [{ name: "token", internalType: "address", type: "address" }], + name: "SafeERC20FailedOperation", }, + { type: "error", inputs: [], name: "UUPSUnauthorizedCallContext" }, { type: "error", - inputs: [], - name: "PILPolicyFrameworkManager__StringArrayMismatch", + inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }], + name: "UUPSUnsupportedProxiableUUID", }, { - type: "error", - inputs: [{ name: "commercializer", internalType: "address", type: "address" }], - name: "PolicyFrameworkManager__CommercializerCheckerDoesNotSupportHook", + type: "event", + anonymous: false, + inputs: [ + { + name: "newGovernance", + internalType: "address", + type: "address", + indexed: true, + }, + ], + name: "GovernanceUpdated", }, - { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, { - type: "error", + type: "event", + anonymous: false, inputs: [ - { name: "value", internalType: "uint256", type: "uint256" }, - { name: "length", internalType: "uint256", type: "uint256" }, + { + name: "version", + internalType: "uint64", + type: "uint64", + indexed: false, + }, ], - name: "StringsInsufficientHexLength", + name: "Initialized", }, { type: "event", anonymous: false, inputs: [ { - name: "licenseId", - internalType: "uint256", - type: "uint256", - indexed: true, + name: "ipId", + internalType: "address", + type: "address", + indexed: false, }, - { name: "ipId", internalType: "address", type: "address", indexed: true }, { - name: "caller", + name: "ipRoyaltyVault", internalType: "address", type: "address", - indexed: true, + indexed: false, + }, + { + name: "royaltyStack", + internalType: "uint32", + type: "uint32", + indexed: false, + }, + { + name: "targetAncestors", + internalType: "address[]", + type: "address[]", + indexed: false, + }, + { + name: "targetRoyaltyAmount", + internalType: "uint32[]", + type: "uint32[]", + indexed: false, }, - { name: "approved", internalType: "bool", type: "bool", indexed: false }, ], - name: "DerivativeApproved", - }, - { - type: "function", - inputs: [], - name: "ACCESS_CONTROLLER", - outputs: [{ name: "", internalType: "contract IAccessController", type: "address" }], - stateMutability: "view", + name: "PolicyInitialized", }, { - type: "function", - inputs: [], - name: "IP_ACCOUNT_REGISTRY", - outputs: [ + type: "event", + anonymous: false, + inputs: [ { - name: "", - internalType: "contract IIPAccountRegistry", + name: "implementation", + internalType: "address", type: "address", + indexed: true, }, ], - stateMutability: "view", + name: "Upgraded", }, { type: "function", inputs: [], - name: "LICENSE_REGISTRY", - outputs: [{ name: "", internalType: "contract ILicenseRegistry", type: "address" }], + name: "LICENSING_MODULE", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "LICENSING_MODULE", - outputs: [{ name: "", internalType: "contract ILicensingModule", type: "address" }], + name: "MAX_ANCESTORS", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "getAggregator", - outputs: [ - { - name: "rights", - internalType: "struct PILAggregator", - type: "tuple", - components: [ - { name: "commercial", internalType: "bool", type: "bool" }, - { name: "derivativesReciprocal", internalType: "bool", type: "bool" }, - { name: "lastPolicyId", internalType: "uint256", type: "uint256" }, - { name: "territoriesAcc", internalType: "bytes32", type: "bytes32" }, - { - name: "distributionChannelsAcc", - internalType: "bytes32", - type: "bytes32", - }, - { - name: "contentRestrictionsAcc", - internalType: "bytes32", - type: "bytes32", - }, - ], - }, - ], + inputs: [], + name: "MAX_PARENTS", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], - name: "getPILPolicy", - outputs: [ - { - name: "policy", - internalType: "struct PILPolicy", - type: "tuple", - components: [ - { name: "attribution", internalType: "bool", type: "bool" }, - { name: "commercialUse", internalType: "bool", type: "bool" }, - { name: "commercialAttribution", internalType: "bool", type: "bool" }, - { - name: "commercializerChecker", - internalType: "address", - type: "address", - }, - { - name: "commercializerCheckerData", - internalType: "bytes", - type: "bytes", - }, - { - name: "commercialRevShare", - internalType: "uint32", - type: "uint32", - }, - { name: "derivativesAllowed", internalType: "bool", type: "bool" }, - { - name: "derivativesAttribution", - internalType: "bool", - type: "bool", - }, - { name: "derivativesApproval", internalType: "bool", type: "bool" }, - { name: "derivativesReciprocal", internalType: "bool", type: "bool" }, - { name: "territories", internalType: "string[]", type: "string[]" }, - { - name: "distributionChannels", - internalType: "string[]", - type: "string[]", - }, - { - name: "contentRestrictions", - internalType: "string[]", - type: "string[]", - }, - ], - }, - ], + inputs: [], + name: "ROYALTY_MODULE", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [ - { name: "licenseId", internalType: "uint256", type: "uint256" }, - { name: "childIpId", internalType: "address", type: "address" }, - ], - name: "isDerivativeApproved", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + inputs: [], + name: "TOTAL_RT_SUPPLY", + outputs: [{ name: "", internalType: "uint32", type: "uint32" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "licenseTextUrl", + name: "UPGRADE_INTERFACE_VERSION", outputs: [{ name: "", internalType: "string", type: "string" }], stateMutability: "view", }, { type: "function", inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], + name: "getGovernance", + outputs: [{ name: "", internalType: "address", type: "address" }], stateMutability: "view", }, { type: "function", - inputs: [{ name: "policyData", internalType: "bytes", type: "bytes" }], - name: "policyToJson", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "pure", + inputs: [], + name: "getIpRoyaltyVaultBeacon", + outputs: [{ name: "", internalType: "address", type: "address" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "aggregator", internalType: "bytes", type: "bytes" }, - { name: "policyId", internalType: "uint256", type: "uint256" }, - { name: "policy", internalType: "bytes", type: "bytes" }, - ], - name: "processInheritedPolicies", + inputs: [{ name: "ipId", internalType: "address", type: "address" }], + name: "getRoyaltyData", outputs: [ - { name: "changedAgg", internalType: "bool", type: "bool" }, - { name: "newAggregator", internalType: "bytes", type: "bytes" }, + { name: "", internalType: "bool", type: "bool" }, + { name: "", internalType: "address", type: "address" }, + { name: "", internalType: "uint32", type: "uint32" }, + { name: "", internalType: "address[]", type: "address[]" }, + { name: "", internalType: "uint32[]", type: "uint32[]" }, ], stateMutability: "view", }, { type: "function", - inputs: [ - { - name: "params", - internalType: "struct RegisterPILPolicyParams", - type: "tuple", - components: [ - { name: "transferable", internalType: "bool", type: "bool" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "mintingFee", internalType: "uint256", type: "uint256" }, - { name: "mintingFeeToken", internalType: "address", type: "address" }, - { - name: "policy", - internalType: "struct PILPolicy", - type: "tuple", - components: [ - { name: "attribution", internalType: "bool", type: "bool" }, - { name: "commercialUse", internalType: "bool", type: "bool" }, - { - name: "commercialAttribution", - internalType: "bool", - type: "bool", - }, - { - name: "commercializerChecker", - internalType: "address", - type: "address", - }, - { - name: "commercializerCheckerData", - internalType: "bytes", - type: "bytes", - }, - { - name: "commercialRevShare", - internalType: "uint32", - type: "uint32", - }, - { - name: "derivativesAllowed", - internalType: "bool", - type: "bool", - }, - { - name: "derivativesAttribution", - internalType: "bool", - type: "bool", - }, - { - name: "derivativesApproval", - internalType: "bool", - type: "bool", - }, - { - name: "derivativesReciprocal", - internalType: "bool", - type: "bool", - }, - { - name: "territories", - internalType: "string[]", - type: "string[]", - }, - { - name: "distributionChannels", - internalType: "string[]", - type: "string[]", - }, - { - name: "contentRestrictions", - internalType: "string[]", - type: "string[]", - }, - ], - }, - ], - }, - ], - name: "registerPolicy", - outputs: [{ name: "policyId", internalType: "uint256", type: "uint256" }], - stateMutability: "nonpayable", + inputs: [], + name: "getSnapshotInterval", + outputs: [{ name: "", internalType: "uint256", type: "uint256" }], + stateMutability: "view", }, { type: "function", - inputs: [ - { name: "licenseId", internalType: "uint256", type: "uint256" }, - { name: "childIpId", internalType: "address", type: "address" }, - { name: "approved", internalType: "bool", type: "bool" }, - ], - name: "setApproval", + inputs: [{ name: "governance", internalType: "address", type: "address" }], + name: "initialize", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [ + { name: "ipId", internalType: "address", type: "address" }, + { name: "licenseData", internalType: "bytes", type: "bytes" }, + { name: "externalData", internalType: "bytes", type: "bytes" }, + ], + name: "onLicenseMinting", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "licenseId", internalType: "uint256", type: "uint256" }, - { name: "licensee", internalType: "address", type: "address" }, { name: "ipId", internalType: "address", type: "address" }, - { name: "parentIpId", internalType: "address", type: "address" }, - { name: "policyData", internalType: "bytes", type: "bytes" }, + { name: "parentIpIds", internalType: "address[]", type: "address[]" }, + { name: "licenseData", internalType: "bytes[]", type: "bytes[]" }, + { name: "externalData", internalType: "bytes", type: "bytes" }, ], - name: "verifyLink", - outputs: [{ name: "", internalType: "bool", type: "bool" }], + name: "onLinkToParents", + outputs: [], stateMutability: "nonpayable", }, { type: "function", inputs: [ - { name: "licensee", internalType: "address", type: "address" }, - { name: "mintingFromADerivative", internalType: "bool", type: "bool" }, - { name: "licensorIpId", internalType: "address", type: "address" }, - { name: "receiver", internalType: "address", type: "address" }, - { name: "mintAmount", internalType: "uint256", type: "uint256" }, - { name: "policyData", internalType: "bytes", type: "bytes" }, - ], - name: "verifyMint", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "nonpayable", - }, -] as const; - -export const pilPolicyFrameworkManagerAddress = - "0xAc2C50Af31501370366D243FaeC56F89128f6d96" as const; - -export const pilPolicyFrameworkManagerConfig = { - address: pilPolicyFrameworkManagerAddress, - abi: pilPolicyFrameworkManagerAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RegistrationModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const registrationModuleAbi = [ - { - type: "constructor", - inputs: [ - { name: "assetRegistry", internalType: "address", type: "address" }, - { name: "licensingModule", internalType: "address", type: "address" }, - { name: "resolverAddr", internalType: "address", type: "address" }, + { name: "caller", internalType: "address", type: "address" }, + { name: "ipId", internalType: "address", type: "address" }, + { name: "token", internalType: "address", type: "address" }, + { name: "amount", internalType: "uint256", type: "uint256" }, ], + name: "onRoyaltyPayment", + outputs: [], stateMutability: "nonpayable", }, - { type: "error", inputs: [], name: "RegistrationModule__InvalidOwner" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "caller", - internalType: "address", - type: "address", - indexed: true, - }, - { name: "ipId", internalType: "address", type: "address", indexed: true }, - { - name: "licenseIds", - internalType: "uint256[]", - type: "uint256[]", - indexed: false, - }, - ], - name: "DerivativeIPRegistered", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "caller", - internalType: "address", - type: "address", - indexed: true, - }, - { name: "ipId", internalType: "address", type: "address", indexed: true }, - { - name: "policyId", - internalType: "uint256", - type: "uint256", - indexed: true, - }, - ], - name: "RootIPRegistered", - }, { type: "function", inputs: [], - name: "ipResolver", - outputs: [{ name: "", internalType: "contract IPResolver", type: "address" }], + name: "proxiableUUID", + outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }], stateMutability: "view", }, { type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", + inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], + name: "setGovernance", + outputs: [], + stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "licenseIds", internalType: "uint256[]", type: "uint256[]" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "ipName", internalType: "string", type: "string" }, - { name: "contentHash", internalType: "bytes32", type: "bytes32" }, - { name: "externalURL", internalType: "string", type: "string" }, - { name: "royaltyContext", internalType: "bytes", type: "bytes" }, - ], - name: "registerDerivativeIp", + inputs: [{ name: "beacon", internalType: "address", type: "address" }], + name: "setIpRoyaltyVaultBeacon", outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [ - { name: "policyId", internalType: "uint256", type: "uint256" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "ipName", internalType: "string", type: "string" }, - { name: "contentHash", internalType: "bytes32", type: "bytes32" }, - { name: "externalURL", internalType: "string", type: "string" }, - ], - name: "registerRootIp", - outputs: [{ name: "", internalType: "address", type: "address" }], + inputs: [{ name: "timestampInterval", internalType: "uint256", type: "uint256" }], + name: "setSnapshotInterval", + outputs: [], stateMutability: "nonpayable", }, { type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", + inputs: [ + { name: "newImplementation", internalType: "address", type: "address" }, + { name: "data", internalType: "bytes", type: "bytes" }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", }, ] as const; -export const registrationModuleAddress = "0xa6249720b3BD1179d84b7E74029Ed2F78E5eC694" as const; +/** + * + */ +export const royaltyPolicyLapAddress = { + 1513: "0x2EcdB5bD12a037dCb9De0Ab7957f35FEeF758eA6", +} as const; -export const registrationModuleConfig = { - address: registrationModuleAddress, - abi: registrationModuleAbi, +/** + * + */ +export const royaltyPolicyLapConfig = { + address: royaltyPolicyLapAddress, + abi: royaltyPolicyLapAbi, } as const; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RoyaltyModule +// SDK ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -export const royaltyModuleAbi = [ - { - type: "constructor", - inputs: [{ name: "governance", internalType: "address", type: "address" }], - stateMutability: "nonpayable", - }, - { type: "error", inputs: [], name: "Governance__InconsistentState" }, - { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, - { - type: "error", - inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], - name: "Governance__UnsupportedInterface", - }, - { type: "error", inputs: [], name: "Governance__ZeroAddress" }, - { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, - { - type: "error", - inputs: [], - name: "RoyaltyModule__CanOnlyMintSelectedPolicy", - }, - { - type: "error", - inputs: [], - name: "RoyaltyModule__IncompatibleRoyaltyPolicy", - }, - { type: "error", inputs: [], name: "RoyaltyModule__NoParentsOnLinking" }, - { type: "error", inputs: [], name: "RoyaltyModule__NoRoyaltyPolicySet" }, - { type: "error", inputs: [], name: "RoyaltyModule__NotAllowedCaller" }, - { - type: "error", - inputs: [], - name: "RoyaltyModule__NotWhitelistedRoyaltyPolicy", - }, - { - type: "error", - inputs: [], - name: "RoyaltyModule__NotWhitelistedRoyaltyToken", - }, - { type: "error", inputs: [], name: "RoyaltyModule__ZeroLicensingModule" }, - { type: "error", inputs: [], name: "RoyaltyModule__ZeroRoyaltyPolicy" }, - { type: "error", inputs: [], name: "RoyaltyModule__ZeroRoyaltyToken" }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newGovernance", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "GovernanceUpdated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "receiverIpId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "payerAddress", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "token", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "LicenseMintingFeePaid", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "receiverIpId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "payerIpId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "sender", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "token", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "amount", - internalType: "uint256", - type: "uint256", - indexed: false, - }, - ], - name: "RoyaltyPaid", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "royaltyPolicy", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "allowed", internalType: "bool", type: "bool", indexed: false }, - ], - name: "RoyaltyPolicyWhitelistUpdated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "token", - internalType: "address", - type: "address", - indexed: false, - }, - { name: "allowed", internalType: "bool", type: "bool", indexed: false }, - ], - name: "RoyaltyTokenWhitelistUpdated", - }, - { - type: "function", - inputs: [], - name: "LICENSING_MODULE", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "getGovernance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "royaltyPolicy", internalType: "address", type: "address" }], - name: "isWhitelistedRoyaltyPolicy", - outputs: [{ name: "isWhitelisted", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "token", internalType: "address", type: "address" }], - name: "isWhitelistedRoyaltyToken", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "licenseData", internalType: "bytes", type: "bytes" }, - { name: "externalData", internalType: "bytes", type: "bytes" }, - ], - name: "onLicenseMinting", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "parentIpIds", internalType: "address[]", type: "address[]" }, - { name: "licenseData", internalType: "bytes[]", type: "bytes[]" }, - { name: "externalData", internalType: "bytes", type: "bytes" }, - ], - name: "onLinkToParents", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "receiverIpId", internalType: "address", type: "address" }, - { name: "payerAddress", internalType: "address", type: "address" }, - { - name: "licenseRoyaltyPolicy", - internalType: "address", - type: "address", - }, - { name: "token", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "payLicenseMintingFee", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "receiverIpId", internalType: "address", type: "address" }, - { name: "payerIpId", internalType: "address", type: "address" }, - { name: "token", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "payRoyaltyOnBehalf", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "royaltyPolicies", - outputs: [{ name: "royaltyPolicy", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], - name: "setGovernance", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "licensingModule", internalType: "address", type: "address" }], - name: "setLicensingModule", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "royaltyPolicy", internalType: "address", type: "address" }, - { name: "allowed", internalType: "bool", type: "bool" }, - ], - name: "whitelistRoyaltyPolicy", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "token", internalType: "address", type: "address" }, - { name: "allowed", internalType: "bool", type: "bool" }, - ], - name: "whitelistRoyaltyToken", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -export const royaltyModuleAddress = "0xE1a667ccc38540b38d8579c499bE22e51390a308" as const; - -export const royaltyModuleConfig = { - address: royaltyModuleAddress, - abi: royaltyModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// RoyaltyPolicyLAP -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const royaltyPolicyLapAbi = [ - { - type: "constructor", - inputs: [ - { name: "royaltyModule", internalType: "address", type: "address" }, - { name: "licensingModule", internalType: "address", type: "address" }, - { name: "liquidSplitFactory", internalType: "address", type: "address" }, - { name: "liquidSplitMain", internalType: "address", type: "address" }, - { name: "governance", internalType: "address", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [{ name: "target", internalType: "address", type: "address" }], - name: "AddressEmptyCode", - }, - { - type: "error", - inputs: [{ name: "account", internalType: "address", type: "address" }], - name: "AddressInsufficientBalance", - }, - { type: "error", inputs: [], name: "ERC1167FailedCreateClone" }, - { type: "error", inputs: [], name: "FailedInnerCall" }, - { type: "error", inputs: [], name: "Governance__InconsistentState" }, - { type: "error", inputs: [], name: "Governance__OnlyProtocolAdmin" }, - { - type: "error", - inputs: [{ name: "interfaceName", internalType: "string", type: "string" }], - name: "Governance__UnsupportedInterface", - }, - { type: "error", inputs: [], name: "Governance__ZeroAddress" }, - { type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__AboveAncestorsLimit" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__AboveParentLimit" }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__AboveRoyaltyStackLimit", - }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__ImplementationAlreadySet", - }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__InvalidAncestors" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__InvalidAncestorsHash" }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__InvalidAncestorsLength", - }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__InvalidAncestorsRoyalty", - }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__InvalidParentRoyaltiesLength", - }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__InvalidRoyaltyAmountLength", - }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense", - }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__NotFullOwnership" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__NotRoyaltyModule" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__TransferFailed" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__UnlinkableToParents" }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__ZeroAncestorsVaultImpl", - }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__ZeroLicensingModule" }, - { - type: "error", - inputs: [], - name: "RoyaltyPolicyLAP__ZeroLiquidSplitFactory", - }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__ZeroLiquidSplitMain" }, - { type: "error", inputs: [], name: "RoyaltyPolicyLAP__ZeroRoyaltyModule" }, - { - type: "error", - inputs: [{ name: "token", internalType: "address", type: "address" }], - name: "SafeERC20FailedOperation", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "newGovernance", - internalType: "address", - type: "address", - indexed: true, - }, - ], - name: "GovernanceUpdated", - }, - { - type: "event", - anonymous: false, - inputs: [ - { - name: "ipId", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "splitClone", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "ancestorsVault", - internalType: "address", - type: "address", - indexed: false, - }, - { - name: "royaltyStack", - internalType: "uint32", - type: "uint32", - indexed: false, - }, - { - name: "targetAncestors", - internalType: "address[]", - type: "address[]", - indexed: false, - }, - { - name: "targetRoyaltyAmount", - internalType: "uint32[]", - type: "uint32[]", - indexed: false, - }, - ], - name: "PolicyInitialized", - }, - { - type: "function", - inputs: [], - name: "ANCESTORS_VAULT_IMPL", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LICENSING_MODULE", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LIQUID_SPLIT_FACTORY", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "LIQUID_SPLIT_MAIN", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_ANCESTORS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "MAX_PARENTS", - outputs: [{ name: "", internalType: "uint256", type: "uint256" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "ROYALTY_MODULE", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "TOTAL_RNFT_SUPPLY", - outputs: [{ name: "", internalType: "uint32", type: "uint32" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "claimerIpId", internalType: "address", type: "address" }, - { name: "ancestors", internalType: "address[]", type: "address[]" }, - { - name: "ancestorsRoyalties", - internalType: "uint32[]", - type: "uint32[]", - }, - { name: "withdrawETH", internalType: "bool", type: "bool" }, - { name: "tokens", internalType: "contract ERC20[]", type: "address[]" }, - ], - name: "claimFromAncestorsVault", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "account", internalType: "address", type: "address" }, - { name: "withdrawETH", internalType: "uint256", type: "uint256" }, - { name: "tokens", internalType: "contract ERC20[]", type: "address[]" }, - ], - name: "claimFromIpPool", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "withdrawETH", internalType: "uint256", type: "uint256" }, - { name: "token", internalType: "address", type: "address" }, - ], - name: "claimFromIpPoolAsTotalRnftOwner", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "token", internalType: "address", type: "address" }, - { name: "accounts", internalType: "address[]", type: "address[]" }, - { name: "distributorAddress", internalType: "address", type: "address" }, - ], - name: "distributeIpPoolFunds", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [], - name: "getGovernance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "governance", - outputs: [{ name: "", internalType: "address", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint256[]", type: "uint256[]" }, - { name: "", internalType: "uint256[]", type: "uint256[]" }, - { name: "", internalType: "bytes", type: "bytes" }, - ], - name: "onERC1155BatchReceived", - outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "address", type: "address" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "uint256", type: "uint256" }, - { name: "", internalType: "bytes", type: "bytes" }, - ], - name: "onERC1155Received", - outputs: [{ name: "", internalType: "bytes4", type: "bytes4" }], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "licenseData", internalType: "bytes", type: "bytes" }, - { name: "externalData", internalType: "bytes", type: "bytes" }, - ], - name: "onLicenseMinting", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipId", internalType: "address", type: "address" }, - { name: "parentIpIds", internalType: "address[]", type: "address[]" }, - { name: "licenseData", internalType: "bytes[]", type: "bytes[]" }, - { name: "externalData", internalType: "bytes", type: "bytes" }, - ], - name: "onLinkToParents", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "caller", internalType: "address", type: "address" }, - { name: "ipId", internalType: "address", type: "address" }, - { name: "token", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "onRoyaltyPayment", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "ipId", internalType: "address", type: "address" }], - name: "royaltyData", - outputs: [ - { name: "isUnlinkableToParents", internalType: "bool", type: "bool" }, - { name: "splitClone", internalType: "address", type: "address" }, - { name: "ancestorsVault", internalType: "address", type: "address" }, - { name: "royaltyStack", internalType: "uint32", type: "uint32" }, - { name: "ancestorsHash", internalType: "bytes32", type: "bytes32" }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [{ name: "ancestorsVaultImpl", internalType: "address", type: "address" }], - name: "setAncestorsVaultImplementation", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "newGovernance", internalType: "address", type: "address" }], - name: "setGovernance", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }], - name: "supportsInterface", - outputs: [{ name: "", internalType: "bool", type: "bool" }], - stateMutability: "view", - }, - { type: "receive", stateMutability: "payable" }, -] as const; - -export const royaltyPolicyLapAddress = "0x265C21b34e0E92d63C678425478C42aa8D727B79" as const; - -export const royaltyPolicyLapConfig = { - address: royaltyPolicyLapAddress, - abi: royaltyPolicyLapAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// TokenWithdrawalModule -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -export const tokenWithdrawalModuleAbi = [ - { - type: "constructor", - inputs: [ - { name: "accessController", internalType: "address", type: "address" }, - { name: "ipAccountRegistry", internalType: "address", type: "address" }, - ], - stateMutability: "nonpayable", - }, - { - type: "error", - inputs: [{ name: "ipAccount", internalType: "address", type: "address" }], - name: "AccessControlled__NotIpAccount", - }, - { type: "error", inputs: [], name: "AccessControlled__ZeroAddress" }, - { - type: "function", - inputs: [], - name: "ACCESS_CONTROLLER", - outputs: [{ name: "", internalType: "contract IAccessController", type: "address" }], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "IP_ACCOUNT_REGISTRY", - outputs: [ - { - name: "", - internalType: "contract IIPAccountRegistry", - type: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - inputs: [], - name: "name", - outputs: [{ name: "", internalType: "string", type: "string" }], - 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: "ipAccount", internalType: "address payable", type: "address" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawERC1155", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipAccount", internalType: "address payable", type: "address" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "amount", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawERC20", - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - inputs: [ - { name: "ipAccount", internalType: "address payable", type: "address" }, - { name: "tokenContract", internalType: "address", type: "address" }, - { name: "tokenId", internalType: "uint256", type: "uint256" }, - ], - name: "withdrawERC721", - outputs: [], - stateMutability: "nonpayable", - }, -] as const; - -export const tokenWithdrawalModuleAddress = "0x5f62d238B3022bA5881e5e443B014cac6999a4f2" as const; - -export const tokenWithdrawalModuleConfig = { - address: tokenWithdrawalModuleAddress, - abi: tokenWithdrawalModuleAbi, -} as const; - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// SDK -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// Contract AccessController ============================================================= - -export type AccessControllerIpAccountRegistryResponse = Address; - -export type AccessControllerModuleRegistryResponse = Address; - -/** - * AccessControllerCheckPermissionRequest - * - * @param ipAccount address - * @param signer address - * @param to address - * @param func bytes4 - */ -export type AccessControllerCheckPermissionRequest = { - ipAccount: Address; - signer: Address; - to: Address; - func: Hex; -}; - -export type AccessControllerGetGovernanceResponse = Address; - -/** - * AccessControllerGetPermissionRequest - * - * @param ipAccount address - * @param signer address - * @param to address - * @param func bytes4 - */ -export type AccessControllerGetPermissionRequest = { - ipAccount: Address; - signer: Address; - to: Address; - func: Hex; -}; - -export type AccessControllerGetPermissionResponse = number; - -export type AccessControllerGovernanceResponse = Address; - -/** - * AccessControllerInitializeRequest - * - * @param ipAccountRegistry address - * @param moduleRegistry address - */ -export type AccessControllerInitializeRequest = { - ipAccountRegistry: Address; - moduleRegistry: Address; -}; - -/** - * AccessControllerSetBatchPermissionsRequest - * - * @param permissions tuple[] - */ -export type AccessControllerSetBatchPermissionsRequest = { - permissions: { - ipAccount: Address; - signer: Address; - to: Address; - func: Hex; - permission: number; - }[]; -}; - -/** - * AccessControllerSetGlobalPermissionRequest - * - * @param signer address - * @param to address - * @param func bytes4 - * @param permission uint8 - */ -export type AccessControllerSetGlobalPermissionRequest = { - signer: Address; - to: Address; - func: Hex; - permission: number; -}; - -/** - * AccessControllerSetGovernanceRequest - * - * @param newGovernance address - */ -export type AccessControllerSetGovernanceRequest = { - newGovernance: Address; -}; - -/** - * AccessControllerSetPermissionRequest - * - * @param ipAccount address - * @param signer address - * @param to address - * @param func bytes4 - * @param permission uint8 - */ -export type AccessControllerSetPermissionRequest = { - ipAccount: Address; - signer: Address; - to: Address; - func: Hex; - permission: number; -}; - -/** - * AccessControllerGovernanceUpdatedEvent - * - * @param newGovernance address (optional) - */ -export type AccessControllerGovernanceUpdatedEvent = { - newGovernance?: Address; -}; - -/** - * AccessControllerPermissionSetEvent - * - * @param ipAccountOwner address (optional) - * @param ipAccount address (optional) - * @param signer address (optional) - * @param to address (optional) - * @param func bytes4 (optional) - * @param permission uint8 (optional) - */ -export type AccessControllerPermissionSetEvent = { - ipAccountOwner?: Address; - ipAccount?: Address; - signer?: Address; - to?: Address; - func?: Hex; - permission?: number; -}; - -/** - * contract AccessController readonly method - */ -export class AccessControllerReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x92c87ae0a0a4b8629ad028e55183CC2b7eC057D3", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method IP_ACCOUNT_REGISTRY for contract AccessController - * - * @param request AccessControllerIpAccountRegistryRequest - * @return Promise - */ - public async ipAccountRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "IP_ACCOUNT_REGISTRY", - }); - } - - /** - * method MODULE_REGISTRY for contract AccessController - * - * @param request AccessControllerModuleRegistryRequest - * @return Promise - */ - public async moduleRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "MODULE_REGISTRY", - }); - } - - /** - * method checkPermission for contract AccessController - * - * @param request AccessControllerCheckPermissionRequest - * @return Promise - */ - public async checkPermission(request: AccessControllerCheckPermissionRequest): Promise { - await this.rpcClient.readContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "checkPermission", - args: [request.ipAccount, request.signer, request.to, request.func], - }); - } - - /** - * method getGovernance for contract AccessController - * - * @param request AccessControllerGetGovernanceRequest - * @return Promise - */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "getGovernance", - }); - } - - /** - * method getPermission for contract AccessController - * - * @param request AccessControllerGetPermissionRequest - * @return Promise - */ - public async getPermission( - request: AccessControllerGetPermissionRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "getPermission", - args: [request.ipAccount, request.signer, request.to, request.func], - }); - } - - /** - * method governance for contract AccessController - * - * @param request AccessControllerGovernanceRequest - * @return Promise - */ - public async governance(): Promise { - return await this.rpcClient.readContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "governance", - }); - } -} - -/** - * contract AccessController write method - */ -export class AccessControllerClient extends AccessControllerReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x92c87ae0a0a4b8629ad028e55183CC2b7eC057D3", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method initialize for contract AccessController - * - * @param request AccessControllerInitializeRequest - * @return Promise - */ - public async initialize( - request: AccessControllerInitializeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "initialize", - account: this.wallet.account, - args: [request.ipAccountRegistry, request.moduleRegistry], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setBatchPermissions for contract AccessController - * - * @param request AccessControllerSetBatchPermissionsRequest - * @return Promise - */ - public async setBatchPermissions( - request: AccessControllerSetBatchPermissionsRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "setBatchPermissions", - account: this.wallet.account, - args: [request.permissions], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setGlobalPermission for contract AccessController - * - * @param request AccessControllerSetGlobalPermissionRequest - * @return Promise - */ - public async setGlobalPermission( - request: AccessControllerSetGlobalPermissionRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "setGlobalPermission", - account: this.wallet.account, - args: [request.signer, request.to, request.func, request.permission], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setGovernance for contract AccessController - * - * @param request AccessControllerSetGovernanceRequest - * @return Promise - */ - public async setGovernance( - request: AccessControllerSetGovernanceRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "setGovernance", - account: this.wallet.account, - args: [request.newGovernance], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setPermission for contract AccessController - * - * @param request AccessControllerSetPermissionRequest - * @return Promise - */ - public async setPermission( - request: AccessControllerSetPermissionRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: accessControllerAbi, - address: this.address, - functionName: "setPermission", - account: this.wallet.account, - args: [request.ipAccount, request.signer, request.to, request.func, request.permission], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract AccessController event - */ -export class AccessControllerEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x92c87ae0a0a4b8629ad028e55183CC2b7eC057D3", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event GovernanceUpdated for contract AccessController - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: AccessControllerGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: accessControllerAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event PermissionSet for contract AccessController - */ - public watchPermissionSetEvent( - onLogs: (txHash: Hex, ev: AccessControllerPermissionSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: accessControllerAbi, - address: this.address, - eventName: "PermissionSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract AncestorsVaultLAP ============================================================= - -export type AncestorsVaultLapRoyaltyPolicyLapResponse = Address; - -/** - * AncestorsVaultLapIsClaimedRequest - * - * @param ipId address - * @param claimerIpId address - */ -export type AncestorsVaultLapIsClaimedRequest = { - ipId: Address; - claimerIpId: Address; -}; - -export type AncestorsVaultLapIsClaimedResponse = boolean; - -/** - * AncestorsVaultLapSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type AncestorsVaultLapSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type AncestorsVaultLapSupportsInterfaceResponse = boolean; - -/** - * AncestorsVaultLapClaimRequest - * - * @param ipId address - * @param claimerIpId address - * @param ancestors address[] - * @param ancestorsRoyalties uint32[] - * @param withdrawETH bool - * @param tokens address[] - */ -export type AncestorsVaultLapClaimRequest = { - ipId: Address; - claimerIpId: Address; - ancestors: readonly Address[]; - ancestorsRoyalties: readonly number[]; - withdrawETH: boolean; - tokens: readonly Address[]; -}; - -/** - * AncestorsVaultLapOnErc1155BatchReceivedRequest - * - * @param 0 address - * @param 1 address - * @param 2 uint256[] - * @param 3 uint256[] - * @param 4 bytes - */ -export type AncestorsVaultLapOnErc1155BatchReceivedRequest = readonly [ - Address, - Address, - readonly bigint[], - readonly bigint[], - Hex, -]; - -/** - * AncestorsVaultLapOnErc1155ReceivedRequest - * - * @param 0 address - * @param 1 address - * @param 2 uint256 - * @param 3 uint256 - * @param 4 bytes - */ -export type AncestorsVaultLapOnErc1155ReceivedRequest = readonly [ - Address, - Address, - bigint, - bigint, - Hex, -]; - -/** - * AncestorsVaultLapClaimedEvent - * - * @param ipId address (optional) - * @param claimerIpId address (optional) - * @param withdrawETH bool (optional) - * @param tokens address[] (optional) - */ -export type AncestorsVaultLapClaimedEvent = { - ipId?: Address; - claimerIpId?: Address; - withdrawETH?: boolean; - tokens?: readonly Address[]; -}; - -/** - * contract AncestorsVaultLAP readonly method - */ -export class AncestorsVaultLapReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x280f8921E36d6Af2E03AD84EC8194ad1b6B4799c", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ROYALTY_POLICY_LAP for contract AncestorsVaultLAP - * - * @param request AncestorsVaultLapRoyaltyPolicyLapRequest - * @return Promise - */ - public async royaltyPolicyLap(): Promise { - return await this.rpcClient.readContract({ - abi: ancestorsVaultLapAbi, - address: this.address, - functionName: "ROYALTY_POLICY_LAP", - }); - } - - /** - * method isClaimed for contract AncestorsVaultLAP - * - * @param request AncestorsVaultLapIsClaimedRequest - * @return Promise - */ - public async isClaimed( - request: AncestorsVaultLapIsClaimedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ancestorsVaultLapAbi, - address: this.address, - functionName: "isClaimed", - args: [request.ipId, request.claimerIpId], - }); - } - - /** - * method supportsInterface for contract AncestorsVaultLAP - * - * @param request AncestorsVaultLapSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: AncestorsVaultLapSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ancestorsVaultLapAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); - } -} - -/** - * contract AncestorsVaultLAP write method - */ -export class AncestorsVaultLapClient extends AncestorsVaultLapReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x280f8921E36d6Af2E03AD84EC8194ad1b6B4799c", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method claim for contract AncestorsVaultLAP - * - * @param request AncestorsVaultLapClaimRequest - * @return Promise - */ - public async claim(request: AncestorsVaultLapClaimRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ancestorsVaultLapAbi, - address: this.address, - functionName: "claim", - account: this.wallet.account, - args: [ - request.ipId, - request.claimerIpId, - request.ancestors, - request.ancestorsRoyalties, - request.withdrawETH, - request.tokens, - ], - }); - return await this.wallet.writeContract(call); - } - - /** - * method onERC1155BatchReceived for contract AncestorsVaultLAP - * - * @param request AncestorsVaultLapOnErc1155BatchReceivedRequest - * @return Promise - */ - public async onErc1155BatchReceived( - request: AncestorsVaultLapOnErc1155BatchReceivedRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ancestorsVaultLapAbi, - address: this.address, - functionName: "onERC1155BatchReceived", - account: this.wallet.account, - args: [request[0], request[1], request[2], request[3], request[4]], - }); - return await this.wallet.writeContract(call); - } - - /** - * method onERC1155Received for contract AncestorsVaultLAP - * - * @param request AncestorsVaultLapOnErc1155ReceivedRequest - * @return Promise - */ - public async onErc1155Received( - request: AncestorsVaultLapOnErc1155ReceivedRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ancestorsVaultLapAbi, - address: this.address, - functionName: "onERC1155Received", - account: this.wallet.account, - args: [request[0], request[1], request[2], request[3], request[4]], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract AncestorsVaultLAP event - */ -export class AncestorsVaultLapEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x280f8921E36d6Af2E03AD84EC8194ad1b6B4799c", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event Claimed for contract AncestorsVaultLAP - */ - public watchClaimedEvent( - onLogs: (txHash: Hex, ev: AncestorsVaultLapClaimedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ancestorsVaultLapAbi, - address: this.address, - eventName: "Claimed", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract ArbitrationPolicySP ============================================================= - -export type ArbitrationPolicySpArbitrationPriceResponse = bigint; - -export type ArbitrationPolicySpDisputeModuleResponse = Address; - -export type ArbitrationPolicySpPaymentTokenResponse = Address; - -export type ArbitrationPolicySpGetGovernanceResponse = Address; - -export type ArbitrationPolicySpGovernanceResponse = Address; - -/** - * ArbitrationPolicySpOnDisputeCancelRequest - * - * @param caller address - * @param disputeId uint256 - * @param data bytes - */ -export type ArbitrationPolicySpOnDisputeCancelRequest = { - caller: Address; - disputeId: bigint; - data: Hex; -}; - -/** - * ArbitrationPolicySpOnDisputeJudgementRequest - * - * @param disputeId uint256 - * @param decision bool - * @param data bytes - */ -export type ArbitrationPolicySpOnDisputeJudgementRequest = { - disputeId: bigint; - decision: boolean; - data: Hex; -}; - -/** - * ArbitrationPolicySpOnRaiseDisputeRequest - * - * @param caller address - * @param data bytes - */ -export type ArbitrationPolicySpOnRaiseDisputeRequest = { - caller: Address; - data: Hex; -}; - -/** - * ArbitrationPolicySpSetGovernanceRequest - * - * @param newGovernance address - */ -export type ArbitrationPolicySpSetGovernanceRequest = { - newGovernance: Address; -}; - -/** - * ArbitrationPolicySpGovernanceUpdatedEvent - * - * @param newGovernance address (optional) - */ -export type ArbitrationPolicySpGovernanceUpdatedEvent = { - newGovernance?: Address; -}; - -/** - * ArbitrationPolicySpGovernanceWithdrewEvent - * - * @param amount uint256 (optional) - */ -export type ArbitrationPolicySpGovernanceWithdrewEvent = { - amount?: bigint; -}; - -/** - * contract ArbitrationPolicySP readonly method - */ -export class ArbitrationPolicySpReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xCc3dDa466A18C4F20Bc0750756B92E2f23741Fd3", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ARBITRATION_PRICE for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpArbitrationPriceRequest - * @return Promise - */ - public async arbitrationPrice(): Promise { - return await this.rpcClient.readContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "ARBITRATION_PRICE", - }); - } - - /** - * method DISPUTE_MODULE for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpDisputeModuleRequest - * @return Promise - */ - public async disputeModule(): Promise { - return await this.rpcClient.readContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "DISPUTE_MODULE", - }); - } - - /** - * method PAYMENT_TOKEN for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpPaymentTokenRequest - * @return Promise - */ - public async paymentToken(): Promise { - return await this.rpcClient.readContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "PAYMENT_TOKEN", - }); - } - - /** - * method getGovernance for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpGetGovernanceRequest - * @return Promise - */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "getGovernance", - }); - } - - /** - * method governance for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpGovernanceRequest - * @return Promise - */ - public async governance(): Promise { - return await this.rpcClient.readContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "governance", - }); - } -} - -/** - * contract ArbitrationPolicySP write method - */ -export class ArbitrationPolicySpClient extends ArbitrationPolicySpReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xCc3dDa466A18C4F20Bc0750756B92E2f23741Fd3", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method governanceWithdraw for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpGovernanceWithdrawRequest - * @return Promise - */ - public async governanceWithdraw(): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "governanceWithdraw", - account: this.wallet.account, - }); - return await this.wallet.writeContract(call); - } - - /** - * method onDisputeCancel for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpOnDisputeCancelRequest - * @return Promise - */ - public async onDisputeCancel( - request: ArbitrationPolicySpOnDisputeCancelRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "onDisputeCancel", - account: this.wallet.account, - args: [request.caller, request.disputeId, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method onDisputeJudgement for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpOnDisputeJudgementRequest - * @return Promise - */ - public async onDisputeJudgement( - request: ArbitrationPolicySpOnDisputeJudgementRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "onDisputeJudgement", - account: this.wallet.account, - args: [request.disputeId, request.decision, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method onRaiseDispute for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpOnRaiseDisputeRequest - * @return Promise - */ - public async onRaiseDispute( - request: ArbitrationPolicySpOnRaiseDisputeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "onRaiseDispute", - account: this.wallet.account, - args: [request.caller, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setGovernance for contract ArbitrationPolicySP - * - * @param request ArbitrationPolicySpSetGovernanceRequest - * @return Promise - */ - public async setGovernance( - request: ArbitrationPolicySpSetGovernanceRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: arbitrationPolicySpAbi, - address: this.address, - functionName: "setGovernance", - account: this.wallet.account, - args: [request.newGovernance], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract ArbitrationPolicySP event - */ -export class ArbitrationPolicySpEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xCc3dDa466A18C4F20Bc0750756B92E2f23741Fd3", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event GovernanceUpdated for contract ArbitrationPolicySP - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: ArbitrationPolicySpGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: arbitrationPolicySpAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event GovernanceWithdrew for contract ArbitrationPolicySP - */ - public watchGovernanceWithdrewEvent( - onLogs: (txHash: Hex, ev: ArbitrationPolicySpGovernanceWithdrewEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: arbitrationPolicySpAbi, - address: this.address, - eventName: "GovernanceWithdrew", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract DisputeModule ============================================================= - -export type DisputeModuleAccessControllerResponse = Address; - -export type DisputeModuleInDisputeResponse = Hex; - -export type DisputeModuleIpAccountRegistryResponse = Address; - -export type DisputeModuleIpAssetRegistryResponse = Address; - -/** - * DisputeModuleArbitrationPoliciesRequest - * - * @param ipId address - */ -export type DisputeModuleArbitrationPoliciesRequest = { - ipId: Address; -}; - -/** - * DisputeModuleArbitrationPoliciesResponse - * - * @param arbitrationPolicy address - */ -export type DisputeModuleArbitrationPoliciesResponse = { - arbitrationPolicy: Address; -}; - -export type DisputeModuleBaseArbitrationPolicyResponse = Address; - -export type DisputeModuleDisputeCounterResponse = bigint; - -/** - * DisputeModuleDisputesRequest - * - * @param disputeId uint256 - */ -export type DisputeModuleDisputesRequest = { - disputeId: bigint; -}; - -/** - * DisputeModuleDisputesResponse - * - * @param targetIpId address - * @param disputeInitiator address - * @param arbitrationPolicy address - * @param linkToDisputeEvidence bytes32 - * @param targetTag bytes32 - * @param currentTag bytes32 - */ -export type DisputeModuleDisputesResponse = { - targetIpId: Address; - disputeInitiator: Address; - arbitrationPolicy: Address; - linkToDisputeEvidence: Hex; - targetTag: Hex; - currentTag: Hex; -}; - -export type DisputeModuleGetGovernanceResponse = Address; - -export type DisputeModuleGovernanceResponse = Address; - -/** - * DisputeModuleIsIpTaggedRequest - * - * @param ipId address - */ -export type DisputeModuleIsIpTaggedRequest = { - ipId: Address; -}; - -export type DisputeModuleIsIpTaggedResponse = boolean; - -/** - * DisputeModuleIsWhitelistedArbitrationPolicyRequest - * - * @param arbitrationPolicy address - */ -export type DisputeModuleIsWhitelistedArbitrationPolicyRequest = { - arbitrationPolicy: Address; -}; - -/** - * DisputeModuleIsWhitelistedArbitrationPolicyResponse - * - * @param allowed bool - */ -export type DisputeModuleIsWhitelistedArbitrationPolicyResponse = { - allowed: boolean; -}; - -/** - * DisputeModuleIsWhitelistedArbitrationRelayerRequest - * - * @param arbitrationPolicy address - * @param arbitrationRelayer address - */ -export type DisputeModuleIsWhitelistedArbitrationRelayerRequest = { - arbitrationPolicy: Address; - arbitrationRelayer: Address; -}; - -/** - * DisputeModuleIsWhitelistedArbitrationRelayerResponse - * - * @param allowed bool - */ -export type DisputeModuleIsWhitelistedArbitrationRelayerResponse = { - allowed: boolean; -}; - -/** - * DisputeModuleIsWhitelistedDisputeTagRequest - * - * @param tag bytes32 - */ -export type DisputeModuleIsWhitelistedDisputeTagRequest = { - tag: Hex; -}; - -/** - * DisputeModuleIsWhitelistedDisputeTagResponse - * - * @param allowed bool - */ -export type DisputeModuleIsWhitelistedDisputeTagResponse = { - allowed: boolean; -}; - -export type DisputeModuleNameResponse = string; - -/** - * DisputeModuleSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type DisputeModuleSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type DisputeModuleSupportsInterfaceResponse = boolean; - -/** - * DisputeModuleCancelDisputeRequest - * - * @param disputeId uint256 - * @param data bytes - */ -export type DisputeModuleCancelDisputeRequest = { - disputeId: bigint; - data: Hex; -}; - -/** - * DisputeModuleRaiseDisputeRequest - * - * @param targetIpId address - * @param linkToDisputeEvidence string - * @param targetTag bytes32 - * @param data bytes - */ -export type DisputeModuleRaiseDisputeRequest = { - targetIpId: Address; - linkToDisputeEvidence: string; - targetTag: Hex; - data: Hex; -}; - -/** - * DisputeModuleResolveDisputeRequest - * - * @param disputeId uint256 - */ -export type DisputeModuleResolveDisputeRequest = { - disputeId: bigint; -}; - -/** - * DisputeModuleSetArbitrationPolicyRequest - * - * @param ipId address - * @param arbitrationPolicy address - */ -export type DisputeModuleSetArbitrationPolicyRequest = { - ipId: Address; - arbitrationPolicy: Address; -}; - -/** - * DisputeModuleSetBaseArbitrationPolicyRequest - * - * @param arbitrationPolicy address - */ -export type DisputeModuleSetBaseArbitrationPolicyRequest = { - arbitrationPolicy: Address; -}; - -/** - * DisputeModuleSetDisputeJudgementRequest - * - * @param disputeId uint256 - * @param decision bool - * @param data bytes - */ -export type DisputeModuleSetDisputeJudgementRequest = { - disputeId: bigint; - decision: boolean; - data: Hex; -}; - -/** - * DisputeModuleSetGovernanceRequest - * - * @param newGovernance address - */ -export type DisputeModuleSetGovernanceRequest = { - newGovernance: Address; -}; - -/** - * DisputeModuleWhitelistArbitrationPolicyRequest - * - * @param arbitrationPolicy address - * @param allowed bool - */ -export type DisputeModuleWhitelistArbitrationPolicyRequest = { - arbitrationPolicy: Address; - allowed: boolean; -}; - -/** - * DisputeModuleWhitelistArbitrationRelayerRequest - * - * @param arbitrationPolicy address - * @param arbPolicyRelayer address - * @param allowed bool - */ -export type DisputeModuleWhitelistArbitrationRelayerRequest = { - arbitrationPolicy: Address; - arbPolicyRelayer: Address; - allowed: boolean; -}; - -/** - * DisputeModuleWhitelistDisputeTagRequest - * - * @param tag bytes32 - * @param allowed bool - */ -export type DisputeModuleWhitelistDisputeTagRequest = { - tag: Hex; - allowed: boolean; -}; - -/** - * DisputeModuleArbitrationPolicySetEvent - * - * @param ipId address (optional) - * @param arbitrationPolicy address (optional) - */ -export type DisputeModuleArbitrationPolicySetEvent = { - ipId?: Address; - arbitrationPolicy?: Address; -}; - -/** - * DisputeModuleArbitrationPolicyWhitelistUpdatedEvent - * - * @param arbitrationPolicy address (optional) - * @param allowed bool (optional) - */ -export type DisputeModuleArbitrationPolicyWhitelistUpdatedEvent = { - arbitrationPolicy?: Address; - allowed?: boolean; -}; - -/** - * DisputeModuleArbitrationRelayerWhitelistUpdatedEvent - * - * @param arbitrationPolicy address (optional) - * @param arbitrationRelayer address (optional) - * @param allowed bool (optional) - */ -export type DisputeModuleArbitrationRelayerWhitelistUpdatedEvent = { - arbitrationPolicy?: Address; - arbitrationRelayer?: Address; - allowed?: boolean; -}; - -/** - * DisputeModuleDefaultArbitrationPolicyUpdatedEvent - * - * @param arbitrationPolicy address (optional) - */ -export type DisputeModuleDefaultArbitrationPolicyUpdatedEvent = { - arbitrationPolicy?: Address; -}; - -/** - * DisputeModuleDisputeCancelledEvent - * - * @param disputeId uint256 (optional) - * @param data bytes (optional) - */ -export type DisputeModuleDisputeCancelledEvent = { - disputeId?: bigint; - data?: Hex; -}; - -/** - * DisputeModuleDisputeJudgementSetEvent - * - * @param disputeId uint256 (optional) - * @param decision bool (optional) - * @param data bytes (optional) - */ -export type DisputeModuleDisputeJudgementSetEvent = { - disputeId?: bigint; - decision?: boolean; - data?: Hex; -}; - -/** - * DisputeModuleDisputeRaisedEvent - * - * @param disputeId uint256 (optional) - * @param targetIpId address (optional) - * @param disputeInitiator address (optional) - * @param arbitrationPolicy address (optional) - * @param linkToDisputeEvidence bytes32 (optional) - * @param targetTag bytes32 (optional) - * @param data bytes (optional) - */ -export type DisputeModuleDisputeRaisedEvent = { - disputeId?: bigint; - targetIpId?: Address; - disputeInitiator?: Address; - arbitrationPolicy?: Address; - linkToDisputeEvidence?: Hex; - targetTag?: Hex; - data?: Hex; -}; - -/** - * DisputeModuleDisputeResolvedEvent - * - * @param disputeId uint256 (optional) - */ -export type DisputeModuleDisputeResolvedEvent = { - disputeId?: bigint; -}; - -/** - * DisputeModuleGovernanceUpdatedEvent - * - * @param newGovernance address (optional) - */ -export type DisputeModuleGovernanceUpdatedEvent = { - newGovernance?: Address; -}; - -/** - * DisputeModuleTagWhitelistUpdatedEvent - * - * @param tag bytes32 (optional) - * @param allowed bool (optional) - */ -export type DisputeModuleTagWhitelistUpdatedEvent = { - tag?: Hex; - allowed?: boolean; -}; - -/** - * contract DisputeModule readonly method - */ -export class DisputeModuleReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x0Ac6fdA124b05D2daA5E9De7059c866EE1CE7Bcb", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ACCESS_CONTROLLER for contract DisputeModule - * - * @param request DisputeModuleAccessControllerRequest - * @return Promise - */ - public async accessController(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "ACCESS_CONTROLLER", - }); - } - - /** - * method IN_DISPUTE for contract DisputeModule - * - * @param request DisputeModuleInDisputeRequest - * @return Promise - */ - public async inDispute(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "IN_DISPUTE", - }); - } - - /** - * method IP_ACCOUNT_REGISTRY for contract DisputeModule - * - * @param request DisputeModuleIpAccountRegistryRequest - * @return Promise - */ - public async ipAccountRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "IP_ACCOUNT_REGISTRY", - }); - } - - /** - * method IP_ASSET_REGISTRY for contract DisputeModule - * - * @param request DisputeModuleIpAssetRegistryRequest - * @return Promise - */ - public async ipAssetRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "IP_ASSET_REGISTRY", - }); - } - - /** - * method arbitrationPolicies for contract DisputeModule - * - * @param request DisputeModuleArbitrationPoliciesRequest - * @return Promise - */ - public async arbitrationPolicies( - request: DisputeModuleArbitrationPoliciesRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "arbitrationPolicies", - args: [request.ipId], - }); - return { - arbitrationPolicy: result, - }; - } - - /** - * method baseArbitrationPolicy for contract DisputeModule - * - * @param request DisputeModuleBaseArbitrationPolicyRequest - * @return Promise - */ - public async baseArbitrationPolicy(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "baseArbitrationPolicy", - }); - } - - /** - * method disputeCounter for contract DisputeModule - * - * @param request DisputeModuleDisputeCounterRequest - * @return Promise - */ - public async disputeCounter(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "disputeCounter", - }); - } - - /** - * method disputes for contract DisputeModule - * - * @param request DisputeModuleDisputesRequest - * @return Promise - */ - public async disputes( - request: DisputeModuleDisputesRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "disputes", - args: [request.disputeId], - }); - return { - targetIpId: result[0], - disputeInitiator: result[1], - arbitrationPolicy: result[2], - linkToDisputeEvidence: result[3], - targetTag: result[4], - currentTag: result[5], - }; - } - - /** - * method getGovernance for contract DisputeModule - * - * @param request DisputeModuleGetGovernanceRequest - * @return Promise - */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "getGovernance", - }); - } - - /** - * method governance for contract DisputeModule - * - * @param request DisputeModuleGovernanceRequest - * @return Promise - */ - public async governance(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "governance", - }); - } - - /** - * method isIpTagged for contract DisputeModule - * - * @param request DisputeModuleIsIpTaggedRequest - * @return Promise - */ - public async isIpTagged( - request: DisputeModuleIsIpTaggedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "isIpTagged", - args: [request.ipId], - }); - } - - /** - * method isWhitelistedArbitrationPolicy for contract DisputeModule - * - * @param request DisputeModuleIsWhitelistedArbitrationPolicyRequest - * @return Promise - */ - public async isWhitelistedArbitrationPolicy( - request: DisputeModuleIsWhitelistedArbitrationPolicyRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "isWhitelistedArbitrationPolicy", - args: [request.arbitrationPolicy], - }); - return { - allowed: result, - }; - } - - /** - * method isWhitelistedArbitrationRelayer for contract DisputeModule - * - * @param request DisputeModuleIsWhitelistedArbitrationRelayerRequest - * @return Promise - */ - public async isWhitelistedArbitrationRelayer( - request: DisputeModuleIsWhitelistedArbitrationRelayerRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "isWhitelistedArbitrationRelayer", - args: [request.arbitrationPolicy, request.arbitrationRelayer], - }); - return { - allowed: result, - }; - } - - /** - * method isWhitelistedDisputeTag for contract DisputeModule - * - * @param request DisputeModuleIsWhitelistedDisputeTagRequest - * @return Promise - */ - public async isWhitelistedDisputeTag( - request: DisputeModuleIsWhitelistedDisputeTagRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "isWhitelistedDisputeTag", - args: [request.tag], - }); - return { - allowed: result, - }; - } - - /** - * method name for contract DisputeModule - * - * @param request DisputeModuleNameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "name", - }); - } - - /** - * method supportsInterface for contract DisputeModule - * - * @param request DisputeModuleSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: DisputeModuleSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); - } -} - -/** - * contract DisputeModule write method - */ -export class DisputeModuleClient extends DisputeModuleReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x0Ac6fdA124b05D2daA5E9De7059c866EE1CE7Bcb", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method cancelDispute for contract DisputeModule - * - * @param request DisputeModuleCancelDisputeRequest - * @return Promise - */ - public async cancelDispute( - request: DisputeModuleCancelDisputeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "cancelDispute", - account: this.wallet.account, - args: [request.disputeId, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method raiseDispute for contract DisputeModule - * - * @param request DisputeModuleRaiseDisputeRequest - * @return Promise - */ - public async raiseDispute( - request: DisputeModuleRaiseDisputeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "raiseDispute", - account: this.wallet.account, - args: [request.targetIpId, request.linkToDisputeEvidence, request.targetTag, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method resolveDispute for contract DisputeModule - * - * @param request DisputeModuleResolveDisputeRequest - * @return Promise - */ - public async resolveDispute( - request: DisputeModuleResolveDisputeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "resolveDispute", - account: this.wallet.account, - args: [request.disputeId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setArbitrationPolicy for contract DisputeModule - * - * @param request DisputeModuleSetArbitrationPolicyRequest - * @return Promise - */ - public async setArbitrationPolicy( - request: DisputeModuleSetArbitrationPolicyRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "setArbitrationPolicy", - account: this.wallet.account, - args: [request.ipId, request.arbitrationPolicy], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setBaseArbitrationPolicy for contract DisputeModule - * - * @param request DisputeModuleSetBaseArbitrationPolicyRequest - * @return Promise - */ - public async setBaseArbitrationPolicy( - request: DisputeModuleSetBaseArbitrationPolicyRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "setBaseArbitrationPolicy", - account: this.wallet.account, - args: [request.arbitrationPolicy], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setDisputeJudgement for contract DisputeModule - * - * @param request DisputeModuleSetDisputeJudgementRequest - * @return Promise - */ - public async setDisputeJudgement( - request: DisputeModuleSetDisputeJudgementRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "setDisputeJudgement", - account: this.wallet.account, - args: [request.disputeId, request.decision, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setGovernance for contract DisputeModule - * - * @param request DisputeModuleSetGovernanceRequest - * @return Promise - */ - public async setGovernance( - request: DisputeModuleSetGovernanceRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "setGovernance", - account: this.wallet.account, - args: [request.newGovernance], - }); - return await this.wallet.writeContract(call); - } - - /** - * method whitelistArbitrationPolicy for contract DisputeModule - * - * @param request DisputeModuleWhitelistArbitrationPolicyRequest - * @return Promise - */ - public async whitelistArbitrationPolicy( - request: DisputeModuleWhitelistArbitrationPolicyRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "whitelistArbitrationPolicy", - account: this.wallet.account, - args: [request.arbitrationPolicy, request.allowed], - }); - return await this.wallet.writeContract(call); - } - - /** - * method whitelistArbitrationRelayer for contract DisputeModule - * - * @param request DisputeModuleWhitelistArbitrationRelayerRequest - * @return Promise - */ - public async whitelistArbitrationRelayer( - request: DisputeModuleWhitelistArbitrationRelayerRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "whitelistArbitrationRelayer", - account: this.wallet.account, - args: [request.arbitrationPolicy, request.arbPolicyRelayer, request.allowed], - }); - return await this.wallet.writeContract(call); - } - - /** - * method whitelistDisputeTag for contract DisputeModule - * - * @param request DisputeModuleWhitelistDisputeTagRequest - * @return Promise - */ - public async whitelistDisputeTag( - request: DisputeModuleWhitelistDisputeTagRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: disputeModuleAbi, - address: this.address, - functionName: "whitelistDisputeTag", - account: this.wallet.account, - args: [request.tag, request.allowed], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract DisputeModule event - */ -export class DisputeModuleEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x0Ac6fdA124b05D2daA5E9De7059c866EE1CE7Bcb", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event ArbitrationPolicySet for contract DisputeModule - */ - public watchArbitrationPolicySetEvent( - onLogs: (txHash: Hex, ev: DisputeModuleArbitrationPolicySetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "ArbitrationPolicySet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event ArbitrationPolicyWhitelistUpdated for contract DisputeModule - */ - public watchArbitrationPolicyWhitelistUpdatedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleArbitrationPolicyWhitelistUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "ArbitrationPolicyWhitelistUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event ArbitrationRelayerWhitelistUpdated for contract DisputeModule - */ - public watchArbitrationRelayerWhitelistUpdatedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleArbitrationRelayerWhitelistUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "ArbitrationRelayerWhitelistUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event DefaultArbitrationPolicyUpdated for contract DisputeModule - */ - public watchDefaultArbitrationPolicyUpdatedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleDefaultArbitrationPolicyUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "DefaultArbitrationPolicyUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event DisputeCancelled for contract DisputeModule - */ - public watchDisputeCancelledEvent( - onLogs: (txHash: Hex, ev: DisputeModuleDisputeCancelledEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "DisputeCancelled", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event DisputeJudgementSet for contract DisputeModule - */ - public watchDisputeJudgementSetEvent( - onLogs: (txHash: Hex, ev: DisputeModuleDisputeJudgementSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "DisputeJudgementSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event DisputeRaised for contract DisputeModule - */ - public watchDisputeRaisedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleDisputeRaisedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "DisputeRaised", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event DisputeResolved for contract DisputeModule - */ - public watchDisputeResolvedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleDisputeResolvedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "DisputeResolved", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event GovernanceUpdated for contract DisputeModule - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event TagWhitelistUpdated for contract DisputeModule - */ - public watchTagWhitelistUpdatedEvent( - onLogs: (txHash: Hex, ev: DisputeModuleTagWhitelistUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: disputeModuleAbi, - address: this.address, - eventName: "TagWhitelistUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract Governance ============================================================= - -export type GovernanceDefaultAdminRoleResponse = Hex; - -/** - * GovernanceGetRoleAdminRequest - * - * @param role bytes32 - */ -export type GovernanceGetRoleAdminRequest = { - role: Hex; -}; - -export type GovernanceGetRoleAdminResponse = Hex; - -export type GovernanceGetStateResponse = number; - -/** - * GovernanceHasRoleRequest - * - * @param role bytes32 - * @param account address - */ -export type GovernanceHasRoleRequest = { - role: Hex; - account: Address; -}; - -export type GovernanceHasRoleResponse = boolean; - -/** - * GovernanceSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type GovernanceSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type GovernanceSupportsInterfaceResponse = boolean; - -/** - * GovernanceGrantRoleRequest - * - * @param role bytes32 - * @param account address - */ -export type GovernanceGrantRoleRequest = { - role: Hex; - account: Address; -}; - -/** - * GovernanceRenounceRoleRequest - * - * @param role bytes32 - * @param callerConfirmation address - */ -export type GovernanceRenounceRoleRequest = { - role: Hex; - callerConfirmation: Address; -}; - -/** - * GovernanceRevokeRoleRequest - * - * @param role bytes32 - * @param account address - */ -export type GovernanceRevokeRoleRequest = { - role: Hex; - account: Address; -}; - -/** - * GovernanceSetStateRequest - * - * @param newState uint8 - */ -export type GovernanceSetStateRequest = { - newState: number; -}; - -/** - * GovernanceRoleAdminChangedEvent - * - * @param role bytes32 (optional) - * @param previousAdminRole bytes32 (optional) - * @param newAdminRole bytes32 (optional) - */ -export type GovernanceRoleAdminChangedEvent = { - role?: Hex; - previousAdminRole?: Hex; - newAdminRole?: Hex; -}; - -/** - * GovernanceRoleGrantedEvent - * - * @param role bytes32 (optional) - * @param account address (optional) - * @param sender address (optional) - */ -export type GovernanceRoleGrantedEvent = { - role?: Hex; - account?: Address; - sender?: Address; -}; - -/** - * GovernanceRoleRevokedEvent - * - * @param role bytes32 (optional) - * @param account address (optional) - * @param sender address (optional) - */ -export type GovernanceRoleRevokedEvent = { - role?: Hex; - account?: Address; - sender?: Address; -}; - -/** - * GovernanceStateSetEvent - * - * @param account address (optional) - * @param prevState uint8 (optional) - * @param newState uint8 (optional) - * @param timestamp uint256 (optional) - */ -export type GovernanceStateSetEvent = { - account?: Address; - prevState?: number; - newState?: number; - timestamp?: bigint; -}; - -/** - * contract Governance readonly method - */ -export class GovernanceReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x6D8070F7726769bEd136bc7007B3deA695f7047A", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method DEFAULT_ADMIN_ROLE for contract Governance - * - * @param request GovernanceDefaultAdminRoleRequest - * @return Promise - */ - public async defaultAdminRole(): Promise { - return await this.rpcClient.readContract({ - abi: governanceAbi, - address: this.address, - functionName: "DEFAULT_ADMIN_ROLE", - }); - } - - /** - * method getRoleAdmin for contract Governance - * - * @param request GovernanceGetRoleAdminRequest - * @return Promise - */ - public async getRoleAdmin( - request: GovernanceGetRoleAdminRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: governanceAbi, - address: this.address, - functionName: "getRoleAdmin", - args: [request.role], - }); - } - - /** - * method getState for contract Governance - * - * @param request GovernanceGetStateRequest - * @return Promise - */ - public async getState(): Promise { - return await this.rpcClient.readContract({ - abi: governanceAbi, - address: this.address, - functionName: "getState", - }); - } - - /** - * method hasRole for contract Governance - * - * @param request GovernanceHasRoleRequest - * @return Promise - */ - public async hasRole(request: GovernanceHasRoleRequest): Promise { - return await this.rpcClient.readContract({ - abi: governanceAbi, - address: this.address, - functionName: "hasRole", - args: [request.role, request.account], - }); - } - - /** - * method supportsInterface for contract Governance - * - * @param request GovernanceSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: GovernanceSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: governanceAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); - } -} - -/** - * contract Governance write method - */ -export class GovernanceClient extends GovernanceReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x6D8070F7726769bEd136bc7007B3deA695f7047A", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method grantRole for contract Governance - * - * @param request GovernanceGrantRoleRequest - * @return Promise - */ - public async grantRole(request: GovernanceGrantRoleRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: governanceAbi, - address: this.address, - functionName: "grantRole", - account: this.wallet.account, - args: [request.role, request.account], - }); - return await this.wallet.writeContract(call); - } - - /** - * method renounceRole for contract Governance - * - * @param request GovernanceRenounceRoleRequest - * @return Promise - */ - public async renounceRole( - request: GovernanceRenounceRoleRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: governanceAbi, - address: this.address, - functionName: "renounceRole", - account: this.wallet.account, - args: [request.role, request.callerConfirmation], - }); - return await this.wallet.writeContract(call); - } - - /** - * method revokeRole for contract Governance - * - * @param request GovernanceRevokeRoleRequest - * @return Promise - */ - public async revokeRole(request: GovernanceRevokeRoleRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: governanceAbi, - address: this.address, - functionName: "revokeRole", - account: this.wallet.account, - args: [request.role, request.account], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setState for contract Governance - * - * @param request GovernanceSetStateRequest - * @return Promise - */ - public async setState(request: GovernanceSetStateRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: governanceAbi, - address: this.address, - functionName: "setState", - account: this.wallet.account, - args: [request.newState], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract Governance event - */ -export class GovernanceEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x6D8070F7726769bEd136bc7007B3deA695f7047A", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event RoleAdminChanged for contract Governance - */ - public watchRoleAdminChangedEvent( - onLogs: (txHash: Hex, ev: GovernanceRoleAdminChangedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: governanceAbi, - address: this.address, - eventName: "RoleAdminChanged", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event RoleGranted for contract Governance - */ - public watchRoleGrantedEvent( - onLogs: (txHash: Hex, ev: GovernanceRoleGrantedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: governanceAbi, - address: this.address, - eventName: "RoleGranted", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event RoleRevoked for contract Governance - */ - public watchRoleRevokedEvent( - onLogs: (txHash: Hex, ev: GovernanceRoleRevokedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: governanceAbi, - address: this.address, - eventName: "RoleRevoked", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event StateSet for contract Governance - */ - public watchStateSetEvent( - onLogs: (txHash: Hex, ev: GovernanceStateSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: governanceAbi, - address: this.address, - eventName: "StateSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract IPAccountImpl ============================================================= - -export type IpAccountImplAccessControllerResponse = Address; - -/** - * IpAccountImplIsValidSignerRequest - * - * @param signer address - * @param data bytes - */ -export type IpAccountImplIsValidSignerRequest = { - signer: Address; - data: Hex; -}; - -export type IpAccountImplIsValidSignerResponse = Hex; - -/** - * IpAccountImplOnErc1155BatchReceivedRequest - * - * @param 0 address - * @param 1 address - * @param 2 uint256[] - * @param 3 uint256[] - * @param 4 bytes - */ -export type IpAccountImplOnErc1155BatchReceivedRequest = readonly [ - Address, - Address, - readonly bigint[], - readonly bigint[], - Hex, -]; - -export type IpAccountImplOnErc1155BatchReceivedResponse = Hex; - -/** - * IpAccountImplOnErc1155ReceivedRequest - * - * @param 0 address - * @param 1 address - * @param 2 uint256 - * @param 3 uint256 - * @param 4 bytes - */ -export type IpAccountImplOnErc1155ReceivedRequest = readonly [ - Address, - Address, - bigint, - bigint, - Hex, -]; - -export type IpAccountImplOnErc1155ReceivedResponse = Hex; - -/** - * IpAccountImplOnErc721ReceivedRequest - * - * @param 0 address - * @param 1 address - * @param 2 uint256 - * @param 3 bytes - */ -export type IpAccountImplOnErc721ReceivedRequest = readonly [Address, Address, bigint, Hex]; - -export type IpAccountImplOnErc721ReceivedResponse = Hex; - -export type IpAccountImplOwnerResponse = Address; - -export type IpAccountImplStateResponse = bigint; - -/** - * IpAccountImplSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type IpAccountImplSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type IpAccountImplSupportsInterfaceResponse = boolean; - -/** - * IpAccountImplTokenResponse - * - * @param 0 uint256 - * @param 1 address - * @param 2 uint256 - */ -export type IpAccountImplTokenResponse = readonly [bigint, Address, bigint]; - -/** - * IpAccountImplExecuteRequest - * - * @param to address - * @param value uint256 - * @param data bytes - */ -export type IpAccountImplExecuteRequest = { - to: Address; - value: bigint; - data: Hex; -}; - -/** - * IpAccountImplExecuteWithSigRequest - * - * @param to address - * @param value uint256 - * @param data bytes - * @param signer address - * @param deadline uint256 - * @param signature bytes - */ -export type IpAccountImplExecuteWithSigRequest = { - to: Address; - value: bigint; - data: Hex; - signer: Address; - deadline: bigint; - signature: Hex; -}; - -/** - * IpAccountImplExecutedEvent - * - * @param to address (optional) - * @param value uint256 (optional) - * @param data bytes (optional) - * @param nonce uint256 (optional) - */ -export type IpAccountImplExecutedEvent = { - to?: Address; - value?: bigint; - data?: Hex; - nonce?: bigint; -}; - -/** - * IpAccountImplExecutedWithSigEvent - * - * @param to address (optional) - * @param value uint256 (optional) - * @param data bytes (optional) - * @param nonce uint256 (optional) - * @param deadline uint256 (optional) - * @param signer address (optional) - * @param signature bytes (optional) - */ -export type IpAccountImplExecutedWithSigEvent = { - to?: Address; - value?: bigint; - data?: Hex; - nonce?: bigint; - deadline?: bigint; - signer?: Address; - signature?: Hex; -}; - -/** - * contract IPAccountImpl readonly method - */ -export class IpAccountImplReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xddcBD4309f0545fa8cC99137bC621620e017bdBe", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method accessController for contract IPAccountImpl - * - * @param request IpAccountImplAccessControllerRequest - * @return Promise - */ - public async accessController(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "accessController", - }); - } - - /** - * method isValidSigner for contract IPAccountImpl - * - * @param request IpAccountImplIsValidSignerRequest - * @return Promise - */ - public async isValidSigner( - request: IpAccountImplIsValidSignerRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "isValidSigner", - args: [request.signer, request.data], - }); - } - - /** - * method onERC1155BatchReceived for contract IPAccountImpl - * - * @param request IpAccountImplOnErc1155BatchReceivedRequest - * @return Promise - */ - public async onErc1155BatchReceived( - request: IpAccountImplOnErc1155BatchReceivedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "onERC1155BatchReceived", - args: [request[0], request[1], request[2], request[3], request[4]], - }); - } - - /** - * method onERC1155Received for contract IPAccountImpl - * - * @param request IpAccountImplOnErc1155ReceivedRequest - * @return Promise - */ - public async onErc1155Received( - request: IpAccountImplOnErc1155ReceivedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "onERC1155Received", - args: [request[0], request[1], request[2], request[3], request[4]], - }); - } - - /** - * method onERC721Received for contract IPAccountImpl - * - * @param request IpAccountImplOnErc721ReceivedRequest - * @return Promise - */ - public async onErc721Received( - request: IpAccountImplOnErc721ReceivedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "onERC721Received", - args: [request[0], request[1], request[2], request[3]], - }); - } - - /** - * method owner for contract IPAccountImpl - * - * @param request IpAccountImplOwnerRequest - * @return Promise - */ - public async owner(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "owner", - }); - } - - /** - * method state for contract IPAccountImpl - * - * @param request IpAccountImplStateRequest - * @return Promise - */ - public async state(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "state", - }); - } - - /** - * method supportsInterface for contract IPAccountImpl - * - * @param request IpAccountImplSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: IpAccountImplSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); - } - - /** - * method token for contract IPAccountImpl - * - * @param request IpAccountImplTokenRequest - * @return Promise - */ - public async token(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "token", - }); - } -} - -/** - * contract IPAccountImpl write method - */ -export class IpAccountImplClient extends IpAccountImplReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xddcBD4309f0545fa8cC99137bC621620e017bdBe", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method execute for contract IPAccountImpl - * - * @param request IpAccountImplExecuteRequest - * @return Promise - */ - public async execute(request: IpAccountImplExecuteRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "execute", - account: this.wallet.account, - args: [request.to, request.value, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method executeWithSig for contract IPAccountImpl - * - * @param request IpAccountImplExecuteWithSigRequest - * @return Promise - */ - public async executeWithSig( - request: IpAccountImplExecuteWithSigRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAccountImplAbi, - address: this.address, - functionName: "executeWithSig", - account: this.wallet.account, - args: [ - request.to, - request.value, - request.data, - request.signer, - request.deadline, - request.signature, - ], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract IPAccountImpl event - */ -export class IpAccountImplEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xddcBD4309f0545fa8cC99137bC621620e017bdBe", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event Executed for contract IPAccountImpl - */ - public watchExecutedEvent( - onLogs: (txHash: Hex, ev: IpAccountImplExecutedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAccountImplAbi, - address: this.address, - eventName: "Executed", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event ExecutedWithSig for contract IPAccountImpl - */ - public watchExecutedWithSigEvent( - onLogs: (txHash: Hex, ev: IpAccountImplExecutedWithSigEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAccountImplAbi, - address: this.address, - eventName: "ExecutedWithSig", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract IPAccountRegistry ============================================================= - -export type IpAccountRegistryErc6551PublicRegistryResponse = Address; - -export type IpAccountRegistryIpAccountImplResponse = Address; - -export type IpAccountRegistryIpAccountSaltResponse = Hex; - -export type IpAccountRegistryGetIpAccountImplResponse = Address; - -/** - * IpAccountRegistryIpAccountRequest - * - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - */ -export type IpAccountRegistryIpAccountRequest = { - chainId: bigint; - tokenContract: Address; - tokenId: bigint; -}; - -export type IpAccountRegistryIpAccountResponse = Address; - -/** - * IpAccountRegistryRegisterIpAccountRequest - * - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - */ -export type IpAccountRegistryRegisterIpAccountRequest = { - chainId: bigint; - tokenContract: Address; - tokenId: bigint; -}; - -/** - * IpAccountRegistryIpAccountRegisteredEvent - * - * @param account address (optional) - * @param implementation address (optional) - * @param chainId uint256 (optional) - * @param tokenContract address (optional) - * @param tokenId uint256 (optional) - */ -export type IpAccountRegistryIpAccountRegisteredEvent = { - account?: Address; - implementation?: Address; - chainId?: bigint; - tokenContract?: Address; - tokenId?: bigint; -}; - -/** - * contract IPAccountRegistry readonly method - */ -export class IpAccountRegistryReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x16129393444e5BEb435501Dea41D5ECfB10b76F0", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ERC6551_PUBLIC_REGISTRY for contract IPAccountRegistry - * - * @param request IpAccountRegistryErc6551PublicRegistryRequest - * @return Promise - */ - public async erc6551PublicRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountRegistryAbi, - address: this.address, - functionName: "ERC6551_PUBLIC_REGISTRY", - }); - } - - /** - * method IP_ACCOUNT_IMPL for contract IPAccountRegistry - * - * @param request IpAccountRegistryIpAccountImplRequest - * @return Promise - */ - public async ipAccountImpl(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountRegistryAbi, - address: this.address, - functionName: "IP_ACCOUNT_IMPL", - }); - } - - /** - * method IP_ACCOUNT_SALT for contract IPAccountRegistry - * - * @param request IpAccountRegistryIpAccountSaltRequest - * @return Promise - */ - public async ipAccountSalt(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountRegistryAbi, - address: this.address, - functionName: "IP_ACCOUNT_SALT", - }); - } - - /** - * method getIPAccountImpl for contract IPAccountRegistry - * - * @param request IpAccountRegistryGetIpAccountImplRequest - * @return Promise - */ - public async getIpAccountImpl(): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountRegistryAbi, - address: this.address, - functionName: "getIPAccountImpl", - }); - } - - /** - * method ipAccount for contract IPAccountRegistry - * - * @param request IpAccountRegistryIpAccountRequest - * @return Promise - */ - public async ipAccount( - request: IpAccountRegistryIpAccountRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAccountRegistryAbi, - address: this.address, - functionName: "ipAccount", - args: [request.chainId, request.tokenContract, request.tokenId], - }); - } -} - -/** - * contract IPAccountRegistry write method - */ -export class IpAccountRegistryClient extends IpAccountRegistryReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x16129393444e5BEb435501Dea41D5ECfB10b76F0", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method registerIpAccount for contract IPAccountRegistry - * - * @param request IpAccountRegistryRegisterIpAccountRequest - * @return Promise - */ - public async registerIpAccount( - request: IpAccountRegistryRegisterIpAccountRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAccountRegistryAbi, - address: this.address, - functionName: "registerIpAccount", - account: this.wallet.account, - args: [request.chainId, request.tokenContract, request.tokenId], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract IPAccountRegistry event - */ -export class IpAccountRegistryEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x16129393444e5BEb435501Dea41D5ECfB10b76F0", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event IPAccountRegistered for contract IPAccountRegistry - */ - public watchIpAccountRegisteredEvent( - onLogs: (txHash: Hex, ev: IpAccountRegistryIpAccountRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAccountRegistryAbi, - address: this.address, - eventName: "IPAccountRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract IPAssetRegistry ============================================================= - -export type IpAssetRegistryErc6551PublicRegistryResponse = Address; - -export type IpAssetRegistryIpAccountImplResponse = Address; - -export type IpAssetRegistryIpAccountSaltResponse = Hex; - -export type IpAssetRegistryModuleRegistryResponse = Address; - -export type IpAssetRegistryRegistrationModuleResponse = Address; - -export type IpAssetRegistryGetGovernanceResponse = Address; - -export type IpAssetRegistryGetIpAccountImplResponse = Address; - -export type IpAssetRegistryGovernanceResponse = Address; - -/** - * IpAssetRegistryIpAccountRequest - * - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - */ -export type IpAssetRegistryIpAccountRequest = { - chainId: bigint; - tokenContract: Address; - tokenId: bigint; -}; - -export type IpAssetRegistryIpAccountResponse = Address; - -/** - * IpAssetRegistryIpIdRequest - * - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - */ -export type IpAssetRegistryIpIdRequest = { - chainId: bigint; - tokenContract: Address; - tokenId: bigint; -}; - -export type IpAssetRegistryIpIdResponse = Address; - -/** - * IpAssetRegistryIsApprovedForAllRequest - * - * @param owner address - * @param operator address - */ -export type IpAssetRegistryIsApprovedForAllRequest = { - owner: Address; - operator: Address; -}; - -export type IpAssetRegistryIsApprovedForAllResponse = boolean; - -/** - * IpAssetRegistryIsRegisteredRequest - * - * @param id address - */ -export type IpAssetRegistryIsRegisteredRequest = { - id: Address; -}; - -export type IpAssetRegistryIsRegisteredResponse = boolean; - -/** - * IpAssetRegistryMetadataRequest - * - * @param id address - */ -export type IpAssetRegistryMetadataRequest = { - id: Address; -}; - -export type IpAssetRegistryMetadataResponse = Hex; - -/** - * IpAssetRegistryMetadataProviderRequest - * - * @param id address - */ -export type IpAssetRegistryMetadataProviderRequest = { - id: Address; -}; - -export type IpAssetRegistryMetadataProviderResponse = Address; - -export type IpAssetRegistryMetadataProvider2Response = Address; - -/** - * IpAssetRegistryResolverRequest - * - * @param id address - */ -export type IpAssetRegistryResolverRequest = { - id: Address; -}; - -export type IpAssetRegistryResolverResponse = Address; - -export type IpAssetRegistryTotalSupplyResponse = bigint; - -/** - * IpAssetRegistryRegisterRequest - * - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - * @param resolverAddr address - * @param createAccount bool - * @param metadata_ bytes - */ -export type IpAssetRegistryRegisterRequest = { - chainId: bigint; - tokenContract: Address; - tokenId: bigint; - resolverAddr: Address; - createAccount: boolean; - metadata_: Hex; -}; - -/** - * IpAssetRegistryRegister2Request - * - * @param licenseIds uint256[] - * @param royaltyContext bytes - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - * @param resolverAddr address - * @param createAccount bool - * @param metadata_ bytes - */ -export type IpAssetRegistryRegister2Request = { - licenseIds: readonly bigint[]; - royaltyContext: Hex; - chainId: bigint; - tokenContract: Address; - tokenId: bigint; - resolverAddr: Address; - createAccount: boolean; - metadata_: Hex; -}; - -/** - * IpAssetRegistryRegisterIpAccountRequest - * - * @param chainId uint256 - * @param tokenContract address - * @param tokenId uint256 - */ -export type IpAssetRegistryRegisterIpAccountRequest = { - chainId: bigint; - tokenContract: Address; - tokenId: bigint; -}; - -/** - * IpAssetRegistrySetApprovalForAllRequest - * - * @param operator address - * @param approved bool - */ -export type IpAssetRegistrySetApprovalForAllRequest = { - operator: Address; - approved: boolean; -}; - -/** - * IpAssetRegistrySetGovernanceRequest - * - * @param newGovernance address - */ -export type IpAssetRegistrySetGovernanceRequest = { - newGovernance: Address; -}; - -/** - * IpAssetRegistrySetMetadataRequest - * - * @param id address - * @param provider address - * @param data bytes - */ -export type IpAssetRegistrySetMetadataRequest = { - id: Address; - provider: Address; - data: Hex; -}; - -/** - * IpAssetRegistrySetMetadataProviderRequest - * - * @param newMetadataProvider address - */ -export type IpAssetRegistrySetMetadataProviderRequest = { - newMetadataProvider: Address; -}; - -/** - * IpAssetRegistrySetRegistrationModuleRequest - * - * @param registrationModule address - */ -export type IpAssetRegistrySetRegistrationModuleRequest = { - registrationModule: Address; -}; - -/** - * IpAssetRegistrySetResolverRequest - * - * @param id address - * @param resolverAddr address - */ -export type IpAssetRegistrySetResolverRequest = { - id: Address; - resolverAddr: Address; -}; - -/** - * IpAssetRegistryApprovalForAllEvent - * - * @param owner address (optional) - * @param operator address (optional) - * @param approved bool (optional) - */ -export type IpAssetRegistryApprovalForAllEvent = { - owner?: Address; - operator?: Address; - approved?: boolean; -}; - -/** - * IpAssetRegistryGovernanceUpdatedEvent - * - * @param newGovernance address (optional) - */ -export type IpAssetRegistryGovernanceUpdatedEvent = { - newGovernance?: Address; -}; - -/** - * IpAssetRegistryIpAccountRegisteredEvent - * - * @param account address (optional) - * @param implementation address (optional) - * @param chainId uint256 (optional) - * @param tokenContract address (optional) - * @param tokenId uint256 (optional) - */ -export type IpAssetRegistryIpAccountRegisteredEvent = { - account?: Address; - implementation?: Address; - chainId?: bigint; - tokenContract?: Address; - tokenId?: bigint; -}; - -/** - * IpAssetRegistryIpRegisteredEvent - * - * @param ipId address (optional) - * @param chainId uint256 (optional) - * @param tokenContract address (optional) - * @param tokenId uint256 (optional) - * @param resolver address (optional) - * @param provider address (optional) - * @param metadata bytes (optional) - */ -export type IpAssetRegistryIpRegisteredEvent = { - ipId?: Address; - chainId?: bigint; - tokenContract?: Address; - tokenId?: bigint; - resolver?: Address; - provider?: Address; - metadata?: Hex; -}; - -/** - * IpAssetRegistryIpResolverSetEvent - * - * @param ipId address (optional) - * @param resolver address (optional) - */ -export type IpAssetRegistryIpResolverSetEvent = { - ipId?: Address; - resolver?: Address; -}; - -/** - * IpAssetRegistryMetadataSetEvent - * - * @param ipId address (optional) - * @param metadataProvider address (optional) - * @param metadata bytes (optional) - */ -export type IpAssetRegistryMetadataSetEvent = { - ipId?: Address; - metadataProvider?: Address; - metadata?: Hex; -}; - -/** - * contract IPAssetRegistry readonly method - */ -export class IpAssetRegistryReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xAAe9e83F8cE8832270AF033c609e233686f0E0eB", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ERC6551_PUBLIC_REGISTRY for contract IPAssetRegistry - * - * @param request IpAssetRegistryErc6551PublicRegistryRequest - * @return Promise - */ - public async erc6551PublicRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "ERC6551_PUBLIC_REGISTRY", - }); - } - - /** - * method IP_ACCOUNT_IMPL for contract IPAssetRegistry - * - * @param request IpAssetRegistryIpAccountImplRequest - * @return Promise - */ - public async ipAccountImpl(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "IP_ACCOUNT_IMPL", - }); - } - - /** - * method IP_ACCOUNT_SALT for contract IPAssetRegistry - * - * @param request IpAssetRegistryIpAccountSaltRequest - * @return Promise - */ - public async ipAccountSalt(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "IP_ACCOUNT_SALT", - }); - } - - /** - * method MODULE_REGISTRY for contract IPAssetRegistry - * - * @param request IpAssetRegistryModuleRegistryRequest - * @return Promise - */ - public async moduleRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "MODULE_REGISTRY", - }); - } - - /** - * method REGISTRATION_MODULE for contract IPAssetRegistry - * - * @param request IpAssetRegistryRegistrationModuleRequest - * @return Promise - */ - public async registrationModule(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "REGISTRATION_MODULE", - }); - } - - /** - * method getGovernance for contract IPAssetRegistry - * - * @param request IpAssetRegistryGetGovernanceRequest - * @return Promise - */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "getGovernance", - }); - } - - /** - * method getIPAccountImpl for contract IPAssetRegistry - * - * @param request IpAssetRegistryGetIpAccountImplRequest - * @return Promise - */ - public async getIpAccountImpl(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "getIPAccountImpl", - }); - } - - /** - * method governance for contract IPAssetRegistry - * - * @param request IpAssetRegistryGovernanceRequest - * @return Promise - */ - public async governance(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "governance", - }); - } - - /** - * method ipAccount for contract IPAssetRegistry - * - * @param request IpAssetRegistryIpAccountRequest - * @return Promise - */ - public async ipAccount( - request: IpAssetRegistryIpAccountRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "ipAccount", - args: [request.chainId, request.tokenContract, request.tokenId], - }); - } - - /** - * method ipId for contract IPAssetRegistry - * - * @param request IpAssetRegistryIpIdRequest - * @return Promise - */ - public async ipId(request: IpAssetRegistryIpIdRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "ipId", - args: [request.chainId, request.tokenContract, request.tokenId], - }); - } - - /** - * method isApprovedForAll for contract IPAssetRegistry - * - * @param request IpAssetRegistryIsApprovedForAllRequest - * @return Promise - */ - public async isApprovedForAll( - request: IpAssetRegistryIsApprovedForAllRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "isApprovedForAll", - args: [request.owner, request.operator], - }); - } - - /** - * method isRegistered for contract IPAssetRegistry - * - * @param request IpAssetRegistryIsRegisteredRequest - * @return Promise - */ - public async isRegistered( - request: IpAssetRegistryIsRegisteredRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "isRegistered", - args: [request.id], - }); - } - - /** - * method metadata for contract IPAssetRegistry - * - * @param request IpAssetRegistryMetadataRequest - * @return Promise - */ - public async metadata( - request: IpAssetRegistryMetadataRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "metadata", - args: [request.id], - }); - } - - /** - * method metadataProvider for contract IPAssetRegistry - * - * @param request IpAssetRegistryMetadataProviderRequest - * @return Promise - */ - public async metadataProvider( - request: IpAssetRegistryMetadataProviderRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "metadataProvider", - args: [request.id], - }); - } - - /** - * method metadataProvider for contract IPAssetRegistry - * - * @param request IpAssetRegistryMetadataProvider2Request - * @return Promise - */ - public async metadataProvider2(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "metadataProvider", - }); - } - - /** - * method resolver for contract IPAssetRegistry - * - * @param request IpAssetRegistryResolverRequest - * @return Promise - */ - public async resolver( - request: IpAssetRegistryResolverRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "resolver", - args: [request.id], - }); - } - - /** - * method totalSupply for contract IPAssetRegistry - * - * @param request IpAssetRegistryTotalSupplyRequest - * @return Promise - */ - public async totalSupply(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "totalSupply", - }); - } -} - -/** - * contract IPAssetRegistry write method - */ -export class IpAssetRegistryClient extends IpAssetRegistryReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xAAe9e83F8cE8832270AF033c609e233686f0E0eB", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method register for contract IPAssetRegistry - * - * @param request IpAssetRegistryRegisterRequest - * @return Promise - */ - public async register(request: IpAssetRegistryRegisterRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "register", - account: this.wallet.account, - args: [ - request.chainId, - request.tokenContract, - request.tokenId, - request.resolverAddr, - request.createAccount, - request.metadata_, - ], - }); - return await this.wallet.writeContract(call); - } - - /** - * method register for contract IPAssetRegistry - * - * @param request IpAssetRegistryRegister2Request - * @return Promise - */ - public async register2( - request: IpAssetRegistryRegister2Request, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "register", - account: this.wallet.account, - args: [ - request.licenseIds, - request.royaltyContext, - request.chainId, - request.tokenContract, - request.tokenId, - request.resolverAddr, - request.createAccount, - request.metadata_, - ], - }); - return await this.wallet.writeContract(call); - } - - /** - * method registerIpAccount for contract IPAssetRegistry - * - * @param request IpAssetRegistryRegisterIpAccountRequest - * @return Promise - */ - public async registerIpAccount( - request: IpAssetRegistryRegisterIpAccountRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "registerIpAccount", - account: this.wallet.account, - args: [request.chainId, request.tokenContract, request.tokenId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setApprovalForAll for contract IPAssetRegistry - * - * @param request IpAssetRegistrySetApprovalForAllRequest - * @return Promise - */ - public async setApprovalForAll( - request: IpAssetRegistrySetApprovalForAllRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "setApprovalForAll", - account: this.wallet.account, - args: [request.operator, request.approved], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setGovernance for contract IPAssetRegistry - * - * @param request IpAssetRegistrySetGovernanceRequest - * @return Promise - */ - public async setGovernance( - request: IpAssetRegistrySetGovernanceRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "setGovernance", - account: this.wallet.account, - args: [request.newGovernance], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setMetadata for contract IPAssetRegistry - * - * @param request IpAssetRegistrySetMetadataRequest - * @return Promise - */ - public async setMetadata( - request: IpAssetRegistrySetMetadataRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "setMetadata", - account: this.wallet.account, - args: [request.id, request.provider, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setMetadataProvider for contract IPAssetRegistry - * - * @param request IpAssetRegistrySetMetadataProviderRequest - * @return Promise - */ - public async setMetadataProvider( - request: IpAssetRegistrySetMetadataProviderRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "setMetadataProvider", - account: this.wallet.account, - args: [request.newMetadataProvider], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setRegistrationModule for contract IPAssetRegistry - * - * @param request IpAssetRegistrySetRegistrationModuleRequest - * @return Promise - */ - public async setRegistrationModule( - request: IpAssetRegistrySetRegistrationModuleRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "setRegistrationModule", - account: this.wallet.account, - args: [request.registrationModule], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setResolver for contract IPAssetRegistry - * - * @param request IpAssetRegistrySetResolverRequest - * @return Promise - */ - public async setResolver( - request: IpAssetRegistrySetResolverRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipAssetRegistryAbi, - address: this.address, - functionName: "setResolver", - account: this.wallet.account, - args: [request.id, request.resolverAddr], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract IPAssetRegistry event - */ -export class IpAssetRegistryEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xAAe9e83F8cE8832270AF033c609e233686f0E0eB", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event ApprovalForAll for contract IPAssetRegistry - */ - public watchApprovalForAllEvent( - onLogs: (txHash: Hex, ev: IpAssetRegistryApprovalForAllEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAssetRegistryAbi, - address: this.address, - eventName: "ApprovalForAll", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event GovernanceUpdated for contract IPAssetRegistry - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: IpAssetRegistryGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAssetRegistryAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event IPAccountRegistered for contract IPAssetRegistry - */ - public watchIpAccountRegisteredEvent( - onLogs: (txHash: Hex, ev: IpAssetRegistryIpAccountRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAssetRegistryAbi, - address: this.address, - eventName: "IPAccountRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event IPRegistered for contract IPAssetRegistry - */ - public watchIpRegisteredEvent( - onLogs: (txHash: Hex, ev: IpAssetRegistryIpRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAssetRegistryAbi, - address: this.address, - eventName: "IPRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event IPResolverSet for contract IPAssetRegistry - */ - public watchIpResolverSetEvent( - onLogs: (txHash: Hex, ev: IpAssetRegistryIpResolverSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAssetRegistryAbi, - address: this.address, - eventName: "IPResolverSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event MetadataSet for contract IPAssetRegistry - */ - public watchMetadataSetEvent( - onLogs: (txHash: Hex, ev: IpAssetRegistryMetadataSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipAssetRegistryAbi, - address: this.address, - eventName: "MetadataSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract IPAssetRenderer ============================================================= - -export type IpAssetRendererIpAssetRegistryResponse = Address; - -export type IpAssetRendererLicenseRegistryResponse = Address; - -export type IpAssetRendererRoyaltyModuleResponse = Address; - -/** - * IpAssetRendererDescriptionRequest - * - * @param ipId address - */ -export type IpAssetRendererDescriptionRequest = { - ipId: Address; -}; - -export type IpAssetRendererDescriptionResponse = string; - -/** - * IpAssetRendererHashRequest - * - * @param ipId address - */ -export type IpAssetRendererHashRequest = { - ipId: Address; -}; - -export type IpAssetRendererHashResponse = Hex; - -/** - * IpAssetRendererNameRequest - * - * @param ipId address - */ -export type IpAssetRendererNameRequest = { - ipId: Address; -}; - -export type IpAssetRendererNameResponse = string; - -/** - * IpAssetRendererOwnerRequest - * - * @param ipId address - */ -export type IpAssetRendererOwnerRequest = { - ipId: Address; -}; - -export type IpAssetRendererOwnerResponse = Address; - -/** - * IpAssetRendererRegistrantRequest - * - * @param ipId address - */ -export type IpAssetRendererRegistrantRequest = { - ipId: Address; -}; - -export type IpAssetRendererRegistrantResponse = Address; - -/** - * IpAssetRendererRegistrationDateRequest - * - * @param ipId address - */ -export type IpAssetRendererRegistrationDateRequest = { - ipId: Address; -}; - -export type IpAssetRendererRegistrationDateResponse = bigint; - -/** - * IpAssetRendererTokenUriRequest - * - * @param ipId address - */ -export type IpAssetRendererTokenUriRequest = { - ipId: Address; -}; - -export type IpAssetRendererTokenUriResponse = string; - -/** - * IpAssetRendererUriRequest - * - * @param ipId address - */ -export type IpAssetRendererUriRequest = { - ipId: Address; -}; - -export type IpAssetRendererUriResponse = string; - -/** - * contract IPAssetRenderer readonly method - */ -export class IpAssetRendererReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x39cCE13916e7bfdeFa462D360d551aEcc6D82311", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method IP_ASSET_REGISTRY for contract IPAssetRenderer - * - * @param request IpAssetRendererIpAssetRegistryRequest - * @return Promise - */ - public async ipAssetRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "IP_ASSET_REGISTRY", - }); - } - - /** - * method LICENSE_REGISTRY for contract IPAssetRenderer - * - * @param request IpAssetRendererLicenseRegistryRequest - * @return Promise - */ - public async licenseRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "LICENSE_REGISTRY", - }); - } - - /** - * method ROYALTY_MODULE for contract IPAssetRenderer - * - * @param request IpAssetRendererRoyaltyModuleRequest - * @return Promise - */ - public async royaltyModule(): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "ROYALTY_MODULE", - }); - } - - /** - * method description for contract IPAssetRenderer - * - * @param request IpAssetRendererDescriptionRequest - * @return Promise - */ - public async description( - request: IpAssetRendererDescriptionRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "description", - args: [request.ipId], - }); - } - - /** - * method hash for contract IPAssetRenderer - * - * @param request IpAssetRendererHashRequest - * @return Promise - */ - public async hash(request: IpAssetRendererHashRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "hash", - args: [request.ipId], - }); - } - - /** - * method name for contract IPAssetRenderer - * - * @param request IpAssetRendererNameRequest - * @return Promise - */ - public async name(request: IpAssetRendererNameRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "name", - args: [request.ipId], - }); - } - - /** - * method owner for contract IPAssetRenderer - * - * @param request IpAssetRendererOwnerRequest - * @return Promise - */ - public async owner(request: IpAssetRendererOwnerRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "owner", - args: [request.ipId], - }); - } - - /** - * method registrant for contract IPAssetRenderer - * - * @param request IpAssetRendererRegistrantRequest - * @return Promise - */ - public async registrant( - request: IpAssetRendererRegistrantRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "registrant", - args: [request.ipId], - }); - } - - /** - * method registrationDate for contract IPAssetRenderer - * - * @param request IpAssetRendererRegistrationDateRequest - * @return Promise - */ - public async registrationDate( - request: IpAssetRendererRegistrationDateRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "registrationDate", - args: [request.ipId], - }); - } - - /** - * method tokenURI for contract IPAssetRenderer - * - * @param request IpAssetRendererTokenUriRequest - * @return Promise - */ - public async tokenUri( - request: IpAssetRendererTokenUriRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "tokenURI", - args: [request.ipId], - }); - } - - /** - * method uri for contract IPAssetRenderer - * - * @param request IpAssetRendererUriRequest - * @return Promise - */ - public async uri(request: IpAssetRendererUriRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipAssetRendererAbi, - address: this.address, - functionName: "uri", - args: [request.ipId], - }); - } -} - -// Contract IPMetadataProvider ============================================================= - -export type IpMetadataProviderIpAssetRegistryResponse = Address; - -/** - * IpMetadataProviderGetMetadataRequest - * - * @param ipId address - */ -export type IpMetadataProviderGetMetadataRequest = { - ipId: Address; -}; - -export type IpMetadataProviderGetMetadataResponse = Hex; - -/** - * IpMetadataProviderHashRequest - * - * @param ipId address - */ -export type IpMetadataProviderHashRequest = { - ipId: Address; -}; - -export type IpMetadataProviderHashResponse = Hex; - -/** - * IpMetadataProviderMetadataRequest - * - * @param ipId address - */ -export type IpMetadataProviderMetadataRequest = { - ipId: Address; -}; - -export type IpMetadataProviderMetadataResponse = { - name: string; - hash: Hex; - registrationDate: bigint; - registrant: Address; - uri: string; -}; - -/** - * IpMetadataProviderNameRequest - * - * @param ipId address - */ -export type IpMetadataProviderNameRequest = { - ipId: Address; -}; - -export type IpMetadataProviderNameResponse = string; - -/** - * IpMetadataProviderRegistrantRequest - * - * @param ipId address - */ -export type IpMetadataProviderRegistrantRequest = { - ipId: Address; -}; - -export type IpMetadataProviderRegistrantResponse = Address; - -/** - * IpMetadataProviderRegistrationDateRequest - * - * @param ipId address - */ -export type IpMetadataProviderRegistrationDateRequest = { - ipId: Address; -}; - -export type IpMetadataProviderRegistrationDateResponse = bigint; - -export type IpMetadataProviderUpgradeProviderResponse = Address; - -/** - * IpMetadataProviderUriRequest - * - * @param ipId address - */ -export type IpMetadataProviderUriRequest = { - ipId: Address; -}; - -export type IpMetadataProviderUriResponse = string; - -/** - * IpMetadataProviderSetMetadataRequest - * - * @param ipId address - * @param metadata bytes - */ -export type IpMetadataProviderSetMetadataRequest = { - ipId: Address; - metadata: Hex; -}; - -/** - * IpMetadataProviderSetUpgradeProviderRequest - * - * @param provider address - */ -export type IpMetadataProviderSetUpgradeProviderRequest = { - provider: Address; -}; - -/** - * IpMetadataProviderUpgradeRequest - * - * @param ipId address - * @param metadata bytes - */ -export type IpMetadataProviderUpgradeRequest = { - ipId: Address; - metadata: Hex; -}; - -/** - * IpMetadataProviderMetadataSetEvent - * - * @param ipId address (optional) - * @param metadata bytes (optional) - */ -export type IpMetadataProviderMetadataSetEvent = { - ipId?: Address; - metadata?: Hex; -}; - -/** - * contract IPMetadataProvider readonly method - */ -export class IpMetadataProviderReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x0A97aD19FEF318F0ACA888574b64A35402C8aDDB", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method IP_ASSET_REGISTRY for contract IPMetadataProvider - * - * @param request IpMetadataProviderIpAssetRegistryRequest - * @return Promise - */ - public async ipAssetRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "IP_ASSET_REGISTRY", - }); - } - - /** - * method getMetadata for contract IPMetadataProvider - * - * @param request IpMetadataProviderGetMetadataRequest - * @return Promise - */ - public async getMetadata( - request: IpMetadataProviderGetMetadataRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "getMetadata", - args: [request.ipId], - }); - } - - /** - * method hash for contract IPMetadataProvider - * - * @param request IpMetadataProviderHashRequest - * @return Promise - */ - public async hash( - request: IpMetadataProviderHashRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "hash", - args: [request.ipId], - }); - } - - /** - * method metadata for contract IPMetadataProvider - * - * @param request IpMetadataProviderMetadataRequest - * @return Promise - */ - public async metadata( - request: IpMetadataProviderMetadataRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "metadata", - args: [request.ipId], - }); - } - - /** - * method name for contract IPMetadataProvider - * - * @param request IpMetadataProviderNameRequest - * @return Promise - */ - public async name( - request: IpMetadataProviderNameRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "name", - args: [request.ipId], - }); - } - - /** - * method registrant for contract IPMetadataProvider - * - * @param request IpMetadataProviderRegistrantRequest - * @return Promise - */ - public async registrant( - request: IpMetadataProviderRegistrantRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "registrant", - args: [request.ipId], - }); - } - - /** - * method registrationDate for contract IPMetadataProvider - * - * @param request IpMetadataProviderRegistrationDateRequest - * @return Promise - */ - public async registrationDate( - request: IpMetadataProviderRegistrationDateRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "registrationDate", - args: [request.ipId], - }); - } - - /** - * method upgradeProvider for contract IPMetadataProvider - * - * @param request IpMetadataProviderUpgradeProviderRequest - * @return Promise - */ - public async upgradeProvider(): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "upgradeProvider", - }); - } - - /** - * method uri for contract IPMetadataProvider - * - * @param request IpMetadataProviderUriRequest - * @return Promise - */ - public async uri(request: IpMetadataProviderUriRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "uri", - args: [request.ipId], - }); - } -} - -/** - * contract IPMetadataProvider write method - */ -export class IpMetadataProviderClient extends IpMetadataProviderReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x0A97aD19FEF318F0ACA888574b64A35402C8aDDB", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method setMetadata for contract IPMetadataProvider - * - * @param request IpMetadataProviderSetMetadataRequest - * @return Promise - */ - public async setMetadata( - request: IpMetadataProviderSetMetadataRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "setMetadata", - account: this.wallet.account, - args: [request.ipId, request.metadata], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setUpgradeProvider for contract IPMetadataProvider - * - * @param request IpMetadataProviderSetUpgradeProviderRequest - * @return Promise - */ - public async setUpgradeProvider( - request: IpMetadataProviderSetUpgradeProviderRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "setUpgradeProvider", - account: this.wallet.account, - args: [request.provider], - }); - return await this.wallet.writeContract(call); - } - - /** - * method upgrade for contract IPMetadataProvider - * - * @param request IpMetadataProviderUpgradeRequest - * @return Promise - */ - public async upgrade( - request: IpMetadataProviderUpgradeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipMetadataProviderAbi, - address: this.address, - functionName: "upgrade", - account: this.wallet.account, - args: [request.ipId, request.metadata], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract IPMetadataProvider event - */ -export class IpMetadataProviderEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x0A97aD19FEF318F0ACA888574b64A35402C8aDDB", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event MetadataSet for contract IPMetadataProvider - */ - public watchMetadataSetEvent( - onLogs: (txHash: Hex, ev: IpMetadataProviderMetadataSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipMetadataProviderAbi, - address: this.address, - eventName: "MetadataSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract IPResolver ============================================================= - -export type IpResolverAccessControllerResponse = Address; - -export type IpResolverIpAccountRegistryResponse = Address; - -export type IpResolverNameResponse = string; - -/** - * IpResolverSupportsInterfaceRequest - * - * @param id bytes4 - */ -export type IpResolverSupportsInterfaceRequest = { - id: Hex; -}; - -export type IpResolverSupportsInterfaceResponse = boolean; - -/** - * IpResolverValueRequest - * - * @param ipId address - * @param key string - */ -export type IpResolverValueRequest = { - ipId: Address; - key: string; -}; - -export type IpResolverValueResponse = string; - -/** - * IpResolverSetValueRequest - * - * @param ipId address - * @param key string - * @param val string - */ -export type IpResolverSetValueRequest = { - ipId: Address; - key: string; - val: string; -}; - -/** - * IpResolverKeyValueSetEvent - * - * @param ipId address (optional) - * @param key string (optional) - * @param value string (optional) - */ -export type IpResolverKeyValueSetEvent = { - ipId?: Address; - key?: string; - value?: string; -}; - -/** - * contract IPResolver readonly method - */ -export class IpResolverReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xeAEd88BEbF00acac8EFE9ED426cDDD2Dc9f8CB78", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ACCESS_CONTROLLER for contract IPResolver - * - * @param request IpResolverAccessControllerRequest - * @return Promise - */ - public async accessController(): Promise { - return await this.rpcClient.readContract({ - abi: ipResolverAbi, - address: this.address, - functionName: "ACCESS_CONTROLLER", - }); - } - - /** - * method IP_ACCOUNT_REGISTRY for contract IPResolver - * - * @param request IpResolverIpAccountRegistryRequest - * @return Promise - */ - public async ipAccountRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: ipResolverAbi, - address: this.address, - functionName: "IP_ACCOUNT_REGISTRY", - }); - } - - /** - * method name for contract IPResolver - * - * @param request IpResolverNameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: ipResolverAbi, - address: this.address, - functionName: "name", - }); - } - - /** - * method supportsInterface for contract IPResolver - * - * @param request IpResolverSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: IpResolverSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: ipResolverAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.id], - }); - } - - /** - * method value for contract IPResolver - * - * @param request IpResolverValueRequest - * @return Promise - */ - public async value(request: IpResolverValueRequest): Promise { - return await this.rpcClient.readContract({ - abi: ipResolverAbi, - address: this.address, - functionName: "value", - args: [request.ipId, request.key], - }); - } -} - -/** - * contract IPResolver write method - */ -export class IpResolverClient extends IpResolverReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xeAEd88BEbF00acac8EFE9ED426cDDD2Dc9f8CB78", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method setValue for contract IPResolver - * - * @param request IpResolverSetValueRequest - * @return Promise - */ - public async setValue(request: IpResolverSetValueRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: ipResolverAbi, - address: this.address, - functionName: "setValue", - account: this.wallet.account, - args: [request.ipId, request.key, request.val], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract IPResolver event - */ -export class IpResolverEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xeAEd88BEbF00acac8EFE9ED426cDDD2Dc9f8CB78", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event KeyValueSet for contract IPResolver - */ - public watchKeyValueSetEvent( - onLogs: (txHash: Hex, ev: IpResolverKeyValueSetEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: ipResolverAbi, - address: this.address, - eventName: "KeyValueSet", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract LicenseRegistry ============================================================= - -export type LicenseRegistryDisputeModuleResponse = Address; - -export type LicenseRegistryLicensingModuleResponse = Address; - -/** - * LicenseRegistryBalanceOfRequest - * - * @param account address - * @param id uint256 - */ -export type LicenseRegistryBalanceOfRequest = { - account: Address; - id: bigint; -}; - -export type LicenseRegistryBalanceOfResponse = bigint; - -/** - * LicenseRegistryBalanceOfBatchRequest - * - * @param accounts address[] - * @param ids uint256[] - */ -export type LicenseRegistryBalanceOfBatchRequest = { - accounts: readonly Address[]; - ids: readonly bigint[]; -}; - -export type LicenseRegistryBalanceOfBatchResponse = readonly bigint[]; - -export type LicenseRegistryGetGovernanceResponse = Address; - -export type LicenseRegistryGovernanceResponse = Address; - -export type LicenseRegistryImageUrlResponse = string; - -/** - * LicenseRegistryIsApprovedForAllRequest - * - * @param account address - * @param operator address - */ -export type LicenseRegistryIsApprovedForAllRequest = { - account: Address; - operator: Address; -}; - -export type LicenseRegistryIsApprovedForAllResponse = boolean; - -/** - * LicenseRegistryIsLicenseRevokedRequest - * - * @param licenseId uint256 - */ -export type LicenseRegistryIsLicenseRevokedRequest = { - licenseId: bigint; -}; - -export type LicenseRegistryIsLicenseRevokedResponse = boolean; - -/** - * LicenseRegistryIsLicenseeRequest - * - * @param licenseId uint256 - * @param holder address - */ -export type LicenseRegistryIsLicenseeRequest = { - licenseId: bigint; - holder: Address; -}; - -export type LicenseRegistryIsLicenseeResponse = boolean; - -/** - * LicenseRegistryLicenseRequest - * - * @param licenseId uint256 - */ -export type LicenseRegistryLicenseRequest = { - licenseId: bigint; -}; - -export type LicenseRegistryLicenseResponse = { - policyId: bigint; - licensorIpId: Address; - transferable: boolean; -}; - -/** - * LicenseRegistryLicensorIpIdRequest - * - * @param licenseId uint256 - */ -export type LicenseRegistryLicensorIpIdRequest = { - licenseId: bigint; -}; - -export type LicenseRegistryLicensorIpIdResponse = Address; - -export type LicenseRegistryMintedLicensesResponse = bigint; - -export type LicenseRegistryNameResponse = string; - -/** - * LicenseRegistryPolicyIdForLicenseRequest - * - * @param licenseId uint256 - */ -export type LicenseRegistryPolicyIdForLicenseRequest = { - licenseId: bigint; -}; - -export type LicenseRegistryPolicyIdForLicenseResponse = bigint; - -/** - * LicenseRegistrySupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type LicenseRegistrySupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type LicenseRegistrySupportsInterfaceResponse = boolean; - -export type LicenseRegistrySymbolResponse = string; - -/** - * LicenseRegistryUriRequest - * - * @param id uint256 - */ -export type LicenseRegistryUriRequest = { - id: bigint; -}; - -export type LicenseRegistryUriResponse = string; - -/** - * LicenseRegistryBurnLicensesRequest - * - * @param holder address - * @param licenseIds uint256[] - */ -export type LicenseRegistryBurnLicensesRequest = { - holder: Address; - licenseIds: readonly bigint[]; -}; - -/** - * LicenseRegistryMintLicenseRequest - * - * @param policyId uint256 - * @param licensorIpId_ address - * @param transferable bool - * @param amount uint256 - * @param receiver address - */ -export type LicenseRegistryMintLicenseRequest = { - policyId: bigint; - licensorIpId_: Address; - transferable: boolean; - amount: bigint; - receiver: Address; -}; - -/** - * LicenseRegistrySafeBatchTransferFromRequest - * - * @param from address - * @param to address - * @param ids uint256[] - * @param values uint256[] - * @param data bytes - */ -export type LicenseRegistrySafeBatchTransferFromRequest = { - from: Address; - to: Address; - ids: readonly bigint[]; - values: readonly bigint[]; - data: Hex; -}; - -/** - * LicenseRegistrySafeTransferFromRequest - * - * @param from address - * @param to address - * @param id uint256 - * @param value uint256 - * @param data bytes - */ -export type LicenseRegistrySafeTransferFromRequest = { - from: Address; - to: Address; - id: bigint; - value: bigint; - data: Hex; -}; - -/** - * LicenseRegistrySetApprovalForAllRequest - * - * @param operator address - * @param approved bool - */ -export type LicenseRegistrySetApprovalForAllRequest = { - operator: Address; - approved: boolean; -}; - -/** - * LicenseRegistrySetDisputeModuleRequest - * - * @param newDisputeModule address - */ -export type LicenseRegistrySetDisputeModuleRequest = { - newDisputeModule: Address; -}; - -/** - * LicenseRegistrySetGovernanceRequest - * - * @param newGovernance address - */ -export type LicenseRegistrySetGovernanceRequest = { - newGovernance: Address; -}; - -/** - * LicenseRegistrySetLicensingImageUrlRequest - * - * @param url string - */ -export type LicenseRegistrySetLicensingImageUrlRequest = { - url: string; -}; - -/** - * LicenseRegistrySetLicensingModuleRequest - * - * @param newLicensingModule address - */ -export type LicenseRegistrySetLicensingModuleRequest = { - newLicensingModule: Address; -}; - -/** - * LicenseRegistryApprovalForAllEvent - * - * @param account address (optional) - * @param operator address (optional) - * @param approved bool (optional) - */ -export type LicenseRegistryApprovalForAllEvent = { - account?: Address; - operator?: Address; - approved?: boolean; -}; - -/** - * LicenseRegistryBatchMetadataUpdateEvent - * - * @param _fromTokenId uint256 (optional) - * @param _toTokenId uint256 (optional) - */ -export type LicenseRegistryBatchMetadataUpdateEvent = { - _fromTokenId?: bigint; - _toTokenId?: bigint; -}; - -/** - * LicenseRegistryGovernanceUpdatedEvent - * - * @param newGovernance address (optional) - */ -export type LicenseRegistryGovernanceUpdatedEvent = { - newGovernance?: Address; -}; - -/** - * LicenseRegistryLicenseMintedEvent - * - * @param creator address (optional) - * @param receiver address (optional) - * @param licenseId uint256 (optional) - * @param amount uint256 (optional) - * @param licenseData tuple (optional) - */ -export type LicenseRegistryLicenseMintedEvent = { - creator?: Address; - receiver?: Address; - licenseId?: bigint; - amount?: bigint; - licenseData?: { - policyId: bigint; - licensorIpId: Address; - transferable: boolean; - }; -}; - -/** - * LicenseRegistryTransferBatchEvent - * - * @param operator address (optional) - * @param from address (optional) - * @param to address (optional) - * @param ids uint256[] (optional) - * @param values uint256[] (optional) - */ -export type LicenseRegistryTransferBatchEvent = { - operator?: Address; - from?: Address; - to?: Address; - ids?: readonly bigint[]; - values?: readonly bigint[]; -}; - -/** - * LicenseRegistryTransferSingleEvent - * - * @param operator address (optional) - * @param from address (optional) - * @param to address (optional) - * @param id uint256 (optional) - * @param value uint256 (optional) - */ -export type LicenseRegistryTransferSingleEvent = { - operator?: Address; - from?: Address; - to?: Address; - id?: bigint; - value?: bigint; -}; - -/** - * LicenseRegistryUriEvent - * - * @param value string (optional) - * @param id uint256 (optional) - */ -export type LicenseRegistryUriEvent = { - value?: string; - id?: bigint; -}; - -/** - * contract LicenseRegistry readonly method - */ -export class LicenseRegistryReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x410d2332270cEb9Ca78b7E2c3720046b3ef2D8Ba", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method DISPUTE_MODULE for contract LicenseRegistry - * - * @param request LicenseRegistryDisputeModuleRequest - * @return Promise - */ - public async disputeModule(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "DISPUTE_MODULE", - }); - } - - /** - * method LICENSING_MODULE for contract LicenseRegistry - * - * @param request LicenseRegistryLicensingModuleRequest - * @return Promise - */ - public async licensingModule(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "LICENSING_MODULE", - }); - } - - /** - * method balanceOf for contract LicenseRegistry - * - * @param request LicenseRegistryBalanceOfRequest - * @return Promise - */ - public async balanceOf( - request: LicenseRegistryBalanceOfRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "balanceOf", - args: [request.account, request.id], - }); - } - - /** - * method balanceOfBatch for contract LicenseRegistry - * - * @param request LicenseRegistryBalanceOfBatchRequest - * @return Promise - */ - public async balanceOfBatch( - request: LicenseRegistryBalanceOfBatchRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "balanceOfBatch", - args: [request.accounts, request.ids], - }); - } - - /** - * method getGovernance for contract LicenseRegistry - * - * @param request LicenseRegistryGetGovernanceRequest - * @return Promise - */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "getGovernance", - }); - } - - /** - * method governance for contract LicenseRegistry - * - * @param request LicenseRegistryGovernanceRequest - * @return Promise - */ - public async governance(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "governance", - }); - } - - /** - * method imageUrl for contract LicenseRegistry - * - * @param request LicenseRegistryImageUrlRequest - * @return Promise - */ - public async imageUrl(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "imageUrl", - }); - } - - /** - * method isApprovedForAll for contract LicenseRegistry - * - * @param request LicenseRegistryIsApprovedForAllRequest - * @return Promise - */ - public async isApprovedForAll( - request: LicenseRegistryIsApprovedForAllRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "isApprovedForAll", - args: [request.account, request.operator], - }); - } - - /** - * method isLicenseRevoked for contract LicenseRegistry - * - * @param request LicenseRegistryIsLicenseRevokedRequest - * @return Promise - */ - public async isLicenseRevoked( - request: LicenseRegistryIsLicenseRevokedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "isLicenseRevoked", - args: [request.licenseId], - }); - } - - /** - * method isLicensee for contract LicenseRegistry - * - * @param request LicenseRegistryIsLicenseeRequest - * @return Promise - */ - public async isLicensee( - request: LicenseRegistryIsLicenseeRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "isLicensee", - args: [request.licenseId, request.holder], - }); - } - - /** - * method license for contract LicenseRegistry - * - * @param request LicenseRegistryLicenseRequest - * @return Promise - */ - public async license( - request: LicenseRegistryLicenseRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "license", - args: [request.licenseId], - }); - } - - /** - * method licensorIpId for contract LicenseRegistry - * - * @param request LicenseRegistryLicensorIpIdRequest - * @return Promise - */ - public async licensorIpId( - request: LicenseRegistryLicensorIpIdRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "licensorIpId", - args: [request.licenseId], - }); - } - - /** - * method mintedLicenses for contract LicenseRegistry - * - * @param request LicenseRegistryMintedLicensesRequest - * @return Promise - */ - public async mintedLicenses(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "mintedLicenses", - }); - } - - /** - * method name for contract LicenseRegistry - * - * @param request LicenseRegistryNameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "name", - }); - } - - /** - * method policyIdForLicense for contract LicenseRegistry - * - * @param request LicenseRegistryPolicyIdForLicenseRequest - * @return Promise - */ - public async policyIdForLicense( - request: LicenseRegistryPolicyIdForLicenseRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "policyIdForLicense", - args: [request.licenseId], - }); - } - - /** - * method supportsInterface for contract LicenseRegistry - * - * @param request LicenseRegistrySupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: LicenseRegistrySupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); - } - - /** - * method symbol for contract LicenseRegistry - * - * @param request LicenseRegistrySymbolRequest - * @return Promise - */ - public async symbol(): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "symbol", - }); - } - - /** - * method uri for contract LicenseRegistry - * - * @param request LicenseRegistryUriRequest - * @return Promise - */ - public async uri(request: LicenseRegistryUriRequest): Promise { - return await this.rpcClient.readContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "uri", - args: [request.id], - }); - } -} - -/** - * contract LicenseRegistry write method - */ -export class LicenseRegistryClient extends LicenseRegistryReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x410d2332270cEb9Ca78b7E2c3720046b3ef2D8Ba", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method burnLicenses for contract LicenseRegistry - * - * @param request LicenseRegistryBurnLicensesRequest - * @return Promise - */ - public async burnLicenses( - request: LicenseRegistryBurnLicensesRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "burnLicenses", - account: this.wallet.account, - args: [request.holder, request.licenseIds], - }); - return await this.wallet.writeContract(call); - } - - /** - * method mintLicense for contract LicenseRegistry - * - * @param request LicenseRegistryMintLicenseRequest - * @return Promise - */ - public async mintLicense( - request: LicenseRegistryMintLicenseRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "mintLicense", - account: this.wallet.account, - args: [ - request.policyId, - request.licensorIpId_, - request.transferable, - request.amount, - request.receiver, - ], - }); - return await this.wallet.writeContract(call); - } - - /** - * method safeBatchTransferFrom for contract LicenseRegistry - * - * @param request LicenseRegistrySafeBatchTransferFromRequest - * @return Promise - */ - public async safeBatchTransferFrom( - request: LicenseRegistrySafeBatchTransferFromRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "safeBatchTransferFrom", - account: this.wallet.account, - args: [request.from, request.to, request.ids, request.values, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method safeTransferFrom for contract LicenseRegistry - * - * @param request LicenseRegistrySafeTransferFromRequest - * @return Promise - */ - public async safeTransferFrom( - request: LicenseRegistrySafeTransferFromRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "safeTransferFrom", - account: this.wallet.account, - args: [request.from, request.to, request.id, request.value, request.data], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setApprovalForAll for contract LicenseRegistry - * - * @param request LicenseRegistrySetApprovalForAllRequest - * @return Promise - */ - public async setApprovalForAll( - request: LicenseRegistrySetApprovalForAllRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "setApprovalForAll", - account: this.wallet.account, - args: [request.operator, request.approved], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setDisputeModule for contract LicenseRegistry - * - * @param request LicenseRegistrySetDisputeModuleRequest - * @return Promise - */ - public async setDisputeModule( - request: LicenseRegistrySetDisputeModuleRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "setDisputeModule", - account: this.wallet.account, - args: [request.newDisputeModule], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setGovernance for contract LicenseRegistry - * - * @param request LicenseRegistrySetGovernanceRequest - * @return Promise - */ - public async setGovernance( - request: LicenseRegistrySetGovernanceRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "setGovernance", - account: this.wallet.account, - args: [request.newGovernance], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setLicensingImageUrl for contract LicenseRegistry - * - * @param request LicenseRegistrySetLicensingImageUrlRequest - * @return Promise - */ - public async setLicensingImageUrl( - request: LicenseRegistrySetLicensingImageUrlRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "setLicensingImageUrl", - account: this.wallet.account, - args: [request.url], - }); - return await this.wallet.writeContract(call); - } - - /** - * method setLicensingModule for contract LicenseRegistry - * - * @param request LicenseRegistrySetLicensingModuleRequest - * @return Promise - */ - public async setLicensingModule( - request: LicenseRegistrySetLicensingModuleRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licenseRegistryAbi, - address: this.address, - functionName: "setLicensingModule", - account: this.wallet.account, - args: [request.newLicensingModule], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract LicenseRegistry event - */ -export class LicenseRegistryEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x410d2332270cEb9Ca78b7E2c3720046b3ef2D8Ba", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event ApprovalForAll for contract LicenseRegistry - */ - public watchApprovalForAllEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryApprovalForAllEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "ApprovalForAll", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event BatchMetadataUpdate for contract LicenseRegistry - */ - public watchBatchMetadataUpdateEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryBatchMetadataUpdateEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "BatchMetadataUpdate", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event GovernanceUpdated for contract LicenseRegistry - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event LicenseMinted for contract LicenseRegistry - */ - public watchLicenseMintedEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryLicenseMintedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "LicenseMinted", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event TransferBatch for contract LicenseRegistry - */ - public watchTransferBatchEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryTransferBatchEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "TransferBatch", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event TransferSingle for contract LicenseRegistry - */ - public watchTransferSingleEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryTransferSingleEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "TransferSingle", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event URI for contract LicenseRegistry - */ - public watchUriEvent( - onLogs: (txHash: Hex, ev: LicenseRegistryUriEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licenseRegistryAbi, - address: this.address, - eventName: "URI", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} - -// Contract LicensingModule ============================================================= - -export type LicensingModuleAccessControllerResponse = Address; - -export type LicensingModuleDisputeModuleResponse = Address; - -export type LicensingModuleIpAccountRegistryResponse = Address; - -export type LicensingModuleLicenseRegistryResponse = Address; - -export type LicensingModuleRoyaltyModuleResponse = Address; - -/** - * LicensingModuleGetPolicyIdRequest - * - * @param pol tuple - */ -export type LicensingModuleGetPolicyIdRequest = { - pol: { - isLicenseTransferable: boolean; - policyFramework: Address; - frameworkData: Hex; - royaltyPolicy: Address; - royaltyData: Hex; - mintingFee: bigint; - mintingFeeToken: Address; - }; -}; - -/** - * LicensingModuleGetPolicyIdResponse - * - * @param policyId uint256 - */ -export type LicensingModuleGetPolicyIdResponse = { - policyId: bigint; -}; - -/** - * LicensingModuleIsFrameworkRegisteredRequest - * - * @param policyFramework address - */ -export type LicensingModuleIsFrameworkRegisteredRequest = { - policyFramework: Address; -}; - -export type LicensingModuleIsFrameworkRegisteredResponse = boolean; - -/** - * LicensingModuleIsParentRequest - * - * @param parentIpId address - * @param childIpId address - */ -export type LicensingModuleIsParentRequest = { - parentIpId: Address; - childIpId: Address; -}; - -export type LicensingModuleIsParentResponse = boolean; - -/** - * LicensingModuleIsPolicyDefinedRequest - * - * @param policyId uint256 - */ -export type LicensingModuleIsPolicyDefinedRequest = { - policyId: bigint; -}; - -export type LicensingModuleIsPolicyDefinedResponse = boolean; - -/** - * LicensingModuleIsPolicyIdSetForIpRequest - * - * @param isInherited bool - * @param ipId address - * @param policyId uint256 - */ -export type LicensingModuleIsPolicyIdSetForIpRequest = { - isInherited: boolean; - ipId: Address; - policyId: bigint; -}; - -export type LicensingModuleIsPolicyIdSetForIpResponse = boolean; - -/** - * LicensingModuleIsPolicyInheritedRequest - * - * @param ipId address - * @param policyId uint256 - */ -export type LicensingModuleIsPolicyInheritedRequest = { - ipId: Address; - policyId: bigint; -}; - -export type LicensingModuleIsPolicyInheritedResponse = boolean; - -export type LicensingModuleNameResponse = string; - -/** - * LicensingModuleParentIpIdsRequest - * - * @param ipId address - */ -export type LicensingModuleParentIpIdsRequest = { - ipId: Address; -}; - -export type LicensingModuleParentIpIdsResponse = readonly Address[]; - -/** - * LicensingModulePolicyRequest - * - * @param policyId uint256 - */ -export type LicensingModulePolicyRequest = { - policyId: bigint; -}; - -/** - * LicensingModulePolicyResponse - * - * @param pol tuple - */ -export type LicensingModulePolicyResponse = { - pol: { - isLicenseTransferable: boolean; - policyFramework: Address; - frameworkData: Hex; - royaltyPolicy: Address; - royaltyData: Hex; - mintingFee: bigint; - mintingFeeToken: Address; - }; -}; - -/** - * LicensingModulePolicyAggregatorDataRequest - * - * @param framework address - * @param ipId address - */ -export type LicensingModulePolicyAggregatorDataRequest = { - framework: Address; - ipId: Address; -}; - -export type LicensingModulePolicyAggregatorDataResponse = Hex; - -/** - * LicensingModulePolicyForIpAtIndexRequest - * - * @param isInherited bool - * @param ipId address - * @param index uint256 - */ -export type LicensingModulePolicyForIpAtIndexRequest = { - isInherited: boolean; - ipId: Address; - index: bigint; -}; - -export type LicensingModulePolicyForIpAtIndexResponse = { - isLicenseTransferable: boolean; - policyFramework: Address; - frameworkData: Hex; - royaltyPolicy: Address; - royaltyData: Hex; - mintingFee: bigint; - mintingFeeToken: Address; -}; - -/** - * LicensingModulePolicyIdForIpAtIndexRequest - * - * @param isInherited bool - * @param ipId address - * @param index uint256 - */ -export type LicensingModulePolicyIdForIpAtIndexRequest = { - isInherited: boolean; - ipId: Address; - index: bigint; -}; - -/** - * LicensingModulePolicyIdForIpAtIndexResponse - * - * @param policyId uint256 - */ -export type LicensingModulePolicyIdForIpAtIndexResponse = { - policyId: bigint; -}; - -/** - * LicensingModulePolicyIdsForIpRequest - * - * @param isInherited bool - * @param ipId address - */ -export type LicensingModulePolicyIdsForIpRequest = { - isInherited: boolean; - ipId: Address; -}; - -/** - * LicensingModulePolicyIdsForIpResponse - * - * @param policyIds uint256[] - */ -export type LicensingModulePolicyIdsForIpResponse = { - policyIds: readonly bigint[]; -}; - -/** - * LicensingModulePolicyStatusRequest - * - * @param ipId address - * @param policyId uint256 - */ -export type LicensingModulePolicyStatusRequest = { - ipId: Address; - policyId: bigint; -}; - -/** - * LicensingModulePolicyStatusResponse - * - * @param index uint256 - * @param isInherited bool - * @param active bool - */ -export type LicensingModulePolicyStatusResponse = { - index: bigint; - isInherited: boolean; - active: boolean; -}; - -/** - * LicensingModuleSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type LicensingModuleSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type LicensingModuleSupportsInterfaceResponse = boolean; - -/** - * LicensingModuleTotalParentsForIpIdRequest - * - * @param ipId address - */ -export type LicensingModuleTotalParentsForIpIdRequest = { - ipId: Address; -}; - -export type LicensingModuleTotalParentsForIpIdResponse = bigint; - -export type LicensingModuleTotalPoliciesResponse = bigint; - -/** - * LicensingModuleTotalPoliciesForIpRequest - * - * @param isInherited bool - * @param ipId address - */ -export type LicensingModuleTotalPoliciesForIpRequest = { - isInherited: boolean; - ipId: Address; -}; - -export type LicensingModuleTotalPoliciesForIpResponse = bigint; - -/** - * LicensingModuleAddPolicyToIpRequest - * - * @param ipId address - * @param polId uint256 - */ -export type LicensingModuleAddPolicyToIpRequest = { - ipId: Address; - polId: bigint; -}; - -/** - * LicensingModuleLinkIpToParentsRequest - * - * @param licenseIds uint256[] - * @param childIpId address - * @param royaltyContext bytes - */ -export type LicensingModuleLinkIpToParentsRequest = { - licenseIds: readonly bigint[]; - childIpId: Address; - royaltyContext: Hex; -}; - -/** - * LicensingModuleMintLicenseRequest - * - * @param policyId uint256 - * @param licensorIpId address - * @param amount uint256 - * @param receiver address - * @param royaltyContext bytes - */ -export type LicensingModuleMintLicenseRequest = { - policyId: bigint; - licensorIpId: Address; - amount: bigint; - receiver: Address; - royaltyContext: Hex; -}; - -/** - * LicensingModuleRegisterPolicyRequest - * - * @param pol tuple - */ -export type LicensingModuleRegisterPolicyRequest = { - pol: { - isLicenseTransferable: boolean; - policyFramework: Address; - frameworkData: Hex; - royaltyPolicy: Address; - royaltyData: Hex; - mintingFee: bigint; - mintingFeeToken: Address; - }; -}; - -/** - * LicensingModuleRegisterPolicyFrameworkManagerRequest - * - * @param manager address - */ -export type LicensingModuleRegisterPolicyFrameworkManagerRequest = { - manager: Address; -}; - -/** - * LicensingModuleIpIdLinkedToParentsEvent - * - * @param caller address (optional) - * @param ipId address (optional) - * @param parentIpIds address[] (optional) - */ -export type LicensingModuleIpIdLinkedToParentsEvent = { - caller?: Address; - ipId?: Address; - parentIpIds?: readonly Address[]; -}; - -/** - * LicensingModulePolicyAddedToIpIdEvent - * - * @param caller address (optional) - * @param ipId address (optional) - * @param policyId uint256 (optional) - * @param index uint256 (optional) - * @param isInherited bool (optional) - */ -export type LicensingModulePolicyAddedToIpIdEvent = { - caller?: Address; - ipId?: Address; - policyId?: bigint; - index?: bigint; - isInherited?: boolean; -}; - -/** - * LicensingModulePolicyFrameworkRegisteredEvent - * - * @param framework address (optional) - * @param name string (optional) - * @param licenseTextUrl string (optional) - */ -export type LicensingModulePolicyFrameworkRegisteredEvent = { - framework?: Address; - name?: string; - licenseTextUrl?: string; -}; - -/** - * LicensingModulePolicyRegisteredEvent - * - * @param policyId uint256 (optional) - * @param policyFrameworkManager address (optional) - * @param frameworkData bytes (optional) - * @param royaltyPolicy address (optional) - * @param royaltyData bytes (optional) - * @param mintingFee uint256 (optional) - * @param mintingFeeToken address (optional) - */ -export type LicensingModulePolicyRegisteredEvent = { - policyId?: bigint; - policyFrameworkManager?: Address; - frameworkData?: Hex; - royaltyPolicy?: Address; - royaltyData?: Hex; - mintingFee?: bigint; - mintingFeeToken?: Address; -}; - -/** - * contract LicensingModule readonly method - */ -export class LicensingModuleReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x2A88056985814dcBb72aFA50B95893359B6262f5", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method ACCESS_CONTROLLER for contract LicensingModule - * - * @param request LicensingModuleAccessControllerRequest - * @return Promise - */ - public async accessController(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "ACCESS_CONTROLLER", - }); - } - - /** - * method DISPUTE_MODULE for contract LicensingModule - * - * @param request LicensingModuleDisputeModuleRequest - * @return Promise - */ - public async disputeModule(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "DISPUTE_MODULE", - }); - } - - /** - * method IP_ACCOUNT_REGISTRY for contract LicensingModule - * - * @param request LicensingModuleIpAccountRegistryRequest - * @return Promise - */ - public async ipAccountRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "IP_ACCOUNT_REGISTRY", - }); - } - - /** - * method LICENSE_REGISTRY for contract LicensingModule - * - * @param request LicensingModuleLicenseRegistryRequest - * @return Promise - */ - public async licenseRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "LICENSE_REGISTRY", - }); - } - - /** - * method ROYALTY_MODULE for contract LicensingModule - * - * @param request LicensingModuleRoyaltyModuleRequest - * @return Promise - */ - public async royaltyModule(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "ROYALTY_MODULE", - }); - } - - /** - * method getPolicyId for contract LicensingModule - * - * @param request LicensingModuleGetPolicyIdRequest - * @return Promise - */ - public async getPolicyId( - request: LicensingModuleGetPolicyIdRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "getPolicyId", - args: [request.pol], - }); - return { - policyId: result, - }; - } - - /** - * method isFrameworkRegistered for contract LicensingModule - * - * @param request LicensingModuleIsFrameworkRegisteredRequest - * @return Promise - */ - public async isFrameworkRegistered( - request: LicensingModuleIsFrameworkRegisteredRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "isFrameworkRegistered", - args: [request.policyFramework], - }); - } - - /** - * method isParent for contract LicensingModule - * - * @param request LicensingModuleIsParentRequest - * @return Promise - */ - public async isParent( - request: LicensingModuleIsParentRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "isParent", - args: [request.parentIpId, request.childIpId], - }); - } - - /** - * method isPolicyDefined for contract LicensingModule - * - * @param request LicensingModuleIsPolicyDefinedRequest - * @return Promise - */ - public async isPolicyDefined( - request: LicensingModuleIsPolicyDefinedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "isPolicyDefined", - args: [request.policyId], - }); - } - - /** - * method isPolicyIdSetForIp for contract LicensingModule - * - * @param request LicensingModuleIsPolicyIdSetForIpRequest - * @return Promise - */ - public async isPolicyIdSetForIp( - request: LicensingModuleIsPolicyIdSetForIpRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "isPolicyIdSetForIp", - args: [request.isInherited, request.ipId, request.policyId], - }); - } - - /** - * method isPolicyInherited for contract LicensingModule - * - * @param request LicensingModuleIsPolicyInheritedRequest - * @return Promise - */ - public async isPolicyInherited( - request: LicensingModuleIsPolicyInheritedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "isPolicyInherited", - args: [request.ipId, request.policyId], - }); - } - - /** - * method name for contract LicensingModule - * - * @param request LicensingModuleNameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "name", - }); - } - - /** - * method parentIpIds for contract LicensingModule - * - * @param request LicensingModuleParentIpIdsRequest - * @return Promise - */ - public async parentIpIds( - request: LicensingModuleParentIpIdsRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "parentIpIds", - args: [request.ipId], - }); - } - - /** - * method policy for contract LicensingModule - * - * @param request LicensingModulePolicyRequest - * @return Promise - */ - public async policy( - request: LicensingModulePolicyRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "policy", - args: [request.policyId], - }); - return { - pol: result, - }; - } - - /** - * method policyAggregatorData for contract LicensingModule - * - * @param request LicensingModulePolicyAggregatorDataRequest - * @return Promise - */ - public async policyAggregatorData( - request: LicensingModulePolicyAggregatorDataRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "policyAggregatorData", - args: [request.framework, request.ipId], - }); - } - - /** - * method policyForIpAtIndex for contract LicensingModule - * - * @param request LicensingModulePolicyForIpAtIndexRequest - * @return Promise - */ - public async policyForIpAtIndex( - request: LicensingModulePolicyForIpAtIndexRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "policyForIpAtIndex", - args: [request.isInherited, request.ipId, request.index], - }); - } - - /** - * method policyIdForIpAtIndex for contract LicensingModule - * - * @param request LicensingModulePolicyIdForIpAtIndexRequest - * @return Promise - */ - public async policyIdForIpAtIndex( - request: LicensingModulePolicyIdForIpAtIndexRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "policyIdForIpAtIndex", - args: [request.isInherited, request.ipId, request.index], - }); - return { - policyId: result, - }; - } - - /** - * method policyIdsForIp for contract LicensingModule - * - * @param request LicensingModulePolicyIdsForIpRequest - * @return Promise - */ - public async policyIdsForIp( - request: LicensingModulePolicyIdsForIpRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "policyIdsForIp", - args: [request.isInherited, request.ipId], - }); - return { - policyIds: result, - }; - } - - /** - * method policyStatus for contract LicensingModule - * - * @param request LicensingModulePolicyStatusRequest - * @return Promise - */ - public async policyStatus( - request: LicensingModulePolicyStatusRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "policyStatus", - args: [request.ipId, request.policyId], - }); - return { - index: result[0], - isInherited: result[1], - active: result[2], - }; - } - - /** - * method supportsInterface for contract LicensingModule - * - * @param request LicensingModuleSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: LicensingModuleSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); - } - - /** - * method totalParentsForIpId for contract LicensingModule - * - * @param request LicensingModuleTotalParentsForIpIdRequest - * @return Promise - */ - public async totalParentsForIpId( - request: LicensingModuleTotalParentsForIpIdRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "totalParentsForIpId", - args: [request.ipId], - }); - } - - /** - * method totalPolicies for contract LicensingModule - * - * @param request LicensingModuleTotalPoliciesRequest - * @return Promise - */ - public async totalPolicies(): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "totalPolicies", - }); - } - - /** - * method totalPoliciesForIp for contract LicensingModule - * - * @param request LicensingModuleTotalPoliciesForIpRequest - * @return Promise - */ - public async totalPoliciesForIp( - request: LicensingModuleTotalPoliciesForIpRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "totalPoliciesForIp", - args: [request.isInherited, request.ipId], - }); - } -} - -/** - * contract LicensingModule write method - */ -export class LicensingModuleClient extends LicensingModuleReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x2A88056985814dcBb72aFA50B95893359B6262f5", - ) { - super(rpcClient, address); - this.wallet = wallet; - } - - /** - * method addPolicyToIp for contract LicensingModule - * - * @param request LicensingModuleAddPolicyToIpRequest - * @return Promise - */ - public async addPolicyToIp( - request: LicensingModuleAddPolicyToIpRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "addPolicyToIp", - account: this.wallet.account, - args: [request.ipId, request.polId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method linkIpToParents for contract LicensingModule - * - * @param request LicensingModuleLinkIpToParentsRequest - * @return Promise - */ - public async linkIpToParents( - request: LicensingModuleLinkIpToParentsRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "linkIpToParents", - account: this.wallet.account, - args: [request.licenseIds, request.childIpId, request.royaltyContext], - }); - return await this.wallet.writeContract(call); - } - - /** - * method mintLicense for contract LicensingModule - * - * @param request LicensingModuleMintLicenseRequest - * @return Promise - */ - public async mintLicense( - request: LicensingModuleMintLicenseRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "mintLicense", - account: this.wallet.account, - args: [ - request.policyId, - request.licensorIpId, - request.amount, - request.receiver, - request.royaltyContext, - ], - }); - return await this.wallet.writeContract(call); - } - - /** - * method registerPolicy for contract LicensingModule - * - * @param request LicensingModuleRegisterPolicyRequest - * @return Promise - */ - public async registerPolicy( - request: LicensingModuleRegisterPolicyRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "registerPolicy", - account: this.wallet.account, - args: [request.pol], - }); - return await this.wallet.writeContract(call); - } - - /** - * method registerPolicyFrameworkManager for contract LicensingModule - * - * @param request LicensingModuleRegisterPolicyFrameworkManagerRequest - * @return Promise - */ - public async registerPolicyFrameworkManager( - request: LicensingModuleRegisterPolicyFrameworkManagerRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: licensingModuleAbi, - address: this.address, - functionName: "registerPolicyFrameworkManager", - account: this.wallet.account, - args: [request.manager], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract LicensingModule event - */ -export class LicensingModuleEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x2A88056985814dcBb72aFA50B95893359B6262f5", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event IpIdLinkedToParents for contract LicensingModule - */ - public watchIpIdLinkedToParentsEvent( - onLogs: (txHash: Hex, ev: LicensingModuleIpIdLinkedToParentsEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licensingModuleAbi, - address: this.address, - eventName: "IpIdLinkedToParents", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event PolicyAddedToIpId for contract LicensingModule - */ - public watchPolicyAddedToIpIdEvent( - onLogs: (txHash: Hex, ev: LicensingModulePolicyAddedToIpIdEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licensingModuleAbi, - address: this.address, - eventName: "PolicyAddedToIpId", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event PolicyFrameworkRegistered for contract LicensingModule - */ - public watchPolicyFrameworkRegisteredEvent( - onLogs: (txHash: Hex, ev: LicensingModulePolicyFrameworkRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licensingModuleAbi, - address: this.address, - eventName: "PolicyFrameworkRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } +// COMMON ============================================================= - /** - * event PolicyRegistered for contract LicensingModule - */ - public watchPolicyRegisteredEvent( - onLogs: (txHash: Hex, ev: LicensingModulePolicyRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: licensingModuleAbi, - address: this.address, - eventName: "PolicyRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } +function getAddress(address: Record, chainId?: number): Address { + return address[chainId || 0] || "0x"; } -// Contract MockERC20 ============================================================= - -/** - * MockErc20AllowanceRequest - * - * @param owner address - * @param spender address - */ -export type MockErc20AllowanceRequest = { - owner: Address; - spender: Address; -}; - -export type MockErc20AllowanceResponse = bigint; - -/** - * MockErc20BalanceOfRequest - * - * @param account address - */ -export type MockErc20BalanceOfRequest = { - account: Address; -}; - -export type MockErc20BalanceOfResponse = bigint; - -export type MockErc20DecimalsResponse = number; - -export type MockErc20NameResponse = string; - -export type MockErc20SymbolResponse = string; - -export type MockErc20TotalSupplyResponse = bigint; - -/** - * MockErc20ApproveRequest - * - * @param spender address - * @param value uint256 - */ -export type MockErc20ApproveRequest = { - spender: Address; - value: bigint; -}; - -/** - * MockErc20BurnRequest - * - * @param from address - * @param amount uint256 - */ -export type MockErc20BurnRequest = { - from: Address; - amount: bigint; +export type SimpleWalletClient< + TChain extends Chain | undefined = Chain | undefined, + TAccount extends Account | undefined = Account | undefined, +> = { + account?: TAccount; + writeContract: < + const abi extends Abi | readonly unknown[], + functionName extends ContractFunctionName, + args extends ContractFunctionArgs, + TChainOverride extends Chain | undefined = undefined, + >( + args: WriteContractParameters, + ) => Promise; }; -/** - * MockErc20MintRequest - * - * @param to address - * @param amount uint256 - */ -export type MockErc20MintRequest = { - to: Address; - amount: bigint; -}; +// Contract AccessController ============================================================= /** - * MockErc20TransferRequest + * AccessControllerPermissionSetEvent * + * @param ipAccountOwner address + * @param ipAccount address + * @param signer address * @param to address - * @param value uint256 + * @param func bytes4 + * @param permission uint8 */ -export type MockErc20TransferRequest = { +export type AccessControllerPermissionSetEvent = { + ipAccountOwner: Address; + ipAccount: Address; + signer: Address; to: Address; - value: bigint; + func: Hex; + permission: number; }; /** - * MockErc20TransferFromRequest + * AccessControllerSetPermissionRequest * - * @param from address + * @param ipAccount address + * @param signer address * @param to address - * @param value uint256 + * @param func bytes4 + * @param permission uint8 */ -export type MockErc20TransferFromRequest = { - from: Address; +export type AccessControllerSetPermissionRequest = { + ipAccount: Address; + signer: Address; to: Address; - value: bigint; -}; - -/** - * MockErc20ApprovalEvent - * - * @param owner address (optional) - * @param spender address (optional) - * @param value uint256 (optional) - */ -export type MockErc20ApprovalEvent = { - owner?: Address; - spender?: Address; - value?: bigint; -}; - -/** - * MockErc20TransferEvent - * - * @param from address (optional) - * @param to address (optional) - * @param value uint256 (optional) - */ -export type MockErc20TransferEvent = { - from?: Address; - to?: Address; - value?: bigint; + func: Hex; + permission: number; }; /** - * contract MockERC20 readonly method + * contract AccessController event */ -export class MockErc20ReadOnlyClient { +export class AccessControllerEventClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0x3271778AdE44EfeC9e11b7160827921b6d614AF1", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(accessControllerAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * method allowance for contract MockERC20 - * - * @param request MockErc20AllowanceRequest - * @return Promise - */ - public async allowance(request: MockErc20AllowanceRequest): Promise { - return await this.rpcClient.readContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "allowance", - args: [request.owner, request.spender], - }); - } - - /** - * method balanceOf for contract MockERC20 - * - * @param request MockErc20BalanceOfRequest - * @return Promise - */ - public async balanceOf(request: MockErc20BalanceOfRequest): Promise { - return await this.rpcClient.readContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "balanceOf", - args: [request.account], - }); - } - - /** - * method decimals for contract MockERC20 - * - * @param request MockErc20DecimalsRequest - * @return Promise - */ - public async decimals(): Promise { - return await this.rpcClient.readContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "decimals", - }); - } - - /** - * method name for contract MockERC20 - * - * @param request MockErc20NameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "name", - }); - } - - /** - * method symbol for contract MockERC20 - * - * @param request MockErc20SymbolRequest - * @return Promise + * event PermissionSet for contract AccessController */ - public async symbol(): Promise { - return await this.rpcClient.readContract({ - abi: mockErc20Abi, + public watchPermissionSetEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: accessControllerAbi, address: this.address, - functionName: "symbol", + eventName: "PermissionSet", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method totalSupply for contract MockERC20 - * - * @param request MockErc20TotalSupplyRequest - * @return Promise + * parse tx receipt event PermissionSet for contract AccessController */ - public async totalSupply(): Promise { - return await this.rpcClient.readContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "totalSupply", - }); + public parseTxPermissionSetEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: accessControllerAbi, + eventName: "PermissionSet", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "PermissionSet") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } } /** - * contract MockERC20 write method + * contract AccessController write method */ -export class MockErc20Client extends MockErc20ReadOnlyClient { - protected readonly wallet: WalletClient; +export class AccessControllerClient extends AccessControllerEventClient { + protected readonly wallet: SimpleWalletClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x3271778AdE44EfeC9e11b7160827921b6d614AF1", - ) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { super(rpcClient, address); this.wallet = wallet; } /** - * method approve for contract MockERC20 - * - * @param request MockErc20ApproveRequest - * @return Promise - */ - public async approve(request: MockErc20ApproveRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "approve", - account: this.wallet.account, - args: [request.spender, request.value], - }); - return await this.wallet.writeContract(call); - } - - /** - * method burn for contract MockERC20 - * - * @param request MockErc20BurnRequest - * @return Promise - */ - public async burn(request: MockErc20BurnRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "burn", - account: this.wallet.account, - args: [request.from, request.amount], - }); - return await this.wallet.writeContract(call); - } - - /** - * method mint for contract MockERC20 - * - * @param request MockErc20MintRequest - * @return Promise - */ - public async mint(request: MockErc20MintRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "mint", - account: this.wallet.account, - args: [request.to, request.amount], - }); - return await this.wallet.writeContract(call); - } - - /** - * method transfer for contract MockERC20 - * - * @param request MockErc20TransferRequest - * @return Promise - */ - public async transfer(request: MockErc20TransferRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc20Abi, - address: this.address, - functionName: "transfer", - account: this.wallet.account, - args: [request.to, request.value], - }); - return await this.wallet.writeContract(call); - } - - /** - * method transferFrom for contract MockERC20 + * method setPermission for contract AccessController * - * @param request MockErc20TransferFromRequest + * @param request AccessControllerSetPermissionRequest * @return Promise */ - public async transferFrom( - request: MockErc20TransferFromRequest, + public async setPermission( + request: AccessControllerSetPermissionRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc20Abi, + abi: accessControllerAbi, address: this.address, - functionName: "transferFrom", + functionName: "setPermission", account: this.wallet.account, - args: [request.from, request.to, request.value], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract MockERC20 event - */ -export class MockErc20EventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x3271778AdE44EfeC9e11b7160827921b6d614AF1", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event Approval for contract MockERC20 - */ - public watchApprovalEvent( - onLogs: (txHash: Hex, ev: MockErc20ApprovalEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: mockErc20Abi, - address: this.address, - eventName: "Approval", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event Transfer for contract MockERC20 - */ - public watchTransferEvent( - onLogs: (txHash: Hex, ev: MockErc20TransferEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: mockErc20Abi, - address: this.address, - eventName: "Transfer", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + args: [request.ipAccount, request.signer, request.to, request.func, request.permission], }); + return await this.wallet.writeContract(call as WriteContractParameters); } } -// Contract MockERC721 ============================================================= - -/** - * MockErc721BalanceOfRequest - * - * @param owner address - */ -export type MockErc721BalanceOfRequest = { - owner: Address; -}; - -export type MockErc721BalanceOfResponse = bigint; - -/** - * MockErc721GetApprovedRequest - * - * @param tokenId uint256 - */ -export type MockErc721GetApprovedRequest = { - tokenId: bigint; -}; - -export type MockErc721GetApprovedResponse = Address; - -/** - * MockErc721IsApprovedForAllRequest - * - * @param owner address - * @param operator address - */ -export type MockErc721IsApprovedForAllRequest = { - owner: Address; - operator: Address; -}; - -export type MockErc721IsApprovedForAllResponse = boolean; - -export type MockErc721NameResponse = string; - -/** - * MockErc721OwnerOfRequest - * - * @param tokenId uint256 - */ -export type MockErc721OwnerOfRequest = { - tokenId: bigint; -}; - -export type MockErc721OwnerOfResponse = Address; - -/** - * MockErc721SupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type MockErc721SupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type MockErc721SupportsInterfaceResponse = boolean; - -export type MockErc721SymbolResponse = string; - -/** - * MockErc721TokenUriRequest - * - * @param tokenId uint256 - */ -export type MockErc721TokenUriRequest = { - tokenId: bigint; -}; - -export type MockErc721TokenUriResponse = string; - -/** - * MockErc721ApproveRequest - * - * @param to address - * @param tokenId uint256 - */ -export type MockErc721ApproveRequest = { - to: Address; - tokenId: bigint; -}; - -/** - * MockErc721BurnRequest - * - * @param tokenId uint256 - */ -export type MockErc721BurnRequest = { - tokenId: bigint; -}; - -/** - * MockErc721MintRequest - * - * @param to address - */ -export type MockErc721MintRequest = { - to: Address; -}; - -/** - * MockErc721MintIdRequest - * - * @param to address - * @param tokenId uint256 - */ -export type MockErc721MintIdRequest = { - to: Address; - tokenId: bigint; -}; +// Contract DisputeModule ============================================================= /** - * MockErc721SafeTransferFromRequest + * DisputeModuleDisputeCancelledEvent * - * @param from address - * @param to address - * @param tokenId uint256 + * @param disputeId uint256 + * @param data bytes */ -export type MockErc721SafeTransferFromRequest = { - from: Address; - to: Address; - tokenId: bigint; +export type DisputeModuleDisputeCancelledEvent = { + disputeId: bigint; + data: Hex; }; /** - * MockErc721SafeTransferFrom2Request + * DisputeModuleDisputeRaisedEvent * - * @param from address - * @param to address - * @param tokenId uint256 + * @param disputeId uint256 + * @param targetIpId address + * @param disputeInitiator address + * @param arbitrationPolicy address + * @param linkToDisputeEvidence bytes32 + * @param targetTag bytes32 * @param data bytes */ -export type MockErc721SafeTransferFrom2Request = { - from: Address; - to: Address; - tokenId: bigint; +export type DisputeModuleDisputeRaisedEvent = { + disputeId: bigint; + targetIpId: Address; + disputeInitiator: Address; + arbitrationPolicy: Address; + linkToDisputeEvidence: Hex; + targetTag: Hex; data: Hex; }; /** - * MockErc721SetApprovalForAllRequest + * DisputeModuleDisputeResolvedEvent * - * @param operator address - * @param approved bool + * @param disputeId uint256 */ -export type MockErc721SetApprovalForAllRequest = { - operator: Address; - approved: boolean; +export type DisputeModuleDisputeResolvedEvent = { + disputeId: bigint; }; /** - * MockErc721TransferFromRequest + * DisputeModuleCancelDisputeRequest * - * @param from address - * @param to address - * @param tokenId uint256 + * @param disputeId uint256 + * @param data bytes */ -export type MockErc721TransferFromRequest = { - from: Address; - to: Address; - tokenId: bigint; -}; - -/** - * MockErc721ApprovalEvent - * - * @param owner address (optional) - * @param approved address (optional) - * @param tokenId uint256 (optional) - */ -export type MockErc721ApprovalEvent = { - owner?: Address; - approved?: Address; - tokenId?: bigint; +export type DisputeModuleCancelDisputeRequest = { + disputeId: bigint; + data: Hex; }; /** - * MockErc721ApprovalForAllEvent + * DisputeModuleRaiseDisputeRequest * - * @param owner address (optional) - * @param operator address (optional) - * @param approved bool (optional) - */ -export type MockErc721ApprovalForAllEvent = { - owner?: Address; - operator?: Address; - approved?: boolean; + * @param targetIpId address + * @param linkToDisputeEvidence string + * @param targetTag bytes32 + * @param data bytes + */ +export type DisputeModuleRaiseDisputeRequest = { + targetIpId: Address; + linkToDisputeEvidence: string; + targetTag: Hex; + data: Hex; }; /** - * MockErc721TransferEvent + * DisputeModuleResolveDisputeRequest * - * @param from address (optional) - * @param to address (optional) - * @param tokenId uint256 (optional) - */ -export type MockErc721TransferEvent = { - from?: Address; - to?: Address; - tokenId?: bigint; + * @param disputeId uint256 + */ +export type DisputeModuleResolveDisputeRequest = { + disputeId: bigint; }; /** - * contract MockERC721 readonly method + * contract DisputeModule event */ -export class MockErc721ReadOnlyClient { +export class DisputeModuleEventClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0xCdBa568f1f4e16a6c6CBC8F509eCc87972Fef09f", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(disputeModuleAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * method balanceOf for contract MockERC721 - * - * @param request MockErc721BalanceOfRequest - * @return Promise - */ - public async balanceOf( - request: MockErc721BalanceOfRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "balanceOf", - args: [request.owner], - }); - } - - /** - * method getApproved for contract MockERC721 - * - * @param request MockErc721GetApprovedRequest - * @return Promise - */ - public async getApproved( - request: MockErc721GetApprovedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "getApproved", - args: [request.tokenId], - }); - } - - /** - * method isApprovedForAll for contract MockERC721 - * - * @param request MockErc721IsApprovedForAllRequest - * @return Promise + * event DisputeCancelled for contract DisputeModule */ - public async isApprovedForAll( - request: MockErc721IsApprovedForAllRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, + public watchDisputeCancelledEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: disputeModuleAbi, address: this.address, - functionName: "isApprovedForAll", - args: [request.owner, request.operator], + eventName: "DisputeCancelled", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method name for contract MockERC721 - * - * @param request MockErc721NameRequest - * @return Promise + * parse tx receipt event DisputeCancelled for contract DisputeModule */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "name", - }); + public parseTxDisputeCancelledEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: disputeModuleAbi, + eventName: "DisputeCancelled", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "DisputeCancelled") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method ownerOf for contract MockERC721 - * - * @param request MockErc721OwnerOfRequest - * @return Promise + * event DisputeRaised for contract DisputeModule */ - public async ownerOf(request: MockErc721OwnerOfRequest): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, + public watchDisputeRaisedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: disputeModuleAbi, address: this.address, - functionName: "ownerOf", - args: [request.tokenId], + eventName: "DisputeRaised", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method supportsInterface for contract MockERC721 - * - * @param request MockErc721SupportsInterfaceRequest - * @return Promise + * parse tx receipt event DisputeRaised for contract DisputeModule */ - public async supportsInterface( - request: MockErc721SupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); + public parseTxDisputeRaisedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: disputeModuleAbi, + eventName: "DisputeRaised", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "DisputeRaised") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method symbol for contract MockERC721 - * - * @param request MockErc721SymbolRequest - * @return Promise + * event DisputeResolved for contract DisputeModule */ - public async symbol(): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, + public watchDisputeResolvedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: disputeModuleAbi, address: this.address, - functionName: "symbol", + eventName: "DisputeResolved", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method tokenURI for contract MockERC721 - * - * @param request MockErc721TokenUriRequest - * @return Promise + * parse tx receipt event DisputeResolved for contract DisputeModule */ - public async tokenUri(request: MockErc721TokenUriRequest): Promise { - return await this.rpcClient.readContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "tokenURI", - args: [request.tokenId], - }); + public parseTxDisputeResolvedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: disputeModuleAbi, + eventName: "DisputeResolved", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "DisputeResolved") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } } /** - * contract MockERC721 write method + * contract DisputeModule write method */ -export class MockErc721Client extends MockErc721ReadOnlyClient { - protected readonly wallet: WalletClient; +export class DisputeModuleClient extends DisputeModuleEventClient { + protected readonly wallet: SimpleWalletClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xCdBa568f1f4e16a6c6CBC8F509eCc87972Fef09f", - ) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { super(rpcClient, address); this.wallet = wallet; } /** - * method approve for contract MockERC721 - * - * @param request MockErc721ApproveRequest - * @return Promise - */ - public async approve(request: MockErc721ApproveRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "approve", - account: this.wallet.account, - args: [request.to, request.tokenId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method burn for contract MockERC721 - * - * @param request MockErc721BurnRequest - * @return Promise - */ - public async burn(request: MockErc721BurnRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "burn", - account: this.wallet.account, - args: [request.tokenId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method mint for contract MockERC721 - * - * @param request MockErc721MintRequest - * @return Promise - */ - public async mint(request: MockErc721MintRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "mint", - account: this.wallet.account, - args: [request.to], - }); - return await this.wallet.writeContract(call); - } - - /** - * method mintId for contract MockERC721 - * - * @param request MockErc721MintIdRequest - * @return Promise - */ - public async mintId(request: MockErc721MintIdRequest): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "mintId", - account: this.wallet.account, - args: [request.to, request.tokenId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method safeTransferFrom for contract MockERC721 - * - * @param request MockErc721SafeTransferFromRequest - * @return Promise - */ - public async safeTransferFrom( - request: MockErc721SafeTransferFromRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, - address: this.address, - functionName: "safeTransferFrom", - account: this.wallet.account, - args: [request.from, request.to, request.tokenId], - }); - return await this.wallet.writeContract(call); - } - - /** - * method safeTransferFrom for contract MockERC721 + * method cancelDispute for contract DisputeModule * - * @param request MockErc721SafeTransferFrom2Request + * @param request DisputeModuleCancelDisputeRequest * @return Promise */ - public async safeTransferFrom2( - request: MockErc721SafeTransferFrom2Request, + public async cancelDispute( + request: DisputeModuleCancelDisputeRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, + abi: disputeModuleAbi, address: this.address, - functionName: "safeTransferFrom", + functionName: "cancelDispute", account: this.wallet.account, - args: [request.from, request.to, request.tokenId, request.data], + args: [request.disputeId, request.data], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method setApprovalForAll for contract MockERC721 + * method raiseDispute for contract DisputeModule * - * @param request MockErc721SetApprovalForAllRequest + * @param request DisputeModuleRaiseDisputeRequest * @return Promise */ - public async setApprovalForAll( - request: MockErc721SetApprovalForAllRequest, + public async raiseDispute( + request: DisputeModuleRaiseDisputeRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, + abi: disputeModuleAbi, address: this.address, - functionName: "setApprovalForAll", + functionName: "raiseDispute", account: this.wallet.account, - args: [request.operator, request.approved], + args: [request.targetIpId, request.linkToDisputeEvidence, request.targetTag, request.data], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method transferFrom for contract MockERC721 + * method resolveDispute for contract DisputeModule * - * @param request MockErc721TransferFromRequest + * @param request DisputeModuleResolveDisputeRequest * @return Promise */ - public async transferFrom( - request: MockErc721TransferFromRequest, + public async resolveDispute( + request: DisputeModuleResolveDisputeRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: mockErc721Abi, + abi: disputeModuleAbi, address: this.address, - functionName: "transferFrom", + functionName: "resolveDispute", account: this.wallet.account, - args: [request.from, request.to, request.tokenId], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract MockERC721 event - */ -export class MockErc721EventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xCdBa568f1f4e16a6c6CBC8F509eCc87972Fef09f", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event Approval for contract MockERC721 - */ - public watchApprovalEvent( - onLogs: (txHash: Hex, ev: MockErc721ApprovalEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: mockErc721Abi, - address: this.address, - eventName: "Approval", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event ApprovalForAll for contract MockERC721 - */ - public watchApprovalForAllEvent( - onLogs: (txHash: Hex, ev: MockErc721ApprovalForAllEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: mockErc721Abi, - address: this.address, - eventName: "ApprovalForAll", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event Transfer for contract MockERC721 - */ - public watchTransferEvent( - onLogs: (txHash: Hex, ev: MockErc721TransferEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: mockErc721Abi, - address: this.address, - eventName: "Transfer", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + args: [request.disputeId], }); + return await this.wallet.writeContract(call as WriteContractParameters); } } -// Contract MockTokenGatedHook ============================================================= - -export type MockTokenGatedHookNameResponse = string; - -/** - * MockTokenGatedHookSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type MockTokenGatedHookSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type MockTokenGatedHookSupportsInterfaceResponse = boolean; +// Contract IPAccountImpl ============================================================= /** - * MockTokenGatedHookValidateConfigRequest + * IpAccountImplExecuteRequest * - * @param configData bytes + * @param to address + * @param value uint256 + * @param data bytes */ -export type MockTokenGatedHookValidateConfigRequest = { - configData: Hex; +export type IpAccountImplExecuteRequest = { + to: Address; + value: bigint; + data: Hex; }; /** - * MockTokenGatedHookVerifyRequest + * IpAccountImplExecuteWithSigRequest * - * @param caller address + * @param to address + * @param value uint256 * @param data bytes + * @param signer address + * @param deadline uint256 + * @param signature bytes */ -export type MockTokenGatedHookVerifyRequest = { - caller: Address; +export type IpAccountImplExecuteWithSigRequest = { + to: Address; + value: bigint; data: Hex; -}; - -export type MockTokenGatedHookVerifyResponse = boolean; - -/** - * contract MockTokenGatedHook readonly method - */ -export class MockTokenGatedHookReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0x008B5D8Db85100E143729453784e9F077B2279fA", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * method name for contract MockTokenGatedHook - * - * @param request MockTokenGatedHookNameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: mockTokenGatedHookAbi, - address: this.address, - functionName: "name", - }); - } - - /** - * method supportsInterface for contract MockTokenGatedHook - * - * @param request MockTokenGatedHookSupportsInterfaceRequest - * @return Promise - */ - public async supportsInterface( - request: MockTokenGatedHookSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: mockTokenGatedHookAbi, - address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], - }); + signer: Address; + deadline: bigint; + signature: Hex; +}; + +/** + * contract IPAccountImpl write method + */ +export class IpAccountImplClient { + protected readonly wallet: SimpleWalletClient; + protected readonly rpcClient: PublicClient; + public readonly address: Address; + + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { + this.address = address || getAddress(ipAccountImplAddress, rpcClient.chain?.id); + this.rpcClient = rpcClient; + this.wallet = wallet; } /** - * method validateConfig for contract MockTokenGatedHook + * method execute for contract IPAccountImpl * - * @param request MockTokenGatedHookValidateConfigRequest - * @return Promise + * @param request IpAccountImplExecuteRequest + * @return Promise */ - public async validateConfig(request: MockTokenGatedHookValidateConfigRequest): Promise { - await this.rpcClient.readContract({ - abi: mockTokenGatedHookAbi, + public async execute(request: IpAccountImplExecuteRequest): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: ipAccountImplAbi, address: this.address, - functionName: "validateConfig", - args: [request.configData], + functionName: "execute", + account: this.wallet.account, + args: [request.to, request.value, request.data], }); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method verify for contract MockTokenGatedHook + * method executeWithSig for contract IPAccountImpl * - * @param request MockTokenGatedHookVerifyRequest - * @return Promise + * @param request IpAccountImplExecuteWithSigRequest + * @return Promise */ - public async verify( - request: MockTokenGatedHookVerifyRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: mockTokenGatedHookAbi, + public async executeWithSig( + request: IpAccountImplExecuteWithSigRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: ipAccountImplAbi, address: this.address, - functionName: "verify", - args: [request.caller, request.data], + functionName: "executeWithSig", + account: this.wallet.account, + args: [ + request.to, + request.value, + request.data, + request.signer, + request.deadline, + request.signature, + ], }); + return await this.wallet.writeContract(call as WriteContractParameters); } } -// Contract ModuleRegistry ============================================================= - -export type ModuleRegistryGetGovernanceResponse = Address; - -/** - * ModuleRegistryGetModuleRequest - * - * @param name string - */ -export type ModuleRegistryGetModuleRequest = { - name: string; -}; - -export type ModuleRegistryGetModuleResponse = Address; - -/** - * ModuleRegistryGetModuleTypeRequest - * - * @param moduleAddress address - */ -export type ModuleRegistryGetModuleTypeRequest = { - moduleAddress: Address; -}; - -export type ModuleRegistryGetModuleTypeResponse = string; - -/** - * ModuleRegistryGetModuleTypeInterfaceIdRequest - * - * @param moduleType string - */ -export type ModuleRegistryGetModuleTypeInterfaceIdRequest = { - moduleType: string; -}; - -export type ModuleRegistryGetModuleTypeInterfaceIdResponse = Hex; - -export type ModuleRegistryGovernanceResponse = Address; - -/** - * ModuleRegistryIsRegisteredRequest - * - * @param moduleAddress address - */ -export type ModuleRegistryIsRegisteredRequest = { - moduleAddress: Address; -}; - -export type ModuleRegistryIsRegisteredResponse = boolean; - -/** - * ModuleRegistryRegisterModuleRequest - * - * @param name string - * @param moduleAddress address - */ -export type ModuleRegistryRegisterModuleRequest = { - name: string; - moduleAddress: Address; -}; - -/** - * ModuleRegistryRegisterModule2Request - * - * @param name string - * @param moduleAddress address - * @param moduleType string - */ -export type ModuleRegistryRegisterModule2Request = { - name: string; - moduleAddress: Address; - moduleType: string; -}; - -/** - * ModuleRegistryRegisterModuleTypeRequest - * - * @param name string - * @param interfaceId bytes4 - */ -export type ModuleRegistryRegisterModuleTypeRequest = { - name: string; - interfaceId: Hex; -}; +// Contract IPAssetRegistry ============================================================= /** - * ModuleRegistryRemoveModuleRequest + * IpAssetRegistryIpRegisteredEvent * + * @param ipId address + * @param chainId uint256 + * @param tokenContract address + * @param tokenId uint256 * @param name string + * @param uri string + * @param registrationDate uint256 */ -export type ModuleRegistryRemoveModuleRequest = { +export type IpAssetRegistryIpRegisteredEvent = { + ipId: Address; + chainId: bigint; + tokenContract: Address; + tokenId: bigint; name: string; + uri: string; + registrationDate: bigint; }; /** - * ModuleRegistryRemoveModuleTypeRequest + * IpAssetRegistryIpIdRequest * - * @param name string + * @param chainId uint256 + * @param tokenContract address + * @param tokenId uint256 */ -export type ModuleRegistryRemoveModuleTypeRequest = { - name: string; +export type IpAssetRegistryIpIdRequest = { + chainId: bigint; + tokenContract: Address; + tokenId: bigint; }; -/** - * ModuleRegistrySetGovernanceRequest - * - * @param newGovernance address - */ -export type ModuleRegistrySetGovernanceRequest = { - newGovernance: Address; -}; +export type IpAssetRegistryIpIdResponse = Address; /** - * ModuleRegistryGovernanceUpdatedEvent + * IpAssetRegistryIsRegisteredRequest * - * @param newGovernance address (optional) + * @param id address */ -export type ModuleRegistryGovernanceUpdatedEvent = { - newGovernance?: Address; +export type IpAssetRegistryIsRegisteredRequest = { + id: Address; }; -/** - * ModuleRegistryModuleAddedEvent - * - * @param name string (optional) - * @param module address (optional) - * @param moduleTypeInterfaceId bytes4 (optional) - * @param moduleType string (optional) - */ -export type ModuleRegistryModuleAddedEvent = { - name?: string; - module?: Address; - moduleTypeInterfaceId?: Hex; - moduleType?: string; -}; +export type IpAssetRegistryIsRegisteredResponse = boolean; /** - * ModuleRegistryModuleRemovedEvent + * IpAssetRegistryRegisterRequest * - * @param name string (optional) - * @param module address (optional) + * @param tokenContract address + * @param tokenId uint256 */ -export type ModuleRegistryModuleRemovedEvent = { - name?: string; - module?: Address; +export type IpAssetRegistryRegisterRequest = { + tokenContract: Address; + tokenId: bigint; }; /** - * contract ModuleRegistry readonly method + * contract IPAssetRegistry event */ -export class ModuleRegistryReadOnlyClient { +export class IpAssetRegistryEventClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0xB8617E2FC9dbFd51781B8D281b725976E3B43f9d", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(ipAssetRegistryAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * method getGovernance for contract ModuleRegistry - * - * @param request ModuleRegistryGetGovernanceRequest - * @return Promise - */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: moduleRegistryAbi, - address: this.address, - functionName: "getGovernance", - }); - } - - /** - * method getModule for contract ModuleRegistry - * - * @param request ModuleRegistryGetModuleRequest - * @return Promise + * event IPRegistered for contract IPAssetRegistry */ - public async getModule( - request: ModuleRegistryGetModuleRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: moduleRegistryAbi, + public watchIpRegisteredEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: ipAssetRegistryAbi, address: this.address, - functionName: "getModule", - args: [request.name], + eventName: "IPRegistered", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method getModuleType for contract ModuleRegistry - * - * @param request ModuleRegistryGetModuleTypeRequest - * @return Promise + * parse tx receipt event IPRegistered for contract IPAssetRegistry */ - public async getModuleType( - request: ModuleRegistryGetModuleTypeRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: moduleRegistryAbi, - address: this.address, - functionName: "getModuleType", - args: [request.moduleAddress], - }); + public parseTxIpRegisteredEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: ipAssetRegistryAbi, + eventName: "IPRegistered", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "IPRegistered") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } +} - /** - * method getModuleTypeInterfaceId for contract ModuleRegistry - * - * @param request ModuleRegistryGetModuleTypeInterfaceIdRequest - * @return Promise - */ - public async getModuleTypeInterfaceId( - request: ModuleRegistryGetModuleTypeInterfaceIdRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: moduleRegistryAbi, - address: this.address, - functionName: "getModuleTypeInterfaceId", - args: [request.moduleType], - }); +/** + * contract IPAssetRegistry readonly method + */ +export class IpAssetRegistryReadOnlyClient extends IpAssetRegistryEventClient { + constructor(rpcClient: PublicClient, address?: Address) { + super(rpcClient, address); } /** - * method governance for contract ModuleRegistry + * method ipId for contract IPAssetRegistry * - * @param request ModuleRegistryGovernanceRequest - * @return Promise + * @param request IpAssetRegistryIpIdRequest + * @return Promise */ - public async governance(): Promise { + public async ipId(request: IpAssetRegistryIpIdRequest): Promise { return await this.rpcClient.readContract({ - abi: moduleRegistryAbi, + abi: ipAssetRegistryAbi, address: this.address, - functionName: "governance", + functionName: "ipId", + args: [request.chainId, request.tokenContract, request.tokenId], }); } /** - * method isRegistered for contract ModuleRegistry + * method isRegistered for contract IPAssetRegistry * - * @param request ModuleRegistryIsRegisteredRequest - * @return Promise + * @param request IpAssetRegistryIsRegisteredRequest + * @return Promise */ public async isRegistered( - request: ModuleRegistryIsRegisteredRequest, - ): Promise { + request: IpAssetRegistryIsRegisteredRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: moduleRegistryAbi, + abi: ipAssetRegistryAbi, address: this.address, functionName: "isRegistered", - args: [request.moduleAddress], + args: [request.id], }); } } /** - * contract ModuleRegistry write method + * contract IPAssetRegistry write method */ -export class ModuleRegistryClient extends ModuleRegistryReadOnlyClient { - protected readonly wallet: WalletClient; +export class IpAssetRegistryClient extends IpAssetRegistryReadOnlyClient { + protected readonly wallet: SimpleWalletClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xB8617E2FC9dbFd51781B8D281b725976E3B43f9d", - ) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { super(rpcClient, address); this.wallet = wallet; } /** - * method registerModule for contract ModuleRegistry + * method register for contract IPAssetRegistry * - * @param request ModuleRegistryRegisterModuleRequest + * @param request IpAssetRegistryRegisterRequest * @return Promise */ - public async registerModule( - request: ModuleRegistryRegisterModuleRequest, - ): Promise { + public async register(request: IpAssetRegistryRegisterRequest): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: moduleRegistryAbi, + abi: ipAssetRegistryAbi, address: this.address, - functionName: "registerModule", + functionName: "register", account: this.wallet.account, - args: [request.name, request.moduleAddress], + args: [request.tokenContract, request.tokenId], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); + } +} + +// Contract IpRoyaltyVaultImpl ============================================================= + +/** + * IpRoyaltyVaultImplClaimableRevenueRequest + * + * @param account address + * @param snapshotId uint256 + * @param token address + */ +export type IpRoyaltyVaultImplClaimableRevenueRequest = { + account: Address; + snapshotId: bigint; + token: Address; +}; + +export type IpRoyaltyVaultImplClaimableRevenueResponse = bigint; + +export type IpRoyaltyVaultImplIpIdResponse = Address; + +/** + * IpRoyaltyVaultImplClaimRevenueBySnapshotBatchRequest + * + * @param snapshotIds uint256[] + * @param token address + */ +export type IpRoyaltyVaultImplClaimRevenueBySnapshotBatchRequest = { + snapshotIds: readonly bigint[]; + token: Address; +}; + +/** + * IpRoyaltyVaultImplClaimRevenueByTokenBatchRequest + * + * @param snapshotId uint256 + * @param tokens address[] + */ +export type IpRoyaltyVaultImplClaimRevenueByTokenBatchRequest = { + snapshotId: bigint; + tokens: readonly Address[]; +}; + +/** + * IpRoyaltyVaultImplCollectRoyaltyTokensRequest + * + * @param ancestorIpId address + */ +export type IpRoyaltyVaultImplCollectRoyaltyTokensRequest = { + ancestorIpId: Address; +}; + +/** + * contract IpRoyaltyVaultImpl readonly method + */ +export class IpRoyaltyVaultImplReadOnlyClient { + protected readonly rpcClient: PublicClient; + public readonly address: Address; + + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(ipRoyaltyVaultImplAddress, rpcClient.chain?.id); + this.rpcClient = rpcClient; } /** - * method registerModule for contract ModuleRegistry + * method claimableRevenue for contract IpRoyaltyVaultImpl * - * @param request ModuleRegistryRegisterModule2Request - * @return Promise + * @param request IpRoyaltyVaultImplClaimableRevenueRequest + * @return Promise */ - public async registerModule2( - request: ModuleRegistryRegisterModule2Request, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: moduleRegistryAbi, + public async claimableRevenue( + request: IpRoyaltyVaultImplClaimableRevenueRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: ipRoyaltyVaultImplAbi, address: this.address, - functionName: "registerModule", - account: this.wallet.account, - args: [request.name, request.moduleAddress, request.moduleType], + functionName: "claimableRevenue", + args: [request.account, request.snapshotId, request.token], }); - return await this.wallet.writeContract(call); } /** - * method registerModuleType for contract ModuleRegistry + * method ipId for contract IpRoyaltyVaultImpl * - * @param request ModuleRegistryRegisterModuleTypeRequest - * @return Promise + * @param request IpRoyaltyVaultImplIpIdRequest + * @return Promise */ - public async registerModuleType( - request: ModuleRegistryRegisterModuleTypeRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: moduleRegistryAbi, + public async ipId(): Promise { + return await this.rpcClient.readContract({ + abi: ipRoyaltyVaultImplAbi, address: this.address, - functionName: "registerModuleType", - account: this.wallet.account, - args: [request.name, request.interfaceId], + functionName: "ipId", }); - return await this.wallet.writeContract(call); + } +} + +/** + * contract IpRoyaltyVaultImpl write method + */ +export class IpRoyaltyVaultImplClient extends IpRoyaltyVaultImplReadOnlyClient { + protected readonly wallet: SimpleWalletClient; + + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { + super(rpcClient, address); + this.wallet = wallet; } /** - * method removeModule for contract ModuleRegistry + * method claimRevenueBySnapshotBatch for contract IpRoyaltyVaultImpl * - * @param request ModuleRegistryRemoveModuleRequest + * @param request IpRoyaltyVaultImplClaimRevenueBySnapshotBatchRequest * @return Promise */ - public async removeModule( - request: ModuleRegistryRemoveModuleRequest, + public async claimRevenueBySnapshotBatch( + request: IpRoyaltyVaultImplClaimRevenueBySnapshotBatchRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: moduleRegistryAbi, + abi: ipRoyaltyVaultImplAbi, address: this.address, - functionName: "removeModule", + functionName: "claimRevenueBySnapshotBatch", account: this.wallet.account, - args: [request.name], + args: [request.snapshotIds, request.token], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method removeModuleType for contract ModuleRegistry + * method claimRevenueByTokenBatch for contract IpRoyaltyVaultImpl * - * @param request ModuleRegistryRemoveModuleTypeRequest + * @param request IpRoyaltyVaultImplClaimRevenueByTokenBatchRequest * @return Promise */ - public async removeModuleType( - request: ModuleRegistryRemoveModuleTypeRequest, + public async claimRevenueByTokenBatch( + request: IpRoyaltyVaultImplClaimRevenueByTokenBatchRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: moduleRegistryAbi, + abi: ipRoyaltyVaultImplAbi, address: this.address, - functionName: "removeModuleType", + functionName: "claimRevenueByTokenBatch", account: this.wallet.account, - args: [request.name], + args: [request.snapshotId, request.tokens], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method setGovernance for contract ModuleRegistry + * method collectRoyaltyTokens for contract IpRoyaltyVaultImpl * - * @param request ModuleRegistrySetGovernanceRequest + * @param request IpRoyaltyVaultImplCollectRoyaltyTokensRequest * @return Promise */ - public async setGovernance( - request: ModuleRegistrySetGovernanceRequest, + public async collectRoyaltyTokens( + request: IpRoyaltyVaultImplCollectRoyaltyTokensRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: moduleRegistryAbi, + abi: ipRoyaltyVaultImplAbi, address: this.address, - functionName: "setGovernance", + functionName: "collectRoyaltyTokens", account: this.wallet.account, - args: [request.newGovernance], + args: [request.ancestorIpId], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } } +// Contract LicenseRegistry ============================================================= + /** - * contract ModuleRegistry event + * LicenseRegistryExpirationTimeSetEvent + * + * @param ipId address + * @param expireTime uint256 */ -export class ModuleRegistryEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; +export type LicenseRegistryExpirationTimeSetEvent = { + ipId: Address; + expireTime: bigint; +}; - constructor( - rpcClient: PublicClient, - address: Address = "0xB8617E2FC9dbFd51781B8D281b725976E3B43f9d", - ) { - this.address = address; - this.rpcClient = rpcClient; - } +/** + * LicenseRegistryGovernanceUpdatedEvent + * + * @param newGovernance address + */ +export type LicenseRegistryGovernanceUpdatedEvent = { + newGovernance: Address; +}; - /** - * event GovernanceUpdated for contract ModuleRegistry - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: ModuleRegistryGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: moduleRegistryAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } +/** + * LicenseRegistryInitializedEvent + * + * @param version uint64 + */ +export type LicenseRegistryInitializedEvent = { + version: bigint; +}; - /** - * event ModuleAdded for contract ModuleRegistry - */ - public watchModuleAddedEvent( - onLogs: (txHash: Hex, ev: ModuleRegistryModuleAddedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: moduleRegistryAbi, - address: this.address, - eventName: "ModuleAdded", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } +/** + * LicenseRegistryLicenseTemplateRegisteredEvent + * + * @param licenseTemplate address + */ +export type LicenseRegistryLicenseTemplateRegisteredEvent = { + licenseTemplate: Address; +}; - /** - * event ModuleRemoved for contract ModuleRegistry - */ - public watchModuleRemovedEvent( - onLogs: (txHash: Hex, ev: ModuleRegistryModuleRemovedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: moduleRegistryAbi, - address: this.address, - eventName: "ModuleRemoved", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } -} +/** + * LicenseRegistryMintingLicenseConfigSetForIpEvent + * + * @param ipId address + * @param mintingLicenseConfig tuple + */ +export type LicenseRegistryMintingLicenseConfigSetForIpEvent = { + ipId: Address; + mintingLicenseConfig: { + isSet: boolean; + mintingFee: bigint; + mintingFeeModule: Address; + receiverCheckModule: Address; + receiverCheckData: Hex; + }; +}; + +/** + * LicenseRegistryMintingLicenseConfigSetLicenseEvent + * + * @param ipId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + */ +export type LicenseRegistryMintingLicenseConfigSetLicenseEvent = { + ipId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; +}; + +/** + * LicenseRegistryUpgradedEvent + * + * @param implementation address + */ +export type LicenseRegistryUpgradedEvent = { + implementation: Address; +}; -// Contract PILPolicyFrameworkManager ============================================================= +export type LicenseRegistryExpirationTimeResponse = Hex; -export type PilPolicyFrameworkManagerAccessControllerResponse = Address; +export type LicenseRegistryUpgradeInterfaceVersionResponse = string; -export type PilPolicyFrameworkManagerIpAccountRegistryResponse = Address; +export type LicenseRegistryDisputeModuleResponse = Address; -export type PilPolicyFrameworkManagerLicenseRegistryResponse = Address; +/** + * LicenseRegistryExistsRequest + * + * @param licenseTemplate address + * @param licenseTermsId uint256 + */ +export type LicenseRegistryExistsRequest = { + licenseTemplate: Address; + licenseTermsId: bigint; +}; -export type PilPolicyFrameworkManagerLicensingModuleResponse = Address; +export type LicenseRegistryExistsResponse = boolean; /** - * PilPolicyFrameworkManagerGetAggregatorRequest + * LicenseRegistryGetAttachedLicenseTermsRequest * * @param ipId address + * @param index uint256 */ -export type PilPolicyFrameworkManagerGetAggregatorRequest = { +export type LicenseRegistryGetAttachedLicenseTermsRequest = { ipId: Address; + index: bigint; }; /** - * PilPolicyFrameworkManagerGetAggregatorResponse + * LicenseRegistryGetAttachedLicenseTermsResponse * - * @param rights tuple + * @param licenseTemplate address + * @param licenseTermsId uint256 */ -export type PilPolicyFrameworkManagerGetAggregatorResponse = { - rights: { - commercial: boolean; - derivativesReciprocal: boolean; - lastPolicyId: bigint; - territoriesAcc: Hex; - distributionChannelsAcc: Hex; - contentRestrictionsAcc: Hex; - }; +export type LicenseRegistryGetAttachedLicenseTermsResponse = { + licenseTemplate: Address; + licenseTermsId: bigint; }; /** - * PilPolicyFrameworkManagerGetPilPolicyRequest + * LicenseRegistryGetAttachedLicenseTermsCountRequest * - * @param policyId uint256 + * @param ipId address */ -export type PilPolicyFrameworkManagerGetPilPolicyRequest = { - policyId: bigint; +export type LicenseRegistryGetAttachedLicenseTermsCountRequest = { + ipId: Address; }; +export type LicenseRegistryGetAttachedLicenseTermsCountResponse = bigint; + /** - * PilPolicyFrameworkManagerGetPilPolicyResponse + * LicenseRegistryGetDefaultLicenseTermsResponse * - * @param policy tuple + * @param licenseTemplate address + * @param licenseTermsId uint256 */ -export type PilPolicyFrameworkManagerGetPilPolicyResponse = { - policy: { - attribution: boolean; - commercialUse: boolean; - commercialAttribution: boolean; - commercializerChecker: Address; - commercializerCheckerData: Hex; - commercialRevShare: number; - derivativesAllowed: boolean; - derivativesAttribution: boolean; - derivativesApproval: boolean; - derivativesReciprocal: boolean; - territories: readonly string[]; - distributionChannels: readonly string[]; - contentRestrictions: readonly string[]; - }; +export type LicenseRegistryGetDefaultLicenseTermsResponse = { + licenseTemplate: Address; + licenseTermsId: bigint; +}; + +/** + * LicenseRegistryGetDerivativeIpRequest + * + * @param parentIpId address + * @param index uint256 + */ +export type LicenseRegistryGetDerivativeIpRequest = { + parentIpId: Address; + index: bigint; +}; + +/** + * LicenseRegistryGetDerivativeIpResponse + * + * @param childIpId address + */ +export type LicenseRegistryGetDerivativeIpResponse = { + childIpId: Address; +}; + +/** + * LicenseRegistryGetDerivativeIpCountRequest + * + * @param parentIpId address + */ +export type LicenseRegistryGetDerivativeIpCountRequest = { + parentIpId: Address; +}; + +export type LicenseRegistryGetDerivativeIpCountResponse = bigint; + +/** + * LicenseRegistryGetExpireTimeRequest + * + * @param ipId address + */ +export type LicenseRegistryGetExpireTimeRequest = { + ipId: Address; +}; + +export type LicenseRegistryGetExpireTimeResponse = bigint; + +export type LicenseRegistryGetGovernanceResponse = Address; + +/** + * LicenseRegistryGetMintingLicenseConfigRequest + * + * @param ipId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + */ +export type LicenseRegistryGetMintingLicenseConfigRequest = { + ipId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; +}; + +export type LicenseRegistryGetMintingLicenseConfigResponse = { + isSet: boolean; + mintingFee: bigint; + mintingFeeModule: Address; + receiverCheckModule: Address; + receiverCheckData: Hex; +}; + +/** + * LicenseRegistryGetParentIpRequest + * + * @param childIpId address + * @param index uint256 + */ +export type LicenseRegistryGetParentIpRequest = { + childIpId: Address; + index: bigint; +}; + +/** + * LicenseRegistryGetParentIpResponse + * + * @param parentIpId address + */ +export type LicenseRegistryGetParentIpResponse = { + parentIpId: Address; +}; + +/** + * LicenseRegistryGetParentIpCountRequest + * + * @param childIpId address + */ +export type LicenseRegistryGetParentIpCountRequest = { + childIpId: Address; +}; + +export type LicenseRegistryGetParentIpCountResponse = bigint; + +/** + * LicenseRegistryHasDerivativeIpsRequest + * + * @param parentIpId address + */ +export type LicenseRegistryHasDerivativeIpsRequest = { + parentIpId: Address; }; +export type LicenseRegistryHasDerivativeIpsResponse = boolean; + +/** + * LicenseRegistryHasIpAttachedLicenseTermsRequest + * + * @param ipId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + */ +export type LicenseRegistryHasIpAttachedLicenseTermsRequest = { + ipId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; +}; + +export type LicenseRegistryHasIpAttachedLicenseTermsResponse = boolean; + /** - * PilPolicyFrameworkManagerIsDerivativeApprovedRequest + * LicenseRegistryIsDerivativeIpRequest * - * @param licenseId uint256 * @param childIpId address */ -export type PilPolicyFrameworkManagerIsDerivativeApprovedRequest = { - licenseId: bigint; +export type LicenseRegistryIsDerivativeIpRequest = { childIpId: Address; }; -export type PilPolicyFrameworkManagerIsDerivativeApprovedResponse = boolean; +export type LicenseRegistryIsDerivativeIpResponse = boolean; + +/** + * LicenseRegistryIsRegisteredLicenseTemplateRequest + * + * @param licenseTemplate address + */ +export type LicenseRegistryIsRegisteredLicenseTemplateRequest = { + licenseTemplate: Address; +}; + +export type LicenseRegistryIsRegisteredLicenseTemplateResponse = boolean; + +export type LicenseRegistryLicensingModuleResponse = Address; + +export type LicenseRegistryProxiableUuidResponse = Hex; + +/** + * LicenseRegistryVerifyMintLicenseTokenRequest + * + * @param licensorIpId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + * @param isMintedByIpOwner bool + */ +export type LicenseRegistryVerifyMintLicenseTokenRequest = { + licensorIpId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; + isMintedByIpOwner: boolean; +}; + +export type LicenseRegistryVerifyMintLicenseTokenResponse = { + isSet: boolean; + mintingFee: bigint; + mintingFeeModule: Address; + receiverCheckModule: Address; + receiverCheckData: Hex; +}; -export type PilPolicyFrameworkManagerLicenseTextUrlResponse = string; +/** + * LicenseRegistryAttachLicenseTermsToIpRequest + * + * @param ipId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + */ +export type LicenseRegistryAttachLicenseTermsToIpRequest = { + ipId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; +}; -export type PilPolicyFrameworkManagerNameResponse = string; +/** + * LicenseRegistryInitializeRequest + * + * @param governance address + */ +export type LicenseRegistryInitializeRequest = { + governance: Address; +}; /** - * PilPolicyFrameworkManagerPolicyToJsonRequest + * LicenseRegistryRegisterDerivativeIpRequest * - * @param policyData bytes + * @param childIpId address + * @param parentIpIds address[] + * @param licenseTemplate address + * @param licenseTermsIds uint256[] */ -export type PilPolicyFrameworkManagerPolicyToJsonRequest = { - policyData: Hex; +export type LicenseRegistryRegisterDerivativeIpRequest = { + childIpId: Address; + parentIpIds: readonly Address[]; + licenseTemplate: Address; + licenseTermsIds: readonly bigint[]; }; -export type PilPolicyFrameworkManagerPolicyToJsonResponse = string; +/** + * LicenseRegistryRegisterLicenseTemplateRequest + * + * @param licenseTemplate address + */ +export type LicenseRegistryRegisterLicenseTemplateRequest = { + licenseTemplate: Address; +}; /** - * PilPolicyFrameworkManagerProcessInheritedPoliciesRequest + * LicenseRegistrySetDefaultLicenseTermsRequest * - * @param aggregator bytes - * @param policyId uint256 - * @param policy bytes - */ -export type PilPolicyFrameworkManagerProcessInheritedPoliciesRequest = { - aggregator: Hex; - policyId: bigint; - policy: Hex; + * @param newLicenseTemplate address + * @param newLicenseTermsId uint256 + */ +export type LicenseRegistrySetDefaultLicenseTermsRequest = { + newLicenseTemplate: Address; + newLicenseTermsId: bigint; }; /** - * PilPolicyFrameworkManagerProcessInheritedPoliciesResponse + * LicenseRegistrySetDisputeModuleRequest * - * @param changedAgg bool - * @param newAggregator bytes + * @param newDisputeModule address */ -export type PilPolicyFrameworkManagerProcessInheritedPoliciesResponse = { - changedAgg: boolean; - newAggregator: Hex; +export type LicenseRegistrySetDisputeModuleRequest = { + newDisputeModule: Address; }; /** - * PilPolicyFrameworkManagerSupportsInterfaceRequest + * LicenseRegistrySetExpireTimeRequest * - * @param interfaceId bytes4 + * @param ipId address + * @param expireTime uint256 */ -export type PilPolicyFrameworkManagerSupportsInterfaceRequest = { - interfaceId: Hex; +export type LicenseRegistrySetExpireTimeRequest = { + ipId: Address; + expireTime: bigint; }; -export type PilPolicyFrameworkManagerSupportsInterfaceResponse = boolean; - /** - * PilPolicyFrameworkManagerRegisterPolicyRequest + * LicenseRegistrySetGovernanceRequest * - * @param params tuple + * @param newGovernance address */ -export type PilPolicyFrameworkManagerRegisterPolicyRequest = { - params: { - transferable: boolean; - royaltyPolicy: Address; - mintingFee: bigint; - mintingFeeToken: Address; - policy: { - attribution: boolean; - commercialUse: boolean; - commercialAttribution: boolean; - commercializerChecker: Address; - commercializerCheckerData: Hex; - commercialRevShare: number; - derivativesAllowed: boolean; - derivativesAttribution: boolean; - derivativesApproval: boolean; - derivativesReciprocal: boolean; - territories: readonly string[]; - distributionChannels: readonly string[]; - contentRestrictions: readonly string[]; - }; - }; +export type LicenseRegistrySetGovernanceRequest = { + newGovernance: Address; }; /** - * PilPolicyFrameworkManagerSetApprovalRequest + * LicenseRegistrySetLicensingModuleRequest * - * @param licenseId uint256 - * @param childIpId address - * @param approved bool + * @param newLicensingModule address */ -export type PilPolicyFrameworkManagerSetApprovalRequest = { - licenseId: bigint; - childIpId: Address; - approved: boolean; +export type LicenseRegistrySetLicensingModuleRequest = { + newLicensingModule: Address; }; /** - * PilPolicyFrameworkManagerVerifyLinkRequest + * LicenseRegistrySetMintingLicenseConfigForIpRequest * - * @param licenseId uint256 - * @param licensee address * @param ipId address - * @param parentIpId address - * @param policyData bytes + * @param mintingLicenseConfig tuple */ -export type PilPolicyFrameworkManagerVerifyLinkRequest = { - licenseId: bigint; - licensee: Address; +export type LicenseRegistrySetMintingLicenseConfigForIpRequest = { ipId: Address; - parentIpId: Address; - policyData: Hex; + mintingLicenseConfig: { + isSet: boolean; + mintingFee: bigint; + mintingFeeModule: Address; + receiverCheckModule: Address; + receiverCheckData: Hex; + }; }; /** - * PilPolicyFrameworkManagerVerifyMintRequest + * LicenseRegistrySetMintingLicenseConfigForLicenseRequest * - * @param licensee address - * @param mintingFromADerivative bool - * @param licensorIpId address - * @param receiver address - * @param mintAmount uint256 - * @param policyData bytes + * @param ipId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + * @param mintingLicenseConfig tuple */ -export type PilPolicyFrameworkManagerVerifyMintRequest = { - licensee: Address; - mintingFromADerivative: boolean; - licensorIpId: Address; - receiver: Address; - mintAmount: bigint; - policyData: Hex; +export type LicenseRegistrySetMintingLicenseConfigForLicenseRequest = { + ipId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; + mintingLicenseConfig: { + isSet: boolean; + mintingFee: bigint; + mintingFeeModule: Address; + receiverCheckModule: Address; + receiverCheckData: Hex; + }; }; /** - * PilPolicyFrameworkManagerDerivativeApprovedEvent + * LicenseRegistryUpgradeToAndCallRequest * - * @param licenseId uint256 (optional) - * @param ipId address (optional) - * @param caller address (optional) - * @param approved bool (optional) - */ -export type PilPolicyFrameworkManagerDerivativeApprovedEvent = { - licenseId?: bigint; - ipId?: Address; - caller?: Address; - approved?: boolean; + * @param newImplementation address + * @param data bytes + */ +export type LicenseRegistryUpgradeToAndCallRequest = { + newImplementation: Address; + data: Hex; }; /** - * contract PILPolicyFrameworkManager readonly method + * contract LicenseRegistry event */ -export class PilPolicyFrameworkManagerReadOnlyClient { +export class LicenseRegistryEventClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0xAc2C50Af31501370366D243FaeC56F89128f6d96", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(licenseRegistryAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * method ACCESS_CONTROLLER for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerAccessControllerRequest - * @return Promise + * event ExpirationTimeSet for contract LicenseRegistry */ - public async accessController(): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public watchExpirationTimeSetEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "ACCESS_CONTROLLER", + eventName: "ExpirationTimeSet", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method IP_ACCOUNT_REGISTRY for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerIpAccountRegistryRequest - * @return Promise + * parse tx receipt event ExpirationTimeSet for contract LicenseRegistry */ - public async ipAccountRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, - address: this.address, - functionName: "IP_ACCOUNT_REGISTRY", - }); + public parseTxExpirationTimeSetEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "ExpirationTimeSet", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "ExpirationTimeSet") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method LICENSE_REGISTRY for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerLicenseRegistryRequest - * @return Promise + * event GovernanceUpdated for contract LicenseRegistry */ - public async licenseRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public watchGovernanceUpdatedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "LICENSE_REGISTRY", + eventName: "GovernanceUpdated", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method LICENSING_MODULE for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerLicensingModuleRequest - * @return Promise + * parse tx receipt event GovernanceUpdated for contract LicenseRegistry */ - public async licensingModule(): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, - address: this.address, - functionName: "LICENSING_MODULE", - }); + public parseTxGovernanceUpdatedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "GovernanceUpdated", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "GovernanceUpdated") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method getAggregator for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerGetAggregatorRequest - * @return Promise + * event Initialized for contract LicenseRegistry */ - public async getAggregator( - request: PilPolicyFrameworkManagerGetAggregatorRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public watchInitializedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "getAggregator", - args: [request.ipId], + eventName: "Initialized", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); - return { - rights: result, - }; } /** - * method getPILPolicy for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerGetPilPolicyRequest - * @return Promise + * parse tx receipt event Initialized for contract LicenseRegistry */ - public async getPilPolicy( - request: PilPolicyFrameworkManagerGetPilPolicyRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, - address: this.address, - functionName: "getPILPolicy", - args: [request.policyId], - }); - return { - policy: result, - }; + public parseTxInitializedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "Initialized", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "Initialized") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method isDerivativeApproved for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerIsDerivativeApprovedRequest - * @return Promise + * event LicenseTemplateRegistered for contract LicenseRegistry */ - public async isDerivativeApproved( - request: PilPolicyFrameworkManagerIsDerivativeApprovedRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public watchLicenseTemplateRegisteredEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "isDerivativeApproved", - args: [request.licenseId, request.childIpId], + eventName: "LicenseTemplateRegistered", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method licenseTextUrl for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerLicenseTextUrlRequest - * @return Promise + * parse tx receipt event LicenseTemplateRegistered for contract LicenseRegistry */ - public async licenseTextUrl(): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, - address: this.address, - functionName: "licenseTextUrl", - }); + public parseTxLicenseTemplateRegisteredEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "LicenseTemplateRegistered", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "LicenseTemplateRegistered") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method name for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerNameRequest - * @return Promise + * event MintingLicenseConfigSetForIP for contract LicenseRegistry */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public watchMintingLicenseConfigSetForIpEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "name", + eventName: "MintingLicenseConfigSetForIP", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } /** - * method policyToJson for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerPolicyToJsonRequest - * @return Promise + * parse tx receipt event MintingLicenseConfigSetForIP for contract LicenseRegistry */ - public async policyToJson( - request: PilPolicyFrameworkManagerPolicyToJsonRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, - address: this.address, - functionName: "policyToJson", - args: [request.policyData], - }); + public parseTxMintingLicenseConfigSetForIpEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "MintingLicenseConfigSetForIP", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "MintingLicenseConfigSetForIP") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; } /** - * method processInheritedPolicies for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerProcessInheritedPoliciesRequest - * @return Promise + * event MintingLicenseConfigSetLicense for contract LicenseRegistry */ - public async processInheritedPolicies( - request: PilPolicyFrameworkManagerProcessInheritedPoliciesRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public watchMintingLicenseConfigSetLicenseEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "processInheritedPolicies", - args: [request.aggregator, request.policyId, request.policy], + eventName: "MintingLicenseConfigSetLicense", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); - return { - changedAgg: result[0], - newAggregator: result[1], - }; } /** - * method supportsInterface for contract PILPolicyFrameworkManager - * - * @param request PilPolicyFrameworkManagerSupportsInterfaceRequest - * @return Promise + * parse tx receipt event MintingLicenseConfigSetLicense for contract LicenseRegistry */ - public async supportsInterface( - request: PilPolicyFrameworkManagerSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: pilPolicyFrameworkManagerAbi, + public parseTxMintingLicenseConfigSetLicenseEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "MintingLicenseConfigSetLicense", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "MintingLicenseConfigSetLicense") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; + } + + /** + * event Upgraded for contract LicenseRegistry + */ + public watchUpgradedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: licenseRegistryAbi, address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], + eventName: "Upgraded", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, }); } + + /** + * parse tx receipt event Upgraded for contract LicenseRegistry + */ + public parseTxUpgradedEvent(txReceipt: TransactionReceipt): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licenseRegistryAbi, + eventName: "Upgraded", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "Upgraded") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; + } } /** - * contract PILPolicyFrameworkManager write method + * contract LicenseRegistry readonly method */ -export class PilPolicyFrameworkManagerClient extends PilPolicyFrameworkManagerReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xAc2C50Af31501370366D243FaeC56F89128f6d96", - ) { +export class LicenseRegistryReadOnlyClient extends LicenseRegistryEventClient { + constructor(rpcClient: PublicClient, address?: Address) { super(rpcClient, address); - this.wallet = wallet; } /** - * method registerPolicy for contract PILPolicyFrameworkManager + * method EXPIRATION_TIME for contract LicenseRegistry * - * @param request PilPolicyFrameworkManagerRegisterPolicyRequest - * @return Promise + * @param request LicenseRegistryExpirationTimeRequest + * @return Promise */ - public async registerPolicy( - request: PilPolicyFrameworkManagerRegisterPolicyRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: pilPolicyFrameworkManagerAbi, + public async expirationTime(): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "registerPolicy", - account: this.wallet.account, - args: [request.params], + functionName: "EXPIRATION_TIME", }); - return await this.wallet.writeContract(call); } /** - * method setApproval for contract PILPolicyFrameworkManager + * method UPGRADE_INTERFACE_VERSION for contract LicenseRegistry * - * @param request PilPolicyFrameworkManagerSetApprovalRequest - * @return Promise + * @param request LicenseRegistryUpgradeInterfaceVersionRequest + * @return Promise */ - public async setApproval( - request: PilPolicyFrameworkManagerSetApprovalRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: pilPolicyFrameworkManagerAbi, + public async upgradeInterfaceVersion(): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "setApproval", - account: this.wallet.account, - args: [request.licenseId, request.childIpId, request.approved], + functionName: "UPGRADE_INTERFACE_VERSION", }); - return await this.wallet.writeContract(call); } /** - * method verifyLink for contract PILPolicyFrameworkManager + * method disputeModule for contract LicenseRegistry * - * @param request PilPolicyFrameworkManagerVerifyLinkRequest - * @return Promise + * @param request LicenseRegistryDisputeModuleRequest + * @return Promise */ - public async verifyLink( - request: PilPolicyFrameworkManagerVerifyLinkRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: pilPolicyFrameworkManagerAbi, + public async disputeModule(): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "verifyLink", - account: this.wallet.account, - args: [ - request.licenseId, - request.licensee, - request.ipId, - request.parentIpId, - request.policyData, - ], + functionName: "disputeModule", }); - return await this.wallet.writeContract(call); } /** - * method verifyMint for contract PILPolicyFrameworkManager + * method exists for contract LicenseRegistry * - * @param request PilPolicyFrameworkManagerVerifyMintRequest - * @return Promise - */ - public async verifyMint( - request: PilPolicyFrameworkManagerVerifyMintRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: pilPolicyFrameworkManagerAbi, - address: this.address, - functionName: "verifyMint", - account: this.wallet.account, - args: [ - request.licensee, - request.mintingFromADerivative, - request.licensorIpId, - request.receiver, - request.mintAmount, - request.policyData, - ], - }); - return await this.wallet.writeContract(call); - } -} - -/** - * contract PILPolicyFrameworkManager event - */ -export class PilPolicyFrameworkManagerEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xAc2C50Af31501370366D243FaeC56F89128f6d96", - ) { - this.address = address; - this.rpcClient = rpcClient; - } - - /** - * event DerivativeApproved for contract PILPolicyFrameworkManager + * @param request LicenseRegistryExistsRequest + * @return Promise */ - public watchDerivativeApprovedEvent( - onLogs: (txHash: Hex, ev: PilPolicyFrameworkManagerDerivativeApprovedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: pilPolicyFrameworkManagerAbi, + public async exists( + request: LicenseRegistryExistsRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - eventName: "DerivativeApproved", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "exists", + args: [request.licenseTemplate, request.licenseTermsId], }); } -} - -// Contract RegistrationModule ============================================================= - -export type RegistrationModuleIpResolverResponse = Address; - -export type RegistrationModuleNameResponse = string; - -/** - * RegistrationModuleSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type RegistrationModuleSupportsInterfaceRequest = { - interfaceId: Hex; -}; - -export type RegistrationModuleSupportsInterfaceResponse = boolean; - -/** - * RegistrationModuleRegisterDerivativeIpRequest - * - * @param licenseIds uint256[] - * @param tokenContract address - * @param tokenId uint256 - * @param ipName string - * @param contentHash bytes32 - * @param externalURL string - * @param royaltyContext bytes - */ -export type RegistrationModuleRegisterDerivativeIpRequest = { - licenseIds: readonly bigint[]; - tokenContract: Address; - tokenId: bigint; - ipName: string; - contentHash: Hex; - externalURL: string; - royaltyContext: Hex; -}; - -/** - * RegistrationModuleRegisterRootIpRequest - * - * @param policyId uint256 - * @param tokenContract address - * @param tokenId uint256 - * @param ipName string - * @param contentHash bytes32 - * @param externalURL string - */ -export type RegistrationModuleRegisterRootIpRequest = { - policyId: bigint; - tokenContract: Address; - tokenId: bigint; - ipName: string; - contentHash: Hex; - externalURL: string; -}; - -/** - * RegistrationModuleDerivativeIpRegisteredEvent - * - * @param caller address (optional) - * @param ipId address (optional) - * @param licenseIds uint256[] (optional) - */ -export type RegistrationModuleDerivativeIpRegisteredEvent = { - caller?: Address; - ipId?: Address; - licenseIds?: readonly bigint[]; -}; - -/** - * RegistrationModuleRootIpRegisteredEvent - * - * @param caller address (optional) - * @param ipId address (optional) - * @param policyId uint256 (optional) - */ -export type RegistrationModuleRootIpRegisteredEvent = { - caller?: Address; - ipId?: Address; - policyId?: bigint; -}; - -/** - * contract RegistrationModule readonly method - */ -export class RegistrationModuleReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xa6249720b3BD1179d84b7E74029Ed2F78E5eC694", - ) { - this.address = address; - this.rpcClient = rpcClient; - } /** - * method ipResolver for contract RegistrationModule + * method getAttachedLicenseTerms for contract LicenseRegistry * - * @param request RegistrationModuleIpResolverRequest - * @return Promise + * @param request LicenseRegistryGetAttachedLicenseTermsRequest + * @return Promise */ - public async ipResolver(): Promise { - return await this.rpcClient.readContract({ - abi: registrationModuleAbi, + public async getAttachedLicenseTerms( + request: LicenseRegistryGetAttachedLicenseTermsRequest, + ): Promise { + const result = await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "ipResolver", + functionName: "getAttachedLicenseTerms", + args: [request.ipId, request.index], }); + return { + licenseTemplate: result[0], + licenseTermsId: result[1], + }; } /** - * method name for contract RegistrationModule + * method getAttachedLicenseTermsCount for contract LicenseRegistry * - * @param request RegistrationModuleNameRequest - * @return Promise + * @param request LicenseRegistryGetAttachedLicenseTermsCountRequest + * @return Promise */ - public async name(): Promise { + public async getAttachedLicenseTermsCount( + request: LicenseRegistryGetAttachedLicenseTermsCountRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: registrationModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "name", + functionName: "getAttachedLicenseTermsCount", + args: [request.ipId], }); } /** - * method supportsInterface for contract RegistrationModule + * method getDefaultLicenseTerms for contract LicenseRegistry * - * @param request RegistrationModuleSupportsInterfaceRequest - * @return Promise + * @param request LicenseRegistryGetDefaultLicenseTermsRequest + * @return Promise */ - public async supportsInterface( - request: RegistrationModuleSupportsInterfaceRequest, - ): Promise { - return await this.rpcClient.readContract({ - abi: registrationModuleAbi, + public async getDefaultLicenseTerms(): Promise { + const result = await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], + functionName: "getDefaultLicenseTerms", }); - } -} - -/** - * contract RegistrationModule write method - */ -export class RegistrationModuleClient extends RegistrationModuleReadOnlyClient { - protected readonly wallet: WalletClient; - - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xa6249720b3BD1179d84b7E74029Ed2F78E5eC694", - ) { - super(rpcClient, address); - this.wallet = wallet; + return { + licenseTemplate: result[0], + licenseTermsId: result[1], + }; } /** - * method registerDerivativeIp for contract RegistrationModule + * method getDerivativeIp for contract LicenseRegistry * - * @param request RegistrationModuleRegisterDerivativeIpRequest - * @return Promise + * @param request LicenseRegistryGetDerivativeIpRequest + * @return Promise */ - public async registerDerivativeIp( - request: RegistrationModuleRegisterDerivativeIpRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: registrationModuleAbi, + public async getDerivativeIp( + request: LicenseRegistryGetDerivativeIpRequest, + ): Promise { + const result = await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "registerDerivativeIp", - account: this.wallet.account, - args: [ - request.licenseIds, - request.tokenContract, - request.tokenId, - request.ipName, - request.contentHash, - request.externalURL, - request.royaltyContext, - ], + functionName: "getDerivativeIp", + args: [request.parentIpId, request.index], }); - return await this.wallet.writeContract(call); + return { + childIpId: result, + }; } /** - * method registerRootIp for contract RegistrationModule + * method getDerivativeIpCount for contract LicenseRegistry * - * @param request RegistrationModuleRegisterRootIpRequest - * @return Promise + * @param request LicenseRegistryGetDerivativeIpCountRequest + * @return Promise */ - public async registerRootIp( - request: RegistrationModuleRegisterRootIpRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: registrationModuleAbi, + public async getDerivativeIpCount( + request: LicenseRegistryGetDerivativeIpCountRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "registerRootIp", - account: this.wallet.account, - args: [ - request.policyId, - request.tokenContract, - request.tokenId, - request.ipName, - request.contentHash, - request.externalURL, - ], + functionName: "getDerivativeIpCount", + args: [request.parentIpId], }); - return await this.wallet.writeContract(call); } -} - -/** - * contract RegistrationModule event - */ -export class RegistrationModuleEventClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0xa6249720b3BD1179d84b7E74029Ed2F78E5eC694", - ) { - this.address = address; - this.rpcClient = rpcClient; + /** + * method getExpireTime for contract LicenseRegistry + * + * @param request LicenseRegistryGetExpireTimeRequest + * @return Promise + */ + public async getExpireTime( + request: LicenseRegistryGetExpireTimeRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, + address: this.address, + functionName: "getExpireTime", + args: [request.ipId], + }); } /** - * event DerivativeIPRegistered for contract RegistrationModule + * method getGovernance for contract LicenseRegistry + * + * @param request LicenseRegistryGetGovernanceRequest + * @return Promise */ - public watchDerivativeIpRegisteredEvent( - onLogs: (txHash: Hex, ev: RegistrationModuleDerivativeIpRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: registrationModuleAbi, + public async getGovernance(): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - eventName: "DerivativeIPRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "getGovernance", }); } /** - * event RootIPRegistered for contract RegistrationModule + * method getMintingLicenseConfig for contract LicenseRegistry + * + * @param request LicenseRegistryGetMintingLicenseConfigRequest + * @return Promise */ - public watchRootIpRegisteredEvent( - onLogs: (txHash: Hex, ev: RegistrationModuleRootIpRegisteredEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: registrationModuleAbi, + public async getMintingLicenseConfig( + request: LicenseRegistryGetMintingLicenseConfigRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - eventName: "RootIPRegistered", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "getMintingLicenseConfig", + args: [request.ipId, request.licenseTemplate, request.licenseTermsId], }); } -} - -// Contract RoyaltyModule ============================================================= - -export type RoyaltyModuleLicensingModuleResponse = Address; - -export type RoyaltyModuleGetGovernanceResponse = Address; - -export type RoyaltyModuleGovernanceResponse = Address; - -/** - * RoyaltyModuleIsWhitelistedRoyaltyPolicyRequest - * - * @param royaltyPolicy address - */ -export type RoyaltyModuleIsWhitelistedRoyaltyPolicyRequest = { - royaltyPolicy: Address; -}; - -/** - * RoyaltyModuleIsWhitelistedRoyaltyPolicyResponse - * - * @param isWhitelisted bool - */ -export type RoyaltyModuleIsWhitelistedRoyaltyPolicyResponse = { - isWhitelisted: boolean; -}; - -/** - * RoyaltyModuleIsWhitelistedRoyaltyTokenRequest - * - * @param token address - */ -export type RoyaltyModuleIsWhitelistedRoyaltyTokenRequest = { - token: Address; -}; - -export type RoyaltyModuleIsWhitelistedRoyaltyTokenResponse = boolean; - -export type RoyaltyModuleNameResponse = string; - -/** - * RoyaltyModuleRoyaltyPoliciesRequest - * - * @param ipId address - */ -export type RoyaltyModuleRoyaltyPoliciesRequest = { - ipId: Address; -}; - -/** - * RoyaltyModuleRoyaltyPoliciesResponse - * - * @param royaltyPolicy address - */ -export type RoyaltyModuleRoyaltyPoliciesResponse = { - royaltyPolicy: Address; -}; - -/** - * RoyaltyModuleSupportsInterfaceRequest - * - * @param interfaceId bytes4 - */ -export type RoyaltyModuleSupportsInterfaceRequest = { - interfaceId: Hex; -}; -export type RoyaltyModuleSupportsInterfaceResponse = boolean; - -/** - * RoyaltyModuleOnLicenseMintingRequest - * - * @param ipId address - * @param royaltyPolicy address - * @param licenseData bytes - * @param externalData bytes - */ -export type RoyaltyModuleOnLicenseMintingRequest = { - ipId: Address; - royaltyPolicy: Address; - licenseData: Hex; - externalData: Hex; -}; - -/** - * RoyaltyModuleOnLinkToParentsRequest - * - * @param ipId address - * @param royaltyPolicy address - * @param parentIpIds address[] - * @param licenseData bytes[] - * @param externalData bytes - */ -export type RoyaltyModuleOnLinkToParentsRequest = { - ipId: Address; - royaltyPolicy: Address; - parentIpIds: readonly Address[]; - licenseData: readonly Hex[]; - externalData: Hex; -}; - -/** - * RoyaltyModulePayLicenseMintingFeeRequest - * - * @param receiverIpId address - * @param payerAddress address - * @param licenseRoyaltyPolicy address - * @param token address - * @param amount uint256 - */ -export type RoyaltyModulePayLicenseMintingFeeRequest = { - receiverIpId: Address; - payerAddress: Address; - licenseRoyaltyPolicy: Address; - token: Address; - amount: bigint; -}; - -/** - * RoyaltyModulePayRoyaltyOnBehalfRequest - * - * @param receiverIpId address - * @param payerIpId address - * @param token address - * @param amount uint256 - */ -export type RoyaltyModulePayRoyaltyOnBehalfRequest = { - receiverIpId: Address; - payerIpId: Address; - token: Address; - amount: bigint; -}; - -/** - * RoyaltyModuleSetGovernanceRequest - * - * @param newGovernance address - */ -export type RoyaltyModuleSetGovernanceRequest = { - newGovernance: Address; -}; - -/** - * RoyaltyModuleSetLicensingModuleRequest - * - * @param licensingModule address - */ -export type RoyaltyModuleSetLicensingModuleRequest = { - licensingModule: Address; -}; - -/** - * RoyaltyModuleWhitelistRoyaltyPolicyRequest - * - * @param royaltyPolicy address - * @param allowed bool - */ -export type RoyaltyModuleWhitelistRoyaltyPolicyRequest = { - royaltyPolicy: Address; - allowed: boolean; -}; - -/** - * RoyaltyModuleWhitelistRoyaltyTokenRequest - * - * @param token address - * @param allowed bool - */ -export type RoyaltyModuleWhitelistRoyaltyTokenRequest = { - token: Address; - allowed: boolean; -}; - -/** - * RoyaltyModuleGovernanceUpdatedEvent - * - * @param newGovernance address (optional) - */ -export type RoyaltyModuleGovernanceUpdatedEvent = { - newGovernance?: Address; -}; - -/** - * RoyaltyModuleLicenseMintingFeePaidEvent - * - * @param receiverIpId address (optional) - * @param payerAddress address (optional) - * @param token address (optional) - * @param amount uint256 (optional) - */ -export type RoyaltyModuleLicenseMintingFeePaidEvent = { - receiverIpId?: Address; - payerAddress?: Address; - token?: Address; - amount?: bigint; -}; - -/** - * RoyaltyModuleRoyaltyPaidEvent - * - * @param receiverIpId address (optional) - * @param payerIpId address (optional) - * @param sender address (optional) - * @param token address (optional) - * @param amount uint256 (optional) - */ -export type RoyaltyModuleRoyaltyPaidEvent = { - receiverIpId?: Address; - payerIpId?: Address; - sender?: Address; - token?: Address; - amount?: bigint; -}; - -/** - * RoyaltyModuleRoyaltyPolicyWhitelistUpdatedEvent - * - * @param royaltyPolicy address (optional) - * @param allowed bool (optional) - */ -export type RoyaltyModuleRoyaltyPolicyWhitelistUpdatedEvent = { - royaltyPolicy?: Address; - allowed?: boolean; -}; - -/** - * RoyaltyModuleRoyaltyTokenWhitelistUpdatedEvent - * - * @param token address (optional) - * @param allowed bool (optional) - */ -export type RoyaltyModuleRoyaltyTokenWhitelistUpdatedEvent = { - token?: Address; - allowed?: boolean; -}; - -/** - * contract RoyaltyModule readonly method - */ -export class RoyaltyModuleReadOnlyClient { - protected readonly rpcClient: PublicClient; - protected readonly address: Address; - - constructor( - rpcClient: PublicClient, - address: Address = "0xE1a667ccc38540b38d8579c499bE22e51390a308", - ) { - this.address = address; - this.rpcClient = rpcClient; + /** + * method getParentIp for contract LicenseRegistry + * + * @param request LicenseRegistryGetParentIpRequest + * @return Promise + */ + public async getParentIp( + request: LicenseRegistryGetParentIpRequest, + ): Promise { + const result = await this.rpcClient.readContract({ + abi: licenseRegistryAbi, + address: this.address, + functionName: "getParentIp", + args: [request.childIpId, request.index], + }); + return { + parentIpId: result, + }; } /** - * method LICENSING_MODULE for contract RoyaltyModule + * method getParentIpCount for contract LicenseRegistry * - * @param request RoyaltyModuleLicensingModuleRequest - * @return Promise + * @param request LicenseRegistryGetParentIpCountRequest + * @return Promise */ - public async licensingModule(): Promise { + public async getParentIpCount( + request: LicenseRegistryGetParentIpCountRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "LICENSING_MODULE", + functionName: "getParentIpCount", + args: [request.childIpId], }); } /** - * method getGovernance for contract RoyaltyModule + * method hasDerivativeIps for contract LicenseRegistry * - * @param request RoyaltyModuleGetGovernanceRequest - * @return Promise + * @param request LicenseRegistryHasDerivativeIpsRequest + * @return Promise */ - public async getGovernance(): Promise { + public async hasDerivativeIps( + request: LicenseRegistryHasDerivativeIpsRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "getGovernance", + functionName: "hasDerivativeIps", + args: [request.parentIpId], }); } /** - * method governance for contract RoyaltyModule + * method hasIpAttachedLicenseTerms for contract LicenseRegistry * - * @param request RoyaltyModuleGovernanceRequest - * @return Promise + * @param request LicenseRegistryHasIpAttachedLicenseTermsRequest + * @return Promise */ - public async governance(): Promise { + public async hasIpAttachedLicenseTerms( + request: LicenseRegistryHasIpAttachedLicenseTermsRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "governance", + functionName: "hasIpAttachedLicenseTerms", + args: [request.ipId, request.licenseTemplate, request.licenseTermsId], }); } /** - * method isWhitelistedRoyaltyPolicy for contract RoyaltyModule + * method isDerivativeIp for contract LicenseRegistry * - * @param request RoyaltyModuleIsWhitelistedRoyaltyPolicyRequest - * @return Promise + * @param request LicenseRegistryIsDerivativeIpRequest + * @return Promise */ - public async isWhitelistedRoyaltyPolicy( - request: RoyaltyModuleIsWhitelistedRoyaltyPolicyRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + public async isDerivativeIp( + request: LicenseRegistryIsDerivativeIpRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "isWhitelistedRoyaltyPolicy", - args: [request.royaltyPolicy], + functionName: "isDerivativeIp", + args: [request.childIpId], }); - return { - isWhitelisted: result, - }; } /** - * method isWhitelistedRoyaltyToken for contract RoyaltyModule + * method isRegisteredLicenseTemplate for contract LicenseRegistry * - * @param request RoyaltyModuleIsWhitelistedRoyaltyTokenRequest - * @return Promise + * @param request LicenseRegistryIsRegisteredLicenseTemplateRequest + * @return Promise */ - public async isWhitelistedRoyaltyToken( - request: RoyaltyModuleIsWhitelistedRoyaltyTokenRequest, - ): Promise { + public async isRegisteredLicenseTemplate( + request: LicenseRegistryIsRegisteredLicenseTemplateRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "isWhitelistedRoyaltyToken", - args: [request.token], + functionName: "isRegisteredLicenseTemplate", + args: [request.licenseTemplate], }); } /** - * method name for contract RoyaltyModule + * method licensingModule for contract LicenseRegistry * - * @param request RoyaltyModuleNameRequest - * @return Promise + * @param request LicenseRegistryLicensingModuleRequest + * @return Promise */ - public async name(): Promise { + public async licensingModule(): Promise { return await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "name", + functionName: "licensingModule", }); } /** - * method royaltyPolicies for contract RoyaltyModule + * method proxiableUUID for contract LicenseRegistry * - * @param request RoyaltyModuleRoyaltyPoliciesRequest - * @return Promise + * @param request LicenseRegistryProxiableUuidRequest + * @return Promise */ - public async royaltyPolicies( - request: RoyaltyModuleRoyaltyPoliciesRequest, - ): Promise { - const result = await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + public async proxiableUuid(): Promise { + return await this.rpcClient.readContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "royaltyPolicies", - args: [request.ipId], + functionName: "proxiableUUID", }); - return { - royaltyPolicy: result, - }; } /** - * method supportsInterface for contract RoyaltyModule + * method verifyMintLicenseToken for contract LicenseRegistry * - * @param request RoyaltyModuleSupportsInterfaceRequest - * @return Promise + * @param request LicenseRegistryVerifyMintLicenseTokenRequest + * @return Promise */ - public async supportsInterface( - request: RoyaltyModuleSupportsInterfaceRequest, - ): Promise { + public async verifyMintLicenseToken( + request: LicenseRegistryVerifyMintLicenseTokenRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], + functionName: "verifyMintLicenseToken", + args: [ + request.licensorIpId, + request.licenseTemplate, + request.licenseTermsId, + request.isMintedByIpOwner, + ], }); } } /** - * contract RoyaltyModule write method + * contract LicenseRegistry write method */ -export class RoyaltyModuleClient extends RoyaltyModuleReadOnlyClient { - protected readonly wallet: WalletClient; +export class LicenseRegistryClient extends LicenseRegistryReadOnlyClient { + protected readonly wallet: SimpleWalletClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0xE1a667ccc38540b38d8579c499bE22e51390a308", - ) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { super(rpcClient, address); this.wallet = wallet; } /** - * method onLicenseMinting for contract RoyaltyModule + * method attachLicenseTermsToIp for contract LicenseRegistry * - * @param request RoyaltyModuleOnLicenseMintingRequest + * @param request LicenseRegistryAttachLicenseTermsToIpRequest * @return Promise */ - public async onLicenseMinting( - request: RoyaltyModuleOnLicenseMintingRequest, + public async attachLicenseTermsToIp( + request: LicenseRegistryAttachLicenseTermsToIpRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "onLicenseMinting", + functionName: "attachLicenseTermsToIp", account: this.wallet.account, - args: [request.ipId, request.royaltyPolicy, request.licenseData, request.externalData], + args: [request.ipId, request.licenseTemplate, request.licenseTermsId], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method onLinkToParents for contract RoyaltyModule + * method initialize for contract LicenseRegistry * - * @param request RoyaltyModuleOnLinkToParentsRequest + * @param request LicenseRegistryInitializeRequest * @return Promise */ - public async onLinkToParents( - request: RoyaltyModuleOnLinkToParentsRequest, + public async initialize( + request: LicenseRegistryInitializeRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, + address: this.address, + functionName: "initialize", + account: this.wallet.account, + args: [request.governance], + }); + return await this.wallet.writeContract(call as WriteContractParameters); + } + + /** + * method registerDerivativeIp for contract LicenseRegistry + * + * @param request LicenseRegistryRegisterDerivativeIpRequest + * @return Promise + */ + public async registerDerivativeIp( + request: LicenseRegistryRegisterDerivativeIpRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licenseRegistryAbi, address: this.address, - functionName: "onLinkToParents", + functionName: "registerDerivativeIp", account: this.wallet.account, args: [ - request.ipId, - request.royaltyPolicy, + request.childIpId, request.parentIpIds, - request.licenseData, - request.externalData, + request.licenseTemplate, + request.licenseTermsIds, ], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method payLicenseMintingFee for contract RoyaltyModule + * method registerLicenseTemplate for contract LicenseRegistry * - * @param request RoyaltyModulePayLicenseMintingFeeRequest + * @param request LicenseRegistryRegisterLicenseTemplateRequest * @return Promise */ - public async payLicenseMintingFee( - request: RoyaltyModulePayLicenseMintingFeeRequest, + public async registerLicenseTemplate( + request: LicenseRegistryRegisterLicenseTemplateRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "payLicenseMintingFee", + functionName: "registerLicenseTemplate", account: this.wallet.account, - args: [ - request.receiverIpId, - request.payerAddress, - request.licenseRoyaltyPolicy, - request.token, - request.amount, - ], + args: [request.licenseTemplate], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method payRoyaltyOnBehalf for contract RoyaltyModule + * method setDefaultLicenseTerms for contract LicenseRegistry * - * @param request RoyaltyModulePayRoyaltyOnBehalfRequest + * @param request LicenseRegistrySetDefaultLicenseTermsRequest * @return Promise */ - public async payRoyaltyOnBehalf( - request: RoyaltyModulePayRoyaltyOnBehalfRequest, + public async setDefaultLicenseTerms( + request: LicenseRegistrySetDefaultLicenseTermsRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "payRoyaltyOnBehalf", + functionName: "setDefaultLicenseTerms", account: this.wallet.account, - args: [request.receiverIpId, request.payerIpId, request.token, request.amount], + args: [request.newLicenseTemplate, request.newLicenseTermsId], + }); + return await this.wallet.writeContract(call as WriteContractParameters); + } + + /** + * method setDisputeModule for contract LicenseRegistry + * + * @param request LicenseRegistrySetDisputeModuleRequest + * @return Promise + */ + public async setDisputeModule( + request: LicenseRegistrySetDisputeModuleRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licenseRegistryAbi, + address: this.address, + functionName: "setDisputeModule", + account: this.wallet.account, + args: [request.newDisputeModule], + }); + return await this.wallet.writeContract(call as WriteContractParameters); + } + + /** + * method setExpireTime for contract LicenseRegistry + * + * @param request LicenseRegistrySetExpireTimeRequest + * @return Promise + */ + public async setExpireTime( + request: LicenseRegistrySetExpireTimeRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licenseRegistryAbi, + address: this.address, + functionName: "setExpireTime", + account: this.wallet.account, + args: [request.ipId, request.expireTime], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method setGovernance for contract RoyaltyModule + * method setGovernance for contract LicenseRegistry * - * @param request RoyaltyModuleSetGovernanceRequest + * @param request LicenseRegistrySetGovernanceRequest * @return Promise */ public async setGovernance( - request: RoyaltyModuleSetGovernanceRequest, + request: LicenseRegistrySetGovernanceRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, functionName: "setGovernance", account: this.wallet.account, args: [request.newGovernance], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method setLicensingModule for contract RoyaltyModule + * method setLicensingModule for contract LicenseRegistry * - * @param request RoyaltyModuleSetLicensingModuleRequest + * @param request LicenseRegistrySetLicensingModuleRequest * @return Promise */ public async setLicensingModule( - request: RoyaltyModuleSetLicensingModuleRequest, + request: LicenseRegistrySetLicensingModuleRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, functionName: "setLicensingModule", account: this.wallet.account, - args: [request.licensingModule], + args: [request.newLicensingModule], + }); + return await this.wallet.writeContract(call as WriteContractParameters); + } + + /** + * method setMintingLicenseConfigForIp for contract LicenseRegistry + * + * @param request LicenseRegistrySetMintingLicenseConfigForIpRequest + * @return Promise + */ + public async setMintingLicenseConfigForIp( + request: LicenseRegistrySetMintingLicenseConfigForIpRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licenseRegistryAbi, + address: this.address, + functionName: "setMintingLicenseConfigForIp", + account: this.wallet.account, + args: [request.ipId, request.mintingLicenseConfig], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method whitelistRoyaltyPolicy for contract RoyaltyModule + * method setMintingLicenseConfigForLicense for contract LicenseRegistry * - * @param request RoyaltyModuleWhitelistRoyaltyPolicyRequest + * @param request LicenseRegistrySetMintingLicenseConfigForLicenseRequest * @return Promise */ - public async whitelistRoyaltyPolicy( - request: RoyaltyModuleWhitelistRoyaltyPolicyRequest, + public async setMintingLicenseConfigForLicense( + request: LicenseRegistrySetMintingLicenseConfigForLicenseRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "whitelistRoyaltyPolicy", + functionName: "setMintingLicenseConfigForLicense", account: this.wallet.account, - args: [request.royaltyPolicy, request.allowed], + args: [ + request.ipId, + request.licenseTemplate, + request.licenseTermsId, + request.mintingLicenseConfig, + ], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method whitelistRoyaltyToken for contract RoyaltyModule + * method upgradeToAndCall for contract LicenseRegistry * - * @param request RoyaltyModuleWhitelistRoyaltyTokenRequest + * @param request LicenseRegistryUpgradeToAndCallRequest * @return Promise */ - public async whitelistRoyaltyToken( - request: RoyaltyModuleWhitelistRoyaltyTokenRequest, + public async upgradeToAndCall( + request: LicenseRegistryUpgradeToAndCallRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyModuleAbi, + abi: licenseRegistryAbi, address: this.address, - functionName: "whitelistRoyaltyToken", + functionName: "upgradeToAndCall", account: this.wallet.account, - args: [request.token, request.allowed], + args: [request.newImplementation, request.data], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } } +// Contract LicensingModule ============================================================= + +/** + * LicensingModuleLicenseTokensMintedEvent + * + * @param caller address + * @param licensorIpId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + * @param amount uint256 + * @param receiver address + * @param startLicenseTokenId uint256 + */ +export type LicensingModuleLicenseTokensMintedEvent = { + caller: Address; + licensorIpId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; + amount: bigint; + receiver: Address; + startLicenseTokenId: bigint; +}; + +/** + * LicensingModuleAttachLicenseTermsRequest + * + * @param ipId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + */ +export type LicensingModuleAttachLicenseTermsRequest = { + ipId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; +}; + +/** + * LicensingModuleMintLicenseTokensRequest + * + * @param licensorIpId address + * @param licenseTemplate address + * @param licenseTermsId uint256 + * @param amount uint256 + * @param receiver address + * @param royaltyContext bytes + */ +export type LicensingModuleMintLicenseTokensRequest = { + licensorIpId: Address; + licenseTemplate: Address; + licenseTermsId: bigint; + amount: bigint; + receiver: Address; + royaltyContext: Hex; +}; + +/** + * LicensingModuleRegisterDerivativeRequest + * + * @param childIpId address + * @param parentIpIds address[] + * @param licenseTermsIds uint256[] + * @param licenseTemplate address + * @param royaltyContext bytes + */ +export type LicensingModuleRegisterDerivativeRequest = { + childIpId: Address; + parentIpIds: readonly Address[]; + licenseTermsIds: readonly bigint[]; + licenseTemplate: Address; + royaltyContext: Hex; +}; + +/** + * LicensingModuleRegisterDerivativeWithLicenseTokensRequest + * + * @param childIpId address + * @param licenseTokenIds uint256[] + * @param royaltyContext bytes + */ +export type LicensingModuleRegisterDerivativeWithLicenseTokensRequest = { + childIpId: Address; + licenseTokenIds: readonly bigint[]; + royaltyContext: Hex; +}; + /** - * contract RoyaltyModule event + * contract LicensingModule event */ -export class RoyaltyModuleEventClient { +export class LicensingModuleEventClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0xE1a667ccc38540b38d8579c499bE22e51390a308", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(licensingModuleAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * event GovernanceUpdated for contract RoyaltyModule + * event LicenseTokensMinted for contract LicensingModule */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: RoyaltyModuleGovernanceUpdatedEvent) => void, + public watchLicenseTokensMintedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, ): WatchContractEventReturnType { return this.rpcClient.watchContractEvent({ - abi: royaltyModuleAbi, + abi: licensingModuleAbi, address: this.address, - eventName: "GovernanceUpdated", + eventName: "LicenseTokensMinted", onLogs: (evs) => { evs.forEach((it) => onLogs(it.transactionHash, it.args)); }, @@ -15115,993 +6774,1191 @@ export class RoyaltyModuleEventClient { } /** - * event LicenseMintingFeePaid for contract RoyaltyModule + * parse tx receipt event LicenseTokensMinted for contract LicensingModule */ - public watchLicenseMintingFeePaidEvent( - onLogs: (txHash: Hex, ev: RoyaltyModuleLicenseMintingFeePaidEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: royaltyModuleAbi, + public parseTxLicenseTokensMintedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: licensingModuleAbi, + eventName: "LicenseTokensMinted", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "LicenseTokensMinted") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; + } +} + +/** + * contract LicensingModule write method + */ +export class LicensingModuleClient extends LicensingModuleEventClient { + protected readonly wallet: SimpleWalletClient; + + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { + super(rpcClient, address); + this.wallet = wallet; + } + + /** + * method attachLicenseTerms for contract LicensingModule + * + * @param request LicensingModuleAttachLicenseTermsRequest + * @return Promise + */ + public async attachLicenseTerms( + request: LicensingModuleAttachLicenseTermsRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licensingModuleAbi, address: this.address, - eventName: "LicenseMintingFeePaid", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "attachLicenseTerms", + account: this.wallet.account, + args: [request.ipId, request.licenseTemplate, request.licenseTermsId], }); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * event RoyaltyPaid for contract RoyaltyModule + * method mintLicenseTokens for contract LicensingModule + * + * @param request LicensingModuleMintLicenseTokensRequest + * @return Promise */ - public watchRoyaltyPaidEvent( - onLogs: (txHash: Hex, ev: RoyaltyModuleRoyaltyPaidEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: royaltyModuleAbi, + public async mintLicenseTokens( + request: LicensingModuleMintLicenseTokensRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licensingModuleAbi, address: this.address, - eventName: "RoyaltyPaid", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "mintLicenseTokens", + account: this.wallet.account, + args: [ + request.licensorIpId, + request.licenseTemplate, + request.licenseTermsId, + request.amount, + request.receiver, + request.royaltyContext, + ], + }); + return await this.wallet.writeContract(call as WriteContractParameters); + } + + /** + * method registerDerivative for contract LicensingModule + * + * @param request LicensingModuleRegisterDerivativeRequest + * @return Promise + */ + public async registerDerivative( + request: LicensingModuleRegisterDerivativeRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licensingModuleAbi, + address: this.address, + functionName: "registerDerivative", + account: this.wallet.account, + args: [ + request.childIpId, + request.parentIpIds, + request.licenseTermsIds, + request.licenseTemplate, + request.royaltyContext, + ], + }); + return await this.wallet.writeContract(call as WriteContractParameters); + } + + /** + * method registerDerivativeWithLicenseTokens for contract LicensingModule + * + * @param request LicensingModuleRegisterDerivativeWithLicenseTokensRequest + * @return Promise + */ + public async registerDerivativeWithLicenseTokens( + request: LicensingModuleRegisterDerivativeWithLicenseTokensRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: licensingModuleAbi, + address: this.address, + functionName: "registerDerivativeWithLicenseTokens", + account: this.wallet.account, + args: [request.childIpId, request.licenseTokenIds, request.royaltyContext], }); + return await this.wallet.writeContract(call as WriteContractParameters); } +} + +// Contract ModuleRegistry ============================================================= + +/** + * ModuleRegistryIsRegisteredRequest + * + * @param moduleAddress address + */ +export type ModuleRegistryIsRegisteredRequest = { + moduleAddress: Address; +}; - /** - * event RoyaltyPolicyWhitelistUpdated for contract RoyaltyModule - */ - public watchRoyaltyPolicyWhitelistUpdatedEvent( - onLogs: (txHash: Hex, ev: RoyaltyModuleRoyaltyPolicyWhitelistUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: royaltyModuleAbi, - address: this.address, - eventName: "RoyaltyPolicyWhitelistUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); +export type ModuleRegistryIsRegisteredResponse = boolean; + +/** + * contract ModuleRegistry readonly method + */ +export class ModuleRegistryReadOnlyClient { + protected readonly rpcClient: PublicClient; + public readonly address: Address; + + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(moduleRegistryAddress, rpcClient.chain?.id); + this.rpcClient = rpcClient; } /** - * event RoyaltyTokenWhitelistUpdated for contract RoyaltyModule + * method isRegistered for contract ModuleRegistry + * + * @param request ModuleRegistryIsRegisteredRequest + * @return Promise */ - public watchRoyaltyTokenWhitelistUpdatedEvent( - onLogs: (txHash: Hex, ev: RoyaltyModuleRoyaltyTokenWhitelistUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: royaltyModuleAbi, + public async isRegistered( + request: ModuleRegistryIsRegisteredRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: moduleRegistryAbi, address: this.address, - eventName: "RoyaltyTokenWhitelistUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "isRegistered", + args: [request.moduleAddress], }); } } -// Contract RoyaltyPolicyLAP ============================================================= +// Contract PILicenseTemplate ============================================================= -export type RoyaltyPolicyLapAncestorsVaultImplResponse = Address; +/** + * PiLicenseTemplateDerivativeApprovedEvent + * + * @param licenseTokenId uint256 + * @param ipId address + * @param caller address + * @param approved bool + */ +export type PiLicenseTemplateDerivativeApprovedEvent = { + licenseTokenId: bigint; + ipId: Address; + caller: Address; + approved: boolean; +}; -export type RoyaltyPolicyLapLicensingModuleResponse = Address; +/** + * PiLicenseTemplateInitializedEvent + * + * @param version uint64 + */ +export type PiLicenseTemplateInitializedEvent = { + version: bigint; +}; -export type RoyaltyPolicyLapLiquidSplitFactoryResponse = Address; +/** + * PiLicenseTemplateLicenseTermsRegisteredEvent + * + * @param licenseTermsId uint256 + * @param licenseTemplate address + * @param licenseTerms bytes + */ +export type PiLicenseTemplateLicenseTermsRegisteredEvent = { + licenseTermsId: bigint; + licenseTemplate: Address; + licenseTerms: Hex; +}; -export type RoyaltyPolicyLapLiquidSplitMainResponse = Address; +export type PiLicenseTemplateAccessControllerResponse = Address; -export type RoyaltyPolicyLapMaxAncestorsResponse = bigint; +export type PiLicenseTemplateIpAccountRegistryResponse = Address; -export type RoyaltyPolicyLapMaxParentsResponse = bigint; +export type PiLicenseTemplateLicenseNftResponse = Address; -export type RoyaltyPolicyLapRoyaltyModuleResponse = Address; +export type PiLicenseTemplateLicenseRegistryResponse = Address; -export type RoyaltyPolicyLapTotalRnftSupplyResponse = number; +export type PiLicenseTemplateRoyaltyModuleResponse = Address; -export type RoyaltyPolicyLapGetGovernanceResponse = Address; +/** + * PiLicenseTemplateExistsRequest + * + * @param licenseTermsId uint256 + */ +export type PiLicenseTemplateExistsRequest = { + licenseTermsId: bigint; +}; -export type RoyaltyPolicyLapGovernanceResponse = Address; +export type PiLicenseTemplateExistsResponse = boolean; /** - * RoyaltyPolicyLapRoyaltyDataRequest + * PiLicenseTemplateGetEarlierExpireTimeRequest * - * @param ipId address + * @param licenseTermsIds uint256[] + * @param start uint256 */ -export type RoyaltyPolicyLapRoyaltyDataRequest = { - ipId: Address; +export type PiLicenseTemplateGetEarlierExpireTimeRequest = { + licenseTermsIds: readonly bigint[]; + start: bigint; }; +export type PiLicenseTemplateGetEarlierExpireTimeResponse = bigint; + /** - * RoyaltyPolicyLapRoyaltyDataResponse + * PiLicenseTemplateGetExpireTimeRequest * - * @param isUnlinkableToParents bool - * @param splitClone address - * @param ancestorsVault address - * @param royaltyStack uint32 - * @param ancestorsHash bytes32 - */ -export type RoyaltyPolicyLapRoyaltyDataResponse = { - isUnlinkableToParents: boolean; - splitClone: Address; - ancestorsVault: Address; - royaltyStack: number; - ancestorsHash: Hex; + * @param licenseTermsId uint256 + * @param start uint256 + */ +export type PiLicenseTemplateGetExpireTimeRequest = { + licenseTermsId: bigint; + start: bigint; }; +export type PiLicenseTemplateGetExpireTimeResponse = bigint; + /** - * RoyaltyPolicyLapSupportsInterfaceRequest + * PiLicenseTemplateGetLicenseTermsIdRequest * - * @param interfaceId bytes4 + * @param terms tuple */ -export type RoyaltyPolicyLapSupportsInterfaceRequest = { - interfaceId: Hex; +export type PiLicenseTemplateGetLicenseTermsIdRequest = { + terms: { + transferable: boolean; + royaltyPolicy: Address; + mintingFee: bigint; + expiration: bigint; + commercialUse: boolean; + commercialAttribution: boolean; + commercializerChecker: Address; + commercializerCheckerData: Hex; + commercialRevShare: number; + commercialRevCelling: bigint; + derivativesAllowed: boolean; + derivativesAttribution: boolean; + derivativesApproval: boolean; + derivativesReciprocal: boolean; + derivativeRevCelling: bigint; + currency: Address; + }; }; -export type RoyaltyPolicyLapSupportsInterfaceResponse = boolean; - /** - * RoyaltyPolicyLapClaimFromAncestorsVaultRequest + * PiLicenseTemplateGetLicenseTermsIdResponse * - * @param ipId address - * @param claimerIpId address - * @param ancestors address[] - * @param ancestorsRoyalties uint32[] - * @param withdrawETH bool - * @param tokens address[] + * @param selectedLicenseTermsId uint256 */ -export type RoyaltyPolicyLapClaimFromAncestorsVaultRequest = { - ipId: Address; - claimerIpId: Address; - ancestors: readonly Address[]; - ancestorsRoyalties: readonly number[]; - withdrawETH: boolean; - tokens: readonly Address[]; +export type PiLicenseTemplateGetLicenseTermsIdResponse = { + selectedLicenseTermsId: bigint; }; +export type PiLicenseTemplateGetMetadataUriResponse = string; + /** - * RoyaltyPolicyLapClaimFromIpPoolRequest + * PiLicenseTemplateGetRoyaltyPolicyRequest * - * @param account address - * @param withdrawETH uint256 - * @param tokens address[] + * @param licenseTermsId uint256 */ -export type RoyaltyPolicyLapClaimFromIpPoolRequest = { - account: Address; - withdrawETH: bigint; - tokens: readonly Address[]; +export type PiLicenseTemplateGetRoyaltyPolicyRequest = { + licenseTermsId: bigint; }; /** - * RoyaltyPolicyLapClaimFromIpPoolAsTotalRnftOwnerRequest + * PiLicenseTemplateGetRoyaltyPolicyResponse * - * @param ipId address - * @param withdrawETH uint256 - * @param token address + * @param royaltyPolicy address + * @param royaltyData bytes + * @param mintingFee uint256 + * @param currency address */ -export type RoyaltyPolicyLapClaimFromIpPoolAsTotalRnftOwnerRequest = { - ipId: Address; - withdrawETH: bigint; - token: Address; +export type PiLicenseTemplateGetRoyaltyPolicyResponse = { + royaltyPolicy: Address; + royaltyData: Hex; + mintingFee: bigint; + currency: Address; }; /** - * RoyaltyPolicyLapDistributeIpPoolFundsRequest + * PiLicenseTemplateIsDerivativeApprovedRequest * - * @param ipId address - * @param token address - * @param accounts address[] - * @param distributorAddress address + * @param licenseTokenId uint256 + * @param childIpId address */ -export type RoyaltyPolicyLapDistributeIpPoolFundsRequest = { - ipId: Address; - token: Address; - accounts: readonly Address[]; - distributorAddress: Address; +export type PiLicenseTemplateIsDerivativeApprovedRequest = { + licenseTokenId: bigint; + childIpId: Address; }; +export type PiLicenseTemplateIsDerivativeApprovedResponse = boolean; + /** - * RoyaltyPolicyLapOnErc1155BatchReceivedRequest + * PiLicenseTemplateIsLicenseTransferableRequest * - * @param 0 address - * @param 1 address - * @param 2 uint256[] - * @param 3 uint256[] - * @param 4 bytes + * @param licenseTermsId uint256 */ -export type RoyaltyPolicyLapOnErc1155BatchReceivedRequest = readonly [ - Address, - Address, - readonly bigint[], - readonly bigint[], - Hex, -]; +export type PiLicenseTemplateIsLicenseTransferableRequest = { + licenseTermsId: bigint; +}; + +export type PiLicenseTemplateIsLicenseTransferableResponse = boolean; + +export type PiLicenseTemplateNameResponse = string; /** - * RoyaltyPolicyLapOnErc1155ReceivedRequest + * PiLicenseTemplateSupportsInterfaceRequest * - * @param 0 address - * @param 1 address - * @param 2 uint256 - * @param 3 uint256 - * @param 4 bytes + * @param interfaceId bytes4 */ -export type RoyaltyPolicyLapOnErc1155ReceivedRequest = readonly [ - Address, - Address, - bigint, - bigint, - Hex, -]; +export type PiLicenseTemplateSupportsInterfaceRequest = { + interfaceId: Hex; +}; + +export type PiLicenseTemplateSupportsInterfaceResponse = boolean; /** - * RoyaltyPolicyLapOnLicenseMintingRequest + * PiLicenseTemplateToJsonRequest * - * @param ipId address - * @param licenseData bytes - * @param externalData bytes + * @param licenseTermsId uint256 */ -export type RoyaltyPolicyLapOnLicenseMintingRequest = { - ipId: Address; - licenseData: Hex; - externalData: Hex; +export type PiLicenseTemplateToJsonRequest = { + licenseTermsId: bigint; }; +export type PiLicenseTemplateToJsonResponse = string; + +export type PiLicenseTemplateTotalRegisteredLicenseTermsResponse = bigint; + /** - * RoyaltyPolicyLapOnLinkToParentsRequest + * PiLicenseTemplateVerifyCompatibleLicensesRequest * - * @param ipId address - * @param parentIpIds address[] - * @param licenseData bytes[] - * @param externalData bytes + * @param licenseTermsIds uint256[] */ -export type RoyaltyPolicyLapOnLinkToParentsRequest = { - ipId: Address; - parentIpIds: readonly Address[]; - licenseData: readonly Hex[]; - externalData: Hex; +export type PiLicenseTemplateVerifyCompatibleLicensesRequest = { + licenseTermsIds: readonly bigint[]; }; +export type PiLicenseTemplateVerifyCompatibleLicensesResponse = boolean; + /** - * RoyaltyPolicyLapOnRoyaltyPaymentRequest + * PiLicenseTemplateInitializeRequest * - * @param caller address - * @param ipId address - * @param token address - * @param amount uint256 + * @param name string + * @param metadataURI string */ -export type RoyaltyPolicyLapOnRoyaltyPaymentRequest = { - caller: Address; - ipId: Address; - token: Address; - amount: bigint; +export type PiLicenseTemplateInitializeRequest = { + name: string; + metadataURI: string; }; /** - * RoyaltyPolicyLapSetAncestorsVaultImplementationRequest + * PiLicenseTemplateRegisterLicenseTermsRequest * - * @param ancestorsVaultImpl address + * @param terms tuple */ -export type RoyaltyPolicyLapSetAncestorsVaultImplementationRequest = { - ancestorsVaultImpl: Address; +export type PiLicenseTemplateRegisterLicenseTermsRequest = { + terms: { + transferable: boolean; + royaltyPolicy: Address; + mintingFee: bigint; + expiration: bigint; + commercialUse: boolean; + commercialAttribution: boolean; + commercializerChecker: Address; + commercializerCheckerData: Hex; + commercialRevShare: number; + commercialRevCelling: bigint; + derivativesAllowed: boolean; + derivativesAttribution: boolean; + derivativesApproval: boolean; + derivativesReciprocal: boolean; + derivativeRevCelling: bigint; + currency: Address; + }; }; /** - * RoyaltyPolicyLapSetGovernanceRequest + * PiLicenseTemplateSetApprovalRequest * - * @param newGovernance address + * @param licenseTokenId uint256 + * @param childIpId address + * @param approved bool */ -export type RoyaltyPolicyLapSetGovernanceRequest = { - newGovernance: Address; +export type PiLicenseTemplateSetApprovalRequest = { + licenseTokenId: bigint; + childIpId: Address; + approved: boolean; }; /** - * RoyaltyPolicyLapGovernanceUpdatedEvent + * PiLicenseTemplateVerifyMintLicenseTokenRequest + * + * @param 0 uint256 + * @param 1 address + * @param 2 address + * @param 3 uint256 + */ +export type PiLicenseTemplateVerifyMintLicenseTokenRequest = readonly [ + bigint, + Address, + Address, + bigint, +]; + +/** + * PiLicenseTemplateVerifyRegisterDerivativeRequest * - * @param newGovernance address (optional) + * @param childIpId address + * @param parentIpId address + * @param licenseTermsId uint256 + * @param licensee address */ -export type RoyaltyPolicyLapGovernanceUpdatedEvent = { - newGovernance?: Address; +export type PiLicenseTemplateVerifyRegisterDerivativeRequest = { + childIpId: Address; + parentIpId: Address; + licenseTermsId: bigint; + licensee: Address; }; /** - * RoyaltyPolicyLapPolicyInitializedEvent + * PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest * - * @param ipId address (optional) - * @param splitClone address (optional) - * @param ancestorsVault address (optional) - * @param royaltyStack uint32 (optional) - * @param targetAncestors address[] (optional) - * @param targetRoyaltyAmount uint32[] (optional) - */ -export type RoyaltyPolicyLapPolicyInitializedEvent = { - ipId?: Address; - splitClone?: Address; - ancestorsVault?: Address; - royaltyStack?: number; - targetAncestors?: readonly Address[]; - targetRoyaltyAmount?: readonly number[]; + * @param childIpId address + * @param parentIpIds address[] + * @param licenseTermsIds uint256[] + * @param childIpOwner address + */ +export type PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest = { + childIpId: Address; + parentIpIds: readonly Address[]; + licenseTermsIds: readonly bigint[]; + childIpOwner: Address; }; /** - * contract RoyaltyPolicyLAP readonly method + * contract PILicenseTemplate event */ -export class RoyaltyPolicyLapReadOnlyClient { +export class PiLicenseTemplateEventClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0x265C21b34e0E92d63C678425478C42aa8D727B79", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(piLicenseTemplateAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * method ANCESTORS_VAULT_IMPL for contract RoyaltyPolicyLAP + * event DerivativeApproved for contract PILicenseTemplate + */ + public watchDerivativeApprovedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: piLicenseTemplateAbi, + address: this.address, + eventName: "DerivativeApproved", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, + }); + } + + /** + * parse tx receipt event DerivativeApproved for contract PILicenseTemplate + */ + public parseTxDerivativeApprovedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: piLicenseTemplateAbi, + eventName: "DerivativeApproved", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "DerivativeApproved") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; + } + + /** + * event Initialized for contract PILicenseTemplate + */ + public watchInitializedEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: piLicenseTemplateAbi, + address: this.address, + eventName: "Initialized", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, + }); + } + + /** + * parse tx receipt event Initialized for contract PILicenseTemplate + */ + public parseTxInitializedEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: piLicenseTemplateAbi, + eventName: "Initialized", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "Initialized") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; + } + + /** + * event LicenseTermsRegistered for contract PILicenseTemplate + */ + public watchLicenseTermsRegisteredEvent( + onLogs: (txHash: Hex, ev: Partial) => void, + ): WatchContractEventReturnType { + return this.rpcClient.watchContractEvent({ + abi: piLicenseTemplateAbi, + address: this.address, + eventName: "LicenseTermsRegistered", + onLogs: (evs) => { + evs.forEach((it) => onLogs(it.transactionHash, it.args)); + }, + }); + } + + /** + * parse tx receipt event LicenseTermsRegistered for contract PILicenseTemplate + */ + public parseTxLicenseTermsRegisteredEvent( + txReceipt: TransactionReceipt, + ): Array { + const targetLogs: Array = []; + for (const log of txReceipt.logs) { + try { + const event = decodeEventLog({ + abi: piLicenseTemplateAbi, + eventName: "LicenseTermsRegistered", + data: log.data, + topics: log.topics, + }); + if (event.eventName === "LicenseTermsRegistered") { + targetLogs.push(event.args); + } + } catch (e) { + /* empty */ + } + } + return targetLogs; + } +} + +/** + * contract PILicenseTemplate readonly method + */ +export class PiLicenseTemplateReadOnlyClient extends PiLicenseTemplateEventClient { + constructor(rpcClient: PublicClient, address?: Address) { + super(rpcClient, address); + } + + /** + * method ACCESS_CONTROLLER for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapAncestorsVaultImplRequest - * @return Promise + * @param request PiLicenseTemplateAccessControllerRequest + * @return Promise */ - public async ancestorsVaultImpl(): Promise { + public async accessController(): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "ANCESTORS_VAULT_IMPL", + functionName: "ACCESS_CONTROLLER", }); } /** - * method LICENSING_MODULE for contract RoyaltyPolicyLAP + * method IP_ACCOUNT_REGISTRY for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapLicensingModuleRequest - * @return Promise + * @param request PiLicenseTemplateIpAccountRegistryRequest + * @return Promise */ - public async licensingModule(): Promise { + public async ipAccountRegistry(): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "LICENSING_MODULE", + functionName: "IP_ACCOUNT_REGISTRY", }); } /** - * method LIQUID_SPLIT_FACTORY for contract RoyaltyPolicyLAP + * method LICENSE_NFT for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapLiquidSplitFactoryRequest - * @return Promise + * @param request PiLicenseTemplateLicenseNftRequest + * @return Promise */ - public async liquidSplitFactory(): Promise { + public async licenseNft(): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "LIQUID_SPLIT_FACTORY", + functionName: "LICENSE_NFT", }); } /** - * method LIQUID_SPLIT_MAIN for contract RoyaltyPolicyLAP + * method LICENSE_REGISTRY for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapLiquidSplitMainRequest - * @return Promise + * @param request PiLicenseTemplateLicenseRegistryRequest + * @return Promise */ - public async liquidSplitMain(): Promise { + public async licenseRegistry(): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "LIQUID_SPLIT_MAIN", + functionName: "LICENSE_REGISTRY", }); } /** - * method MAX_ANCESTORS for contract RoyaltyPolicyLAP + * method ROYALTY_MODULE for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapMaxAncestorsRequest - * @return Promise + * @param request PiLicenseTemplateRoyaltyModuleRequest + * @return Promise */ - public async maxAncestors(): Promise { + public async royaltyModule(): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "MAX_ANCESTORS", + functionName: "ROYALTY_MODULE", }); } /** - * method MAX_PARENTS for contract RoyaltyPolicyLAP + * method exists for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapMaxParentsRequest - * @return Promise + * @param request PiLicenseTemplateExistsRequest + * @return Promise */ - public async maxParents(): Promise { + public async exists( + request: PiLicenseTemplateExistsRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "MAX_PARENTS", + functionName: "exists", + args: [request.licenseTermsId], }); } /** - * method ROYALTY_MODULE for contract RoyaltyPolicyLAP + * method getEarlierExpireTime for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapRoyaltyModuleRequest - * @return Promise + * @param request PiLicenseTemplateGetEarlierExpireTimeRequest + * @return Promise */ - public async royaltyModule(): Promise { + public async getEarlierExpireTime( + request: PiLicenseTemplateGetEarlierExpireTimeRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "ROYALTY_MODULE", + functionName: "getEarlierExpireTime", + args: [request.licenseTermsIds, request.start], }); } /** - * method TOTAL_RNFT_SUPPLY for contract RoyaltyPolicyLAP + * method getExpireTime for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapTotalRnftSupplyRequest - * @return Promise + * @param request PiLicenseTemplateGetExpireTimeRequest + * @return Promise */ - public async totalRnftSupply(): Promise { + public async getExpireTime( + request: PiLicenseTemplateGetExpireTimeRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "TOTAL_RNFT_SUPPLY", + functionName: "getExpireTime", + args: [request.licenseTermsId, request.start], }); } /** - * method getGovernance for contract RoyaltyPolicyLAP + * method getLicenseTermsId for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapGetGovernanceRequest - * @return Promise + * @param request PiLicenseTemplateGetLicenseTermsIdRequest + * @return Promise */ - public async getGovernance(): Promise { - return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + public async getLicenseTermsId( + request: PiLicenseTemplateGetLicenseTermsIdRequest, + ): Promise { + const result = await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, address: this.address, - functionName: "getGovernance", + functionName: "getLicenseTermsId", + args: [request.terms], }); + return { + selectedLicenseTermsId: result, + }; } /** - * method governance for contract RoyaltyPolicyLAP + * method getMetadataURI for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapGovernanceRequest - * @return Promise + * @param request PiLicenseTemplateGetMetadataUriRequest + * @return Promise */ - public async governance(): Promise { + public async getMetadataUri(): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "governance", + functionName: "getMetadataURI", }); } /** - * method royaltyData for contract RoyaltyPolicyLAP + * method getRoyaltyPolicy for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapRoyaltyDataRequest - * @return Promise + * @param request PiLicenseTemplateGetRoyaltyPolicyRequest + * @return Promise */ - public async royaltyData( - request: RoyaltyPolicyLapRoyaltyDataRequest, - ): Promise { + public async getRoyaltyPolicy( + request: PiLicenseTemplateGetRoyaltyPolicyRequest, + ): Promise { const result = await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "royaltyData", - args: [request.ipId], + functionName: "getRoyaltyPolicy", + args: [request.licenseTermsId], }); return { - isUnlinkableToParents: result[0], - splitClone: result[1], - ancestorsVault: result[2], - royaltyStack: result[3], - ancestorsHash: result[4], + royaltyPolicy: result[0], + royaltyData: result[1], + mintingFee: result[2], + currency: result[3], }; } /** - * method supportsInterface for contract RoyaltyPolicyLAP + * method isDerivativeApproved for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapSupportsInterfaceRequest - * @return Promise + * @param request PiLicenseTemplateIsDerivativeApprovedRequest + * @return Promise */ - public async supportsInterface( - request: RoyaltyPolicyLapSupportsInterfaceRequest, - ): Promise { + public async isDerivativeApproved( + request: PiLicenseTemplateIsDerivativeApprovedRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], + functionName: "isDerivativeApproved", + args: [request.licenseTokenId, request.childIpId], }); } -} - -/** - * contract RoyaltyPolicyLAP write method - */ -export class RoyaltyPolicyLapClient extends RoyaltyPolicyLapReadOnlyClient { - protected readonly wallet: WalletClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x265C21b34e0E92d63C678425478C42aa8D727B79", - ) { - super(rpcClient, address); - this.wallet = wallet; + /** + * method isLicenseTransferable for contract PILicenseTemplate + * + * @param request PiLicenseTemplateIsLicenseTransferableRequest + * @return Promise + */ + public async isLicenseTransferable( + request: PiLicenseTemplateIsLicenseTransferableRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, + address: this.address, + functionName: "isLicenseTransferable", + args: [request.licenseTermsId], + }); } /** - * method claimFromAncestorsVault for contract RoyaltyPolicyLAP + * method name for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapClaimFromAncestorsVaultRequest - * @return Promise + * @param request PiLicenseTemplateNameRequest + * @return Promise */ - public async claimFromAncestorsVault( - request: RoyaltyPolicyLapClaimFromAncestorsVaultRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + public async name(): Promise { + return await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, address: this.address, - functionName: "claimFromAncestorsVault", - account: this.wallet.account, - args: [ - request.ipId, - request.claimerIpId, - request.ancestors, - request.ancestorsRoyalties, - request.withdrawETH, - request.tokens, - ], + functionName: "name", }); - return await this.wallet.writeContract(call); } /** - * method claimFromIpPool for contract RoyaltyPolicyLAP + * method supportsInterface for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapClaimFromIpPoolRequest - * @return Promise + * @param request PiLicenseTemplateSupportsInterfaceRequest + * @return Promise */ - public async claimFromIpPool( - request: RoyaltyPolicyLapClaimFromIpPoolRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + public async supportsInterface( + request: PiLicenseTemplateSupportsInterfaceRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, address: this.address, - functionName: "claimFromIpPool", - account: this.wallet.account, - args: [request.account, request.withdrawETH, request.tokens], + functionName: "supportsInterface", + args: [request.interfaceId], }); - return await this.wallet.writeContract(call); } /** - * method claimFromIpPoolAsTotalRnftOwner for contract RoyaltyPolicyLAP + * method toJson for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapClaimFromIpPoolAsTotalRnftOwnerRequest - * @return Promise + * @param request PiLicenseTemplateToJsonRequest + * @return Promise */ - public async claimFromIpPoolAsTotalRnftOwner( - request: RoyaltyPolicyLapClaimFromIpPoolAsTotalRnftOwnerRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + public async toJson( + request: PiLicenseTemplateToJsonRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, address: this.address, - functionName: "claimFromIpPoolAsTotalRnftOwner", - account: this.wallet.account, - args: [request.ipId, request.withdrawETH, request.token], + functionName: "toJson", + args: [request.licenseTermsId], }); - return await this.wallet.writeContract(call); } /** - * method distributeIpPoolFunds for contract RoyaltyPolicyLAP + * method totalRegisteredLicenseTerms for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapDistributeIpPoolFundsRequest - * @return Promise + * @param request PiLicenseTemplateTotalRegisteredLicenseTermsRequest + * @return Promise */ - public async distributeIpPoolFunds( - request: RoyaltyPolicyLapDistributeIpPoolFundsRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + public async totalRegisteredLicenseTerms(): Promise { + return await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, address: this.address, - functionName: "distributeIpPoolFunds", - account: this.wallet.account, - args: [request.ipId, request.token, request.accounts, request.distributorAddress], + functionName: "totalRegisteredLicenseTerms", }); - return await this.wallet.writeContract(call); } /** - * method onERC1155BatchReceived for contract RoyaltyPolicyLAP + * method verifyCompatibleLicenses for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapOnErc1155BatchReceivedRequest - * @return Promise + * @param request PiLicenseTemplateVerifyCompatibleLicensesRequest + * @return Promise */ - public async onErc1155BatchReceived( - request: RoyaltyPolicyLapOnErc1155BatchReceivedRequest, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + public async verifyCompatibleLicenses( + request: PiLicenseTemplateVerifyCompatibleLicensesRequest, + ): Promise { + return await this.rpcClient.readContract({ + abi: piLicenseTemplateAbi, address: this.address, - functionName: "onERC1155BatchReceived", - account: this.wallet.account, - args: [request[0], request[1], request[2], request[3], request[4]], + functionName: "verifyCompatibleLicenses", + args: [request.licenseTermsIds], }); - return await this.wallet.writeContract(call); + } +} + +/** + * contract PILicenseTemplate write method + */ +export class PiLicenseTemplateClient extends PiLicenseTemplateReadOnlyClient { + protected readonly wallet: SimpleWalletClient; + + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { + super(rpcClient, address); + this.wallet = wallet; } /** - * method onERC1155Received for contract RoyaltyPolicyLAP + * method initialize for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapOnErc1155ReceivedRequest + * @param request PiLicenseTemplateInitializeRequest * @return Promise */ - public async onErc1155Received( - request: RoyaltyPolicyLapOnErc1155ReceivedRequest, + public async initialize( + request: PiLicenseTemplateInitializeRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "onERC1155Received", + functionName: "initialize", account: this.wallet.account, - args: [request[0], request[1], request[2], request[3], request[4]], + args: [request.name, request.metadataURI], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method onLicenseMinting for contract RoyaltyPolicyLAP + * method registerLicenseTerms for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapOnLicenseMintingRequest + * @param request PiLicenseTemplateRegisterLicenseTermsRequest * @return Promise */ - public async onLicenseMinting( - request: RoyaltyPolicyLapOnLicenseMintingRequest, + public async registerLicenseTerms( + request: PiLicenseTemplateRegisterLicenseTermsRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "onLicenseMinting", + functionName: "registerLicenseTerms", account: this.wallet.account, - args: [request.ipId, request.licenseData, request.externalData], + args: [request.terms], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method onLinkToParents for contract RoyaltyPolicyLAP + * method setApproval for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapOnLinkToParentsRequest + * @param request PiLicenseTemplateSetApprovalRequest * @return Promise */ - public async onLinkToParents( - request: RoyaltyPolicyLapOnLinkToParentsRequest, + public async setApproval( + request: PiLicenseTemplateSetApprovalRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "onLinkToParents", + functionName: "setApproval", account: this.wallet.account, - args: [request.ipId, request.parentIpIds, request.licenseData, request.externalData], + args: [request.licenseTokenId, request.childIpId, request.approved], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method onRoyaltyPayment for contract RoyaltyPolicyLAP + * method verifyMintLicenseToken for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapOnRoyaltyPaymentRequest + * @param request PiLicenseTemplateVerifyMintLicenseTokenRequest * @return Promise */ - public async onRoyaltyPayment( - request: RoyaltyPolicyLapOnRoyaltyPaymentRequest, + public async verifyMintLicenseToken( + request: PiLicenseTemplateVerifyMintLicenseTokenRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "onRoyaltyPayment", + functionName: "verifyMintLicenseToken", account: this.wallet.account, - args: [request.caller, request.ipId, request.token, request.amount], + args: [request[0], request[1], request[2], request[3]], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method setAncestorsVaultImplementation for contract RoyaltyPolicyLAP + * method verifyRegisterDerivative for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapSetAncestorsVaultImplementationRequest + * @param request PiLicenseTemplateVerifyRegisterDerivativeRequest * @return Promise */ - public async setAncestorsVaultImplementation( - request: RoyaltyPolicyLapSetAncestorsVaultImplementationRequest, + public async verifyRegisterDerivative( + request: PiLicenseTemplateVerifyRegisterDerivativeRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "setAncestorsVaultImplementation", + functionName: "verifyRegisterDerivative", account: this.wallet.account, - args: [request.ancestorsVaultImpl], + args: [request.childIpId, request.parentIpId, request.licenseTermsId, request.licensee], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } /** - * method setGovernance for contract RoyaltyPolicyLAP + * method verifyRegisterDerivativeForAllParents for contract PILicenseTemplate * - * @param request RoyaltyPolicyLapSetGovernanceRequest + * @param request PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest * @return Promise */ - public async setGovernance( - request: RoyaltyPolicyLapSetGovernanceRequest, + public async verifyRegisterDerivativeForAllParents( + request: PiLicenseTemplateVerifyRegisterDerivativeForAllParentsRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: royaltyPolicyLapAbi, + abi: piLicenseTemplateAbi, address: this.address, - functionName: "setGovernance", + functionName: "verifyRegisterDerivativeForAllParents", account: this.wallet.account, - args: [request.newGovernance], + args: [request.childIpId, request.parentIpIds, request.licenseTermsIds, request.childIpOwner], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } } +// Contract RoyaltyModule ============================================================= + +/** + * RoyaltyModulePayRoyaltyOnBehalfRequest + * + * @param receiverIpId address + * @param payerIpId address + * @param token address + * @param amount uint256 + */ +export type RoyaltyModulePayRoyaltyOnBehalfRequest = { + receiverIpId: Address; + payerIpId: Address; + token: Address; + amount: bigint; +}; + /** - * contract RoyaltyPolicyLAP event + * contract RoyaltyModule write method */ -export class RoyaltyPolicyLapEventClient { +export class RoyaltyModuleClient { + protected readonly wallet: SimpleWalletClient; protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0x265C21b34e0E92d63C678425478C42aa8D727B79", - ) { - this.address = address; + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { + this.address = address || getAddress(royaltyModuleAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; + this.wallet = wallet; } /** - * event GovernanceUpdated for contract RoyaltyPolicyLAP - */ - public watchGovernanceUpdatedEvent( - onLogs: (txHash: Hex, ev: RoyaltyPolicyLapGovernanceUpdatedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: royaltyPolicyLapAbi, - address: this.address, - eventName: "GovernanceUpdated", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, - }); - } - - /** - * event PolicyInitialized for contract RoyaltyPolicyLAP + * method payRoyaltyOnBehalf for contract RoyaltyModule + * + * @param request RoyaltyModulePayRoyaltyOnBehalfRequest + * @return Promise */ - public watchPolicyInitializedEvent( - onLogs: (txHash: Hex, ev: RoyaltyPolicyLapPolicyInitializedEvent) => void, - ): WatchContractEventReturnType { - return this.rpcClient.watchContractEvent({ - abi: royaltyPolicyLapAbi, + public async payRoyaltyOnBehalf( + request: RoyaltyModulePayRoyaltyOnBehalfRequest, + ): Promise { + const { request: call } = await this.rpcClient.simulateContract({ + abi: royaltyModuleAbi, address: this.address, - eventName: "PolicyInitialized", - onLogs: (evs) => { - evs.forEach((it) => onLogs(it.transactionHash, it.args)); - }, + functionName: "payRoyaltyOnBehalf", + account: this.wallet.account, + args: [request.receiverIpId, request.payerIpId, request.token, request.amount], }); + return await this.wallet.writeContract(call as WriteContractParameters); } } -// Contract TokenWithdrawalModule ============================================================= - -export type TokenWithdrawalModuleAccessControllerResponse = Address; - -export type TokenWithdrawalModuleIpAccountRegistryResponse = Address; - -export type TokenWithdrawalModuleNameResponse = string; +// Contract RoyaltyPolicyLAP ============================================================= /** - * TokenWithdrawalModuleSupportsInterfaceRequest + * RoyaltyPolicyLapGetRoyaltyDataRequest * - * @param interfaceId bytes4 + * @param ipId address */ -export type TokenWithdrawalModuleSupportsInterfaceRequest = { - interfaceId: Hex; +export type RoyaltyPolicyLapGetRoyaltyDataRequest = { + ipId: Address; }; -export type TokenWithdrawalModuleSupportsInterfaceResponse = boolean; - /** - * TokenWithdrawalModuleWithdrawErc1155Request + * RoyaltyPolicyLapGetRoyaltyDataResponse * - * @param ipAccount address - * @param tokenContract address - * @param tokenId uint256 - * @param amount uint256 + * @param 0 bool + * @param 1 address + * @param 2 uint32 + * @param 3 address[] + * @param 4 uint32[] */ -export type TokenWithdrawalModuleWithdrawErc1155Request = { - ipAccount: Address; - tokenContract: Address; - tokenId: bigint; - amount: bigint; -}; +export type RoyaltyPolicyLapGetRoyaltyDataResponse = readonly [ + boolean, + Address, + number, + readonly Address[], + readonly number[], +]; /** - * TokenWithdrawalModuleWithdrawErc20Request + * RoyaltyPolicyLapOnRoyaltyPaymentRequest * - * @param ipAccount address - * @param tokenContract address + * @param caller address + * @param ipId address + * @param token address * @param amount uint256 */ -export type TokenWithdrawalModuleWithdrawErc20Request = { - ipAccount: Address; - tokenContract: Address; +export type RoyaltyPolicyLapOnRoyaltyPaymentRequest = { + caller: Address; + ipId: Address; + token: Address; amount: bigint; }; /** - * TokenWithdrawalModuleWithdrawErc721Request - * - * @param ipAccount address - * @param tokenContract address - * @param tokenId uint256 - */ -export type TokenWithdrawalModuleWithdrawErc721Request = { - ipAccount: Address; - tokenContract: Address; - tokenId: bigint; -}; - -/** - * contract TokenWithdrawalModule readonly method + * contract RoyaltyPolicyLAP readonly method */ -export class TokenWithdrawalModuleReadOnlyClient { +export class RoyaltyPolicyLapReadOnlyClient { protected readonly rpcClient: PublicClient; - protected readonly address: Address; + public readonly address: Address; - constructor( - rpcClient: PublicClient, - address: Address = "0x5f62d238B3022bA5881e5e443B014cac6999a4f2", - ) { - this.address = address; + constructor(rpcClient: PublicClient, address?: Address) { + this.address = address || getAddress(royaltyPolicyLapAddress, rpcClient.chain?.id); this.rpcClient = rpcClient; } /** - * method ACCESS_CONTROLLER for contract TokenWithdrawalModule - * - * @param request TokenWithdrawalModuleAccessControllerRequest - * @return Promise - */ - public async accessController(): Promise { - return await this.rpcClient.readContract({ - abi: tokenWithdrawalModuleAbi, - address: this.address, - functionName: "ACCESS_CONTROLLER", - }); - } - - /** - * method IP_ACCOUNT_REGISTRY for contract TokenWithdrawalModule - * - * @param request TokenWithdrawalModuleIpAccountRegistryRequest - * @return Promise - */ - public async ipAccountRegistry(): Promise { - return await this.rpcClient.readContract({ - abi: tokenWithdrawalModuleAbi, - address: this.address, - functionName: "IP_ACCOUNT_REGISTRY", - }); - } - - /** - * method name for contract TokenWithdrawalModule - * - * @param request TokenWithdrawalModuleNameRequest - * @return Promise - */ - public async name(): Promise { - return await this.rpcClient.readContract({ - abi: tokenWithdrawalModuleAbi, - address: this.address, - functionName: "name", - }); - } - - /** - * method supportsInterface for contract TokenWithdrawalModule + * method getRoyaltyData for contract RoyaltyPolicyLAP * - * @param request TokenWithdrawalModuleSupportsInterfaceRequest - * @return Promise + * @param request RoyaltyPolicyLapGetRoyaltyDataRequest + * @return Promise */ - public async supportsInterface( - request: TokenWithdrawalModuleSupportsInterfaceRequest, - ): Promise { + public async getRoyaltyData( + request: RoyaltyPolicyLapGetRoyaltyDataRequest, + ): Promise { return await this.rpcClient.readContract({ - abi: tokenWithdrawalModuleAbi, + abi: royaltyPolicyLapAbi, address: this.address, - functionName: "supportsInterface", - args: [request.interfaceId], + functionName: "getRoyaltyData", + args: [request.ipId], }); } } /** - * contract TokenWithdrawalModule write method + * contract RoyaltyPolicyLAP write method */ -export class TokenWithdrawalModuleClient extends TokenWithdrawalModuleReadOnlyClient { - protected readonly wallet: WalletClient; +export class RoyaltyPolicyLapClient extends RoyaltyPolicyLapReadOnlyClient { + protected readonly wallet: SimpleWalletClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - address: Address = "0x5f62d238B3022bA5881e5e443B014cac6999a4f2", - ) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) { super(rpcClient, address); this.wallet = wallet; } /** - * method withdrawERC1155 for contract TokenWithdrawalModule - * - * @param request TokenWithdrawalModuleWithdrawErc1155Request - * @return Promise - */ - public async withdrawErc1155( - request: TokenWithdrawalModuleWithdrawErc1155Request, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: tokenWithdrawalModuleAbi, - address: this.address, - functionName: "withdrawERC1155", - account: this.wallet.account, - args: [request.ipAccount, request.tokenContract, request.tokenId, request.amount], - }); - return await this.wallet.writeContract(call); - } - - /** - * method withdrawERC20 for contract TokenWithdrawalModule - * - * @param request TokenWithdrawalModuleWithdrawErc20Request - * @return Promise - */ - public async withdrawErc20( - request: TokenWithdrawalModuleWithdrawErc20Request, - ): Promise { - const { request: call } = await this.rpcClient.simulateContract({ - abi: tokenWithdrawalModuleAbi, - address: this.address, - functionName: "withdrawERC20", - account: this.wallet.account, - args: [request.ipAccount, request.tokenContract, request.amount], - }); - return await this.wallet.writeContract(call); - } - - /** - * method withdrawERC721 for contract TokenWithdrawalModule + * method onRoyaltyPayment for contract RoyaltyPolicyLAP * - * @param request TokenWithdrawalModuleWithdrawErc721Request + * @param request RoyaltyPolicyLapOnRoyaltyPaymentRequest * @return Promise */ - public async withdrawErc721( - request: TokenWithdrawalModuleWithdrawErc721Request, + public async onRoyaltyPayment( + request: RoyaltyPolicyLapOnRoyaltyPaymentRequest, ): Promise { const { request: call } = await this.rpcClient.simulateContract({ - abi: tokenWithdrawalModuleAbi, + abi: royaltyPolicyLapAbi, address: this.address, - functionName: "withdrawERC721", + functionName: "onRoyaltyPayment", account: this.wallet.account, - args: [request.ipAccount, request.tokenContract, request.tokenId], + args: [request.caller, request.ipId, request.token, request.amount], }); - return await this.wallet.writeContract(call); + return await this.wallet.writeContract(call as WriteContractParameters); } } diff --git a/packages/core-sdk/src/abi/json/AccessController.abi.ts b/packages/core-sdk/src/abi/json/AccessController.abi.ts deleted file mode 100644 index 0949af5d..00000000 --- a/packages/core-sdk/src/abi/json/AccessController.abi.ts +++ /dev/null @@ -1,78 +0,0 @@ -export default [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "ipAccountOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "ipAccount", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "signer", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: false, - internalType: "bytes4", - name: "func", - type: "bytes4", - }, - { - indexed: false, - internalType: "uint8", - name: "permission", - type: "uint8", - }, - ], - name: "PermissionSet", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "ipAccount", - type: "address", - }, - { - internalType: "address", - name: "signer", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bytes4", - name: "func", - type: "bytes4", - }, - { - internalType: "uint8", - name: "permission", - type: "uint8", - }, - ], - name: "setPermission", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/DisputeModule.abi.ts b/packages/core-sdk/src/abi/json/DisputeModule.abi.ts deleted file mode 100644 index 306a2c5e..00000000 --- a/packages/core-sdk/src/abi/json/DisputeModule.abi.ts +++ /dev/null @@ -1,148 +0,0 @@ -export default [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "disputeId", - type: "uint256", - }, - { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "DisputeCancelled", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "disputeId", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "targetIpId", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "disputeInitiator", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "arbitrationPolicy", - type: "address", - }, - { - indexed: false, - internalType: "bytes32", - name: "linkToDisputeEvidence", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes32", - name: "targetTag", - type: "bytes32", - }, - { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "DisputeRaised", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "uint256", - name: "disputeId", - type: "uint256", - }, - ], - name: "DisputeResolved", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeId", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "cancelDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "targetIpId", - type: "address", - }, - { - internalType: "string", - name: "linkToDisputeEvidence", - type: "string", - }, - { - internalType: "bytes32", - name: "targetTag", - type: "bytes32", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "raiseDispute", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "disputeId", - type: "uint256", - }, - ], - name: "resolveDispute", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/Errors.abi.ts b/packages/core-sdk/src/abi/json/Errors.abi.ts deleted file mode 100644 index 78bbb458..00000000 --- a/packages/core-sdk/src/abi/json/Errors.abi.ts +++ /dev/null @@ -1,1216 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - ], - name: "AccessControlled__CallerIsNotIpAccount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipAccount", - type: "address", - }, - ], - name: "AccessControlled__NotIpAccount", - type: "error", - }, - { - inputs: [], - name: "AccessControlled__ZeroAddress", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "signer", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - ], - name: "AccessController__BothCallerAndRecipientAreNotRegisteredModule", - type: "error", - }, - { - inputs: [], - name: "AccessController__CallerIsNotIPAccount", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipAccount", - type: "address", - }, - ], - name: "AccessController__IPAccountIsNotValid", - type: "error", - }, - { - inputs: [], - name: "AccessController__IPAccountIsZeroAddress", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipAccount", - type: "address", - }, - { - internalType: "address", - name: "signer", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bytes4", - name: "func", - type: "bytes4", - }, - ], - name: "AccessController__PermissionDenied", - type: "error", - }, - { - inputs: [], - name: "AccessController__PermissionIsNotValid", - type: "error", - }, - { - inputs: [], - name: "AccessController__SignerIsZeroAddress", - type: "error", - }, - { - inputs: [], - name: "ArbitrationPolicySP__NotDisputeModule", - type: "error", - }, - { - inputs: [], - name: "ArbitrationPolicySP__ZeroDisputeModule", - type: "error", - }, - { - inputs: [], - name: "ArbitrationPolicySP__ZeroPaymentToken", - type: "error", - }, - { - inputs: [], - name: "BasePolicyFrameworkManager__CallerNotLicensingModule", - type: "error", - }, - { - inputs: [], - name: "CoreMetadataModule__MetadataAlreadyFrozen", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotAbleToResolve", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotDisputeInitiator", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotInDisputeState", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotRegisteredIpId", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotWhitelistedArbitrationPolicy", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotWhitelistedArbitrationRelayer", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__NotWhitelistedDisputeTag", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__ZeroArbitrationPolicy", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__ZeroArbitrationRelayer", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__ZeroDisputeTag", - type: "error", - }, - { - inputs: [], - name: "DisputeModule__ZeroLinkToDisputeEvidence", - type: "error", - }, - { - inputs: [], - name: "IPAccountRegistry_InvalidIpAccountImpl", - type: "error", - }, - { - inputs: [], - name: "IPAccount__ExpiredSignature", - type: "error", - }, - { - inputs: [], - name: "IPAccount__InvalidAccessController", - type: "error", - }, - { - inputs: [], - name: "IPAccount__InvalidCalldata", - type: "error", - }, - { - inputs: [], - name: "IPAccount__InvalidSignature", - type: "error", - }, - { - inputs: [], - name: "IPAccount__InvalidSigner", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__AlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__IPAccountAlreadyCreated", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__InvalidAccount", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__InvalidMetadataProvider", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "contractAddress", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "IPAssetRegistry__InvalidToken", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__NotYetRegistered", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__RegistrantUnauthorized", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__ResolverInvalid", - type: "error", - }, - { - inputs: [], - name: "IPAssetRegistry__Unauthorized", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "contractAddress", - type: "address", - }, - ], - name: "IPAssetRegistry__UnsupportedIERC721", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "contractAddress", - type: "address", - }, - ], - name: "IPAssetRegistry__UnsupportedIERC721Metadata", - type: "error", - }, - { - inputs: [], - name: "IPResolver_InvalidIP", - type: "error", - }, - { - inputs: [], - name: "IPResolver_Unauthorized", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__AlreadyClaimed", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__ClaimerNotAnAncestor", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__IpTagged", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__NotRoyaltyPolicyLAP", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__SnapshotIntervalTooShort", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__ZeroDisputeModule", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__ZeroIpId", - type: "error", - }, - { - inputs: [], - name: "IpRoyaltyVault__ZeroRoyaltyPolicyLAP", - type: "error", - }, - { - inputs: [], - name: "LicenseRegistry__CallerNotLicensingModule", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - ], - name: "LicenseRegistry__DerivativeAlreadyRegistered", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - ], - name: "LicenseRegistry__DerivativeIpAlreadyHasLicense", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "LicenseRegistry__DerivativeIsParent", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "uint256", - name: "length", - type: "uint256", - }, - ], - name: "LicenseRegistry__IndexOutOfBounds", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "LicenseRegistry__IpExpired", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - ], - name: "LicenseRegistry__LicenseTermsNotExists", - type: "error", - }, - { - inputs: [], - name: "LicenseRegistry__NoParentIp", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - ], - name: "LicenseRegistry__NotLicenseTemplate", - type: "error", - }, - { - inputs: [], - name: "LicenseRegistry__NotTransferable", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "LicenseRegistry__ParentIpExpired", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - ], - name: "LicenseRegistry__ParentIpHasNoLicenseTerms", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "LicenseRegistry__ParentIpTagged", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - ], - name: "LicenseRegistry__ParentIpUnmachedLicenseTemplate", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - ], - name: "LicenseRegistry__UnregisteredLicenseTemplate", - type: "error", - }, - { - inputs: [], - name: "LicenseRegistry__ZeroDisputeModule", - type: "error", - }, - { - inputs: [], - name: "LicenseRegistry__ZeroLicensingModule", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "address", - name: "anotherLicenseTemplate", - type: "address", - }, - ], - name: "LicenseToken__AllLicenseTokensMustFromSameLicenseTemplate", - type: "error", - }, - { - inputs: [], - name: "LicenseToken__CallerNotLicensingModule", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiredAt", - type: "uint256", - }, - { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", - }, - ], - name: "LicenseToken__LicenseTokenExpired", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "address", - name: "iPowner", - type: "address", - }, - { - internalType: "address", - name: "tokenOwner", - type: "address", - }, - ], - name: "LicenseToken__NotLicenseTokenOwner", - type: "error", - }, - { - inputs: [], - name: "LicenseToken__NotTransferable", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "LicenseToken__RevokedLicense", - type: "error", - }, - { - inputs: [], - name: "LicenseToken__ZeroDisputeModule", - type: "error", - }, - { - inputs: [], - name: "LicenseToken__ZeroLicensingModule", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__CallerNotLicenseRegistry", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - { - internalType: "address", - name: "licensorIpId", - type: "address", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - ], - name: "LicensingModule__CallerNotLicensorAndIpHasNotAttachedLicenseTerms", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__CallerNotLicensorAndPolicyNotSet", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__CommercialTermInNonCommercialPolicy", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "LicensingModule__DerivativeAlreadyHasLicenseTerms", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__DerivativeAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__DerivativeIsParent", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__DerivativeRevShareSumExceedsMaxRNFTSupply", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__DerivativesCannotAddLicenseTerms", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__DerivativesCannotAddPolicy", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__DisputedIpId", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__EmptyLicenseUrl", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__EmptyParamName", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__FrameworkNotFound", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__IncompatibleLicensorRoyaltyDerivativeRevShare", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "royaltyPolicy", - type: "address", - }, - { - internalType: "address", - name: "anotherRoyaltyPolicy", - type: "address", - }, - ], - name: "LicensingModule__IncompatibleRoyaltyPolicy", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__IncompatibleRoyaltyPolicyAddress", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__IncompatibleRoyaltyPolicyDerivativeRevShare", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__InvalidLicensor", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__InvalidPolicyFramework", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__IpAlreadyLinked", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - ], - name: "LicensingModule__LicenseNotCompatibleForDerivative", - type: "error", - }, - { - inputs: [ - { - internalType: "uint256", - name: "ipLength", - type: "uint256", - }, - { - internalType: "uint256", - name: "licenseTermsLength", - type: "uint256", - }, - ], - name: "LicensingModule__LicenseTermsLengthMismatch", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - ], - name: "LicensingModule__LicenseTermsNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - { - internalType: "uint256[]", - name: "licenseTokenIds", - type: "uint256[]", - }, - ], - name: "LicensingModule__LicenseTokenNotCompatibleForDerivative", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__LicensorDoesntHaveThisPolicy", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__LicensorNotRegistered", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__LinkParentParamFailed", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__LinkingRevokedLicense", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__MintAmountZero", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__MintLicenseParamFailed", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__MintingFeeTokenNotWhitelisted", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__MismatchBetweenRoyaltyPolicy", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__NoLicenseToken", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__NoParentIp", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__NotLicensee", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__ParamVerifierAlreadySet", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__ParamVerifierLengthMismatch", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__ParentIdEqualThanChild", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "LicensingModule__ParentIpHasNoLicenseTerms", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__PolicyAlreadySetForIpId", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__PolicyNotFound", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "LicensingModule__ReceiverCheckFailed", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__ReceiverZeroAddress", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__RegisterPolicyFrameworkMismatch", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__RoyaltyPolicyNotWhitelisted", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__TransferParamFailed", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__UnauthorizedAccess", - type: "error", - }, - { - inputs: [], - name: "LicensingModule__UnregisteredFrameworkAddingPolicy", - type: "error", - }, - { - inputs: [], - name: "LicensorApprovalChecker__Unauthorized", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__HashInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__IPAssetOwnerInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__MetadataNotCompatible", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__NameInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__RegistrantInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__RegistrationDateInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__URIInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__Unauthorized", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__UpgradeProviderInvalid", - type: "error", - }, - { - inputs: [], - name: "MetadataProvider__UpgradeUnavailable", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__InterfaceIdZero", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleAddressNotContract", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleAddressZeroAddress", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleNotRegistered", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleTypeAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleTypeEmptyString", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__ModuleTypeNotRegistered", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__NameAlreadyRegistered", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__NameDoesNotMatch", - type: "error", - }, - { - inputs: [], - name: "ModuleRegistry__NameEmptyString", - type: "error", - }, - { - inputs: [], - name: "Module_Unauthorized", - type: "error", - }, - { - inputs: [ - { - internalType: "address", - name: "commercializer", - type: "address", - }, - ], - name: "PolicyFrameworkManager__CommercializerCheckerDoesNotSupportHook", - type: "error", - }, - { - inputs: [], - name: "PolicyFrameworkManager__GettingPolicyWrongFramework", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__CanOnlyMintSelectedPolicy", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__IncompatibleRoyaltyPolicy", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__IpIsTagged", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__NoParentsOnLinking", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__NoRoyaltyPolicySet", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__NotAllowedCaller", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__NotWhitelistedRoyaltyPolicy", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__NotWhitelistedRoyaltyToken", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__ZeroDisputeModule", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__ZeroLicensingModule", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__ZeroRoyaltyPolicy", - type: "error", - }, - { - inputs: [], - name: "RoyaltyModule__ZeroRoyaltyToken", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__AboveAncestorsLimit", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__AboveParentLimit", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__AboveRoyaltyStackLimit", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ImplementationAlreadySet", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__InvalidParentRoyaltiesLength", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__NotFullOwnership", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__NotRoyaltyModule", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__UnlinkableToParents", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ZeroAncestorsVaultImpl", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ZeroIpRoyaltyVaultBeacon", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ZeroLicensingModule", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ZeroLiquidSplitFactory", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ZeroLiquidSplitMain", - type: "error", - }, - { - inputs: [], - name: "RoyaltyPolicyLAP__ZeroRoyaltyModule", - type: "error", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/Errors.json b/packages/core-sdk/src/abi/json/Errors.json deleted file mode 100644 index 26905f58..00000000 --- a/packages/core-sdk/src/abi/json/Errors.json +++ /dev/null @@ -1,1216 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "AccessControlled__CallerIsNotIpAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipAccount", - "type": "address" - } - ], - "name": "AccessControlled__NotIpAccount", - "type": "error" - }, - { - "inputs": [], - "name": "AccessControlled__ZeroAddress", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "AccessController__BothCallerAndRecipientAreNotRegisteredModule", - "type": "error" - }, - { - "inputs": [], - "name": "AccessController__CallerIsNotIPAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipAccount", - "type": "address" - } - ], - "name": "AccessController__IPAccountIsNotValid", - "type": "error" - }, - { - "inputs": [], - "name": "AccessController__IPAccountIsZeroAddress", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipAccount", - "type": "address" - }, - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "func", - "type": "bytes4" - } - ], - "name": "AccessController__PermissionDenied", - "type": "error" - }, - { - "inputs": [], - "name": "AccessController__PermissionIsNotValid", - "type": "error" - }, - { - "inputs": [], - "name": "AccessController__SignerIsZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationPolicySP__NotDisputeModule", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationPolicySP__ZeroDisputeModule", - "type": "error" - }, - { - "inputs": [], - "name": "ArbitrationPolicySP__ZeroPaymentToken", - "type": "error" - }, - { - "inputs": [], - "name": "BasePolicyFrameworkManager__CallerNotLicensingModule", - "type": "error" - }, - { - "inputs": [], - "name": "CoreMetadataModule__MetadataAlreadyFrozen", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotAbleToResolve", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotDisputeInitiator", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotInDisputeState", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotRegisteredIpId", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotWhitelistedArbitrationPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotWhitelistedArbitrationRelayer", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__NotWhitelistedDisputeTag", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__ZeroArbitrationPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__ZeroArbitrationRelayer", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__ZeroDisputeTag", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeModule__ZeroLinkToDisputeEvidence", - "type": "error" - }, - { - "inputs": [], - "name": "IPAccountRegistry_InvalidIpAccountImpl", - "type": "error" - }, - { - "inputs": [], - "name": "IPAccount__ExpiredSignature", - "type": "error" - }, - { - "inputs": [], - "name": "IPAccount__InvalidAccessController", - "type": "error" - }, - { - "inputs": [], - "name": "IPAccount__InvalidCalldata", - "type": "error" - }, - { - "inputs": [], - "name": "IPAccount__InvalidSignature", - "type": "error" - }, - { - "inputs": [], - "name": "IPAccount__InvalidSigner", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__AlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__IPAccountAlreadyCreated", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__InvalidAccount", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__InvalidMetadataProvider", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "IPAssetRegistry__InvalidToken", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__NotYetRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__RegistrantUnauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__ResolverInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "IPAssetRegistry__Unauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - } - ], - "name": "IPAssetRegistry__UnsupportedIERC721", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "contractAddress", - "type": "address" - } - ], - "name": "IPAssetRegistry__UnsupportedIERC721Metadata", - "type": "error" - }, - { - "inputs": [], - "name": "IPResolver_InvalidIP", - "type": "error" - }, - { - "inputs": [], - "name": "IPResolver_Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__AlreadyClaimed", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__ClaimerNotAnAncestor", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__IpTagged", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__NotRoyaltyPolicyLAP", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__SnapshotIntervalTooShort", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__ZeroDisputeModule", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__ZeroIpId", - "type": "error" - }, - { - "inputs": [], - "name": "IpRoyaltyVault__ZeroRoyaltyPolicyLAP", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseRegistry__CallerNotLicensingModule", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "childIpId", - "type": "address" - } - ], - "name": "LicenseRegistry__DerivativeAlreadyRegistered", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "childIpId", - "type": "address" - } - ], - "name": "LicenseRegistry__DerivativeIpAlreadyHasLicense", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - } - ], - "name": "LicenseRegistry__DerivativeIsParent", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "LicenseRegistry__IndexOutOfBounds", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - } - ], - "name": "LicenseRegistry__IpExpired", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "licenseTermsId", - "type": "uint256" - } - ], - "name": "LicenseRegistry__LicenseTermsNotExists", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseRegistry__NoParentIp", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - } - ], - "name": "LicenseRegistry__NotLicenseTemplate", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseRegistry__NotTransferable", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - } - ], - "name": "LicenseRegistry__ParentIpExpired", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - }, - { - "internalType": "uint256", - "name": "licenseTermsId", - "type": "uint256" - } - ], - "name": "LicenseRegistry__ParentIpHasNoLicenseTerms", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - } - ], - "name": "LicenseRegistry__ParentIpTagged", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - }, - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - } - ], - "name": "LicenseRegistry__ParentIpUnmachedLicenseTemplate", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - } - ], - "name": "LicenseRegistry__UnregisteredLicenseTemplate", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseRegistry__ZeroDisputeModule", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseRegistry__ZeroLicensingModule", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - }, - { - "internalType": "address", - "name": "anotherLicenseTemplate", - "type": "address" - } - ], - "name": "LicenseToken__AllLicenseTokensMustFromSameLicenseTemplate", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseToken__CallerNotLicensingModule", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiredAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - } - ], - "name": "LicenseToken__LicenseTokenExpired", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "iPowner", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOwner", - "type": "address" - } - ], - "name": "LicenseToken__NotLicenseTokenOwner", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseToken__NotTransferable", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "LicenseToken__RevokedLicense", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseToken__ZeroDisputeModule", - "type": "error" - }, - { - "inputs": [], - "name": "LicenseToken__ZeroLicensingModule", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__CallerNotLicenseRegistry", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "internalType": "address", - "name": "licensorIpId", - "type": "address" - }, - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "licenseTermsId", - "type": "uint256" - } - ], - "name": "LicensingModule__CallerNotLicensorAndIpHasNotAttachedLicenseTerms", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__CallerNotLicensorAndPolicyNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__CommercialTermInNonCommercialPolicy", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - } - ], - "name": "LicensingModule__DerivativeAlreadyHasLicenseTerms", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__DerivativeAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__DerivativeIsParent", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__DerivativeRevShareSumExceedsMaxRNFTSupply", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__DerivativesCannotAddLicenseTerms", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__DerivativesCannotAddPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__DisputedIpId", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__EmptyLicenseUrl", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__EmptyParamName", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__FrameworkNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__IncompatibleLicensorRoyaltyDerivativeRevShare", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "royaltyPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "anotherRoyaltyPolicy", - "type": "address" - } - ], - "name": "LicensingModule__IncompatibleRoyaltyPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__IncompatibleRoyaltyPolicyAddress", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__IncompatibleRoyaltyPolicyDerivativeRevShare", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__InvalidLicensor", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__InvalidPolicyFramework", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__IpAlreadyLinked", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "childIpId", - "type": "address" - } - ], - "name": "LicensingModule__LicenseNotCompatibleForDerivative", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "ipLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "licenseTermsLength", - "type": "uint256" - } - ], - "name": "LicensingModule__LicenseTermsLengthMismatch", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "licenseTemplate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "licenseTermsId", - "type": "uint256" - } - ], - "name": "LicensingModule__LicenseTermsNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "childIpId", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "licenseTokenIds", - "type": "uint256[]" - } - ], - "name": "LicensingModule__LicenseTokenNotCompatibleForDerivative", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__LicensorDoesntHaveThisPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__LicensorNotRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__LinkParentParamFailed", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__LinkingRevokedLicense", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__MintAmountZero", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__MintLicenseParamFailed", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__MintingFeeTokenNotWhitelisted", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__MismatchBetweenRoyaltyPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__NoLicenseToken", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__NoParentIp", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__NotLicensee", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__ParamVerifierAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__ParamVerifierLengthMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__ParentIdEqualThanChild", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ipId", - "type": "address" - } - ], - "name": "LicensingModule__ParentIpHasNoLicenseTerms", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__PolicyAlreadySetForIpId", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__PolicyNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "LicensingModule__ReceiverCheckFailed", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__ReceiverZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__RegisterPolicyFrameworkMismatch", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__RoyaltyPolicyNotWhitelisted", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__TransferParamFailed", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__UnauthorizedAccess", - "type": "error" - }, - { - "inputs": [], - "name": "LicensingModule__UnregisteredFrameworkAddingPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "LicensorApprovalChecker__Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__HashInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__IPAssetOwnerInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__MetadataNotCompatible", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__NameInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__RegistrantInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__RegistrationDateInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__URIInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__UpgradeProviderInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "MetadataProvider__UpgradeUnavailable", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__InterfaceIdZero", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleAddressNotContract", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleAddressZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleNotRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleNotSupportExpectedModuleTypeInterfaceId", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleTypeAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleTypeEmptyString", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__ModuleTypeNotRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__NameAlreadyRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__NameDoesNotMatch", - "type": "error" - }, - { - "inputs": [], - "name": "ModuleRegistry__NameEmptyString", - "type": "error" - }, - { - "inputs": [], - "name": "Module_Unauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "commercializer", - "type": "address" - } - ], - "name": "PolicyFrameworkManager__CommercializerCheckerDoesNotSupportHook", - "type": "error" - }, - { - "inputs": [], - "name": "PolicyFrameworkManager__GettingPolicyWrongFramework", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__CanOnlyMintSelectedPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__IncompatibleRoyaltyPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__IpIsTagged", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__NoParentsOnLinking", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__NoRoyaltyPolicySet", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__NotAllowedCaller", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__NotWhitelistedRoyaltyPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__NotWhitelistedRoyaltyToken", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__ZeroDisputeModule", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__ZeroLicensingModule", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__ZeroRoyaltyPolicy", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyModule__ZeroRoyaltyToken", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__AboveAncestorsLimit", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__AboveParentLimit", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__AboveRoyaltyStackLimit", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ImplementationAlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__InvalidParentRoyaltiesLength", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__NotFullOwnership", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__NotRoyaltyModule", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__UnlinkableToParents", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ZeroAncestorsVaultImpl", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ZeroIpRoyaltyVaultBeacon", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ZeroLicensingModule", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ZeroLiquidSplitFactory", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ZeroLiquidSplitMain", - "type": "error" - }, - { - "inputs": [], - "name": "RoyaltyPolicyLAP__ZeroRoyaltyModule", - "type": "error" - } -] diff --git a/packages/core-sdk/src/abi/json/IERC1155.abi.ts b/packages/core-sdk/src/abi/json/IERC1155.abi.ts deleted file mode 100644 index e3af3f06..00000000 --- a/packages/core-sdk/src/abi/json/IERC1155.abi.ts +++ /dev/null @@ -1,76 +0,0 @@ -export default [ - { - 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", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/IIPAssetRegistry.abi.ts b/packages/core-sdk/src/abi/json/IIPAssetRegistry.abi.ts deleted file mode 100644 index 2f51f5de..00000000 --- a/packages/core-sdk/src/abi/json/IIPAssetRegistry.abi.ts +++ /dev/null @@ -1,123 +0,0 @@ -export default [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "ipId", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "tokenContract", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "name", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "uri", - type: "string", - }, - { - indexed: false, - internalType: "uint256", - name: "registrationDate", - type: "uint256", - }, - ], - name: "IPRegistered", - type: "event", - }, - { - inputs: [ - { - internalType: "uint256", - name: "chainId", - type: "uint256", - }, - { - internalType: "address", - name: "tokenContract", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ipId", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "id", - type: "address", - }, - ], - name: "isRegistered", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "tokenContract", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "register", - outputs: [ - { - internalType: "address", - name: "id", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/ILicenseToken.abi.ts b/packages/core-sdk/src/abi/json/ILicenseToken.abi.ts deleted file mode 100644 index 0db80367..00000000 --- a/packages/core-sdk/src/abi/json/ILicenseToken.abi.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "getLicenseTermsId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "licensorIpId", - type: "address", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "address", - name: "minter", - type: "address", - }, - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "mintLicenseTokens", - outputs: [ - { - internalType: "uint256", - name: "startLicenseTokenId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/IPAccountImpl.abi.ts b/packages/core-sdk/src/abi/json/IPAccountImpl.abi.ts deleted file mode 100644 index d7751266..00000000 --- a/packages/core-sdk/src/abi/json/IPAccountImpl.abi.ts +++ /dev/null @@ -1,75 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - ], - name: "execute", - outputs: [ - { - internalType: "bytes", - name: "result", - type: "bytes", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "address", - name: "signer", - type: "address", - }, - { - internalType: "uint256", - name: "deadline", - type: "uint256", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - name: "executeWithSig", - outputs: [ - { - internalType: "bytes", - name: "result", - type: "bytes", - }, - ], - stateMutability: "payable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/IPILicenseTemplate.abi.ts b/packages/core-sdk/src/abi/json/IPILicenseTemplate.abi.ts deleted file mode 100644 index 59d57fcd..00000000 --- a/packages/core-sdk/src/abi/json/IPILicenseTemplate.abi.ts +++ /dev/null @@ -1,229 +0,0 @@ -export default [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - { - indexed: true, - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - indexed: false, - internalType: "bytes", - name: "licenseTerms", - type: "bytes", - }, - ], - name: "LicenseTermsRegistered", - type: "event", - }, - { - inputs: [ - { - components: [ - { - internalType: "bool", - name: "transferable", - type: "bool", - }, - { - internalType: "address", - name: "royaltyPolicy", - type: "address", - }, - { - internalType: "uint256", - name: "mintingFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiration", - type: "uint256", - }, - { - internalType: "bool", - name: "commercialUse", - type: "bool", - }, - { - internalType: "bool", - name: "commercialAttribution", - type: "bool", - }, - { - internalType: "address", - name: "commercializerChecker", - type: "address", - }, - { - internalType: "bytes", - name: "commercializerCheckerData", - type: "bytes", - }, - { - internalType: "uint32", - name: "commercialRevShare", - type: "uint32", - }, - { - internalType: "uint256", - name: "commercialRevCelling", - type: "uint256", - }, - { - internalType: "bool", - name: "derivativesAllowed", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesAttribution", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesApproval", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesReciprocal", - type: "bool", - }, - { - internalType: "uint256", - name: "derivativeRevCelling", - type: "uint256", - }, - { - internalType: "address", - name: "currency", - type: "address", - }, - ], - internalType: "struct PILTerms", - name: "terms", - type: "tuple", - }, - ], - name: "getLicenseTermsId", - outputs: [ - { - internalType: "uint256", - name: "selectedLicenseTermsId", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bool", - name: "transferable", - type: "bool", - }, - { - internalType: "address", - name: "royaltyPolicy", - type: "address", - }, - { - internalType: "uint256", - name: "mintingFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "expiration", - type: "uint256", - }, - { - internalType: "bool", - name: "commercialUse", - type: "bool", - }, - { - internalType: "bool", - name: "commercialAttribution", - type: "bool", - }, - { - internalType: "address", - name: "commercializerChecker", - type: "address", - }, - { - internalType: "bytes", - name: "commercializerCheckerData", - type: "bytes", - }, - { - internalType: "uint32", - name: "commercialRevShare", - type: "uint32", - }, - { - internalType: "uint256", - name: "commercialRevCelling", - type: "uint256", - }, - { - internalType: "bool", - name: "derivativesAllowed", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesAttribution", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesApproval", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesReciprocal", - type: "bool", - }, - { - internalType: "uint256", - name: "derivativeRevCelling", - type: "uint256", - }, - { - internalType: "address", - name: "currency", - type: "address", - }, - ], - internalType: "struct PILTerms", - name: "terms", - type: "tuple", - }, - ], - name: "registerLicenseTerms", - outputs: [ - { - internalType: "uint256", - name: "selectedLicenseTermsId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/IRoyaltyModule.abi.ts b/packages/core-sdk/src/abi/json/IRoyaltyModule.abi.ts deleted file mode 100644 index b4819b8b..00000000 --- a/packages/core-sdk/src/abi/json/IRoyaltyModule.abi.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "address", - name: "receiverIpId", - type: "address", - }, - { - internalType: "address", - name: "payerIpId", - type: "address", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "payRoyaltyOnBehalf", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/IRoyaltyPolicyLAP.abi.ts b/packages/core-sdk/src/abi/json/IRoyaltyPolicyLAP.abi.ts deleted file mode 100644 index 364cfead..00000000 --- a/packages/core-sdk/src/abi/json/IRoyaltyPolicyLAP.abi.ts +++ /dev/null @@ -1,69 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - ], - name: "getRoyaltyData", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint32", - name: "", - type: "uint32", - }, - { - internalType: "address[]", - name: "", - type: "address[]", - }, - { - internalType: "uint32[]", - name: "", - type: "uint32[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "caller", - type: "address", - }, - { - internalType: "address", - name: "ipId", - type: "address", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "onRoyaltyPayment", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/IpRoyaltyVault.abi.ts b/packages/core-sdk/src/abi/json/IpRoyaltyVault.abi.ts deleted file mode 100644 index 3e66f600..00000000 --- a/packages/core-sdk/src/abi/json/IpRoyaltyVault.abi.ts +++ /dev/null @@ -1,93 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "uint256[]", - name: "snapshotIds", - type: "uint256[]", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "claimRevenueBySnapshotBatch", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "snapshotId", - type: "uint256", - }, - { - internalType: "address[]", - name: "tokens", - type: "address[]", - }, - ], - name: "claimRevenueByTokenBatch", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "uint256", - name: "snapshotId", - type: "uint256", - }, - { - internalType: "address", - name: "token", - type: "address", - }, - ], - name: "claimableRevenue", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "ancestorIpId", - type: "address", - }, - ], - name: "collectRoyaltyTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "ipId", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/LicenseRegistry.abi.ts b/packages/core-sdk/src/abi/json/LicenseRegistry.abi.ts deleted file mode 100644 index f8d62e75..00000000 --- a/packages/core-sdk/src/abi/json/LicenseRegistry.abi.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default [ - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - { - internalType: "address[]", - name: "parentIpIds", - type: "address[]", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256[]", - name: "licenseTermsIds", - type: "uint256[]", - }, - ], - name: "registerDerivativeIp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/LicensingModule.abi.ts b/packages/core-sdk/src/abi/json/LicensingModule.abi.ts deleted file mode 100644 index 14251ee2..00000000 --- a/packages/core-sdk/src/abi/json/LicensingModule.abi.ts +++ /dev/null @@ -1,174 +0,0 @@ -export default [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "caller", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "licensorIpId", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - indexed: false, - internalType: "address", - name: "receiver", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "startLicenseTokenId", - type: "uint256", - }, - ], - name: "LicenseTokensMinted", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "ipId", - type: "address", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - ], - name: "attachLicenseTerms", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "licensorIpId", - type: "address", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "uint256", - name: "licenseTermsId", - type: "uint256", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "bytes", - name: "royaltyContext", - type: "bytes", - }, - ], - name: "mintLicenseTokens", - outputs: [ - { - internalType: "uint256", - name: "startLicenseTokenId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - { - internalType: "address[]", - name: "parentIpIds", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "licenseTermsIds", - type: "uint256[]", - }, - { - internalType: "address", - name: "licenseTemplate", - type: "address", - }, - { - internalType: "bytes", - name: "royaltyContext", - type: "bytes", - }, - ], - name: "registerDerivative", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "childIpId", - type: "address", - }, - { - internalType: "uint256[]", - name: "licenseTokenIds", - type: "uint256[]", - }, - { - internalType: "bytes", - name: "royaltyContext", - type: "bytes", - }, - ], - name: "registerDerivativeWithLicenseTokens", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/json/PILPolicyFrameworkManager.abi.ts b/packages/core-sdk/src/abi/json/PILPolicyFrameworkManager.abi.ts deleted file mode 100644 index 6acf866f..00000000 --- a/packages/core-sdk/src/abi/json/PILPolicyFrameworkManager.abi.ts +++ /dev/null @@ -1,115 +0,0 @@ -export default [ - { - inputs: [ - { - components: [ - { - internalType: "bool", - name: "transferable", - type: "bool", - }, - { - internalType: "address", - name: "royaltyPolicy", - type: "address", - }, - { - internalType: "uint256", - name: "mintingFee", - type: "uint256", - }, - { - internalType: "address", - name: "mintingFeeToken", - type: "address", - }, - { - components: [ - { - internalType: "bool", - name: "attribution", - type: "bool", - }, - { - internalType: "bool", - name: "commercialUse", - type: "bool", - }, - { - internalType: "bool", - name: "commercialAttribution", - type: "bool", - }, - { - internalType: "address", - name: "commercializerChecker", - type: "address", - }, - { - internalType: "bytes", - name: "commercializerCheckerData", - type: "bytes", - }, - { - internalType: "uint32", - name: "commercialRevShare", - type: "uint32", - }, - { - internalType: "bool", - name: "derivativesAllowed", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesAttribution", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesApproval", - type: "bool", - }, - { - internalType: "bool", - name: "derivativesReciprocal", - type: "bool", - }, - { - internalType: "string[]", - name: "territories", - type: "string[]", - }, - { - internalType: "string[]", - name: "distributionChannels", - type: "string[]", - }, - { - internalType: "string[]", - name: "contentRestrictions", - type: "string[]", - }, - ], - internalType: "struct PILPolicy", - name: "policy", - type: "tuple", - }, - ], - internalType: "struct RegisterPILPolicyParams", - name: "params", - type: "tuple", - }, - ], - name: "registerPolicy", - outputs: [ - { - internalType: "uint256", - name: "policyId", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -] as const; diff --git a/packages/core-sdk/src/abi/sdkEntities.json b/packages/core-sdk/src/abi/sdkEntities.json deleted file mode 100644 index 4e9cd441..00000000 --- a/packages/core-sdk/src/abi/sdkEntities.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - "execute", - "executeWithSig", - - "ipId", - "isRegistered", - "register", - - "registerRootIp", - "registerDerivativeIp", - "IPRegistered", - "registerDerivativeWithLicenseTokens", - "registerDerivative", - "DerivativeRegistered", - - "getLicenseTermsId", - "registerLicenseTerms", - "LicenseTermsRegistered", - "attachLicenseTerms", - "mintLicenseTokens", - "LicenseTokensMinted", - - "registerPolicy", - "addPolicyToIp", - "getPolicyId", - "PolicyRegistered", - "PolicyAddedToIpId", - - "mintLicense", - "linkIpToParents", - "TransferSingle", - "TransferBatch", - "IpIdLinkedToParents", - - "setPermission", - "PermissionSet", - - "raiseDispute", - "cancelDispute", - "resolveDispute", - "DisputeCancelled", - "DisputeResolved", - "DisputeRaised", - - "collectRoyaltyTokens", - "claimRevenueBySnapshotBatch", - "claimRevenueByTokenBatch", - "claimableRevenue", - - "getRoyaltyData", - "onRoyaltyPayment", - "claimableRevenue", - "payRoyaltyOnBehalf" -] diff --git a/packages/core-sdk/src/client.ts b/packages/core-sdk/src/client.ts index 21d86485..4e57e978 100644 --- a/packages/core-sdk/src/client.ts +++ b/packages/core-sdk/src/client.ts @@ -1,7 +1,12 @@ -import { createPublicClient, createWalletClient, PublicClient, WalletClient } from "viem"; +import { createPublicClient, createWalletClient, PublicClient } from "viem"; import * as dotenv from "dotenv"; -import { StoryConfig, SupportedChainIds } from "./types/config"; +import { + StoryConfig, + SupportedChainIds, + UseAccountStoryConfig, + UseWalletStoryConfig, +} from "./types/config"; import { IPAssetClient } from "./resources/ipAsset"; import { PermissionClient } from "./resources/permission"; import { LicenseClient } from "./resources/license"; @@ -10,6 +15,7 @@ import { IPAccountClient } from "./resources/ipAccount"; import { chainStringToViemChain } from "./utils/utils"; import { StoryAPIClient } from "./clients/storyAPI"; import { RoyaltyClient } from "./resources/royalty"; +import { SimpleWalletClient } from "./abi/generated"; if (typeof process !== "undefined") { dotenv.config(); @@ -20,7 +26,7 @@ if (typeof process !== "undefined") { export class StoryClient { private readonly config: StoryConfig & { chainId: SupportedChainIds }; private readonly rpcClient: PublicClient; - private readonly wallet: WalletClient; + private readonly wallet: SimpleWalletClient; private readonly storyClient: StoryAPIClient; private _ipAsset: IPAssetClient | null = null; private _permission: PermissionClient | null = null; @@ -50,28 +56,55 @@ export class StoryClient { this.rpcClient = createPublicClient(clientConfig); this.storyClient = new StoryAPIClient(); - const account = this.config.account; - if (!account) { - throw new Error("account is null"); - } + if (this.config.wallet) { + this.wallet = this.config.wallet; + } else if (this.config.account) { + const account = this.config.account; - this.wallet = - config.wallet || - createWalletClient({ + this.wallet = createWalletClient({ ...clientConfig, account: account, }); + } else { + throw new Error("must specify a wallet or account"); + } } /** * Factory method for creating a SDK client with a signer. * - * @param config - the configuration for a new SDK client + * @param config StoryClient - the configuration for a new SDK client */ static newClient(config: StoryConfig): StoryClient { return new StoryClient(config); } + /** + * Factory method for creating a SDK client with a signer. + * + * @param config WalletClientConfig - the configuration for a new SDK client + */ + static newClientUseWallet(config: UseWalletStoryConfig): StoryClient { + return new StoryClient({ + chainId: config.chainId, + transport: config.transport, + wallet: config.wallet, + }); + } + + /** + * Factory method for creating a SDK client with a signer. + * + * @param config UseAccountStoryConfig - the configuration for a new SDK client + */ + static newClientUseAccount(config: UseAccountStoryConfig): StoryClient { + return new StoryClient({ + account: config.account, + chainId: config.chainId, + transport: config.transport, + }); + } + /** * Getter for the ip asset client. The client is lazily created when * this method is called. @@ -94,7 +127,7 @@ export class StoryClient { */ public get permission(): PermissionClient { if (this._permission === null) { - this._permission = new PermissionClient(this.rpcClient, this.wallet, this.config.chainId); + this._permission = new PermissionClient(this.rpcClient, this.wallet); } return this._permission; @@ -108,12 +141,7 @@ export class StoryClient { */ public get license(): LicenseClient { if (this._license === null) { - this._license = new LicenseClient( - this.rpcClient, - this.wallet, - this.storyClient, - this.config.chainId, - ); + this._license = new LicenseClient(this.rpcClient, this.wallet, this.storyClient); } return this._license; @@ -127,7 +155,7 @@ export class StoryClient { */ public get dispute(): DisputeClient { if (this._dispute === null) { - this._dispute = new DisputeClient(this.rpcClient, this.wallet, this.config.chainId); + this._dispute = new DisputeClient(this.rpcClient, this.wallet); } return this._dispute; @@ -154,7 +182,7 @@ export class StoryClient { */ public get royalty(): RoyaltyClient { if (this._royalty === null) { - this._royalty = new RoyaltyClient(this.rpcClient, this.wallet, this.config.chainId); + this._royalty = new RoyaltyClient(this.rpcClient, this.wallet); } return this._royalty; diff --git a/packages/core-sdk/src/resources/dispute.ts b/packages/core-sdk/src/resources/dispute.ts index 7d74c97b..19eca996 100644 --- a/packages/core-sdk/src/resources/dispute.ts +++ b/packages/core-sdk/src/resources/dispute.ts @@ -1,4 +1,4 @@ -import { PublicClient, WalletClient, stringToHex } from "viem"; +import { PublicClient, stringToHex } from "viem"; import { handleError } from "../utils/errors"; import { @@ -9,19 +9,15 @@ import { ResolveDisputeRequest, ResolveDisputeResponse, } from "../types/resources/dispute"; -import { waitTx, waitTxAndFilterLog } from "../utils/utils"; -import { getDisputeModuleConfig } from "../abi/config"; -import { SupportedChainIds } from "../types/config"; +import { DisputeModuleClient, SimpleWalletClient } from "../abi/generated"; export class DisputeClient { - private readonly wallet: WalletClient; private readonly rpcClient: PublicClient; - public disputeModuleConfig; + public disputeModuleClient: DisputeModuleClient; - constructor(rpcClient: PublicClient, wallet: WalletClient, chainId: SupportedChainIds) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient) { this.rpcClient = rpcClient; - this.wallet = wallet; - this.disputeModuleConfig = getDisputeModuleConfig(chainId); + this.disputeModuleClient = new DisputeModuleClient(rpcClient, wallet); } /** @@ -42,28 +38,19 @@ export class DisputeClient { */ public async raiseDispute(request: RaiseDisputeRequest): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.disputeModuleConfig, - functionName: "raiseDispute", - args: [ - request.targetIpId, - request.linkToDisputeEvidence, - stringToHex(request.targetTag, { size: 32 }), - request.calldata || "0x", - ], - account: this.wallet.account, + const txHash = await this.disputeModuleClient.raiseDispute({ + targetIpId: request.targetIpId, + linkToDisputeEvidence: request.linkToDisputeEvidence, + targetTag: stringToHex(request.targetTag, { size: 32 }), + data: request.calldata || "0x", }); - const txHash = await this.wallet.writeContract(call); - if (request.txOptions?.waitForTransaction) { - const targetLogs = await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.disputeModuleConfig, - eventName: "DisputeRaised", - }); + const txReceipt = await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); + const targetLogs = this.disputeModuleClient.parseTxDisputeRaisedEvent(txReceipt); return { txHash: txHash, - disputeId: BigInt(targetLogs[0].args.disputeId).toString() as `0x${string}`, + disputeId: BigInt(targetLogs[0].disputeId).toString() as `0x${string}`, }; } return { txHash: txHash }; @@ -86,17 +73,13 @@ export class DisputeClient { */ public async cancelDispute(request: CancelDisputeRequest): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.disputeModuleConfig, - functionName: "cancelDispute", - args: [BigInt(request.disputeId), request.calldata ? request.calldata : "0x"], - account: this.wallet.account, + const txHash = await this.disputeModuleClient.cancelDispute({ + disputeId: BigInt(request.disputeId), + data: request.calldata ? request.calldata : "0x", }); - const txHash = await this.wallet.writeContract(call); - if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); } return { txHash: txHash }; @@ -116,17 +99,12 @@ export class DisputeClient { */ public async resolveDispute(request: ResolveDisputeRequest): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.disputeModuleConfig, - functionName: "resolveDispute", - args: [BigInt(request.disputeId)], - account: this.wallet.account, + const txHash = await this.disputeModuleClient.resolveDispute({ + disputeId: BigInt(request.disputeId), }); - const txHash = await this.wallet.writeContract(call); - if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); } return { txHash: txHash }; diff --git a/packages/core-sdk/src/resources/ipAccount.ts b/packages/core-sdk/src/resources/ipAccount.ts index 2a9046a6..3967c52f 100644 --- a/packages/core-sdk/src/resources/ipAccount.ts +++ b/packages/core-sdk/src/resources/ipAccount.ts @@ -1,4 +1,4 @@ -import { PublicClient, WalletClient, getAddress } from "viem"; +import { PublicClient, getAddress } from "viem"; import { IPAccountExecuteRequest, @@ -7,15 +7,14 @@ import { IPAccountExecuteWithSigResponse, } from "../types/resources/ipAccount"; import { handleError } from "../utils/errors"; -import { IPAccountABI } from "../abi/config"; -import { parseToBigInt, waitTx } from "../utils/utils"; +import { parseToBigInt } from "../utils/utils"; +import { IpAccountImplClient, SimpleWalletClient } from "../abi/generated"; export class IPAccountClient { - private readonly wallet: WalletClient; + private readonly wallet: SimpleWalletClient; private readonly rpcClient: PublicClient; - public ipAccountABI = IPAccountABI; - constructor(rpcClient: PublicClient, wallet: WalletClient) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient) { this.wallet = wallet; this.rpcClient = rpcClient; } @@ -29,21 +28,20 @@ export class IPAccountClient { */ public async execute(request: IPAccountExecuteRequest): Promise { try { - const IPAccountConfig = { - abi: this.ipAccountABI, - address: getAddress(request.accountAddress), - }; + const ipAccountClient = new IpAccountImplClient( + this.rpcClient, + this.wallet, + getAddress(request.accountAddress), + ); - const { request: call } = await this.rpcClient.simulateContract({ - ...IPAccountConfig, - functionName: "execute", - args: [request.to, parseToBigInt(0), request.data], - account: this.wallet.account, + const txHash = await ipAccountClient.execute({ + to: request.to, + value: parseToBigInt(0), + data: request.data, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); } return { txHash: txHash }; } catch (error) { @@ -65,28 +63,23 @@ export class IPAccountClient { request: IPAccountExecuteWithSigRequest, ): Promise { try { - const IPAccountConfig = { - abi: this.ipAccountABI, - address: getAddress(request.accountAddress), - }; + const ipAccountClient = new IpAccountImplClient( + this.rpcClient, + this.wallet, + getAddress(request.accountAddress), + ); - const { request: call } = await this.rpcClient.simulateContract({ - ...IPAccountConfig, - functionName: "executeWithSig", - args: [ - request.to, - parseToBigInt(0), - request.data, - request.signer, - parseToBigInt(request.deadline), - request.signature, - ], - account: this.wallet.account, + const txHash = await ipAccountClient.executeWithSig({ + to: request.to, + value: parseToBigInt(0), + data: request.data, + signer: request.signer, + deadline: parseToBigInt(request.deadline), + signature: request.signature, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); } return { txHash: txHash }; } catch (error) { diff --git a/packages/core-sdk/src/resources/ipAsset.ts b/packages/core-sdk/src/resources/ipAsset.ts index 915d0b1e..fd8cb3a2 100644 --- a/packages/core-sdk/src/resources/ipAsset.ts +++ b/packages/core-sdk/src/resources/ipAsset.ts @@ -1,11 +1,6 @@ -import { Hex, PublicClient, WalletClient, getAddress, zeroAddress } from "viem"; +import { Hex, PublicClient, getAddress, zeroAddress } from "viem"; -import { chain, parseToBigInt, waitTx, waitTxAndFilterLog } from "../utils/utils"; -import { - getIPAssetRegistryConfig, - getLicenseTemplateConfig, - getLicensingModuleConfig, -} from "../abi/config"; +import { chain, parseToBigInt } from "../utils/utils"; import { SupportedChainIds } from "../types/config"; import { handleError } from "../utils/errors"; import { @@ -16,23 +11,28 @@ import { RegisterIpResponse, RegisterRequest, } from "../types/resources/ipAsset"; +import { + IpAssetRegistryClient, + LicensingModuleClient, + PiLicenseTemplateClient, + SimpleWalletClient, +} from "../abi/generated"; export class IPAssetClient { - private readonly wallet: WalletClient; private readonly rpcClient: PublicClient; private readonly chainId: SupportedChainIds; - public ipAssetRegistryConfig; - public licenseModuleConfig; - public licenseTemplateConfig; + public ipAssetRegistryClient: IpAssetRegistryClient; + public licensingModuleClient: LicensingModuleClient; + public licenseTemplateClient: PiLicenseTemplateClient; - constructor(rpcClient: PublicClient, wallet: WalletClient, chainId: SupportedChainIds) { - this.wallet = wallet; + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, chainId: SupportedChainIds) { this.rpcClient = rpcClient; this.chainId = chainId; - this.ipAssetRegistryConfig = getIPAssetRegistryConfig(chainId); - this.licenseModuleConfig = getLicensingModuleConfig(chainId); - this.licenseTemplateConfig = getLicenseTemplateConfig(chainId); + this.ipAssetRegistryClient = new IpAssetRegistryClient(rpcClient, wallet); + this.licensingModuleClient = new LicensingModuleClient(this.rpcClient, wallet); + this.licenseTemplateClient = new PiLicenseTemplateClient(this.rpcClient, wallet); } + /** * Registers an NFT as IP, creating a corresponding IP record. * @param request The request object that contains all data needed to register IP. @@ -49,19 +49,14 @@ export class IPAssetClient { if (ipId !== "0x") { return { ipId: ipId }; } - const { request: call } = await this.rpcClient.simulateContract({ - ...this.ipAssetRegistryConfig, - functionName: "register", - args: [getAddress(request.tokenContract), tokenId], - account: this.wallet.account, + const txHash = await this.ipAssetRegistryClient.register({ + tokenContract: getAddress(request.tokenContract), + tokenId: tokenId, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - const targetLogs = await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.ipAssetRegistryConfig, - eventName: "IPRegistered", - }); - return { txHash: txHash, ipId: targetLogs[0].args.ipId }; + const txReceipt = await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); + const targetLogs = this.ipAssetRegistryClient.parseTxIpRegisteredEvent(txReceipt); + return { txHash: txHash, ipId: targetLogs[0].ipId }; } else { return { txHash: txHash }; } @@ -87,21 +82,15 @@ export class IPAssetClient { request: RegisterDerivativeRequest, ): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licenseModuleConfig, - functionName: "registerDerivative", - args: [ - request.childIpId, - request.parentIpIds, - request.licenseTermsIds.map((id) => BigInt(id)), - request.licenseTemplate || this.licenseTemplateConfig.address, - zeroAddress, - ], - account: this.wallet.account, + const txHash = await this.licensingModuleClient.registerDerivative({ + childIpId: request.childIpId, + parentIpIds: request.parentIpIds, + licenseTermsIds: request.licenseTermsIds.map((id) => BigInt(id)), + licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address, + royaltyContext: zeroAddress, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); return { txHash }; } else { return { txHash }; @@ -126,15 +115,13 @@ export class IPAssetClient { request: RegisterDerivativeWithLicenseTokensRequest, ): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licenseModuleConfig, - functionName: "registerDerivativeWithLicenseTokens", - args: [request.childIpId, request.licenseTokenIds.map((id) => BigInt(id)), zeroAddress], - account: this.wallet.account, + const txHash = await this.licensingModuleClient.registerDerivativeWithLicenseTokens({ + childIpId: request.childIpId, + licenseTokenIds: request.licenseTokenIds.map((id) => BigInt(id)), + royaltyContext: zeroAddress, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); return { txHash: txHash }; } else { return { txHash: txHash }; @@ -143,17 +130,14 @@ export class IPAssetClient { handleError(error, "Failed to register derivative with license tokens"); } } + private async isNFTRegistered(tokenAddress: Hex, tokenId: bigint): Promise { - const ipId = await this.rpcClient.readContract({ - ...this.ipAssetRegistryConfig, - functionName: "ipId", - args: [parseToBigInt(chain[this.chainId]), tokenAddress, tokenId], - }); - const isRegistered = await this.rpcClient.readContract({ - ...this.ipAssetRegistryConfig, - functionName: "isRegistered", - args: [ipId], + const ipId = await this.ipAssetRegistryClient.ipId({ + chainId: parseToBigInt(chain[this.chainId]), + tokenContract: tokenAddress, + tokenId: tokenId, }); + const isRegistered = await this.ipAssetRegistryClient.isRegistered({ id: ipId }); return isRegistered ? ipId : "0x"; } } diff --git a/packages/core-sdk/src/resources/license.ts b/packages/core-sdk/src/resources/license.ts index 4879609e..b904d83e 100644 --- a/packages/core-sdk/src/resources/license.ts +++ b/packages/core-sdk/src/resources/license.ts @@ -1,15 +1,13 @@ -import { PublicClient, WalletClient, zeroAddress } from "viem"; +import { PublicClient, zeroAddress } from "viem"; -import { handleError } from "../utils/errors"; -import { waitTx, waitTxAndFilterLog } from "../utils/utils"; -import { - IPAccountABI, - getLicenseRegistryConfig, - getLicenseTemplateConfig, - getLicensingModuleConfig, - getRoyaltyPolicyLAPConfig, -} from "../abi/config"; import { StoryAPIClient } from "../clients/storyAPI"; +import { + LicenseRegistryEventClient, + LicensingModuleClient, + PiLicenseTemplateClient, + RoyaltyPolicyLapClient, + SimpleWalletClient, +} from "../abi/generated"; import { LicenseTerms, RegisterLicenseTermsRequest, @@ -21,40 +19,30 @@ import { MintLicenseTokensRequest, MintLicenseTokensResponse, } from "../types/resources/license"; -import { SupportedChainIds } from "../types/config"; +import { handleError } from "../utils/errors"; export class LicenseClient { - private readonly wallet: WalletClient; + private readonly wallet: SimpleWalletClient; private readonly rpcClient: PublicClient; private readonly storyClient: StoryAPIClient; - public licenseRegistryConfig; - public licensingModuleConfig; - public ipAccountABI = IPAccountABI; - public licenseTemplateConfig; - public royaltyPolicyLAPConfig; + public licenseRegistryClient: LicenseRegistryEventClient; + public licensingModuleClient: LicensingModuleClient; + private licenseTemplateClient: PiLicenseTemplateClient; + private royaltyPolicyLAPClient: RoyaltyPolicyLapClient; - constructor( - rpcClient: PublicClient, - wallet: WalletClient, - storyClient: StoryAPIClient, - chainId: SupportedChainIds, - ) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient, storyClient: StoryAPIClient) { this.wallet = wallet; this.rpcClient = rpcClient; this.storyClient = storyClient; - this.licenseRegistryConfig = getLicenseRegistryConfig(chainId); - this.licensingModuleConfig = getLicensingModuleConfig(chainId); - this.licenseTemplateConfig = getLicenseTemplateConfig(chainId); - this.royaltyPolicyLAPConfig = getRoyaltyPolicyLAPConfig(chainId); + this.licenseRegistryClient = new LicenseRegistryEventClient(this.rpcClient); + this.licenseTemplateClient = new PiLicenseTemplateClient(this.rpcClient, this.wallet); + this.licensingModuleClient = new LicensingModuleClient(this.rpcClient, this.wallet); + this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(this.rpcClient, this.wallet); } private async getLicenseTermsId(request: LicenseTerms): Promise { - const selectedLicenseTermsId = await this.rpcClient.readContract({ - ...this.licenseTemplateConfig, - functionName: "getLicenseTermsId", - args: [request], - }); - return Number(selectedLicenseTermsId); + const licenseRes = await this.licenseTemplateClient.getLicenseTermsId({ terms: request }) + return Number(licenseRes.selectedLicenseTermsId); } /** @@ -90,20 +78,13 @@ export class LicenseClient { if (licenseTermsId !== 0) { return { licenseTermsId: licenseTermsId.toString() }; } - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licenseTemplateConfig, - functionName: "registerLicenseTerms", - args: [licenseTerms], - account: this.wallet.account, - }); - const txHash = await this.wallet.writeContract(call); + const txHash = await this.licenseTemplateClient.registerLicenseTerms({ terms: licenseTerms }); if (request.txOptions?.waitForTransaction) { - const targetLogs = await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.licenseTemplateConfig, - eventName: "LicenseTermsRegistered", - }); - return { txHash: txHash, licenseTermsId: targetLogs[0].args.licenseTermsId.toString() }; + const txReceipt = await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); + const targetLogs = this.licenseTemplateClient.parseTxLicenseTermsRegisteredEvent(txReceipt); + + return { txHash: txHash, licenseTermsId: targetLogs[0].licenseTermsId.toString() }; } else { return { txHash: txHash }; } @@ -128,7 +109,7 @@ export class LicenseClient { try { const licenseTerms: LicenseTerms = { transferable: true, - royaltyPolicy: this.royaltyPolicyLAPConfig.address, + royaltyPolicy: this.royaltyPolicyLAPClient.address, mintingFee: BigInt(request.mintingFee), expiration: BigInt(0), commercialUse: true, @@ -149,20 +130,12 @@ export class LicenseClient { return { licenseTermsId: licenseTermsId.toString() }; } - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licenseTemplateConfig, - functionName: "registerLicenseTerms", - args: [licenseTerms], - account: this.wallet.account, - }); - const txHash = await this.wallet.writeContract(call); + const txHash = await this.licenseTemplateClient.registerLicenseTerms({ terms: licenseTerms }); if (request.txOptions?.waitForTransaction) { - const targetLogs = await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.licenseTemplateConfig, - eventName: "LicenseTermsRegistered", - }); - return { txHash: txHash, licenseTermsId: targetLogs[0].args.licenseTermsId.toString() }; + const txReceipt = await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); + const targetLogs = this.licenseTemplateClient.parseTxLicenseTermsRegisteredEvent(txReceipt); + return { txHash: txHash, licenseTermsId: targetLogs[0].licenseTermsId.toString() }; } else { return { txHash: txHash }; } @@ -187,7 +160,7 @@ export class LicenseClient { try { const licenseTerms: LicenseTerms = { transferable: true, - royaltyPolicy: this.royaltyPolicyLAPConfig.address, + royaltyPolicy: this.royaltyPolicyLAPClient.address, mintingFee: BigInt(request.mintingFee), expiration: BigInt(0), commercialUse: true, @@ -207,20 +180,12 @@ export class LicenseClient { if (licenseTermsId !== 0) { return { licenseTermsId: licenseTermsId.toString() }; } - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licenseTemplateConfig, - functionName: "registerLicenseTerms", - args: [licenseTerms], - account: this.wallet.account, - }); - const txHash = await this.wallet.writeContract(call); + const txHash = await this.licenseTemplateClient.registerLicenseTerms({ terms: licenseTerms }); if (request.txOptions?.waitForTransaction) { - const targetLogs = await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.licenseTemplateConfig, - eventName: "LicenseTermsRegistered", - }); - return { txHash: txHash, licenseTermsId: targetLogs[0].args.licenseTermsId.toString() }; + const txReceipt = await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); + const targetLogs = this.licenseTemplateClient.parseTxLicenseTermsRegisteredEvent(txReceipt); + return { txHash: txHash, licenseTermsId: targetLogs[0].licenseTermsId.toString() }; } else { return { txHash: txHash }; } @@ -232,6 +197,10 @@ export class LicenseClient { /** * Attaches license terms to an IP. * @param request The request object that contains all data needed to attach license terms. + @param request.ipId The IP ID. + @param request.tokenAddress The address of the NFT. + @param request.licenseTemplate The address of the license template. + @param request.licenseTermsId The ID of the license terms. @param request.ipId The address of the IP to which the license terms are attached. @param request.licenseTemplate The address of the license template. @param request.licenseTermsId The ID of the license terms. @@ -239,19 +208,13 @@ export class LicenseClient { * @returns A Promise that resolves to an object containing the transaction hash. */ public async attachLicenseTerms(request: AttachLicenseTermsRequest) { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licensingModuleConfig, - functionName: "attachLicenseTerms", - args: [ - request.ipId, - request.licenseTemplate || this.licenseTemplateConfig.address, - BigInt(request.licenseTermsId), - ], - account: this.wallet.account, + const txHash = await this.licensingModuleClient.attachLicenseTerms({ + ipId: request.ipId, + licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address, + licenseTermsId: BigInt(request.licenseTermsId), }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); return { txHash: txHash }; } else { return { txHash: txHash }; @@ -284,28 +247,21 @@ export class LicenseClient { request: MintLicenseTokensRequest, ): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.licensingModuleConfig, - functionName: "mintLicenseTokens", - args: [ - request.licensorIpId, - request.licenseTemplate || this.licenseTemplateConfig.address, - BigInt(request.licenseTermsId), - BigInt(request.amount || 1), - request.receiver || this.wallet.account!.address, - zeroAddress, - ], - account: this.wallet.account, + const txHash = await this.licensingModuleClient.mintLicenseTokens({ + licensorIpId: request.licensorIpId, + licenseTemplate: request.licenseTemplate || this.licenseTemplateClient.address, + licenseTermsId: BigInt(request.licenseTermsId), + amount: BigInt(request.amount || 1), + receiver: request.receiver || this.wallet.account!.address, + royaltyContext: zeroAddress, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - const targetLogs = await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.licensingModuleConfig, - eventName: "LicenseTokensMinted", - }); + const txReceipt = await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); + const targetLogs = this.licensingModuleClient.parseTxLicenseTokensMintedEvent(txReceipt); + return { txHash: txHash, - licenseTokenId: targetLogs[0].args.startLicenseTokenId.toString(), + licenseTokenId: targetLogs[0].startLicenseTokenId.toString(), }; } else { return { txHash: txHash }; diff --git a/packages/core-sdk/src/resources/permission.ts b/packages/core-sdk/src/resources/permission.ts index e5bb4b7e..53fef187 100644 --- a/packages/core-sdk/src/resources/permission.ts +++ b/packages/core-sdk/src/resources/permission.ts @@ -1,21 +1,24 @@ -import { PublicClient, WalletClient, getAddress, Hex, encodeFunctionData } from "viem"; +import { PublicClient, getAddress, Hex, encodeFunctionData } from "viem"; import { handleError } from "../utils/errors"; import { SetPermissionsRequest, SetPermissionsResponse } from "../types/resources/permission"; -import { IPAccountABI, getAccessControllerConfig } from "../abi/config"; -import { parseToBigInt, waitTxAndFilterLog } from "../utils/utils"; -import { SupportedChainIds } from "../types/config"; +import { parseToBigInt } from "../utils/utils"; +import { + accessControllerAbi, + AccessControllerClient, + IpAccountImplClient, + SimpleWalletClient, +} from "../abi/generated"; export class PermissionClient { - private readonly wallet: WalletClient; + private readonly wallet: SimpleWalletClient; private readonly rpcClient: PublicClient; - public ipAccountABI = IPAccountABI; - public accessControllerConfig; + private accessControllerClient: AccessControllerClient; - constructor(rpcClient: PublicClient, wallet: WalletClient, chainId: SupportedChainIds) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient) { this.rpcClient = rpcClient; this.wallet = wallet; - this.accessControllerConfig = getAccessControllerConfig(chainId); + this.accessControllerClient = new AccessControllerClient(this.rpcClient, this.wallet); } /** @@ -39,39 +42,30 @@ export class PermissionClient { */ public async setPermission(request: SetPermissionsRequest): Promise { try { - const IPAccountConfig = { - abi: this.ipAccountABI, - address: getAddress(request.ipId), - }; + const ipAccountClient = new IpAccountImplClient( + this.rpcClient, + this.wallet, + getAddress(request.ipId), + ); - const { request: call } = await this.rpcClient.simulateContract({ - ...IPAccountConfig, - functionName: "execute", - args: [ - this.accessControllerConfig.address, - parseToBigInt(0), - encodeFunctionData({ - abi: this.accessControllerConfig.abi, - functionName: "setPermission", - args: [ - getAddress(request.ipId), // 0x Address - getAddress(request.signer), // 0x Address - getAddress(request.to), // 0x Address - (request.func || "0x00000000") as Hex, // bytes4 - request.permission, // uint8 - ], - }), - ], - account: this.wallet.account, + const txHash = await ipAccountClient.execute({ + to: this.accessControllerClient.address, + value: parseToBigInt(0), + data: encodeFunctionData({ + abi: accessControllerAbi, + functionName: "setPermission", + args: [ + getAddress(request.ipId), // 0x Address + getAddress(request.signer), // 0x Address + getAddress(request.to), // 0x Address + (request.func || "0x00000000") as Hex, // bytes4 + request.permission, // uint8 + ], + }), }); - const txHash = await this.wallet.writeContract(call); - if (request.txOptions?.waitForTransaction) { - await waitTxAndFilterLog(this.rpcClient, txHash, { - ...this.accessControllerConfig, - eventName: "PermissionSet", - }); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); return { txHash: txHash, success: true }; } else { return { txHash: txHash }; diff --git a/packages/core-sdk/src/resources/royalty.ts b/packages/core-sdk/src/resources/royalty.ts index 4627b951..87af8d61 100644 --- a/packages/core-sdk/src/resources/royalty.ts +++ b/packages/core-sdk/src/resources/royalty.ts @@ -1,7 +1,6 @@ -import { Hex, PublicClient, WalletClient } from "viem"; +import { Hex, PublicClient } from "viem"; import { handleError } from "../utils/errors"; -import { SupportedChainIds } from "../types/config"; import { CollectRoyaltyTokensRequest, CollectRoyaltyTokensResponse, @@ -9,26 +8,27 @@ import { PayRoyaltyOnBehalfResponse, } from "../types/resources/royalty"; import { - getRoyaltyModuleConfig, - getRoyaltyPolicyLAPConfig, - getRoyaltyVaultImplConfig, -} from "../abi/config"; -import { waitTx } from "../utils/utils"; + IpRoyaltyVaultImplClient, + RoyaltyModuleClient, + RoyaltyPolicyLapClient, + SimpleWalletClient, +} from "../abi/generated"; export class RoyaltyClient { - private readonly wallet: WalletClient; + private readonly wallet: SimpleWalletClient; private readonly rpcClient: PublicClient; - public royaltyVaultImplConfig; - public royaltyPolicyLAPConfig; - public royaltyModuleConfig; + public royaltyVaultImplClient: IpRoyaltyVaultImplClient; + public royaltyPolicyLAPClient: RoyaltyPolicyLapClient; + public royaltyModuleClient: RoyaltyModuleClient; - constructor(rpcClient: PublicClient, wallet: WalletClient, chainId: SupportedChainIds) { + constructor(rpcClient: PublicClient, wallet: SimpleWalletClient) { this.rpcClient = rpcClient; this.wallet = wallet; - this.royaltyVaultImplConfig = getRoyaltyVaultImplConfig(chainId); - this.royaltyPolicyLAPConfig = getRoyaltyPolicyLAPConfig(chainId); - this.royaltyModuleConfig = getRoyaltyModuleConfig(chainId); + this.royaltyVaultImplClient = new IpRoyaltyVaultImplClient(this.rpcClient, this.wallet); + this.royaltyPolicyLAPClient = new RoyaltyPolicyLapClient(this.rpcClient, this.wallet); + this.royaltyModuleClient = new RoyaltyModuleClient(this.rpcClient, this.wallet); } + /** * Allows ancestors to claim the royalty tokens and any accrued revenue tokens * @param request - the licensing parameters for the Programmable IP License v1 (PIL) standard. @@ -45,14 +45,9 @@ export class RoyaltyClient { if (!proxyAddress) { throw new Error("Proxy address not found"); } - const { request: call } = await this.rpcClient.simulateContract({ - ...this.royaltyVaultImplConfig, - address: proxyAddress, - functionName: "collectRoyaltyTokens", - args: [request.ancestorIpId], - account: this.wallet.account, + const txHash = await this.royaltyVaultImplClient.collectRoyaltyTokens({ + ancestorIpId: request.ancestorIpId, }); - const txHash = await this.wallet.writeContract(call); return { txHash }; } catch (error) { handleError(error, "Failed to collect royalty tokens"); @@ -60,10 +55,8 @@ export class RoyaltyClient { } private async getProxyAddress(derivativeID: Hex) { - const data = await this.rpcClient.readContract({ - ...this.royaltyPolicyLAPConfig, - functionName: "getRoyaltyData", - args: [derivativeID], + const data = await this.royaltyPolicyLAPClient.getRoyaltyData({ + ipId: derivativeID, }); if (Array.isArray(data) && data[1]) { return data[1]; @@ -85,15 +78,14 @@ export class RoyaltyClient { request: PayRoyaltyOnBehalfRequest, ): Promise { try { - const { request: call } = await this.rpcClient.simulateContract({ - ...this.royaltyModuleConfig, - functionName: "payRoyaltyOnBehalf", - args: [request.receiverIpId, request.payerIpId, request.token, request.amount], - account: this.wallet.account, + const txHash = await this.royaltyModuleClient.payRoyaltyOnBehalf({ + receiverIpId: request.receiverIpId, + payerIpId: request.payerIpId, + token: request.token, + amount: request.amount, }); - const txHash = await this.wallet.writeContract(call); if (request.txOptions?.waitForTransaction) { - await waitTx(this.rpcClient, txHash); + await this.rpcClient.waitForTransactionReceipt({ hash: txHash }); } return { txHash }; } catch (error) { diff --git a/packages/core-sdk/src/types/config.ts b/packages/core-sdk/src/types/config.ts index a283f869..572fa977 100644 --- a/packages/core-sdk/src/types/config.ts +++ b/packages/core-sdk/src/types/config.ts @@ -1,4 +1,6 @@ -import { Account, Transport, Address, WalletClient } from "viem"; +import { Account, Transport, Address } from "viem"; + +import { SimpleWalletClient } from "../abi/generated"; /** * Supported chains. For convenience, both name or chain ID are supported. @@ -12,11 +14,23 @@ export type SupportedChainIds = "11155111" | "sepolia" | "1513" | "storyTestnet" * * @public */ -export interface StoryConfig { +export type UseAccountStoryConfig = { readonly account: Account | Address; readonly chainId?: SupportedChainIds; readonly transport: Transport; - readonly wallet?: WalletClient; -} +}; + +export type UseWalletStoryConfig = { + readonly chainId?: SupportedChainIds; + readonly transport: Transport; + readonly wallet: SimpleWalletClient; +}; + +export type StoryConfig = { + readonly chainId?: SupportedChainIds; + readonly transport: Transport; + readonly wallet?: SimpleWalletClient; + readonly account?: Account | Address; +}; export type ContractAddress = { [key in SupportedChainIds]: Record }; diff --git a/packages/core-sdk/src/types/options.ts b/packages/core-sdk/src/types/options.ts index a63bdbdb..f6d245e9 100644 --- a/packages/core-sdk/src/types/options.ts +++ b/packages/core-sdk/src/types/options.ts @@ -3,3 +3,7 @@ export type TxOptions = { gasPrice?: bigint; numBlockConfirmations?: number; }; + +export type WithTxOptions = T & { + txOptions?: TxOptions; +}; diff --git a/packages/core-sdk/src/utils/env.ts b/packages/core-sdk/src/utils/env.ts deleted file mode 100644 index 19e57a2a..00000000 --- a/packages/core-sdk/src/utils/env.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Hex } from "viem"; - -import { ContractAddress } from "../types/config"; - -const sepolia: Record = { - AccessController: "0xad64a4b2e18FF7D2f97aF083E7b193d7Dd141735", - AncestorsVaultLAP: "0x1db575D163685F4b825aA2b0972B62CB6E7Ac2Db", - ArbitrationPolicySP: "0x532BC697eFFd12Eb16C913b0df04ebEA87dea309", - DisputeModule: "0x6157B19CBc151af2b36e0a2581001d32a22b2661", - Governance: "0xc5Cdbb3359143C2449D03342D2F13F2F0e58c1b8", - IPAccountImpl: "0x79792DccC6C58C303510fc1F7649e481C431aFb1", - IPAccountRegistry: "0xBD2780F291588C8bDDf7F5874988fA9d3179d560", - IPAssetRegistry: "0x292639452A975630802C17c9267169D93BD5a793", - IPAssetRenderer: "0x1Ce95B7b333d71C00C3334a96713440d5A5A26dD", - IPMetadataProvider: "0x31c65C12A6A3889cd08A055914931E2Fbe773dD6", - IPResolver: "0x3809f4128B0B33AFb17576edafD7D4F4E2ABE933", - LicenseRegistry: "0xc2BC7a2d5784768BDEd98436f2522A4931e2FBb4", - LicensingModule: "0x950d766A1a0afDc33c3e653C861A8765cb42DbdC", - MockERC20: "0x857308523a01B430cB112400976B9FC4A6429D55", - MockERC721: "0x16d50f333B264b153B7BF1DD9fe65A2707B3281b", - MockTokenGatedHook: "0x28C32a4B5B3E186d7f658C051d3Bb4a95243209a", - ModuleRegistry: "0x5Aac3177F496F503Ac724A0D0A697f6ba9dA2C27", - PILicenseTemplate: "0xeAABf2b80B7e069EE449B5629590A1cc0F9bC9C2", - RegistrationModule: "0x613128e88b568768764824f898C8135efED97fA6", - RoyaltyModule: "0xA6bEf9CC650A16939566c1da5d5088f3F028a865", - RoyaltyPolicyLAP: "0x16eF58e959522727588921A92e9084d36E5d3855", - TokenWithdrawalModule: "0x66738a5722e9Cd91B694bA39146CFEcE95457F04", -}; - -const storyTestnet: Record = { - AccessController: "0x7e253Df9b0fC872746877Fa362b2cAf32712d770", - ArbitrationPolicySP: "0xA25bc70932282b35407e0DC08cc9C91f6b00CEf0", - CoreMetadataModule: "0x8A8FBAaEB6A0B7736ebde31c6F49CccD808232bA", - CoreMetadataViewModule: "0x8A8FBAaEB6A0B7736ebde31c6F49CccD808232bA", - DisputeModule: "0x6d54456Ae5DCbDC0C9E2713cC8E650fE4f445c7C", - Governance: "0x63F4A670A8b518ef5eb291559BdAbea4b31c1AC4", - IPAccountImpl: "0x38cAfD16502B1d61c6399A18d6Fa1Ea8CEca3678", - IPAccountRegistry: "0x8448d0F77D7e67e0814f83D988aB3344D46bb1E4", - IPAssetRegistry: "0x862de97662a1231FFc14038eC1BE93aB129D2169", - IpRoyaltyVaultBeacon: "0xE92Cdf428f07D92248b6b15ce59a9d5597428F21", - IpRoyaltyVaultImpl: "0x8Be22cc2D13ADF496a417D9C616dA4a253c68Af8", - LicenseRegistry: "0x0c3D467537FAd845a78728CEdc3D9447338c5422", - LicenseToken: "0xD40b7bCA204f96a346021e31c9ad54FF495226e7", - LicensingModule: "0xEeDDE5529122b621105798860F235c28FD3aBA40", - MockERC20: "0xA36F2A4A02f5C215d1b3630f71A4Ff55B5492AAE", - MockERC721: "0x83DD606d14CcEb629dE9Bf8Aad7aE63767dB476f", - MockTokenGatedHook: "0x80519d82FBE474AB9E863A066AC32E3eeAFc8F11", - ModuleRegistry: "0xf2965E3B6251905Dd1E8671077760D07b0408cf2", - PILicenseTemplate: "0xd0Be223ae9719bBD93447ecf5289319CCf8cA227", - RoyaltyModule: "0x551AD8CD7893003cE00500aC2aCF1E327763D9f6", - RoyaltyPolicyLAP: "0x2EcdB5bD12a037dCb9De0Ab7957f35FEeF758eA6", - TokenWithdrawalModule: "0xC573E5c36B8FA5108b78f7357947972D030699d5", -}; - -export const contractAddress: ContractAddress = { - sepolia, - 11155111: sepolia, - storyTestnet, - 1513: storyTestnet, -}; diff --git a/packages/core-sdk/test/config.ts b/packages/core-sdk/test/config.ts deleted file mode 100644 index a024b1cd..00000000 --- a/packages/core-sdk/test/config.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { getAddress } from "viem"; - -import IERC1155ABI from "../src/abi/json/IERC1155.abi"; -import AccessControllerABI from "../src/abi/json/AccessController.abi"; -import DisputeModuleABI from "../src/abi/json/DisputeModule.abi"; -import IPAccountImplABI from "../src/abi/json/IPAccountImpl.abi"; -import IPAssetRegistryABI from "../src/abi/json/IIPAssetRegistry.abi"; -import LicensingModuleABI from "../src/abi/json/LicensingModule.abi"; -import IRoyaltyPolicyLAPABI from "../src/abi/json/IRoyaltyPolicyLAP.abi"; -import IpRoyaltyVaultABI from "../src/abi/json/IpRoyaltyVault.abi"; -import IRoyaltyModuleABI from "../src/abi/json/IRoyaltyModule.abi"; -import PILicenseTemplateABI from "../src/abi/json/IPILicenseTemplate.abi"; -import ErrorsABI from "../src/abi/json/Errors.abi"; -import { contractAddress } from "./env"; -import { SupportedChainIds } from "../src/types/config"; - -export const IPAccountABI = [...IPAccountImplABI, ...ErrorsABI]; -export const getIPAssetRegistryConfig = (chain: SupportedChainIds) => ({ - abi: IPAssetRegistryABI, - address: getAddress(contractAddress[chain].IPAssetRegistry), -}); -export const getAccessControllerConfig = (chain: SupportedChainIds) => ({ - abi: [...AccessControllerABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].AccessController), -}); -export const getDisputeModuleConfig = (chain: SupportedChainIds) => ({ - abi: [...DisputeModuleABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].DisputeModule), -}); -export const getLicenseRegistryConfig = (chain: SupportedChainIds) => ({ - abi: IERC1155ABI, - address: getAddress(contractAddress[chain].LicenseRegistry), -}); -export const getLicensingModuleConfig = (chain: SupportedChainIds) => ({ - abi: [...LicensingModuleABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].LicensingModule), -}); -export const getPILicenseTemplateConfig = (chain: SupportedChainIds) => ({ - abi: [...PILicenseTemplateABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].PILicenseTemplate), -}); -export const getRoyaltyPolicyLAPConfig = (chain: SupportedChainIds) => ({ - abi: [...IRoyaltyPolicyLAPABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].RoyaltyPolicyLAP), -}); - -export const getRoyaltyVaultImplConfig = (chain: SupportedChainIds) => ({ - abi: [...IpRoyaltyVaultABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].IpRoyaltyVaultImpl), -}); - -export const getRoyaltyModuleConfig = (chain: SupportedChainIds) => ({ - abi: [...IRoyaltyModuleABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].RoyaltyModule), -}); - -export const getLicenseTemplateConfig = (chain: SupportedChainIds) => ({ - abi: [...PILicenseTemplateABI, ...ErrorsABI], - address: getAddress(contractAddress[chain].PILicenseTemplate), -}); diff --git a/packages/core-sdk/test/integration/config.test.ts b/packages/core-sdk/test/integration/config.test.ts index 6eb416e0..282fa0ff 100644 --- a/packages/core-sdk/test/integration/config.test.ts +++ b/packages/core-sdk/test/integration/config.test.ts @@ -7,30 +7,30 @@ dotenv.config(); chai.use(chaiAsPromised); chai.config.truncateThreshold = 0; -before(async function () { - const TEST_CHECKPOINT = "0x024c376000e3bb27344a6d8bbd5b99ee22c84eb9beefdfc3caa7bb367869dc09"; - const client = createPublicClient({ - chain: { - id: 11155111, - name: "Tenderly", - network: "paris", - nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, - rpcUrls: { - default: { - http: [process.env.RPC_PROVIDER_URL!], - }, - public: { - http: [process.env.RPC_PROVIDER_URL!], - }, - }, - }, - transport: http(), - }); - - // @ts-ignore - await client.request({ method: "evm_revert", params: [TEST_CHECKPOINT] }); - - // @ts-ignore - const checkpoint = (await client.request({ method: "evm_snapshot", params: [] })) as string; - console.log("Checkpoint created:", checkpoint); -}); +// before(async function () { +// const TEST_CHECKPOINT = "0x024c376000e3bb27344a6d8bbd5b99ee22c84eb9beefdfc3caa7bb367869dc09"; +// const client = createPublicClient({ +// chain: { +// id: 11155111, +// name: "Tenderly", +// network: "paris", +// nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, +// rpcUrls: { +// default: { +// http: [process.env.RPC_PROVIDER_URL!], +// }, +// public: { +// http: [process.env.RPC_PROVIDER_URL!], +// }, +// }, +// }, +// transport: http(), +// }); +// +// // @ts-ignore +// await client.request({ method: "evm_revert", params: [TEST_CHECKPOINT] }); +// +// // @ts-ignore +// const checkpoint = (await client.request({ method: "evm_snapshot", params: [] })) as string; +// console.log("Checkpoint created:", checkpoint); +// }); diff --git a/packages/core-sdk/test/integration/dispute.test.ts b/packages/core-sdk/test/integration/dispute.test.ts index 3e8cab90..abb13501 100644 --- a/packages/core-sdk/test/integration/dispute.test.ts +++ b/packages/core-sdk/test/integration/dispute.test.ts @@ -8,9 +8,8 @@ import { RaiseDisputeRequest, ResolveDisputeRequest, } from "../../src/types/resources/dispute"; -import { getDisputeModuleConfig } from "../config"; -describe("Dispute Functions", () => { +describe.skip("Dispute Functions", () => { let client: StoryClient; before(function () { @@ -20,7 +19,6 @@ describe("Dispute Functions", () => { }; client = StoryClient.newClient(config); - client.dispute.disputeModuleConfig = getDisputeModuleConfig("sepolia"); }); describe("Should be able to", async function () { diff --git a/packages/core-sdk/test/integration/ipAccount.test.ts b/packages/core-sdk/test/integration/ipAccount.test.ts index a91bc75d..be010c4b 100644 --- a/packages/core-sdk/test/integration/ipAccount.test.ts +++ b/packages/core-sdk/test/integration/ipAccount.test.ts @@ -2,9 +2,8 @@ import { expect } from "chai"; import { StoryClient, StoryConfig } from "../../src"; import { Hex, http, Account } from "viem"; import { privateKeyToAccount } from "viem/accounts"; -import { IPAccountABI } from "./testABI.tenderly"; -describe("Permission Functions", () => { +describe.skip("Permission Functions", () => { let client: StoryClient; let senderAddress: string; @@ -18,7 +17,6 @@ describe("Permission Functions", () => { const configAccount: Account = config.account as Account; senderAddress = configAccount.address; client = StoryClient.newClient(config); - client.ipAccount.ipAccountABI = IPAccountABI; }); describe("Execute Set Permission", async function () { diff --git a/packages/core-sdk/test/integration/permission.test.ts b/packages/core-sdk/test/integration/permission.test.ts index be43a13a..72cecfd1 100644 --- a/packages/core-sdk/test/integration/permission.test.ts +++ b/packages/core-sdk/test/integration/permission.test.ts @@ -2,9 +2,8 @@ import { expect } from "chai"; import { StoryClient, StoryConfig } from "../../src"; import { Hex, http, Account } from "viem"; import { privateKeyToAccount } from "viem/accounts"; -import { IPAccountABI, AccessControllerConfig } from "./testABI.tenderly"; -describe("Permission Functions", () => { +describe.skip("Permission Functions", () => { let client: StoryClient; let senderAddress: string; @@ -18,8 +17,6 @@ describe("Permission Functions", () => { const configAccount: Account = config.account as Account; senderAddress = configAccount.address; client = StoryClient.newClient(config); - client.permission.ipAccountABI = IPAccountABI; - client.permission.accessControllerConfig = AccessControllerConfig; }); describe("Set Permission", async function () { diff --git a/packages/core-sdk/test/integration/storyTestNet/ipAsset.storyTest.test.ts b/packages/core-sdk/test/integration/storyTestNet/ipAsset.storyTest.test.ts index aa50fa5a..63bf6423 100644 --- a/packages/core-sdk/test/integration/storyTestNet/ipAsset.storyTest.test.ts +++ b/packages/core-sdk/test/integration/storyTestNet/ipAsset.storyTest.test.ts @@ -3,12 +3,6 @@ import { StoryClient, StoryConfig } from "../../../src"; import { Hex, createPublicClient, createWalletClient, http } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { chainStringToViemChain } from "../../../src/utils/utils"; -import { - IPAccountABI, - getIPAssetRegistryConfig, - getLicenseRegistryConfig, - getLicensingModuleConfig, -} from "../../config"; import { storyTestnetAddress } from "../../env"; import chaiAsPromised from "chai-as-promised"; @@ -28,10 +22,6 @@ describe.skip("IP Asset Functions in storyTestnet", () => { account: privateKeyToAccount(process.env.STORY_TEST_NET_WALLET_PRIVATE_KEY as Hex), }; client = StoryClient.newClient(config); - client.ipAsset.ipAssetRegistryConfig = getIPAssetRegistryConfig("1513"); - client.license.ipAccountABI = IPAccountABI; - client.license.licenseRegistryConfig = getLicenseRegistryConfig("1513"); - client.license.licensingModuleConfig = getLicensingModuleConfig("1513"); }); const getTokenId = async (tokenId: number): Promise => { const baseConfig = { diff --git a/packages/core-sdk/test/integration/storyTestNet/license.storyTest.test.ts b/packages/core-sdk/test/integration/storyTestNet/license.storyTest.test.ts index 2778068c..169aed41 100644 --- a/packages/core-sdk/test/integration/storyTestNet/license.storyTest.test.ts +++ b/packages/core-sdk/test/integration/storyTestNet/license.storyTest.test.ts @@ -1,36 +1,25 @@ import chai from "chai"; import { StoryClient, StoryConfig } from "../../../src"; -import { Hex, http } from "viem"; +import { createPublicClient, createWalletClient, Hex, http } from "viem"; import { privateKeyToAccount } from "viem/accounts"; -import { - IPAccountABI, - getLicenseTemplateConfig, - getLicenseRegistryConfig, - getLicensingModuleConfig, - getIPAssetRegistryConfig, - getRoyaltyPolicyLAPConfig, -} from "../../config"; import chaiAsPromised from "chai-as-promised"; import { storyTestnetAddress } from "../../env"; +import { chainStringToViemChain } from "../../../src/utils/utils"; chai.use(chaiAsPromised); const expect = chai.expect; -describe("License Functions in storyTestnet", () => { + +describe.skip("License Functions in storyTestnet", () => { let client: StoryClient; + const account = privateKeyToAccount(process.env.STORY_TEST_NET_WALLET_PRIVATE_KEY as Hex); + before(function () { const config: StoryConfig = { chainId: "storyTestnet", transport: http(process.env.STORY_TEST_NET_RPC_PROVIDER_URL), - account: privateKeyToAccount(process.env.STORY_TEST_NET_WALLET_PRIVATE_KEY as Hex), + account, }; client = StoryClient.newClient(config); - client.license.ipAccountABI = IPAccountABI; - client.license.licensingModuleConfig = getLicensingModuleConfig("1513"); - client.license.licenseTemplateConfig = getLicenseTemplateConfig("1513"); - client.license.royaltyPolicyLAPConfig = getRoyaltyPolicyLAPConfig("1513"); - client.ipAsset.ipAssetRegistryConfig = getIPAssetRegistryConfig("1513"); - client.license.ipAccountABI = IPAccountABI; - client.license.licenseRegistryConfig = getLicenseRegistryConfig("1513"); }); describe("registering license with different types", async function () { it("should not throw error when registering license with non commercial social remixing PIL", async function () { @@ -72,15 +61,55 @@ describe("License Functions in storyTestnet", () => { describe("attach License Terms and mint license tokens", async function () { let ipId: Hex; let licenseId: string; + let tokenId: string; before(async function () { + const baseConfig = { + chain: chainStringToViemChain("storyTestnet"), + transport: http(process.env.STORY_TEST_NET_RPC_PROVIDER_URL), + } as const; + const publicClient = createPublicClient(baseConfig); + const walletClient = createWalletClient({ + ...baseConfig, + account, + }); + const { request } = await publicClient.simulateContract({ + abi: [ + { + inputs: [ + { internalType: "address", name: "to", type: "address" }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "mintId", + outputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + ], + address: storyTestnetAddress.MockERC721, + functionName: "mintId", + args: [account.address, BigInt(Math.round(new Date().getTime() / 1000))], + }); + const hash = await walletClient.writeContract(request); + const { logs } = await publicClient.waitForTransactionReceipt({ + hash, + }); + if (logs[0].topics[3]) { + tokenId = parseInt(logs[0].topics[3], 16).toString(); + } + const registerResult = await client.ipAsset.register({ tokenContract: storyTestnetAddress.MockERC721, - tokenId: "1", + tokenId: tokenId, txOptions: { waitForTransaction: true, }, }); ipId = registerResult.ipId!; + const registerLicenseResult = await client.license.registerNonComSocialRemixingPIL({ txOptions: { waitForTransaction: true, diff --git a/packages/core-sdk/test/integration/testABI.tenderly.ts b/packages/core-sdk/test/integration/testABI.tenderly.ts deleted file mode 100644 index 4413ea2e..00000000 --- a/packages/core-sdk/test/integration/testABI.tenderly.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { getAddress } from "viem"; - -import IERC1155ABI from "../../src/abi/json/IERC1155.abi"; -import AccessControllerABI from "../../src/abi/json/AccessController.abi"; -import DisputeModuleABI from "../../src/abi/json/DisputeModule.abi"; -import IPAccountImplABI from "../../src/abi/json/IPAccountImpl.abi"; -import IPAssetRegistryABI from "../../src/abi/json/IIPAssetRegistry.abi"; -import LicensingModuleABI from "../../src/abi/json/LicensingModule.abi"; -import PILPolicyFrameworkManagerABI from "../../src/abi/json/PILPolicyFrameworkManager.abi"; -import ErrorsABI from "../../src/abi/json/Errors.abi"; - -const tenderly = { - AccessController: "0x674d6E1f7b5e2d714DBa588e9d046965225517c8", - ArbitrationPolicySP: "0xb41BC78478878B338336C5E7a34292213779cd6F", - DisputeModule: "0x3A96cad7b2aC783a6811c7c3e8DEF30E8a4cfcDb", - IPAccountImpl: "0x7481a227A11860E80f69AB39d0165258f4c139f6", - IPAccountRegistry: "0x74Cbd8CCc22290FeaaE8421D4FFc6760210B5B0C", - IPAssetRegistry: "0xb1534826Bc9D77d818CbC596435f530778C73865", - LicenseRegistry: "0x66f6865668F2B9213Ed05b97eE97beb97A75e243", - LicensingModule: "0x2ac240293f12032E103458451dE8A8096c5A72E8", - PILPolicyFrameworkManager: "0x3C30b98f56b469c0d292EFF5878e9Fb302CB13dD", - RegistrationModule: "0x193f0Cc84d51Fc38a30658d7eFffEB2C5Cc25840", - RoyaltyPolicyLAP: "0xb811a9aD59375eDC449cb3A05eB4672042BB9Daf", -}; - -export const IPAccountABI = [...IPAccountImplABI, ...ErrorsABI]; - -export const IPAssetRegistryConfig = { - abi: IPAssetRegistryABI, - address: getAddress(tenderly.IPAssetRegistry), -}; - -export const AccessControllerConfig = { - abi: [...AccessControllerABI, ...ErrorsABI], - address: getAddress(tenderly.AccessController), -}; - -export const DisputeModuleConfig = { - abi: [...DisputeModuleABI, ...ErrorsABI], - address: getAddress(tenderly.DisputeModule), -}; - -export const LicenseRegistryConfig = { - abi: IERC1155ABI, - address: getAddress(tenderly.LicenseRegistry), -}; - -export const LicensingModuleConfig = { - abi: [...LicensingModuleABI, ...ErrorsABI], - address: getAddress(tenderly.LicensingModule), -}; - -export const PILPolicyFrameworkManagerConfig = { - abi: [...PILPolicyFrameworkManagerABI, ...ErrorsABI], - address: getAddress(tenderly.PILPolicyFrameworkManager), -}; - -export const RoyaltyPolicyLAPConfig = { - address: getAddress(tenderly.RoyaltyPolicyLAP), -}; diff --git a/packages/core-sdk/test/unit/client.test.ts b/packages/core-sdk/test/unit/client.test.ts index db9a7f4c..f49b30de 100644 --- a/packages/core-sdk/test/unit/client.test.ts +++ b/packages/core-sdk/test/unit/client.test.ts @@ -1,14 +1,16 @@ import { expect } from "chai"; -import { privateKeyToAccount, generatePrivateKey } from "viem/accounts"; +import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; import { sepolia } from "viem/chains"; -import { Account, http, Transport, createWalletClient, createPublicClient } from "viem"; -import { StoryClient } from "../../src"; -import { StoryConfig } from "../../src/types/config"; -import { PermissionClient } from "../../src/resources/permission"; -import { LicenseClient } from "../../src/resources/license"; -import { IPAccountABI } from "../../src/abi/config"; -import { DisputeClient } from "../../src/resources/dispute"; +import { Account, createPublicClient, createWalletClient, http, Transport } from "viem"; +import { + DisputeClient, + LicenseClient, + PermissionClient, + StoryClient, + StoryConfig, +} from "../../src"; import { StoryAPIClient } from "../../src/clients/storyAPI"; + describe("Test StoryClient", function () { describe("Test constructor", function () { it("should succeed when passing in default params", function () { @@ -28,13 +30,12 @@ describe("Test StoryClient", function () { }).to.throw("transport is null, please pass in a valid RPC Provider URL as the transport."); }); - it("should throw error when wallet account is null", function () { + it("should throw error when not specify a wallet or account", function () { expect(() => { StoryClient.newClient({ transport: http(process.env.RPC_PROVIDER_URL), - account: null as any as Account, }); - }).to.throw("account is null"); + }).to.throw("must specify a wallet or account"); }); }); @@ -64,35 +65,26 @@ describe("Test StoryClient", function () { }); it("should return client permission", () => { - const permission = new PermissionClient(rpcClient, wallet, "sepolia"); + const permission = new PermissionClient(rpcClient, wallet); expect(client.permission).to.not.equal(null); expect(client.permission).to.not.equal(undefined); - expect(client.permission.ipAccountABI).to.eql(permission.ipAccountABI); - expect(client.permission.accessControllerConfig).to.eql(permission.accessControllerConfig); }); it("should return client license", () => { - const license = new LicenseClient(rpcClient, wallet, storyAPIClient, "sepolia"); + const license = new LicenseClient(rpcClient, wallet, storyAPIClient); expect(client.license).to.not.equal(null); expect(client.license).to.not.equal(undefined); - expect(client.license.ipAccountABI).to.eql(license.ipAccountABI); - expect(client.license.licenseRegistryConfig).to.eql(license.licenseRegistryConfig); - expect(client.license.licensingModuleConfig).to.eql(license.licensingModuleConfig); - expect(client.license.licenseTemplateConfig).to.eql(license.licenseTemplateConfig); - expect(client.license.royaltyPolicyLAPConfig).to.eql(license.royaltyPolicyLAPConfig); }); it("should return client account", () => { expect(client.ipAccount).to.not.equal(null); expect(client.ipAccount).to.not.equal(undefined); - expect(client.ipAccount.ipAccountABI).to.eql(IPAccountABI); }); it("should return client dispute", () => { - const dispute = new DisputeClient(rpcClient, wallet, "sepolia"); + const dispute = new DisputeClient(rpcClient, wallet); expect(client.dispute).to.not.equal(null); expect(client.dispute).to.not.equal(undefined); - expect(client.dispute.disputeModuleConfig).to.eql(dispute.disputeModuleConfig); }); }); }); diff --git a/packages/core-sdk/test/unit/resources/dispute.test.ts b/packages/core-sdk/test/unit/resources/dispute.test.ts index 5e1b51aa..002cdbb5 100644 --- a/packages/core-sdk/test/unit/resources/dispute.test.ts +++ b/packages/core-sdk/test/unit/resources/dispute.test.ts @@ -1,12 +1,10 @@ import * as sinon from "sinon"; import { createMock } from "../testUtils"; -import chai from "chai"; -import { expect } from "chai"; +import chai, { expect } from "chai"; import chaiAsPromised from "chai-as-promised"; import { PublicClient, WalletClient } from "viem"; -import { DisputeClient } from "../../../src/resources/dispute"; -import { CancelDisputeRequest, ResolveDisputeRequest } from "../../../src/types/resources/dispute"; -import * as utils from "../../../src/utils/utils"; +import { CancelDisputeRequest, DisputeClient, ResolveDisputeRequest } from "../../../src"; +import { DisputeModuleClient } from "../../../src/abi/generated"; chai.use(chaiAsPromised); @@ -22,7 +20,7 @@ describe("Test DisputeClient", function () { beforeEach(function () { rpcMock = createMock(); walletMock = createMock(); - disputeClient = new DisputeClient(rpcMock, walletMock, "sepolia"); + disputeClient = new DisputeClient(rpcMock, walletMock); }); afterEach(function () { @@ -35,6 +33,7 @@ describe("Test DisputeClient", function () { const arbitrationPolicy = "0xC6A1c49BCeeE2E512167d5c03e4753776477730b" as `0x${string}`; const linkToDisputeEvidence = "foo"; const targetTag = "bar"; + it("should throw simulateContract error if simulateContract throws an error", async () => { rpcMock.simulateContract = sinon.stub().throws(new Error("simulateContract error")); const raiseDisputeRequest = { @@ -75,12 +74,9 @@ describe("Test DisputeClient", function () { it("should return txHash only if request.txOptions is missing", async () => { rpcMock.simulateContract = sinon.stub().resolves({ request: null }); walletMock.writeContract = sinon.stub().resolves(mock.txHash); - sinon.stub(utils, "waitTxAndFilterLog").resolves([ + disputeClient.disputeModuleClient.parseTxDisputeRaisedEvent = sinon.stub().resolves([ { - eventName: "DisputeRaised", - args: { - disputeId: "7", - }, + disputeId: "7", }, ]); const raiseDisputeRequest = { @@ -95,15 +91,16 @@ describe("Test DisputeClient", function () { expect(Object.keys(result)[0]).to.equal("txHash"); expect(result.txHash).to.equal(mock.txHash); }); + it("should return txHash and disputeId if request.txOptions is present", async () => { rpcMock.simulateContract = sinon.stub().resolves({ request: null }); - walletMock.writeContract = sinon.stub().resolves(mock.txHash); - sinon.stub(utils, "waitTxAndFilterLog").resolves([ + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); + + disputeClient.disputeModuleClient = createMock(); + disputeClient.disputeModuleClient.raiseDispute = sinon.stub().resolves(mock.txHash); + disputeClient.disputeModuleClient.parseTxDisputeRaisedEvent = sinon.stub().returns([ { - eventName: "DisputeRaised", - args: { - disputeId: "7", - }, + disputeId: "7", }, ]); const raiseDisputeRequest = { diff --git a/packages/core-sdk/test/unit/resources/ipAccount.test.ts b/packages/core-sdk/test/unit/resources/ipAccount.test.ts index 76a36fb2..876f5471 100644 --- a/packages/core-sdk/test/unit/resources/ipAccount.test.ts +++ b/packages/core-sdk/test/unit/resources/ipAccount.test.ts @@ -2,13 +2,9 @@ import { expect } from "chai"; import { createMock } from "../testUtils"; import * as sinon from "sinon"; import { IPAccountClient } from "../../../src/resources/ipAccount"; -import { - IPAccountExecuteRequest, - IPAccountExecuteWithSigRequest, -} from "../../../src/types/resources/ipAccount"; -import { IPAccountABI } from "../../../src/abi/config"; +import { IPAccountExecuteRequest, IPAccountExecuteWithSigRequest } from "../../../src"; import * as utils from "../../../src/utils/utils"; -import { PublicClient, WalletClient, Account, zeroAddress } from "viem"; +import { Account, PublicClient, WalletClient, zeroAddress } from "viem"; describe("Test IPAccountClient", () => { let ipAccountClient: IPAccountClient; @@ -27,11 +23,7 @@ describe("Test IPAccountClient", () => { afterEach(() => { sinon.restore(); }); - describe("Test constructor", () => { - it("should have expected ipAccountABI", () => { - expect(ipAccountClient.ipAccountABI).to.equal(IPAccountABI); - }); - }); + describe("Test execute", async () => { it("should throw invalid address error when accountAddress is invalid", async function () { const request: IPAccountExecuteRequest = { @@ -80,6 +72,7 @@ describe("Test IPAccountClient", () => { it("should throw waitTx error when waitTx throws an error", async function () { const txHash = "0x129f7dd802200f096221dd89d5b086e4bd3ad6eafb378a0c75e3b04fc375f997"; rpcMock.simulateContract = sinon.stub().resolves({ request: null }); + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); walletMock.writeContract = sinon.stub().resolves(txHash); sinon.stub(utils, "waitTx").rejects(new Error("waitTx error")); const request: IPAccountExecuteRequest = { @@ -101,6 +94,7 @@ describe("Test IPAccountClient", () => { it("should return txHash if waitTx succeeds", async function () { const txHash = "0x129f7dd802200f096221dd89d5b086e4bd3ad6eafb378a0c75e3b04fc375f997"; rpcMock.simulateContract = sinon.stub().resolves({ request: null }); + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); walletMock.writeContract = sinon.stub().resolves(txHash); sinon.stub(utils, "waitTx").resolves(); const request: IPAccountExecuteRequest = { @@ -195,6 +189,7 @@ describe("Test IPAccountClient", () => { it("should throw waitTx error when waitTx throws an error", async function () { const txHash = "0x129f7dd802200f096221dd89d5b086e4bd3ad6eafb378a0c75e3b04fc375f997"; rpcMock.simulateContract = sinon.stub().resolves({ request: null }); + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); walletMock.writeContract = sinon.stub().resolves(txHash); sinon.stub(utils, "waitTx").rejects(new Error("waitTx error")); const request: IPAccountExecuteWithSigRequest = { @@ -219,6 +214,7 @@ describe("Test IPAccountClient", () => { it("should return txHash when waitTx succeeds", async function () { const txHash = "0x129f7dd802200f096221dd89d5b086e4bd3ad6eafb378a0c75e3b04fc375f997"; rpcMock.simulateContract = sinon.stub().resolves({ request: null }); + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); walletMock.writeContract = sinon.stub().resolves(txHash); sinon.stub(utils, "waitTx").resolves(); const request: IPAccountExecuteWithSigRequest = { diff --git a/packages/core-sdk/test/unit/resources/ipAsset.test.ts b/packages/core-sdk/test/unit/resources/ipAsset.test.ts index 2343623d..40ede5d1 100644 --- a/packages/core-sdk/test/unit/resources/ipAsset.test.ts +++ b/packages/core-sdk/test/unit/resources/ipAsset.test.ts @@ -3,7 +3,6 @@ import { createMock } from "../testUtils"; import * as sinon from "sinon"; import { IPAssetClient } from "../../../src"; import { PublicClient, WalletClient, Account } from "viem"; -import { getIPAssetRegistryConfig } from "../../config"; import chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); const expect = chai.expect; @@ -20,7 +19,6 @@ describe("Test IpAssetClient", function () { accountMock.address = "0x73fcb515cee99e4991465ef586cfe2b072ebb512"; walletMock.account = accountMock; ipAssetClient = new IPAssetClient(rpcMock, walletMock, "sepolia"); - ipAssetClient.ipAssetRegistryConfig = getIPAssetRegistryConfig("sepolia"); }); afterEach(function () { @@ -127,6 +125,7 @@ describe("Test IpAssetClient", function () { rpcMock.simulateContract = sinon.stub().resolves({ request: null }); rpcMock.readContract = sinon.stub().resolves(); walletMock.writeContract = sinon.stub().rejects(new Error("http 500")); + await expect( ipAssetClient.register({ tokenContract: "0x1daAE3197Bc469Cb97B917aa460a12dD95c6627c", diff --git a/packages/core-sdk/test/unit/resources/permission.test.ts b/packages/core-sdk/test/unit/resources/permission.test.ts index 7b14afc5..e87c916d 100644 --- a/packages/core-sdk/test/unit/resources/permission.test.ts +++ b/packages/core-sdk/test/unit/resources/permission.test.ts @@ -16,7 +16,7 @@ describe("Test Permission", function () { const accountMock = createMock(); accountMock.address = "0x73fcb515cee99e4991465ef586cfe2b072ebb512"; walletMock.account = accountMock; - permissionClient = new PermissionClient(rpcMock, walletMock, "sepolia"); + permissionClient = new PermissionClient(rpcMock, walletMock); }); afterEach(function () { @@ -89,6 +89,7 @@ describe("Test Permission", function () { const txHash = "0x129f7dd802200f096221dd89d5b086e4bd3ad6eafb378a0c75e3b04fc375f997"; rpcMock.readContract = sinon.stub().resolves(AddressZero); rpcMock.simulateContract = sinon.stub().resolves({ request: null }); + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); walletMock.writeContract = sinon.stub().resolves(txHash); sinon.stub(utils, "waitTxAndFilterLog").resolves(); @@ -104,9 +105,13 @@ describe("Test Permission", function () { expect(res.txHash).to.equal(txHash); expect(res.success).to.equal(true); }); + it("should throw error when request fails", async function () { rpcMock.simulateContract = sinon.stub().resolves({ request: null }); + rpcMock.readContract = sinon.stub().resolves(); + rpcMock.waitForTransactionReceipt = sinon.stub().resolves({}); walletMock.writeContract = sinon.stub().rejects(new Error("http 500")); + await expect( permissionClient.setPermission({ ipId: AddressZero, @@ -115,7 +120,7 @@ describe("Test Permission", function () { func: "0x00000000", permission: 0, txOptions: { - waitForTransaction: false, + waitForTransaction: true, }, }), ).to.be.rejectedWith("http 500"); diff --git a/packages/core-sdk/test/unit/utils/utils.test.ts b/packages/core-sdk/test/unit/utils/utils.test.ts index 057aff50..e4fe5e99 100644 --- a/packages/core-sdk/test/unit/utils/utils.test.ts +++ b/packages/core-sdk/test/unit/utils/utils.test.ts @@ -16,7 +16,7 @@ import { storyTestnet, } from "../../../src/utils/utils"; import { createMock } from "../testUtils"; -import defaultAbi from "../../../src/abi/json/LicensingModule.abi"; +import { licensingModuleAbi } from "../../../src/abi/generated"; describe("Test isIntegerString", function () { it("should return true when passing in an integer string", function () { @@ -84,7 +84,7 @@ describe("Test waitTxAndFilterLog", () => { .stub() .throws(new Error("waitForTransactionReceipt error")); const params = { - abi: defaultAbi as viem.Abi, + abi: licensingModuleAbi as viem.Abi, eventName: "TransferSingle", }; try { @@ -115,7 +115,7 @@ describe("Test waitTxAndFilterLog", () => { const params = { from: "0x0000000000000000000000000000000000000001" as `0x${string}`, - abi: defaultAbi as viem.Abi, + abi: licensingModuleAbi as viem.Abi, eventName: "TransferSingle", }; try { diff --git a/packages/wagmi-generater/resolveProxyContracts.ts b/packages/wagmi-generater/resolveProxyContracts.ts new file mode 100644 index 00000000..35d6fc8d --- /dev/null +++ b/packages/wagmi-generater/resolveProxyContracts.ts @@ -0,0 +1,64 @@ +import type {Evaluate} from "@wagmi/cli/src/types"; +import type {ContractConfig} from "@wagmi/cli/src/config"; +import {Address} from "viem"; + +export type Config = { + baseUrl: string, + contracts: Evaluate>[], + chainId: number, +} +export type ProxyMap = (config: { address: NonNullable }) => Address + +interface RpcResponse { + result: Address +} + +function getAddress(chainId: number, address: string | (Record & Partial>)): Address { + if (typeof address == "string") { + return address as Address + } else { + return address[chainId] + } +} + +function makeProxyMap(chainId: number, proxyContractsMap: Record): ProxyMap { + return function (config): Address { + let address: Address = getAddress(chainId, config.address) + + if (address in proxyContractsMap) { + return proxyContractsMap[address] + } else { + return address + } + } +} + +export async function resolveProxyContracts(config: Config): Promise { + const proxyContractsMap: Record = {} + for (let contract of config.contracts) { + const address: Address = getAddress(config.chainId, contract.address) + const resp = await fetch(config.baseUrl, { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + id: 1, + jsonrpc: "2.0", + method: "eth_getStorageAt", + params: [ + address, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ], + }) + }) + + const rpcResponse: RpcResponse = await resp.json() + if (!/^0x0+$/[Symbol.match](rpcResponse.result)) { + proxyContractsMap[address] = `0x${rpcResponse.result.substring(rpcResponse.result.length - 40)}` + } + } + + return makeProxyMap(config.chainId, proxyContractsMap) +} \ No newline at end of file diff --git a/packages/wagmi-generater/sdk.ts b/packages/wagmi-generater/sdk.ts index b515d90f..2a85da7a 100644 --- a/packages/wagmi-generater/sdk.ts +++ b/packages/wagmi-generater/sdk.ts @@ -5,14 +5,22 @@ import {Contract} from "@wagmi/cli/src/config"; import {pascalCase, camelCase} from 'change-case' import {AbiFunction, AbiEvent, AbiParameter} from "abitype"; -export type SDKConfig = {} +export type SDKConfig = { + permissionLessSDK?: boolean + whiteList?: Record> +} -type ReactResult = Evaluate> +type SDKResult = Evaluate> type RunConfig = { contracts: Array isTypeScript: boolean, } +const primitiveNeedImportMap: Record = { + Address: true, + Hex: true, +} + const primitiveTypeMap = { uint8: 'number', uint32: 'number', @@ -26,6 +34,24 @@ const primitiveTypeMap = { string: 'string', } +let importUsedMap: Record> = {} + +function addImport(from: string, ...names: Array) { + if (!(from in importUsedMap)) { + importUsedMap[from] = {} + } + + names.forEach(it => importUsedMap[from][it] = true) +} + +function buildImport(): string { + let imports: Array = [] + for (let from in importUsedMap) { + imports.push(`import {${Object.keys(importUsedMap[from]).join(', ')}} from "${from}";`) + } + return imports.join('\n') +} + function isAbiFuncOnlyRead(func: AbiFunction): boolean { return func.stateMutability == "view" || func.stateMutability == "pure" } @@ -34,8 +60,13 @@ function parameterToPrimitiveType(type: string): string { if (type.endsWith("[]")) { return `readonly ${parameterToPrimitiveType(type.substring(0, type.length - 2))}[]` } else if (type in primitiveTypeMap) { + if (primitiveNeedImportMap[primitiveTypeMap[type]]) { + addImport("viem", primitiveTypeMap[type]) + } + return primitiveTypeMap[type] } else { + addImport("abitype", 'AbiTypeToPrimitiveType') return `AbiTypeToPrimitiveType<'${type}'>` } } @@ -52,6 +83,7 @@ function parameterToType(type: AbiParameter, optional: boolean = false): string } } + addImport("abitype", 'AbiParameterToPrimitiveType') return `AbiParameterToPrimitiveType<${JSON.stringify(type)}>` + optionalAppend } else { return parameterToPrimitiveType(type.type) + optionalAppend @@ -141,6 +173,8 @@ function generateContractFunction(contractName: string, func: AbiFunction) { if (inType.valid) types.push(`${inType.comment}\n${inType.type}`) if (!isAbiFuncOnlyRead(func)) { + addImport('viem', 'WriteContractReturnType') + method = 'simulateContract'; outType.valid = true outName = "WriteContractReturnType" @@ -185,7 +219,7 @@ function generateContractFunction(contractName: string, func: AbiFunction) { } funcLine.push(` });`) if (method == "simulateContract") { - funcLine.push(` return await this.wallet.writeContract(call);`) + funcLine.push(` return await this.wallet.writeContract(call as WriteContractParameters);`) } else if (outType.valid && outType.kind == "object") { funcLine.push(` return {`) if (func.outputs.length == 1) { @@ -200,6 +234,7 @@ function generateContractFunction(contractName: string, func: AbiFunction) { funcLine.push(` };`) } funcLine.push(` }`) + addImport('viem', 'WriteContractParameters') return {func: funcLine.join("\n"), types: types.join("\n")} } @@ -207,7 +242,7 @@ function generateContractFunction(contractName: string, func: AbiFunction) { function generateEventFunction(contractName: any, event: AbiEvent) { const abiName = `${camelCase(contractName)}Abi` const typeName = `${pascalCase(contractName)}${pascalCase(event.name)}Event` - const type = generateContractTypes(typeName, event.inputs, true) + const type = generateContractTypes(typeName, event.inputs, false) let funcLine: Array = []; let types: Array = []; @@ -218,7 +253,7 @@ function generateEventFunction(contractName: any, event: AbiEvent) { funcLine.push(`/**`) funcLine.push(` * event ${event.name} for contract ${contractName}`) funcLine.push(`*/`) - funcLine.push(` public watch${pascalCase(event.name)}Event(onLogs: (txHash: Hex, ev: ${typeName}) => void): WatchContractEventReturnType {`) + funcLine.push(` public watch${pascalCase(event.name)}Event(onLogs: (txHash: Hex, ev: Partial<${typeName}>) => void): WatchContractEventReturnType {`) funcLine.push(` return this.rpcClient.watchContractEvent({`) funcLine.push(` abi: ${abiName},`) funcLine.push(` address: this.address,`) @@ -226,21 +261,34 @@ function generateEventFunction(contractName: any, event: AbiEvent) { funcLine.push(` onLogs: (evs) => {evs.forEach(it=> onLogs(it.transactionHash, it.args))},`) funcLine.push(` })`) funcLine.push(` }`) + funcLine.push(``) + funcLine.push(`/**`) + funcLine.push(` * parse tx receipt event ${event.name} for contract ${contractName}`) + funcLine.push(` */`) + funcLine.push(`public parseTx${pascalCase(event.name)}Event(txReceipt: TransactionReceipt): Array<${typeName}> {`) + funcLine.push(` const targetLogs: Array<${typeName}> = [];`) + funcLine.push(` for (const log of txReceipt.logs) {`) + funcLine.push(` try {`) + funcLine.push(` const event = decodeEventLog({`) + funcLine.push(` abi: ${abiName},`) + funcLine.push(` eventName: '${event.name}',`) + funcLine.push(` data: log.data,`) + funcLine.push(` topics: log.topics,`) + funcLine.push(` });`) + funcLine.push(` if (event.eventName === '${event.name}') targetLogs.push(event.args)`) + funcLine.push(` } catch (e) { /* empty */ }`) + funcLine.push(` }`) + funcLine.push(` return targetLogs`) + funcLine.push(`}`) + + addImport('viem', 'decodeEventLog', 'WatchContractEventReturnType', 'TransactionReceipt') } return {func: funcLine.join("\n"), types: types.join("\n")} } -function generateContract(contract: Contract): string { - let contractAddress = "" - if (typeof contract.address == "string") { - contractAddress = `= '${contract.address}'` - } else { - for (let addressKey in contract.address) { - contractAddress = `= '${contract.address[addressKey]}'` - } - } - +function generateContract(config: SDKConfig, contract: Contract): string { + const addressName = `${camelCase(contract.name)}Address` let functionMap: Record = {} let abiViewFunctions: Array = []; let abiWriteFunctions: Array = []; @@ -248,6 +296,12 @@ function generateContract(contract: Contract): string { for (let abiElement of contract.abi) { switch (abiElement.type) { case "function": + if (config.whiteList && config.whiteList[contract.name]) { + if (config.whiteList[contract.name].indexOf(abiElement.name) == -1) { + continue + } + } + const indexAbiElement: AbiFunction & { index?: number } = abiElement if (!functionMap[indexAbiElement.name]) { @@ -264,6 +318,12 @@ function generateContract(contract: Contract): string { } break; case "event": + if (config.whiteList && config.whiteList[contract.name]) { + if (config.whiteList[contract.name].indexOf(abiElement.name) == -1) { + continue + } + } + abiEvents.push(abiElement) break; } @@ -272,41 +332,51 @@ function generateContract(contract: Contract): string { let file: Array = []; let types: Array = []; - if (abiViewFunctions.length) { + if (abiEvents.length) { + addImport('viem', 'PublicClient', 'Address') + file.push(``) file.push(`/**`) - file.push(` * contract ${contract.name} readonly method`) + file.push(` * contract ${contract.name} event`) file.push(`*/`) - file.push(`export class ${pascalCase(contract.name)}ReadOnlyClient {`) + file.push(`export class ${pascalCase(contract.name)}EventClient {`) file.push(` protected readonly rpcClient: PublicClient;`) - file.push(` protected readonly address: Address;`) + file.push(` public readonly address: Address;`) file.push(``) - file.push(` constructor (rpcClient: PublicClient, address: Address ${contractAddress}) {`) - file.push(` this.address = address;`) + file.push(` constructor (rpcClient: PublicClient, address?: Address) {`) + file.push(` this.address = address || getAddress(${addressName}, rpcClient.chain?.id);`) file.push(` this.rpcClient = rpcClient;`) file.push(` }`) - abiViewFunctions.forEach(it => { - const data = generateContractFunction(contract.name, it) + abiEvents.forEach(it => { + const data = generateEventFunction(contract.name, it) file.push(data.func) types.push(data.types) }) file.push(`}`) } - if (abiWriteFunctions.length) { - const extend = abiViewFunctions.length ? ` extends ${pascalCase(contract.name)}ReadOnlyClient` : `` + if (abiViewFunctions.length) { + const extend = abiEvents.length ? ` extends ${pascalCase(contract.name)}EventClient` : `` file.push(``) file.push(`/**`) - file.push(` * contract ${contract.name} write method`) + file.push(` * contract ${contract.name} readonly method`) file.push(`*/`) - file.push(`export class ${pascalCase(contract.name)}Client ${extend} {`) - file.push(` protected readonly wallet: WalletClient;`) + file.push(`export class ${pascalCase(contract.name)}ReadOnlyClient ${extend} {`) + if (!abiEvents.length) { + addImport('viem', 'PublicClient', 'Address') + file.push(` protected readonly rpcClient: PublicClient;`) + file.push(` public readonly address: Address;`) + } file.push(``) - file.push(` constructor (rpcClient: PublicClient, wallet: WalletClient, address: Address ${contractAddress}) {`) - file.push(` super(rpcClient, address);`) - file.push(` this.wallet = wallet;`) + file.push(` constructor (rpcClient: PublicClient, address?: Address) {`) + if (abiEvents.length) { + file.push(` super(rpcClient, address);`) + } else { + file.push(` this.address = address || getAddress(${addressName}, rpcClient.chain?.id);`) + file.push(` this.rpcClient = rpcClient;`) + } file.push(` }`) - abiWriteFunctions.forEach(it => { + abiViewFunctions.forEach(it => { const data = generateContractFunction(contract.name, it) file.push(data.func) types.push(data.types) @@ -314,21 +384,34 @@ function generateContract(contract: Contract): string { file.push(`}`) } - if (abiEvents.length) { + if (abiWriteFunctions.length) { + addImport('viem', 'PublicClient', 'Address') + + const extend = abiViewFunctions.length ? + ` extends ${pascalCase(contract.name)}ReadOnlyClient` + : abiEvents.length ? ` extends ${pascalCase(contract.name)}EventClient` : `` file.push(``) file.push(`/**`) - file.push(` * contract ${contract.name} event`) + file.push(` * contract ${contract.name} write method`) file.push(`*/`) - file.push(`export class ${pascalCase(contract.name)}EventClient {`) - file.push(` protected readonly rpcClient: PublicClient;`) - file.push(` protected readonly address: Address;`) + file.push(`export class ${pascalCase(contract.name)}Client ${extend} {`) + file.push(` protected readonly wallet: SimpleWalletClient;`) + if (!extend) { + file.push(` protected readonly rpcClient: PublicClient;`) + file.push(` public readonly address: Address;`) + } file.push(``) - file.push(` constructor (rpcClient: PublicClient, address: Address ${contractAddress}) {`) - file.push(` this.address = address;`) - file.push(` this.rpcClient = rpcClient;`) + file.push(` constructor (rpcClient: PublicClient, wallet: SimpleWalletClient, address?: Address) {`) + if (!extend) { + file.push(` this.address = address || getAddress(${addressName}, rpcClient.chain?.id);`) + file.push(` this.rpcClient = rpcClient;`) + } else { + file.push(` super(rpcClient, address);`) + } + file.push(` this.wallet = wallet;`) file.push(` }`) - abiEvents.forEach(it => { - const data = generateEventFunction(contract.name, it) + abiWriteFunctions.forEach(it => { + const data = generateContractFunction(contract.name, it) file.push(data.func) types.push(data.types) }) @@ -341,18 +424,65 @@ function generateContract(contract: Contract): string { file.join("\n"); } -export function sdk(config: SDKConfig = {}): ReactResult { +function generateCommon(config: SDKConfig) { + let file: Array = []; + file.push(`// COMMON =============================================================`) + file.push(``) + file.push(`function getAddress(address: Record, chainId?: number): Address {`) + file.push(` return address[chainId || 0] || '0x'`) + file.push(`}`) + file.push(``) + addImport('viem', 'Address') + + if (config.permissionLessSDK) { + file.push(``) + file.push(`export type SimpleWalletClient<`) + file.push(` TChain extends Chain | undefined = Chain | undefined,`) + file.push(` TAccount extends Account | undefined = Account | undefined,`) + file.push(`> = {`) + file.push(` account ?: TAccount;`) + file.push(` writeContract: <`) + file.push(` const abi extends Abi | readonly unknown[],`) + file.push(` functionName extends ContractFunctionName,`) + file.push(` args extends ContractFunctionArgs<`) + file.push(` abi,`) + file.push(` 'payable' | 'nonpayable',`) + file.push(` functionName`) + file.push(` >,`) + file.push(` TChainOverride extends Chain | undefined = undefined,`) + file.push(` >(`) + file.push(` args: WriteContractParameters<`) + file.push(` abi,`) + file.push(` functionName,`) + file.push(` args,`) + file.push(` TChain,`) + file.push(` TAccount,`) + file.push(` TChainOverride`) + file.push(` >,`) + file.push(` ) => Promise`) + file.push(`};`) + file.push(``) + + addImport('viem', 'Abi', 'Account', 'Chain', 'ContractFunctionArgs', 'ContractFunctionName', 'WriteContractParameters', 'WriteContractReturnType') + } + + return file.join("\n"); +} + +export function sdk(config: SDKConfig = {}): SDKResult { return { name: 'SDK', - async run(config: RunConfig): Promise<{ imports?: string, prepend?: string, content: string }> { + async run(runConfig: RunConfig): Promise<{ imports?: string, prepend?: string, content: string }> { let classFile: Array = [] - for (const contract of config.contracts) { - classFile.push(generateContract(contract)) + classFile.push(generateCommon(config)) + + for (const contract of runConfig.contracts) { + classFile.push(generateContract(config, contract)) } return { - imports: `import {Address, PublicClient, WalletClient, WatchContractEventReturnType, WriteContractReturnType, Hex} from "viem";import {AbiTypeToPrimitiveType, AbiParameterToPrimitiveType} from "abitype";`, + imports: buildImport(), content: classFile.join("\n\n"), } }, diff --git a/packages/wagmi-generater/wagmi.config.ts b/packages/wagmi-generater/wagmi.config.ts index e2f4cf5f..d0a9aa9f 100644 --- a/packages/wagmi-generater/wagmi.config.ts +++ b/packages/wagmi-generater/wagmi.config.ts @@ -1,39 +1,152 @@ import {defineConfig} from '@wagmi/cli' -import {blockExplorer} from '@wagmi/cli/plugins' +import {blockExplorer, react} from '@wagmi/cli/plugins' import {sdk} from './sdk' +import type {Evaluate} from "@wagmi/cli/src/types"; +import type {ContractConfig} from "@wagmi/cli/src/config"; +import {resolveProxyContracts} from "./resolveProxyContracts"; -export default defineConfig({ - out: '../core-sdk/src/abi/generated.ts', - contracts: [], - plugins: [ - blockExplorer({ - baseUrl: 'https://story-network.explorer.caldera.xyz/api', - name: 'StoryScan', - contracts: [ - {name: "AccessController", address: "0x92c87ae0a0a4b8629ad028e55183CC2b7eC057D3"}, - {name: "AncestorsVaultLAP", address: "0x280f8921E36d6Af2E03AD84EC8194ad1b6B4799c"}, - {name: "ArbitrationPolicySP", address: "0xCc3dDa466A18C4F20Bc0750756B92E2f23741Fd3"}, - {name: "DisputeModule", address: "0x0Ac6fdA124b05D2daA5E9De7059c866EE1CE7Bcb"}, - {name: "Governance", address: "0x6D8070F7726769bEd136bc7007B3deA695f7047A"}, - {name: "IPAccountImpl", address: "0xddcBD4309f0545fa8cC99137bC621620e017bdBe"}, - {name: "IPAccountRegistry", address: "0x16129393444e5BEb435501Dea41D5ECfB10b76F0"}, - {name: "IPAssetRegistry", address: "0xAAe9e83F8cE8832270AF033c609e233686f0E0eB"}, - {name: "IPAssetRenderer", address: "0x39cCE13916e7bfdeFa462D360d551aEcc6D82311"}, - {name: "IPMetadataProvider", address: "0x0A97aD19FEF318F0ACA888574b64A35402C8aDDB"}, - {name: "IPResolver", address: "0xeAEd88BEbF00acac8EFE9ED426cDDD2Dc9f8CB78"}, - {name: "LicenseRegistry", address: "0x410d2332270cEb9Ca78b7E2c3720046b3ef2D8Ba"}, - {name: "LicensingModule", address: "0x2A88056985814dcBb72aFA50B95893359B6262f5"}, - {name: "MockERC20", address: "0x3271778AdE44EfeC9e11b7160827921b6d614AF1"}, - {name: "MockERC721", address: "0xCdBa568f1f4e16a6c6CBC8F509eCc87972Fef09f"}, - {name: "MockTokenGatedHook", address: "0x008B5D8Db85100E143729453784e9F077B2279fA"}, - {name: "ModuleRegistry", address: "0xB8617E2FC9dbFd51781B8D281b725976E3B43f9d"}, - {name: "PILPolicyFrameworkManager", address: "0xAc2C50Af31501370366D243FaeC56F89128f6d96"}, - {name: "RegistrationModule", address: "0xa6249720b3BD1179d84b7E74029Ed2F78E5eC694"}, - {name: "RoyaltyModule", address: "0xE1a667ccc38540b38d8579c499bE22e51390a308"}, - {name: "RoyaltyPolicyLAP", address: "0x265C21b34e0E92d63C678425478C42aa8D727B79"}, - {name: "TokenWithdrawalModule", address: "0x5f62d238B3022bA5881e5e443B014cac6999a4f2"}, - ], - }), - sdk(), - ], +const storyTestnetId = 1513 + +export default defineConfig(async () => { + const contracts: Evaluate>[] = [ + { + name: "AccessController", address: { + // [sepolia.id]: "0xad64a4b2e18FF7D2f97aF083E7b193d7Dd141735", + [storyTestnetId]: "0x7e253Df9b0fC872746877Fa362b2cAf32712d770", + } + }, + { + name: "DisputeModule", address: { + // [sepolia.id]: "0x6157B19CBc151af2b36e0a2581001d32a22b2661", + [storyTestnetId]: "0x6d54456Ae5DCbDC0C9E2713cC8E650fE4f445c7C", + } + }, + { + name: "IPAccountImpl", address: { + // [sepolia.id]: "0x79792DccC6C58C303510fc1F7649e481C431aFb1", + [storyTestnetId]: "0x38cAfD16502B1d61c6399A18d6Fa1Ea8CEca3678", + } + }, + { + name: "IPAssetRegistry", address: { + // [sepolia.id]: "0x292639452A975630802C17c9267169D93BD5a793", + [storyTestnetId]: "0x862de97662a1231FFc14038eC1BE93aB129D2169", + } + }, + { + name: "IpRoyaltyVaultImpl", address: { + // [sepolia.id]: "", + [storyTestnetId]: "0x8Be22cc2D13ADF496a417D9C616dA4a253c68Af8", + } + }, + { + name: "LicenseRegistry", address: { + // [sepolia.id]: "0xc2BC7a2d5784768BDEd98436f2522A4931e2FBb4", + [storyTestnetId]: "0x0c3D467537FAd845a78728CEdc3D9447338c5422", + } + }, + { + name: "LicensingModule", address: { + // [sepolia.id]: "0x950d766A1a0afDc33c3e653C861A8765cb42DbdC", + [storyTestnetId]: "0xEeDDE5529122b621105798860F235c28FD3aBA40", + } + }, + { + name: "PILicenseTemplate", address: { + // [sepolia.id]: "", + [storyTestnetId]: "0xd0Be223ae9719bBD93447ecf5289319CCf8cA227", + } + }, + { + name: "ModuleRegistry", address: { + // [sepolia.id]: "0x5Aac3177F496F503Ac724A0D0A697f6ba9dA2C27", + [storyTestnetId]: "0xf2965E3B6251905Dd1E8671077760D07b0408cf2", + } + }, + { + name: "RoyaltyModule", address: { + // [sepolia.id]: "0xA6bEf9CC650A16939566c1da5d5088f3F028a865", + [storyTestnetId]: "0x551AD8CD7893003cE00500aC2aCF1E327763D9f6", + } + }, + { + name: "RoyaltyPolicyLAP", address: { + // [sepolia.id]: "0x16eF58e959522727588921A92e9084d36E5d3855", + [storyTestnetId]: "0x2EcdB5bD12a037dCb9De0Ab7957f35FEeF758eA6", + } + }, + ] + + return { + out: '../core-sdk/src/abi/generated.ts', + contracts: [], + plugins: [ + blockExplorer({ + baseUrl: 'https://story-network.explorer.caldera.xyz/api', + name: 'StoryScan', + getAddress: await resolveProxyContracts({ + baseUrl: 'https://story-network.rpc.caldera.xyz/http', + contracts: contracts, + chainId: storyTestnetId, + }), + contracts: contracts, + }), + sdk({ + permissionLessSDK: true, + whiteList: { + "AccessController": [ + "PermissionSet", + "setPermission", + ], + "DisputeModule": [ + "DisputeCancelled", + "DisputeRaised", + "DisputeResolved", + "cancelDispute", + "raiseDispute", + "resolveDispute", + ], + "IPAccountImpl": [ + "execute", + "executeWithSig", + ], + "IPAssetRegistry": [ + "IPRegistered", + "ipId", + "isRegistered", + "register", + ], + "IpRoyaltyVaultImpl": [ + "claimRevenueBySnapshotBatch", + "claimRevenueByTokenBatch", + "claimableRevenue", + "collectRoyaltyTokens", + "ipId", + ], + "PiLicenseTemplate": [ + "getLicenseTermsId", + "registerLicenseTerms", + "LicenseTermsRegistered" + ], + "LicensingModule": [ + "attachLicenseTerms", + "mintLicenseTokens", + "LicenseTokensMinted", + "registerDerivativeWithLicenseTokens", + "registerDerivative", + ], + "ModuleRegistry": [ + "isRegistered", + ], + "RoyaltyModule": [ + "payRoyaltyOnBehalf", + ], + "RoyaltyPolicyLAP": [ + "onRoyaltyPayment", + "getRoyaltyData", + ], + } + }), + ], + } }) From 6afbc5ee7ad8948e75082ac655265d2203ee74a3 Mon Sep 17 00:00:00 2001 From: Jacob Tucker Date: Fri, 12 Apr 2024 14:56:30 -0400 Subject: [PATCH 2/2] add maxFeePerGas to txOptions (#138) --- packages/core-sdk/package.json | 2 +- packages/core-sdk/src/types/options.ts | 1 + pnpm-lock.yaml | 1388 ++++++++++++------------ 3 files changed, 702 insertions(+), 689 deletions(-) diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index 33fe8ca8..3a3e409f 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@story-protocol/core-sdk", - "version": "1.0.0-rc.1", + "version": "1.0.0-rc.2", "description": "Story Protocol Core SDK", "main": "dist/story-protocol-core-sdk.cjs.js", "module": "dist/story-protocol-core-sdk.esm.js", diff --git a/packages/core-sdk/src/types/options.ts b/packages/core-sdk/src/types/options.ts index f6d245e9..bc91e8e8 100644 --- a/packages/core-sdk/src/types/options.ts +++ b/packages/core-sdk/src/types/options.ts @@ -1,6 +1,7 @@ export type TxOptions = { waitForTransaction?: boolean; gasPrice?: bigint; + maxFeePerGas?: bigint; numBlockConfirmations?: number; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2552e543..4658794f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,13 +16,13 @@ importers: version: 8.0.3 turbo: specifier: ^1.10.13 - version: 1.13.0 + version: 1.13.2 packages/core-sdk: dependencies: abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.4.3) + version: 0.10.3(typescript@5.4.5) axios: specifier: ^1.5.1 version: 1.6.8 @@ -31,17 +31,17 @@ importers: version: 16.4.5 viem: specifier: ^2.8.12 - version: 2.8.18(typescript@5.4.3)(zod@3.22.4) + version: 2.9.16(typescript@5.4.5)(zod@3.22.4) devDependencies: '@babel/core': specifier: ^7.23.0 - version: 7.24.3 + version: 7.24.4 '@babel/preset-env': specifier: ^7.22.20 - version: 7.24.3(@babel/core@7.24.3) + version: 7.24.4(@babel/core@7.24.4) '@babel/preset-typescript': specifier: ^7.23.0 - version: 7.24.1(@babel/core@7.24.3) + version: 7.24.1(@babel/core@7.24.4) '@preconstruct/cli': specifier: ^2.8.1 version: 2.8.3 @@ -65,7 +65,7 @@ importers: version: 10.0.6 '@types/node': specifier: ^20.8.2 - version: 20.11.30 + version: 20.12.7 '@types/sinon': specifier: ^10.0.18 version: 10.0.20 @@ -83,7 +83,7 @@ importers: version: 8.57.0 mocha: specifier: ^10.2.0 - version: 10.3.0 + version: 10.4.0 prettier: specifier: ^2.8.8 version: 2.8.8 @@ -92,28 +92,28 @@ importers: version: 16.1.3 ts-node: specifier: ^10.9.1 - version: 10.9.2(@types/node@20.11.30)(typescript@5.4.3) + version: 10.9.2(@types/node@20.12.7)(typescript@5.4.5) typechain: specifier: ^8.3.1 - version: 8.3.2(typescript@5.4.3) + version: 8.3.2(typescript@5.4.5) typescript: specifier: ^5.2.2 - version: 5.4.3 + version: 5.4.5 packages/eslint-config-story: dependencies: '@typescript-eslint/eslint-plugin': specifier: ^6.2.0 - version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.3) + version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': specifier: ^6.2.0 - version: 6.21.0(eslint@8.57.0)(typescript@5.4.3) + version: 6.21.0(eslint@8.57.0)(typescript@5.4.5) eslint-config-prettier: specifier: ^8.10.0 version: 8.10.0(eslint@8.57.0) eslint-config-turbo: specifier: ^1.10.0 - version: 1.13.0(eslint@8.57.0) + version: 1.13.2(eslint@8.57.0) eslint-plugin-import: specifier: ^2.28.0 version: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.57.0) @@ -143,28 +143,28 @@ importers: devDependencies: '@wagmi/cli': specifier: 0.0.0-canary-20240313013119 - version: 0.0.0-canary-20240313013119(typescript@5.4.3) + version: 0.0.0-canary-20240313013119(typescript@5.4.5) '@wagmi/connectors': specifier: ^4.1.14 - version: 4.1.24(@wagmi/core@2.6.15)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.3)(viem@2.8.18) + version: 4.1.25(@wagmi/core@2.6.16)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.5)(viem@2.9.16) '@wagmi/core': specifier: ^2.6.5 - version: 2.6.15(react@18.2.0)(typescript@5.4.3)(viem@2.8.18) + version: 2.6.16(react@18.2.0)(typescript@5.4.5)(viem@2.9.16) abitype: specifier: ^1.0.2 - version: 1.0.2(typescript@5.4.3) + version: 1.0.2(typescript@5.4.5) change-case: specifier: ^5.4.3 - version: 5.4.3 + version: 5.4.4 typescript: specifier: ^5.4.2 - version: 5.4.3 + version: 5.4.5 viem: specifier: ^2.8.6 - version: 2.8.18(typescript@5.4.3)(zod@3.22.4) + version: 2.9.16(typescript@5.4.5)(zod@3.22.4) wagmi: specifier: ^2.5.7 - version: 2.5.18(@tanstack/react-query@5.28.14)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.3)(viem@2.8.18) + version: 2.5.19(@tanstack/react-query@5.29.2)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.5)(viem@2.9.16) packages: @@ -191,22 +191,22 @@ packages: picocolors: 1.0.0 dev: true - /@babel/compat-data@7.24.1: - resolution: {integrity: sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==} + /@babel/compat-data@7.24.4: + resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.24.3: - resolution: {integrity: sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==} + /@babel/core@7.24.4: + resolution: {integrity: sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.1 + '@babel/generator': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.3) - '@babel/helpers': 7.24.1 - '@babel/parser': 7.24.1 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) + '@babel/helpers': 7.24.4 + '@babel/parser': 7.24.4 '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 '@babel/types': 7.24.0 @@ -219,8 +219,8 @@ packages: - supports-color dev: true - /@babel/generator@7.24.1: - resolution: {integrity: sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==} + /@babel/generator@7.24.4: + resolution: {integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 @@ -247,49 +247,49 @@ packages: resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.24.1 + '@babel/compat-data': 7.24.4 '@babel/helper-validator-option': 7.23.5 browserslist: 4.23.0 lru-cache: 5.1.1 semver: 6.3.1 dev: true - /@babel/helper-create-class-features-plugin@7.24.1(@babel/core@7.24.3): - resolution: {integrity: sha512-1yJa9dX9g//V6fDebXoEfEsxkZHk3Hcbm+zLhyu6qVgYFLvmTALTeV+jNU9e5RnYtioBrGEOdoI2joMSNQ/+aA==} + /@babel/helper-create-class-features-plugin@7.24.4(@babel/core@7.24.4): + resolution: {integrity: sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-member-expression-to-functions': 7.23.0 '@babel/helper-optimise-call-expression': 7.22.5 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.3) + '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.4) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 dev: true - /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.24.3): + /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.24.4): resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 regexpu-core: 5.3.2 semver: 6.3.1 dev: true - /@babel/helper-define-polyfill-provider@0.6.1(@babel/core@7.24.3): + /@babel/helper-define-polyfill-provider@0.6.1(@babel/core@7.24.4): resolution: {integrity: sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.24.0 debug: 4.3.4(supports-color@8.1.1) @@ -333,13 +333,13 @@ packages: '@babel/types': 7.24.0 dev: true - /@babel/helper-module-transforms@7.23.3(@babel/core@7.24.3): + /@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 @@ -359,25 +359,25 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-remap-async-to-generator@7.22.20(@babel/core@7.24.3): + /@babel/helper-remap-async-to-generator@7.22.20(@babel/core@7.24.4): resolution: {integrity: sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-wrap-function': 7.22.20 dev: true - /@babel/helper-replace-supers@7.24.1(@babel/core@7.24.3): + /@babel/helper-replace-supers@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-member-expression-to-functions': 7.23.0 '@babel/helper-optimise-call-expression': 7.22.5 @@ -428,8 +428,8 @@ packages: '@babel/types': 7.24.0 dev: true - /@babel/helpers@7.24.1: - resolution: {integrity: sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==} + /@babel/helpers@7.24.4: + resolution: {integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.24.0 @@ -449,1117 +449,1129 @@ packages: picocolors: 1.0.0 dev: true - /@babel/parser@7.24.1: - resolution: {integrity: sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==} + /@babel/parser@7.24.4: + resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.24.0 dev: true - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1(@babel/core@7.24.3): + /@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.4(@babel/core@7.24.4): + resolution: {integrity: sha512-qpl6vOOEEzTLLcsuqYYo8yDtrTocmu2xkGvgNebvPjT9DTtfFYGmgDqY+rBYXNlqL4s9qLDn6xkrJv4RxAPiTA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.24.4 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-plugin-utils': 7.24.0 + dev: true + + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.1(@babel/core@7.24.3): + /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.1(@babel/core@7.24.3): + /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-proposal-async-generator-functions@7.20.7(@babel/core@7.24.3): + /@babel/plugin-proposal-async-generator-functions@7.20.7(@babel/core@7.24.4): resolution: {integrity: sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-plugin-utils': 7.24.0 - '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.3) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.3) + '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.4) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.24.3): + /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.24.4): resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-proposal-export-default-from@7.24.1(@babel/core@7.24.3): + /@babel/plugin-proposal-export-default-from@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-+0hrgGGV3xyYIjOrD/bUZk/iUwOIGuoANfRfVg1cPhYBxF+TIXSEcc42DqzBICmWsnAQ+SfKedY0bj8QD+LuMg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-export-default-from': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-export-default-from': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.24.3): + /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.24.4): resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.24.3): + /@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.24.4): resolution: {integrity: sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.3) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.24.3): + /@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.24.4): resolution: {integrity: sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.24.1 - '@babel/core': 7.24.3 + '@babel/compat-data': 7.24.4 + '@babel/core': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.24.3): + /@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.24.4): resolution: {integrity: sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.24.3): + /@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.24.4): resolution: {integrity: sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==} engines: {node: '>=6.9.0'} deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.3): + /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.4): resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 dev: true - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.3): + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.4): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.3): + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.4): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.3): + /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.4): resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-export-default-from@7.24.1(@babel/core@7.24.3): + /@babel/plugin-syntax-export-default-from@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-cNXSxv9eTkGUtd0PsNMK8Yx5xeScxfpWOUAxE+ZPAXXEcAMOC3fk7LRdXq5fvpra2pLx2p1YtkAhpUbB2SwaRA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.3): + /@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-sxi2kLTI5DeW5vDtMUsk4mTPwvlUDbjOnoWayhynCwrw4QXRld4QEYwqzY8JmQXaJUtgUuCIurtSRH5sn4c7mA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-import-assertions@7.24.1(@babel/core@7.24.3): + /@babel/plugin-syntax-import-assertions@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.24.3): + /@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.3): + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.4): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.3): + /@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.3): + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.4): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.3): + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.4): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.3): + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.4): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.3): + /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.4): resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.3): + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.4): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.3): + /@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.3): + /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.4): resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-arrow-functions@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-arrow-functions@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-async-generator-functions@7.24.3(@babel/core@7.24.3): + /@babel/plugin-transform-async-generator-functions@7.24.3(@babel/core@7.24.4): resolution: {integrity: sha512-Qe26CMYVjpQxJ8zxM1340JFNjZaF+ISWpr1Kt/jGo+ZTUzKkfw/pphEWbRCb+lmSM6k/TOgfYLvmbHkUQ0asIg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-plugin-utils': 7.24.0 - '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.3) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.3) + '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.4) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-async-to-generator@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-async-to-generator@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-AawPptitRXp1y0n4ilKcGbRYWfbbzFWz2NqNu7dacYDtFtz0CMjG64b3LQsb3KIgnf4/obcUL78hfaOS7iCUfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-module-imports': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 - '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.3) + '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-block-scoped-functions@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-block-scoped-functions@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-block-scoping@7.24.1(@babel/core@7.24.3): - resolution: {integrity: sha512-h71T2QQvDgM2SmT29UYU6ozjMlAt7s7CSs5Hvy8f8cf/GM/Z4a2zMfN+fjVGaieeCrXR3EdQl6C4gQG+OgmbKw==} + /@babel/plugin-transform-block-scoping@7.24.4(@babel/core@7.24.4): + resolution: {integrity: sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-class-properties@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-class-properties@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-class-static-block@7.24.1(@babel/core@7.24.3): - resolution: {integrity: sha512-FUHlKCn6J3ERiu8Dv+4eoz7w8+kFLSyeVG4vDAikwADGjUCoHw/JHokyGtr8OR4UjpwPVivyF+h8Q5iv/JmrtA==} + /@babel/plugin-transform-class-static-block@7.24.4(@babel/core@7.24.4): + resolution: {integrity: sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.3) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-classes@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-classes@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-plugin-utils': 7.24.0 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.3) + '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.4) '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 dev: true - /@babel/plugin-transform-computed-properties@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-computed-properties@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/template': 7.24.0 dev: true - /@babel/plugin-transform-destructuring@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-destructuring@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-dotall-regex@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-dotall-regex@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-duplicate-keys@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-duplicate-keys@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-dynamic-import@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-dynamic-import@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-exponentiation-operator@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-exponentiation-operator@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-export-namespace-from@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-export-namespace-from@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-flow-strip-types@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-flow-strip-types@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-iIYPIWt3dUmUKKE10s3W+jsQ3icFkw0JyRVyY1B7G4yK/nngAOHLVx8xlhA6b/Jzl/Y0nis8gjqhqKtRDQqHWQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-flow': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-flow': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-for-of@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-for-of@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true - /@babel/plugin-transform-function-name@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-function-name@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-function-name': 7.23.0 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-json-strings@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-json-strings@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-literals@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-literals@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-logical-assignment-operators@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-logical-assignment-operators@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.3) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-member-expression-literals@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-member-expression-literals@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-modules-amd@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-modules-amd@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-modules-commonjs@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-modules-commonjs@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-simple-access': 7.22.5 dev: true - /@babel/plugin-transform-modules-systemjs@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-modules-systemjs@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.3) + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-validator-identifier': 7.22.20 dev: true - /@babel/plugin-transform-modules-umd@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-modules-umd@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.24.3): + /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.24.4): resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-new-target@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-new-target@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-nullish-coalescing-operator@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-nullish-coalescing-operator@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-numeric-separator@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-numeric-separator@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.3) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-object-rest-spread@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-object-rest-spread@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-object-super@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-object-super@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.3) + '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-optional-catch-binding@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-optional-catch-binding@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-optional-chaining@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-optional-chaining@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.3) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-parameters@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-parameters@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-private-methods@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-private-methods@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-private-property-in-object@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-private-property-in-object@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.24.3) + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.3) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-property-literals@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-property-literals@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-react-display-name@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-react-display-name@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-mvoQg2f9p2qlpDQRBC7M3c3XTr0k7cp/0+kFKKO/7Gtu0LSw16eKB+Fabe2bDT/UpsyasTBBkAnbdsLrkD5XMw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-react-jsx-self@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-react-jsx-self@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.3): + /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.4): resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-module-imports': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) '@babel/types': 7.24.0 dev: true - /@babel/plugin-transform-regenerator@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-regenerator@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 regenerator-transform: 0.15.2 dev: true - /@babel/plugin-transform-reserved-words@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-reserved-words@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-runtime@7.24.3(@babel/core@7.24.3): + /@babel/plugin-transform-runtime@7.24.3(@babel/core@7.24.4): resolution: {integrity: sha512-J0BuRPNlNqlMTRJ72eVptpt9VcInbxO6iP3jaxr+1NPhC0UkKL+6oeX6VXMEYdADnuqmMmsBspt4d5w8Y/TCbQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-module-imports': 7.24.3 '@babel/helper-plugin-utils': 7.24.0 - babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.24.3) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.3) - babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.24.3) + babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.24.4) + babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.4) + babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.24.4) semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/plugin-transform-shorthand-properties@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-shorthand-properties@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-spread@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-spread@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true - /@babel/plugin-transform-sticky-regex@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-sticky-regex@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-template-literals@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-template-literals@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-typeof-symbol@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-typeof-symbol@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-typescript@7.24.1(@babel/core@7.24.3): - resolution: {integrity: sha512-liYSESjX2fZ7JyBFkYG78nfvHlMKE6IpNdTVnxmlYUR+j5ZLsitFbaAE+eJSK2zPPkNWNw4mXL51rQ8WrvdK0w==} + /@babel/plugin-transform-typescript@7.24.4(@babel/core@7.24.4): + resolution: {integrity: sha512-79t3CQ8+oBGk/80SQ8MN3Bs3obf83zJ0YZjDmDaEZN8MqhMI760apl5z6a20kFeMXBwJX99VpKT8CKxEBp5H1g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.1(@babel/core@7.24.3) + '@babel/helper-create-class-features-plugin': 7.24.4(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/plugin-transform-unicode-escapes@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-unicode-escapes@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-unicode-property-regex@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-unicode-property-regex@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-unicode-regex@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-unicode-regex@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/plugin-transform-unicode-sets-regex@7.24.1(@babel/core@7.24.3): + /@babel/plugin-transform-unicode-sets-regex@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.24.4) '@babel/helper-plugin-utils': 7.24.0 dev: true - /@babel/preset-env@7.24.3(@babel/core@7.24.3): - resolution: {integrity: sha512-fSk430k5c2ff8536JcPvPWK4tZDwehWLGlBp0wrsBUjZVdeQV6lePbwKWZaZfK2vnh/1kQX1PzAJWsnBmVgGJA==} + /@babel/preset-env@7.24.4(@babel/core@7.24.4): + resolution: {integrity: sha512-7Kl6cSmYkak0FK/FXjSEnLJ1N9T/WA2RkMhu17gZ/dsxKJUuTYNIylahPTzqpLyJN4WhDif8X0XK1R8Wsguo/A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.24.1 - '@babel/core': 7.24.3 + '@babel/compat-data': 7.24.4 + '@babel/core': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-validator-option': 7.23.5 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.3) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.3) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.3) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.3) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-import-assertions': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.3) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.3) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.3) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.3) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.3) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-async-generator-functions': 7.24.3(@babel/core@7.24.3) - '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-block-scoped-functions': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-block-scoping': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-class-properties': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-class-static-block': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-classes': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-computed-properties': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-destructuring': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-dotall-regex': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-duplicate-keys': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-dynamic-import': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-exponentiation-operator': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-export-namespace-from': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-for-of': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-function-name': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-json-strings': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-literals': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-logical-assignment-operators': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-member-expression-literals': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-modules-amd': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-modules-systemjs': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-modules-umd': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.24.3) - '@babel/plugin-transform-new-target': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-numeric-separator': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-object-rest-spread': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-object-super': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-optional-catch-binding': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-private-methods': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-private-property-in-object': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-property-literals': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-regenerator': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-reserved-words': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-spread': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-template-literals': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-typeof-symbol': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-unicode-escapes': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-unicode-property-regex': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-unicode-sets-regex': 7.24.1(@babel/core@7.24.3) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.3) - babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.24.3) - babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.3) - babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.24.3) + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.24.4(@babel/core@7.24.4) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.4) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.4) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.4) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.4) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-import-assertions': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-syntax-import-attributes': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.4) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.4) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.4) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.4) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.4) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-async-generator-functions': 7.24.3(@babel/core@7.24.4) + '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-block-scoped-functions': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-block-scoping': 7.24.4(@babel/core@7.24.4) + '@babel/plugin-transform-class-properties': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-class-static-block': 7.24.4(@babel/core@7.24.4) + '@babel/plugin-transform-classes': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-computed-properties': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-destructuring': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-dotall-regex': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-duplicate-keys': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-dynamic-import': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-exponentiation-operator': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-export-namespace-from': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-for-of': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-function-name': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-json-strings': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-literals': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-logical-assignment-operators': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-member-expression-literals': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-modules-amd': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-modules-systemjs': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-modules-umd': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.24.4) + '@babel/plugin-transform-new-target': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-nullish-coalescing-operator': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-numeric-separator': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-object-rest-spread': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-object-super': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-optional-catch-binding': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-optional-chaining': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-private-methods': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-private-property-in-object': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-property-literals': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-regenerator': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-reserved-words': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-spread': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-template-literals': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-typeof-symbol': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-unicode-escapes': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-unicode-property-regex': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-unicode-sets-regex': 7.24.1(@babel/core@7.24.4) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.24.4) + babel-plugin-polyfill-corejs2: 0.4.10(@babel/core@7.24.4) + babel-plugin-polyfill-corejs3: 0.10.4(@babel/core@7.24.4) + babel-plugin-polyfill-regenerator: 0.6.1(@babel/core@7.24.4) core-js-compat: 3.36.1 semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /@babel/preset-flow@7.24.1(@babel/core@7.24.3): + /@babel/preset-flow@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-sWCV2G9pcqZf+JHyv/RyqEIpFypxdCSxWIxQjpdaQxenNog7cN1pr76hg8u0Fz8Qgg0H4ETkGcJnXL8d4j0PPA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-validator-option': 7.23.5 - '@babel/plugin-transform-flow-strip-types': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-transform-flow-strip-types': 7.24.1(@babel/core@7.24.4) dev: true - /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.3): + /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.4): resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/types': 7.24.0 esutils: 2.0.3 dev: true - /@babel/preset-typescript@7.24.1(@babel/core@7.24.3): + /@babel/preset-typescript@7.24.1(@babel/core@7.24.4): resolution: {integrity: sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.24.0 '@babel/helper-validator-option': 7.23.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-typescript': 7.24.4(@babel/core@7.24.4) dev: true - /@babel/register@7.23.7(@babel/core@7.24.3): + /@babel/register@7.23.7(@babel/core@7.24.4): resolution: {integrity: sha512-EjJeB6+kvpk+Y5DAkEAmbOBEFkh9OASx0huoEkqYTFxAZHzOAX2Oh5uwAUuL2rUddqfM0SA+KPXV2TbzoZ2kvQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 clone-deep: 4.0.1 find-cache-dir: 2.1.0 make-dir: 2.1.0 @@ -1571,8 +1583,8 @@ packages: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/runtime@7.24.1: - resolution: {integrity: sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==} + /@babel/runtime@7.24.4: + resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 @@ -1583,7 +1595,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.1 + '@babel/parser': 7.24.4 '@babel/types': 7.24.0 dev: true @@ -1592,12 +1604,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.1 + '@babel/generator': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.24.1 + '@babel/parser': 7.24.4 '@babel/types': 7.24.0 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 @@ -1621,7 +1633,7 @@ packages: /@changesets/apply-release-plan@7.0.0: resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/config': 3.0.0 '@changesets/get-version-range-type': 0.4.0 '@changesets/git': 3.0.0 @@ -1639,7 +1651,7 @@ packages: /@changesets/assemble-release-plan@6.0.0: resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.0.0 '@changesets/types': 6.0.0 @@ -1657,7 +1669,7 @@ packages: resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} hasBin: true dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/apply-release-plan': 7.0.0 '@changesets/assemble-release-plan': 6.0.0 '@changesets/changelog-git': 0.2.0 @@ -1722,7 +1734,7 @@ packages: /@changesets/get-release-plan@4.0.0: resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/assemble-release-plan': 6.0.0 '@changesets/config': 3.0.0 '@changesets/pre': 2.0.0 @@ -1738,7 +1750,7 @@ packages: /@changesets/git@3.0.0: resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -1763,7 +1775,7 @@ packages: /@changesets/pre@2.0.0: resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -1773,7 +1785,7 @@ packages: /@changesets/read@0.6.0: resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/git': 3.0.0 '@changesets/logger': 0.1.0 '@changesets/parse': 0.4.0 @@ -1794,7 +1806,7 @@ packages: /@changesets/write@0.3.0: resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 @@ -1811,7 +1823,7 @@ packages: eth-json-rpc-filters: 6.0.1 eventemitter3: 5.0.1 keccak: 3.0.4 - preact: 10.20.1 + preact: 10.20.2 sha.js: 2.4.11 transitivePeerDependencies: - supports-color @@ -1828,7 +1840,7 @@ packages: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: '@babel/helper-module-imports': 7.24.3 - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@emotion/hash': 0.9.1 '@emotion/memoize': 0.8.1 '@emotion/serialize': 1.1.4 @@ -1873,7 +1885,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.4 @@ -1908,7 +1920,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.2 '@emotion/react': 11.11.4(react@18.2.0) @@ -2224,7 +2236,7 @@ packages: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.2 + '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: @@ -2234,8 +2246,8 @@ packages: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - /@humanwhocodes/object-schema@2.0.2: - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + /@humanwhocodes/object-schema@2.0.3: + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} /@isaacs/ttlcache@1.4.1: resolution: {integrity: sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==} @@ -2260,7 +2272,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.7 jest-mock: 29.7.0 dev: true @@ -2270,7 +2282,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.11.30 + '@types/node': 20.12.7 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2289,7 +2301,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.7 '@types/yargs': 15.0.19 chalk: 4.1.2 dev: true @@ -2301,7 +2313,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.7 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -2363,7 +2375,7 @@ packages: /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 @@ -2372,7 +2384,7 @@ packages: /@manypkg/get-packages@1.1.3: resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -2526,7 +2538,7 @@ packages: qrcode-terminal-nooctal: 0.12.1 react: 18.2.0 react-i18next: 13.5.0(i18next@22.5.1)(react-dom@18.2.0)(react-native@0.73.6)(react@18.2.0) - react-native: 0.73.6(@babel/core@7.24.3)(@babel/preset-env@7.24.3)(react@18.2.0) + react-native: 0.73.6(@babel/core@7.24.4)(@babel/preset-env@7.24.4)(react@18.2.0) react-native-webview: 11.26.1(react-native@0.73.6)(react@18.2.0) readable-stream: 2.3.8 rollup-plugin-visualizer: 5.12.0 @@ -2561,7 +2573,7 @@ packages: engines: {node: '>=16.0.0'} dependencies: '@ethereumjs/tx': 4.2.0 - '@noble/hashes': 1.3.2 + '@noble/hashes': 1.4.0 '@scure/base': 1.1.6 '@types/debug': 4.1.12 debug: 4.3.4(supports-color@8.1.1) @@ -2668,6 +2680,11 @@ packages: engines: {node: '>= 16'} dev: true + /@noble/hashes@1.4.0: + resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} + engines: {node: '>= 16'} + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -2832,9 +2849,9 @@ packages: hasBin: true dependencies: '@babel/code-frame': 7.24.2 - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 '@babel/helper-module-imports': 7.24.3 - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 '@preconstruct/hook': 0.4.0 '@rollup/plugin-alias': 3.1.9(rollup@2.79.1) '@rollup/plugin-commonjs': 15.1.0(rollup@2.79.1) @@ -2853,7 +2870,7 @@ packages: fs-extra: 9.1.0 is-reference: 1.2.1 jest-worker: 26.6.2 - magic-string: 0.30.8 + magic-string: 0.30.9 meow: 7.1.1 ms: 2.1.3 normalize-path: 3.0.0 @@ -2866,7 +2883,7 @@ packages: resolve-from: 5.0.0 rollup: 2.79.1 semver: 7.6.0 - terser: 5.29.2 + terser: 5.30.3 v8-compile-cache: 2.4.0 zod: 3.22.4 transitivePeerDependencies: @@ -2876,8 +2893,8 @@ packages: /@preconstruct/hook@0.4.0: resolution: {integrity: sha512-a7mrlPTM3tAFJyz43qb4pPVpUx8j8TzZBFsNFqcKcE/sEakNXRlQAuCT4RGZRf9dQiiUnBahzSIWawU4rENl+Q==} dependencies: - '@babel/core': 7.24.3 - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.4) pirates: 4.0.6 source-map-support: 0.5.21 transitivePeerDependencies: @@ -2890,7 +2907,7 @@ packages: react-native: ^0.0.0-0 || >=0.60 <1.0 dependencies: merge-options: 3.0.4 - react-native: 0.73.6(@babel/core@7.24.3)(@babel/preset-env@7.24.3)(react@18.2.0) + react-native: 0.73.6(@babel/core@7.24.4)(@babel/preset-env@7.24.4)(react@18.2.0) dev: true /@react-native-community/cli-clean@12.3.6: @@ -2911,7 +2928,7 @@ packages: cosmiconfig: 5.2.1 deepmerge: 4.3.1 glob: 7.2.3 - joi: 17.12.2 + joi: 17.12.3 transitivePeerDependencies: - encoding dev: true @@ -2934,7 +2951,7 @@ packages: chalk: 4.1.2 command-exists: 1.2.9 deepmerge: 4.3.1 - envinfo: 7.11.1 + envinfo: 7.12.0 execa: 5.1.1 hermes-profile-transformer: 0.0.6 node-stream-zip: 1.15.0 @@ -3027,7 +3044,7 @@ packages: /@react-native-community/cli-types@12.3.6: resolution: {integrity: sha512-xPqTgcUtZowQ8WKOkI9TLGBwH2bGggOC4d2FFaIRST3gTcjrEeGRNeR5aXCzJFIgItIft8sd7p2oKEdy90+01Q==} dependencies: - joi: 17.12.2 + joi: 17.12.3 dev: true /@react-native-community/cli@12.3.6: @@ -3065,95 +3082,95 @@ packages: engines: {node: '>=18'} dev: true - /@react-native/babel-plugin-codegen@0.73.4(@babel/preset-env@7.24.3): + /@react-native/babel-plugin-codegen@0.73.4(@babel/preset-env@7.24.4): resolution: {integrity: sha512-XzRd8MJGo4Zc5KsphDHBYJzS1ryOHg8I2gOZDAUCGcwLFhdyGu1zBNDJYH2GFyDrInn9TzAbRIf3d4O+eltXQQ==} engines: {node: '>=18'} dependencies: - '@react-native/codegen': 0.73.3(@babel/preset-env@7.24.3) + '@react-native/codegen': 0.73.3(@babel/preset-env@7.24.4) transitivePeerDependencies: - '@babel/preset-env' - supports-color dev: true - /@react-native/babel-preset@0.73.21(@babel/core@7.24.3)(@babel/preset-env@7.24.3): + /@react-native/babel-preset@0.73.21(@babel/core@7.24.4)(@babel/preset-env@7.24.4): resolution: {integrity: sha512-WlFttNnySKQMeujN09fRmrdWqh46QyJluM5jdtDNrkl/2Hx6N4XeDUGhABvConeK95OidVO7sFFf7sNebVXogA==} engines: {node: '>=18'} peerDependencies: '@babel/core': '*' dependencies: - '@babel/core': 7.24.3 - '@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.24.3) - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-proposal-export-default-from': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.24.3) - '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.3) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-export-default-from': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-syntax-flow': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.3) - '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-block-scoping': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-classes': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-computed-properties': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-destructuring': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-flow-strip-types': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-function-name': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-literals': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.24.3) - '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-private-methods': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-private-property-in-object': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-react-display-name': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.3) - '@babel/plugin-transform-react-jsx-self': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-runtime': 7.24.3(@babel/core@7.24.3) - '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-spread': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-typescript': 7.24.1(@babel/core@7.24.3) - '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.24.4) + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-proposal-export-default-from': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.24.4) + '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.4) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-export-default-from': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-syntax-flow': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.4) + '@babel/plugin-transform-arrow-functions': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-async-to-generator': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-block-scoping': 7.24.4(@babel/core@7.24.4) + '@babel/plugin-transform-classes': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-computed-properties': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-destructuring': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-flow-strip-types': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-function-name': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-literals': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.24.4) + '@babel/plugin-transform-parameters': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-private-methods': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-private-property-in-object': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-react-display-name': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.24.4) + '@babel/plugin-transform-react-jsx-self': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-react-jsx-source': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-runtime': 7.24.3(@babel/core@7.24.4) + '@babel/plugin-transform-shorthand-properties': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-spread': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-sticky-regex': 7.24.1(@babel/core@7.24.4) + '@babel/plugin-transform-typescript': 7.24.4(@babel/core@7.24.4) + '@babel/plugin-transform-unicode-regex': 7.24.1(@babel/core@7.24.4) '@babel/template': 7.24.0 - '@react-native/babel-plugin-codegen': 0.73.4(@babel/preset-env@7.24.3) - babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.24.3) + '@react-native/babel-plugin-codegen': 0.73.4(@babel/preset-env@7.24.4) + babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.24.4) react-refresh: 0.14.0 transitivePeerDependencies: - '@babel/preset-env' - supports-color dev: true - /@react-native/codegen@0.73.3(@babel/preset-env@7.24.3): + /@react-native/codegen@0.73.3(@babel/preset-env@7.24.4): resolution: {integrity: sha512-sxslCAAb8kM06vGy9Jyh4TtvjhcP36k/rvj2QE2Jdhdm61KvfafCATSIsOfc0QvnduWFcpXUPvAVyYwuv7PYDg==} engines: {node: '>=18'} peerDependencies: '@babel/preset-env': ^7.1.6 dependencies: - '@babel/parser': 7.24.1 - '@babel/preset-env': 7.24.3(@babel/core@7.24.3) + '@babel/parser': 7.24.4 + '@babel/preset-env': 7.24.4(@babel/core@7.24.4) flow-parser: 0.206.0 glob: 7.2.3 invariant: 2.2.4 - jscodeshift: 0.14.0(@babel/preset-env@7.24.3) + jscodeshift: 0.14.0(@babel/preset-env@7.24.4) mkdirp: 0.5.6 nullthrows: 1.1.1 transitivePeerDependencies: - supports-color dev: true - /@react-native/community-cli-plugin@0.73.17(@babel/core@7.24.3)(@babel/preset-env@7.24.3): + /@react-native/community-cli-plugin@0.73.17(@babel/core@7.24.4)(@babel/preset-env@7.24.4): resolution: {integrity: sha512-F3PXZkcHg+1ARIr6FRQCQiB7ZAA+MQXGmq051metRscoLvgYJwj7dgC8pvgy0kexzUkHu5BNKrZeySzUft3xuQ==} engines: {node: '>=18'} dependencies: '@react-native-community/cli-server-api': 12.3.6 '@react-native-community/cli-tools': 12.3.6 '@react-native/dev-middleware': 0.73.8 - '@react-native/metro-babel-transformer': 0.73.15(@babel/core@7.24.3)(@babel/preset-env@7.24.3) + '@react-native/metro-babel-transformer': 0.73.15(@babel/core@7.24.4)(@babel/preset-env@7.24.4) chalk: 4.1.2 execa: 5.1.1 metro: 0.80.8 @@ -3207,14 +3224,14 @@ packages: engines: {node: '>=18'} dev: true - /@react-native/metro-babel-transformer@0.73.15(@babel/core@7.24.3)(@babel/preset-env@7.24.3): + /@react-native/metro-babel-transformer@0.73.15(@babel/core@7.24.4)(@babel/preset-env@7.24.4): resolution: {integrity: sha512-LlkSGaXCz+xdxc9819plmpsl4P4gZndoFtpjN3GMBIu6f7TBV0GVbyJAU4GE8fuAWPVSVL5ArOcdkWKSbI1klw==} engines: {node: '>=18'} peerDependencies: '@babel/core': '*' dependencies: - '@babel/core': 7.24.3 - '@react-native/babel-preset': 0.73.21(@babel/core@7.24.3)(@babel/preset-env@7.24.3) + '@babel/core': 7.24.4 + '@react-native/babel-preset': 0.73.21(@babel/core@7.24.4)(@babel/preset-env@7.24.4) hermes-parser: 0.15.0 nullthrows: 1.1.1 transitivePeerDependencies: @@ -3234,7 +3251,7 @@ packages: dependencies: invariant: 2.2.4 nullthrows: 1.1.1 - react-native: 0.73.6(@babel/core@7.24.3)(@babel/preset-env@7.24.3)(react@18.2.0) + react-native: 0.73.6(@babel/core@7.24.4)(@babel/preset-env@7.24.4)(react@18.2.0) dev: true /@rollup/plugin-alias@3.1.9(rollup@2.79.1): @@ -3309,10 +3326,10 @@ packages: rollup: 2.79.1 dev: true - /@safe-global/safe-apps-provider@0.18.1(typescript@5.4.3): + /@safe-global/safe-apps-provider@0.18.1(typescript@5.4.5): resolution: {integrity: sha512-V4a05A3EgJcriqtDoJklDz1BOinWhC6P0hjUSxshA4KOZM7rGPCTto/usXs09zr1vvL28evl/NldSTv97j2bmg==} dependencies: - '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.4.3) + '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.4.5) events: 3.3.0 transitivePeerDependencies: - bufferutil @@ -3321,11 +3338,11 @@ packages: - zod dev: true - /@safe-global/safe-apps-sdk@8.1.0(typescript@5.4.3): + /@safe-global/safe-apps-sdk@8.1.0(typescript@5.4.5): resolution: {integrity: sha512-XJbEPuaVc7b9n23MqlF6c+ToYIS3f7P2Sel8f3cSBQ9WORE4xrSuvhMpK9fDSFqJ7by/brc+rmJR/5HViRr0/w==} dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.19.0 - viem: 1.21.4(typescript@5.4.3) + viem: 1.21.4(typescript@5.4.5) transitivePeerDependencies: - bufferutil - typescript @@ -3423,8 +3440,8 @@ packages: resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} dev: true - /@socket.io/component-emitter@3.1.0: - resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} + /@socket.io/component-emitter@3.1.1: + resolution: {integrity: sha512-dzJtaDAAoXx4GCOJpbB2eG/Qj8VDpdwkLsWGzGm+0L7E8/434RyMbAHmk9ubXWVAb9nXmc44jUf8GKqVDiKezg==} dev: true /@stablelib/aead@1.0.1: @@ -3543,21 +3560,21 @@ packages: '@stablelib/wipe': 1.0.1 dev: true - /@tanstack/query-core@5.28.13: - resolution: {integrity: sha512-C3+CCOcza+mrZ7LglQbjeYEOTEC3LV0VN0eYaIN6GvqAZ8Foegdgch7n6QYPtT4FuLae5ALy+m+ZMEKpD6tMCQ==} + /@tanstack/query-core@5.29.0: + resolution: {integrity: sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww==} dev: true - /@tanstack/react-query@5.28.14(react@18.2.0): - resolution: {integrity: sha512-cZqt03Igb3I9tM72qNX5TAAmeYl75Z+k4Mv92VkXIXc2hCrv0fIywd7GN3JV1BBJl4mr7Cc+OOKKOPy8sNVOkA==} + /@tanstack/react-query@5.29.2(react@18.2.0): + resolution: {integrity: sha512-nyuWILR4u7H5moLGSiifLh8kIqQDLNOHGuSz0rcp+J75fNc8aQLyr5+I2JCHU3n+nJrTTW1ssgAD8HiKD7IFBQ==} peerDependencies: react: ^18.0.0 dependencies: - '@tanstack/query-core': 5.28.13 + '@tanstack/query-core': 5.29.0 react: 18.2.0 dev: true - /@tsconfig/node10@1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + /@tsconfig/node10@1.0.11: + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} dev: true /@tsconfig/node12@1.0.11: @@ -3661,8 +3678,8 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node@20.11.30: - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + /@types/node@20.12.7: + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} dependencies: undici-types: 5.26.5 dev: true @@ -3682,13 +3699,13 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.7 dev: true /@types/secp256k1@4.0.6: resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.7 dev: true /@types/semver@7.5.8: @@ -3728,7 +3745,7 @@ packages: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3740,10 +3757,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/type-utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 @@ -3751,13 +3768,13 @@ packages: ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3769,11 +3786,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - typescript: 5.4.3 + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false @@ -3786,7 +3803,7 @@ packages: '@typescript-eslint/visitor-keys': 6.21.0 dev: false - /@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/type-utils@6.21.0(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3796,12 +3813,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false @@ -3811,7 +3828,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: false - /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.3): + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.5): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3827,13 +3844,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.3.0(typescript@5.4.3) - typescript: 5.4.3 + ts-api-utils: 1.3.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -3844,7 +3861,7 @@ packages: '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -3863,7 +3880,7 @@ packages: /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - /@wagmi/cli@0.0.0-canary-20240313013119(typescript@5.4.3): + /@wagmi/cli@0.0.0-canary-20240313013119(typescript@5.4.5): resolution: {integrity: sha512-9detC5+llu+6x+DeghsA8xCqEbh+CZ6r7iGkQvq3sn+PTx426a4A0TFnqyNkCHMkPPanDOy2E8busGN+yhyhVg==} hasBin: true peerDependencies: @@ -3872,11 +3889,11 @@ packages: typescript: optional: true dependencies: - abitype: 0.9.10(typescript@5.4.3)(zod@3.22.4) + abitype: 0.9.10(typescript@5.4.5)(zod@3.22.4) bundle-require: 4.0.2(esbuild@0.19.12) cac: 6.7.14 change-case: 4.1.2 - chokidar: 3.5.3 + chokidar: 3.6.0 dedent: 0.7.0 dotenv: 16.4.5 dotenv-expand: 10.0.0 @@ -3889,18 +3906,18 @@ packages: pathe: 1.1.2 picocolors: 1.0.0 prettier: 3.2.5 - typescript: 5.4.3 - viem: 2.8.18(typescript@5.4.3)(zod@3.22.4) + typescript: 5.4.5 + viem: 2.9.16(typescript@5.4.5)(zod@3.22.4) zod: 3.22.4 transitivePeerDependencies: - bufferutil - utf-8-validate dev: true - /@wagmi/connectors@4.1.24(@wagmi/core@2.6.15)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.3)(viem@2.8.18): - resolution: {integrity: sha512-gFziI7E3m+ESJmEnsvlm/eMlboKwdfGqOOQIU068MoZ+ZcNxoLZe4gu8CqnrmG7ksdPtwG38prsMl96opZexIA==} + /@wagmi/connectors@4.1.25(@wagmi/core@2.6.16)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.5)(viem@2.9.16): + resolution: {integrity: sha512-4Tot1Gtiv7uhiUAxZ9On37aai35l5S0sV7N2yQSNgzqXe55bAlI0cqyBAIJRvyKwOe1+hzKfoFqYQSaoCgj5Lg==} peerDependencies: - '@wagmi/core': 2.6.15 + '@wagmi/core': 2.6.16 typescript: '>=5.0.4' viem: 2.x peerDependenciesMeta: @@ -3909,13 +3926,13 @@ packages: dependencies: '@coinbase/wallet-sdk': 3.9.1 '@metamask/sdk': 0.14.3(react-native@0.73.6)(react@18.2.0) - '@safe-global/safe-apps-provider': 0.18.1(typescript@5.4.3) - '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.4.3) - '@wagmi/core': 2.6.15(react@18.2.0)(typescript@5.4.3)(viem@2.8.18) + '@safe-global/safe-apps-provider': 0.18.1(typescript@5.4.5) + '@safe-global/safe-apps-sdk': 8.1.0(typescript@5.4.5) + '@wagmi/core': 2.6.16(react@18.2.0)(typescript@5.4.5)(viem@2.9.16) '@walletconnect/ethereum-provider': 2.11.2(react@18.2.0) '@walletconnect/modal': 2.6.2(react@18.2.0) - typescript: 5.4.3 - viem: 2.8.18(typescript@5.4.3)(zod@3.22.4) + typescript: 5.4.5 + viem: 2.9.16(typescript@5.4.5)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -3943,8 +3960,8 @@ packages: - zod dev: true - /@wagmi/core@2.6.15(react@18.2.0)(typescript@5.4.3)(viem@2.8.18): - resolution: {integrity: sha512-P3w7NIPBs6Pt3j8k5Tq9cVYjvUiyuEAk3WxZfUG5NyaveLqs3b6IC6Frl63zriSV3Bj0tdJJXhEVoIIeIUqMCA==} + /@wagmi/core@2.6.16(react@18.2.0)(typescript@5.4.5)(viem@2.9.16): + resolution: {integrity: sha512-95r+2CCf4Yz4CWG7UZMALIcGSUfpr9YbZ2HOqmz6gJEBaW9Cf9xUEZj2MXOHZIP+Ri/3CZJtbBEclDot4enZWA==} peerDependencies: '@tanstack/query-core': '>=5.0.0' typescript: '>=5.0.4' @@ -3956,9 +3973,9 @@ packages: optional: true dependencies: eventemitter3: 5.0.1 - mipd: 0.0.5(typescript@5.4.3) - typescript: 5.4.3 - viem: 2.8.18(typescript@5.4.3)(zod@3.22.4) + mipd: 0.0.5(typescript@5.4.5) + typescript: 5.4.5 + viem: 2.9.16(typescript@5.4.5)(zod@3.22.4) zustand: 4.4.1(react@18.2.0) transitivePeerDependencies: - '@types/react' @@ -3978,7 +3995,7 @@ packages: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/jsonrpc-ws-connection': 1.0.14 '@walletconnect/keyvaluestorage': 1.1.1 - '@walletconnect/logger': 2.0.1 + '@walletconnect/logger': 2.1.2 '@walletconnect/relay-api': 1.0.9 '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 @@ -4138,11 +4155,11 @@ packages: - uWebSockets.js dev: true - /@walletconnect/logger@2.0.1: - resolution: {integrity: sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ==} + /@walletconnect/logger@2.1.2: + resolution: {integrity: sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==} dependencies: + '@walletconnect/safe-json': 1.0.2 pino: 7.11.0 - tslib: 1.14.1 dev: true /@walletconnect/modal-core@2.6.2(react@18.2.0): @@ -4207,7 +4224,7 @@ packages: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/logger': 2.0.1 + '@walletconnect/logger': 2.1.2 '@walletconnect/time': 1.0.2 '@walletconnect/types': 2.11.2 '@walletconnect/utils': 2.11.2 @@ -4245,7 +4262,7 @@ packages: '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/keyvaluestorage': 1.1.1 - '@walletconnect/logger': 2.0.1 + '@walletconnect/logger': 2.1.2 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -4271,7 +4288,7 @@ packages: '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 - '@walletconnect/logger': 2.0.1 + '@walletconnect/logger': 2.1.2 '@walletconnect/sign-client': 2.11.2 '@walletconnect/types': 2.11.2 '@walletconnect/utils': 2.11.2 @@ -4343,7 +4360,7 @@ packages: tslib: 1.14.1 dev: true - /abitype@0.10.3(typescript@5.4.3): + /abitype@0.10.3(typescript@5.4.5): resolution: {integrity: sha512-tRN+7XIa7J9xugdbRzFv/95ka5ivR/sRe01eiWvM0HWWjHuigSZEACgKa0sj4wGuekTDtghCx+5Izk/cOi78pQ==} peerDependencies: typescript: '>=5.0.4' @@ -4354,10 +4371,10 @@ packages: zod: optional: true dependencies: - typescript: 5.4.3 + typescript: 5.4.5 dev: false - /abitype@0.9.10(typescript@5.4.3)(zod@3.22.4): + /abitype@0.9.10(typescript@5.4.5)(zod@3.22.4): resolution: {integrity: sha512-FIS7U4n7qwAT58KibwYig5iFG4K61rbhAqaQh/UWj8v1Y8mjX3F8TC9gd8cz9yT1TYel9f8nS5NO5kZp2RW0jQ==} peerDependencies: typescript: '>=5.0.4' @@ -4368,11 +4385,11 @@ packages: zod: optional: true dependencies: - typescript: 5.4.3 + typescript: 5.4.5 zod: 3.22.4 dev: true - /abitype@0.9.8(typescript@5.4.3): + /abitype@0.9.8(typescript@5.4.5): resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} peerDependencies: typescript: '>=5.0.4' @@ -4383,10 +4400,10 @@ packages: zod: optional: true dependencies: - typescript: 5.4.3 + typescript: 5.4.5 dev: true - /abitype@1.0.0(typescript@5.4.3)(zod@3.22.4): + /abitype@1.0.0(typescript@5.4.5)(zod@3.22.4): resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} peerDependencies: typescript: '>=5.0.4' @@ -4397,10 +4414,10 @@ packages: zod: optional: true dependencies: - typescript: 5.4.3 + typescript: 5.4.5 zod: 3.22.4 - /abitype@1.0.2(typescript@5.4.3): + /abitype@1.0.2(typescript@5.4.5): resolution: {integrity: sha512-aFt4k2H+eiAKy/zxtnORa9iIb10BMBeWL18l8v4+QuwYEBXPxxjSB1bFZCzQmKPoj8m7j68K705l3uY+E2gAjg==} peerDependencies: typescript: '>=5.0.4' @@ -4411,7 +4428,7 @@ packages: zod: optional: true dependencies: - typescript: 5.4.3 + typescript: 5.4.5 dev: true /abort-controller@3.0.0: @@ -4556,7 +4573,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 get-intrinsic: 1.2.4 is-string: 1.0.7 @@ -4572,7 +4589,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-errors: 1.3.0 es-object-atoms: 1.0.0 es-shim-unscopables: 1.0.2 @@ -4584,7 +4601,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 /array.prototype.flatmap@1.3.2: @@ -4593,7 +4610,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 dev: false @@ -4604,7 +4621,7 @@ packages: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -4675,63 +4692,63 @@ packages: - debug dev: false - /babel-core@7.0.0-bridge.0(@babel/core@7.24.3): + /babel-core@7.0.0-bridge.0(@babel/core@7.24.4): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 dev: true /babel-plugin-macros@3.1.0: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 cosmiconfig: 7.1.0 resolve: 1.22.8 dev: true - /babel-plugin-polyfill-corejs2@0.4.10(@babel/core@7.24.3): + /babel-plugin-polyfill-corejs2@0.4.10(@babel/core@7.24.4): resolution: {integrity: sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/compat-data': 7.24.1 - '@babel/core': 7.24.3 - '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.3) + '@babel/compat-data': 7.24.4 + '@babel/core': 7.24.4 + '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.4) semver: 6.3.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.3): + /babel-plugin-polyfill-corejs3@0.10.4(@babel/core@7.24.4): resolution: {integrity: sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.4) core-js-compat: 3.36.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.6.1(@babel/core@7.24.3): + /babel-plugin-polyfill-regenerator@0.6.1(@babel/core@7.24.4): resolution: {integrity: sha512-JfTApdE++cgcTWjsiCQlLyFBMbTUft9ja17saCc93lgV33h4tuCVj7tlvu//qpLwaG+3yEz7/KhahGrUMkVq9g==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: - '@babel/core': 7.24.3 - '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/helper-define-polyfill-provider': 0.6.1(@babel/core@7.24.4) transitivePeerDependencies: - supports-color dev: true - /babel-plugin-transform-flow-enums@0.0.2(@babel/core@7.24.3): + /babel-plugin-transform-flow-enums@0.0.2(@babel/core@7.24.4): resolution: {integrity: sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ==} dependencies: - '@babel/plugin-syntax-flow': 7.24.1(@babel/core@7.24.3) + '@babel/plugin-syntax-flow': 7.24.1(@babel/core@7.24.4) transitivePeerDependencies: - '@babel/core' dev: true @@ -4819,8 +4836,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001600 - electron-to-chromium: 1.4.715 + caniuse-lite: 1.0.30001609 + electron-to-chromium: 1.4.735 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true @@ -4960,8 +4977,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001600: - resolution: {integrity: sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==} + /caniuse-lite@1.0.30001609: + resolution: {integrity: sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==} dev: true /capital-case@1.0.4: @@ -5032,8 +5049,8 @@ packages: tslib: 2.6.2 dev: true - /change-case@5.4.3: - resolution: {integrity: sha512-4cdyvorTy/lViZlVzw2O8/hHCLUuHqp4KpSSP3DlauhFCf3LdnfF+p5s0EAhjKsU7bqrMzu7iQArYfoPiHO2nw==} + /change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} dev: true /chardet@0.7.0: @@ -5081,7 +5098,7 @@ packages: engines: {node: '>=12.13.0'} hasBin: true dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.7 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -5092,7 +5109,7 @@ packages: /chromium-edge-launcher@1.0.0: resolution: {integrity: sha512-pgtgjNKZ7i5U++1g1PWv75umkHvhVTDOQIZ+sjeUX9483S7Y6MUvO0lrd7ShGlQlFHMN4SwKTCq/X8hWrbv2KA==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.7 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -5458,7 +5475,7 @@ packages: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 dev: true /dayjs@1.11.10: @@ -5704,8 +5721,8 @@ packages: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true - /electron-to-chromium@1.4.715: - resolution: {integrity: sha512-XzWNH4ZSa9BwVUQSDorPWAUQ5WGuYz7zJUNpNif40zFCiCl20t8zgylmreNmn26h5kiyw2lg7RfTmeMBsDklqg==} + /electron-to-chromium@1.4.735: + resolution: {integrity: sha512-pkYpvwg8VyOTQAeBqZ7jsmpCjko1Qc6We1ZtZCjRyYbT5v4AIUKDy5cQTRotQlSSZmMr8jqpEt6JtOj5k7lR7A==} dev: true /elliptic@6.5.5: @@ -5742,7 +5759,7 @@ packages: /engine.io-client@6.5.3(bufferutil@4.0.8)(utf-8-validate@6.0.3): resolution: {integrity: sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==} dependencies: - '@socket.io/component-emitter': 3.1.0 + '@socket.io/component-emitter': 3.1.1 debug: 4.3.4(supports-color@8.1.1) engine.io-parser: 5.2.2 ws: 8.11.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) @@ -5766,8 +5783,8 @@ packages: strip-ansi: 6.0.1 dev: true - /envinfo@7.11.1: - resolution: {integrity: sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg==} + /envinfo@7.12.0: + resolution: {integrity: sha512-Iw9rQJBGpJRd3rwXm9ft/JiGoAZmLxxJZELYDQoPRZ4USVhkKtIcNBPw6U+/K2mBpaqM25JSV6Yl4Az9vO2wJg==} engines: {node: '>=4'} hasBin: true dev: true @@ -5792,8 +5809,8 @@ packages: escape-html: 1.0.3 dev: true - /es-abstract@1.23.2: - resolution: {integrity: sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==} + /es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 @@ -5943,13 +5960,13 @@ packages: eslint: 8.57.0 dev: false - /eslint-config-turbo@1.13.0(eslint@8.57.0): - resolution: {integrity: sha512-xV13WrEjAJLeo6yqR1YEv5R5WPwNMyw8f4FlK2C4zWMr7e8ZiRg81jajltabEOZdeVboHIQ6gGn+FnSmgdVSSQ==} + /eslint-config-turbo@1.13.2(eslint@8.57.0): + resolution: {integrity: sha512-TzvsMwNJx/P4JYw79iFqbyQApnyT050gW7dBxnNeNVl3pVMnT2rwaFo9Q3Hc49Tp5NANxEwYN9RStF50P/IwGA==} peerDependencies: eslint: '>6.6.0' dependencies: eslint: 8.57.0 - eslint-plugin-turbo: 1.13.0(eslint@8.57.0) + eslint-plugin-turbo: 1.13.2(eslint@8.57.0) dev: false /eslint-import-resolver-node@0.3.9: @@ -5983,7 +6000,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -6001,7 +6018,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -6033,8 +6050,8 @@ packages: '@microsoft/tsdoc-config': 0.16.2 dev: false - /eslint-plugin-turbo@1.13.0(eslint@8.57.0): - resolution: {integrity: sha512-y9YRXMSOc43SijAFFkDnrFpstV2k/w6Qmbr5mO/w7tUGzDWkHc87btLa0e/L2PJxod5bzNwsmzeyj8c/AsMMCQ==} + /eslint-plugin-turbo@1.13.2(eslint@8.57.0): + resolution: {integrity: sha512-QNaihF0hTRjfOBd1SLHrftm8V3pOU35CNS/C0/Z6qY1xxdL1PSv4IctEIldSMX7/A1jOPYwMPO7wYwPXgjgp/g==} peerDependencies: eslint: '>6.6.0' dependencies: @@ -6518,7 +6535,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 functions-have-names: 1.2.3 /functions-have-names@1.2.3: @@ -6864,13 +6881,13 @@ packages: /i18next-browser-languagedetector@7.2.1: resolution: {integrity: sha512-h/pM34bcH6tbz8WgGXcmWauNpQupCGr25XPp9cZwZInR9XHSjIFDYp1SIok7zSPsTOMxdvuLyu86V+g2Kycnfw==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 dev: true /i18next@22.5.1: resolution: {integrity: sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 dev: true /iconv-lite@0.4.24: @@ -7294,7 +7311,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.7 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -7324,7 +7341,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.7 jest-util: 29.7.0 dev: true @@ -7333,7 +7350,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.7 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -7356,7 +7373,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.7 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -7365,7 +7382,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.7 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7380,8 +7397,8 @@ packages: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} dev: false - /joi@17.12.2: - resolution: {integrity: sha512-RonXAIzCiHLc8ss3Ibuz45u28GOsWE1UpfDXLbN/9NKbL4tCJf8TWYVKsoYuuh+sAUt7fsSNpA+r2+TBA6Wjmw==} + /joi@17.12.3: + resolution: {integrity: sha512-2RRziagf555owrm9IRVtdKynOBeITiDpuZqIpgwqXShPncPKNiRQoiGsl/T8SQdq+8ugRzH2LqY67irr2y/d+g==} dependencies: '@hapi/hoek': 9.3.0 '@hapi/topo': 5.1.0 @@ -7420,23 +7437,23 @@ packages: resolution: {integrity: sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==} dev: true - /jscodeshift@0.14.0(@babel/preset-env@7.24.3): + /jscodeshift@0.14.0(@babel/preset-env@7.24.4): resolution: {integrity: sha512-7eCC1knD7bLUPuSCwXsMZUH51O8jIcoVyKtI6P0XM0IVzlGjckPy3FIwQlorzbN0Sg79oK+RlohN32Mqf/lrYA==} hasBin: true peerDependencies: '@babel/preset-env': ^7.1.6 dependencies: - '@babel/core': 7.24.3 - '@babel/parser': 7.24.1 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.3) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.3) - '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.3) - '@babel/preset-env': 7.24.3(@babel/core@7.24.3) - '@babel/preset-flow': 7.24.1(@babel/core@7.24.3) - '@babel/preset-typescript': 7.24.1(@babel/core@7.24.3) - '@babel/register': 7.23.7(@babel/core@7.24.3) - babel-core: 7.0.0-bridge.0(@babel/core@7.24.3) + '@babel/core': 7.24.4 + '@babel/parser': 7.24.4 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.4) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.4) + '@babel/plugin-transform-modules-commonjs': 7.24.1(@babel/core@7.24.4) + '@babel/preset-env': 7.24.4(@babel/core@7.24.4) + '@babel/preset-flow': 7.24.1(@babel/core@7.24.4) + '@babel/preset-typescript': 7.24.1(@babel/core@7.24.4) + '@babel/register': 7.23.7(@babel/core@7.24.4) + babel-core: 7.0.0-bridge.0(@babel/core@7.24.4) chalk: 4.1.2 flow-parser: 0.206.0 graceful-fs: 4.2.11 @@ -7553,11 +7570,6 @@ packages: resolution: {integrity: sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==} dev: true - /keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - dependencies: - json-buffer: 3.0.1 - /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -7794,8 +7806,8 @@ packages: sourcemap-codec: 1.4.8 dev: true - /magic-string@0.30.8: - resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} + /magic-string@0.30.9: + resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -7897,7 +7909,7 @@ packages: resolution: {integrity: sha512-TTzNwRZb2xxyv4J/+yqgtDAP2qVqH3sahsnFu6Xv4SkLqzrivtlnyUbaeTdJ9JjtADJUEjCbgbFgUVafrXdR9Q==} engines: {node: '>=18'} dependencies: - '@babel/core': 7.24.3 + '@babel/core': 7.24.4 hermes-parser: 0.20.1 nullthrows: 1.1.1 transitivePeerDependencies: @@ -7967,7 +7979,7 @@ packages: resolution: {integrity: sha512-y8sUFjVvdeUIINDuW1sejnIjkZfEF+7SmQo0EIpYbWmwh+kq/WMj74yVaBWuqNjirmUp1YNfi3alT67wlbBWBQ==} engines: {node: '>=18'} dependencies: - terser: 5.29.2 + terser: 5.30.3 dev: true /metro-resolver@0.80.8: @@ -7979,7 +7991,7 @@ packages: resolution: {integrity: sha512-2oScjfv6Yb79PelU1+p8SVrCMW9ZjgEiipxq7jMRn8mbbtWzyv3g8Mkwr+KwOoDFI/61hYPUbY8cUnu278+x1g==} engines: {node: '>=18'} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 dev: true /metro-source-map@0.80.8: @@ -8017,8 +8029,8 @@ packages: resolution: {integrity: sha512-sSu8VPL9Od7w98MftCOkQ1UDeySWbsIAS5I54rW22BVpPnI3fQ42srvqMLaJUQPjLehUanq8St6OMBCBgH/UWw==} engines: {node: '>=18'} dependencies: - '@babel/core': 7.24.3 - '@babel/generator': 7.24.1 + '@babel/core': 7.24.4 + '@babel/generator': 7.24.4 '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 nullthrows: 1.1.1 @@ -8030,9 +8042,9 @@ packages: resolution: {integrity: sha512-+4FG3TQk3BTbNqGkFb2uCaxYTfsbuFOCKMMURbwu0ehCP8ZJuTUramkaNZoATS49NSAkRgUltgmBa4YaKZ5mqw==} engines: {node: '>=18'} dependencies: - '@babel/core': 7.24.3 - '@babel/generator': 7.24.1 - '@babel/parser': 7.24.1 + '@babel/core': 7.24.4 + '@babel/generator': 7.24.4 + '@babel/parser': 7.24.4 '@babel/types': 7.24.0 metro: 0.80.8 metro-babel-transformer: 0.80.8 @@ -8055,9 +8067,9 @@ packages: hasBin: true dependencies: '@babel/code-frame': 7.24.2 - '@babel/core': 7.24.3 - '@babel/generator': 7.24.1 - '@babel/parser': 7.24.1 + '@babel/core': 7.24.4 + '@babel/generator': 7.24.4 + '@babel/parser': 7.24.4 '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 '@babel/types': 7.24.0 @@ -8197,7 +8209,7 @@ packages: /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - /mipd@0.0.5(typescript@5.4.3): + /mipd@0.0.5(typescript@5.4.5): resolution: {integrity: sha512-gbKA784D2WKb5H/GtqEv+Ofd1S9Zj+Z/PGDIl1u1QAbswkxD28BQ5bSXQxkeBzPBABg1iDSbiwGG1XqlOxRspA==} peerDependencies: typescript: '>=5.0.4' @@ -8205,8 +8217,8 @@ packages: typescript: optional: true dependencies: - typescript: 5.4.3 - viem: 1.21.4(typescript@5.4.3) + typescript: 5.4.5 + viem: 1.21.4(typescript@5.4.5) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -8240,8 +8252,8 @@ packages: ufo: 1.5.3 dev: true - /mocha@10.3.0: - resolution: {integrity: sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==} + /mocha@10.4.0: + resolution: {integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==} engines: {node: '>= 14.0.0'} hasBin: true dependencies: @@ -8316,7 +8328,7 @@ packages: '@sinonjs/fake-timers': 11.2.2 '@sinonjs/text-encoding': 0.7.2 just-extend: 6.2.0 - path-to-regexp: 6.2.1 + path-to-regexp: 6.2.2 dev: true /no-case@3.0.4: @@ -8487,7 +8499,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 dev: false @@ -8497,7 +8509,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 dev: false /object.values@1.2.0: @@ -8791,8 +8803,8 @@ packages: /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - /path-to-regexp@6.2.1: - resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==} + /path-to-regexp@6.2.2: + resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} dev: true /path-type@4.0.0: @@ -8899,8 +8911,8 @@ packages: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} - /preact@10.20.1: - resolution: {integrity: sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw==} + /preact@10.20.2: + resolution: {integrity: sha512-S1d1ernz3KQ+Y2awUxKakpfOg2CEmJmwOP+6igPx6dgr6pgDvenqYviyokWso2rhHvGtTlWWnJDa7RaPbQerTg==} dev: true /preferred-pm@3.1.3: @@ -9112,12 +9124,12 @@ packages: react-native: optional: true dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 html-parse-stringify: 3.0.1 i18next: 22.5.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-native: 0.73.6(@babel/core@7.24.3)(@babel/preset-env@7.24.3)(react@18.2.0) + react-native: 0.73.6(@babel/core@7.24.4)(@babel/preset-env@7.24.4)(react@18.2.0) dev: true /react-is@16.13.1: @@ -9141,10 +9153,10 @@ packages: escape-string-regexp: 2.0.0 invariant: 2.2.4 react: 18.2.0 - react-native: 0.73.6(@babel/core@7.24.3)(@babel/preset-env@7.24.3)(react@18.2.0) + react-native: 0.73.6(@babel/core@7.24.4)(@babel/preset-env@7.24.4)(react@18.2.0) dev: true - /react-native@0.73.6(@babel/core@7.24.3)(@babel/preset-env@7.24.3)(react@18.2.0): + /react-native@0.73.6(@babel/core@7.24.4)(@babel/preset-env@7.24.4)(react@18.2.0): resolution: {integrity: sha512-oqmZe8D2/VolIzSPZw+oUd6j/bEmeRHwsLn1xLA5wllEYsZ5zNuMsDus235ONOnCRwexqof/J3aztyQswSmiaA==} engines: {node: '>=18'} hasBin: true @@ -9156,8 +9168,8 @@ packages: '@react-native-community/cli-platform-android': 12.3.6 '@react-native-community/cli-platform-ios': 12.3.6 '@react-native/assets-registry': 0.73.1 - '@react-native/codegen': 0.73.3(@babel/preset-env@7.24.3) - '@react-native/community-cli-plugin': 0.73.17(@babel/core@7.24.3)(@babel/preset-env@7.24.3) + '@react-native/codegen': 0.73.3(@babel/preset-env@7.24.4) + '@react-native/community-cli-plugin': 0.73.17(@babel/core@7.24.4)(@babel/preset-env@7.24.4) '@react-native/gradle-plugin': 0.73.4 '@react-native/js-polyfills': 0.73.1 '@react-native/normalize-colors': 0.73.2 @@ -9344,7 +9356,7 @@ packages: /regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: - '@babel/runtime': 7.24.1 + '@babel/runtime': 7.24.4 dev: true /regexp.prototype.flags@1.5.2: @@ -9743,7 +9755,7 @@ packages: resolution: {integrity: sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ==} engines: {node: '>=10.0.0'} dependencies: - '@socket.io/component-emitter': 3.1.0 + '@socket.io/component-emitter': 3.1.1 debug: 4.3.4(supports-color@8.1.1) engine.io-client: 6.5.3(bufferutil@4.0.8)(utf-8-validate@6.0.3) socket.io-parser: 4.2.4 @@ -9757,7 +9769,7 @@ packages: resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} engines: {node: '>=10.0.0'} dependencies: - '@socket.io/component-emitter': 3.1.0 + '@socket.io/component-emitter': 3.1.1 debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -9912,7 +9924,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.2 + es-abstract: 1.23.3 es-object-atoms: 1.0.0 /string.prototype.trimend@1.0.8: @@ -10065,8 +10077,8 @@ packages: engines: {node: '>=8'} dev: true - /terser@5.29.2: - resolution: {integrity: sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw==} + /terser@5.30.3: + resolution: {integrity: sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -10141,13 +10153,13 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.3.0(typescript@5.4.3): + /ts-api-utils@1.3.0(typescript@5.4.5): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.4.3 + typescript: 5.4.5 dev: false /ts-command-line-args@2.5.1: @@ -10160,15 +10172,15 @@ packages: string-format: 2.0.0 dev: true - /ts-essentials@7.0.3(typescript@5.4.3): + /ts-essentials@7.0.3(typescript@5.4.5): resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} peerDependencies: typescript: '>=3.7.0' dependencies: - typescript: 5.4.3 + typescript: 5.4.5 dev: true - /ts-node@10.9.2(@types/node@20.11.30)(typescript@5.4.3): + /ts-node@10.9.2(@types/node@20.12.7)(typescript@5.4.5): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -10183,18 +10195,18 @@ packages: optional: true dependencies: '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 + '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.7 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.3 + typescript: 5.4.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -10230,64 +10242,64 @@ packages: yargs: 17.7.2 dev: true - /turbo-darwin-64@1.13.0: - resolution: {integrity: sha512-ctHeJXtQgBcgxnCXwrJTGiq57HtwF7zWz5NTuSv//5yeU01BtQIt62ArKfjudOhRefWJbX3Z5srn88XTb9hfww==} + /turbo-darwin-64@1.13.2: + resolution: {integrity: sha512-CCSuD8CfmtncpohCuIgq7eAzUas0IwSbHfI8/Q3vKObTdXyN8vAo01gwqXjDGpzG9bTEVedD0GmLbD23dR0MLA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.13.0: - resolution: {integrity: sha512-/Q9/pNFkF9w83tNxwMpgapwLYdQ12p8mpty2YQRoUiS9ClWkcqe136jR0mtuMqzlNlpREOFZaoyIthjt6Sdo0g==} + /turbo-darwin-arm64@1.13.2: + resolution: {integrity: sha512-0HySm06/D2N91rJJ89FbiI/AodmY8B3WDSFTVEpu2+8spUw7hOJ8okWOT0e5iGlyayUP9gr31eOeL3VFZkpfCw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.13.0: - resolution: {integrity: sha512-hgbT7o020BGV4L7Sd8hhFTd5zVKPKxbsr0dPfel/9NkdTmptz2aGZ0Vb2MAa18SY3XaCQpDxmdYuOzvvRpo5ZA==} + /turbo-linux-64@1.13.2: + resolution: {integrity: sha512-7HnibgbqZrjn4lcfIouzlPu8ZHSBtURG4c7Bedu7WJUDeZo+RE1crlrQm8wuwO54S0siYqUqo7GNHxu4IXbioQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.13.0: - resolution: {integrity: sha512-WK01i2wDZARrV+HEs495A3hNeGMwQR5suYk7G+ceqqW7b+dOTlQdvUjnI3sg7wAnZPgjafFs/hoBaZdJjVa/nw==} + /turbo-linux-arm64@1.13.2: + resolution: {integrity: sha512-sUq4dbpk6SNKg/Hkwn256Vj2AEYSQdG96repio894h5/LEfauIK2QYiC/xxAeW3WBMc6BngmvNyURIg7ltrePg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.13.0: - resolution: {integrity: sha512-hJgSZJZwlWHNwLEthaqJqJWGm4NqF5X/I7vE0sPE4i/jeDl8f0n1hcOkgJkJiNXVxhj+qy/9+4dzbPLKT9imaQ==} + /turbo-windows-64@1.13.2: + resolution: {integrity: sha512-DqzhcrciWq3dpzllJR2VVIyOhSlXYCo4mNEWl98DJ3FZ08PEzcI3ceudlH6F0t/nIcfSItK1bDP39cs7YoZHEA==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.13.0: - resolution: {integrity: sha512-L/ErxYoXeq8tmjU/AIGicC9VyBN1zdYw8JlM4yPmMI0pJdY8E4GaYK1IiIazqq7M72lmQhU/WW7fV9FqEktwrw==} + /turbo-windows-arm64@1.13.2: + resolution: {integrity: sha512-WnPMrwfCXxK69CdDfS1/j2DlzcKxSmycgDAqV0XCYpK/812KB0KlvsVAt5PjEbZGXkY88pCJ1BLZHAjF5FcbqA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.13.0: - resolution: {integrity: sha512-r02GtNmkOPcQvUzVE6lg474QVLyU02r3yh3lUGqrFHf5h5ZEjgDGWILsAUqplVqjri1Y/oOkTssks4CObTAaiw==} + /turbo@1.13.2: + resolution: {integrity: sha512-rX/d9f4MgRT3yK6cERPAkfavIxbpBZowDQpgvkYwGMGDQ0Nvw1nc0NVjruE76GrzXQqoxR1UpnmEP54vBARFHQ==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.13.0 - turbo-darwin-arm64: 1.13.0 - turbo-linux-64: 1.13.0 - turbo-linux-arm64: 1.13.0 - turbo-windows-64: 1.13.0 - turbo-windows-arm64: 1.13.0 + turbo-darwin-64: 1.13.2 + turbo-darwin-arm64: 1.13.2 + turbo-linux-64: 1.13.2 + turbo-linux-arm64: 1.13.2 + turbo-windows-64: 1.13.2 + turbo-windows-arm64: 1.13.2 dev: true /type-check@0.4.0: @@ -10325,7 +10337,7 @@ packages: engines: {node: '>=8'} dev: true - /typechain@8.3.2(typescript@5.4.3): + /typechain@8.3.2(typescript@5.4.5): resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} hasBin: true peerDependencies: @@ -10340,8 +10352,8 @@ packages: mkdirp: 1.0.4 prettier: 2.8.8 ts-command-line-args: 2.5.1 - ts-essentials: 7.0.3(typescript@5.4.3) - typescript: 5.4.3 + ts-essentials: 7.0.3(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true @@ -10386,8 +10398,8 @@ packages: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - /typescript@5.4.3: - resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true @@ -10670,7 +10682,7 @@ packages: engines: {node: '>= 0.8'} dev: true - /viem@1.21.4(typescript@5.4.3): + /viem@1.21.4(typescript@5.4.5): resolution: {integrity: sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ==} peerDependencies: typescript: '>=5.0.4' @@ -10683,9 +10695,9 @@ packages: '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.4.3) + abitype: 0.9.8(typescript@5.4.5) isows: 1.0.3(ws@8.13.0) - typescript: 5.4.3 + typescript: 5.4.5 ws: 8.13.0 transitivePeerDependencies: - bufferutil @@ -10693,8 +10705,8 @@ packages: - zod dev: true - /viem@2.8.18(typescript@5.4.3)(zod@3.22.4): - resolution: {integrity: sha512-Kq3kwkKziJ8rQeLkmdbSLheHDnA+tx2EdLKLmQ3N4FVtjKYjBP9tPL1r+fI6KltVUM1TDOhIHOdslDSp57VMMg==} + /viem@2.9.16(typescript@5.4.5)(zod@3.22.4): + resolution: {integrity: sha512-FQRfN4G7uKEUs5DYvVrH/kZmTkwcSDpTBxnadpwG1EEP8nHm57WDpSaGN7PwSPVgJ6rMo5MENT5hgnqaNTlb2w==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -10706,9 +10718,9 @@ packages: '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 1.0.0(typescript@5.4.3)(zod@3.22.4) + abitype: 1.0.0(typescript@5.4.5)(zod@3.22.4) isows: 1.0.3(ws@8.13.0) - typescript: 5.4.3 + typescript: 5.4.5 ws: 8.13.0 transitivePeerDependencies: - bufferutil @@ -10724,8 +10736,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /wagmi@2.5.18(@tanstack/react-query@5.28.14)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.3)(viem@2.8.18): - resolution: {integrity: sha512-V2NTcgI1kZxLZcpW/FaS5KEoc89IkW8b39kBEZLzCFMIiSYqOINoq2N1S5Y9ZD8PYFmBmvFC0KxQ0uNBmWi+pg==} + /wagmi@2.5.19(@tanstack/react-query@5.29.2)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.5)(viem@2.9.16): + resolution: {integrity: sha512-fy6s3qTuXpfrrghhoNXuV92yqOqJI7m/9iLIejHxEYxiddVDTR8BVdkt0BuBQZzoXSAutDkyIlJbtFcpX5dfrQ==} peerDependencies: '@tanstack/react-query': '>=5.0.0' react: '>=18' @@ -10735,13 +10747,13 @@ packages: typescript: optional: true dependencies: - '@tanstack/react-query': 5.28.14(react@18.2.0) - '@wagmi/connectors': 4.1.24(@wagmi/core@2.6.15)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.3)(viem@2.8.18) - '@wagmi/core': 2.6.15(react@18.2.0)(typescript@5.4.3)(viem@2.8.18) + '@tanstack/react-query': 5.29.2(react@18.2.0) + '@wagmi/connectors': 4.1.25(@wagmi/core@2.6.16)(react-native@0.73.6)(react@18.2.0)(typescript@5.4.5)(viem@2.9.16) + '@wagmi/core': 2.6.16(react@18.2.0)(typescript@5.4.5)(viem@2.9.16) react: 18.2.0 - typescript: 5.4.3 + typescript: 5.4.5 use-sync-external-store: 1.2.0(react@18.2.0) - viem: 2.8.18(typescript@5.4.3)(zod@3.22.4) + viem: 2.9.16(typescript@5.4.5)(zod@3.22.4) transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos'