diff --git a/abis/v3/DataRegistryImplementation.json b/abis/v3/DataRegistryImplementation.json index 9c73834..6f14b56 100644 --- a/abis/v3/DataRegistryImplementation.json +++ b/abis/v3/DataRegistryImplementation.json @@ -1,928 +1,820 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "ERC1967InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "ERC1967NonPayable", - "type": "error" - }, - { - "inputs": [], - "name": "EnforcedPause", - "type": "error" - }, - { - "inputs": [], - "name": "ExpectedPause", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [], - "name": "FileUrlAlreadyUsed", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotFileOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "ownerAddress", - "type": "address" - }, - { - "indexed": false, + { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, + { "inputs": [], "name": "AccessControlBadConfirmation", "type": "error" }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "bytes32", "name": "neededRole", "type": "bytes32" } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "target", "type": "address" } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "implementation", "type": "address" } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, + { "inputs": [], "name": "EnforcedPause", "type": "error" }, + { "inputs": [], "name": "ExpectedPause", "type": "error" }, + { "inputs": [], "name": "FailedInnerCall", "type": "error" }, + { "inputs": [], "name": "FileNotFound", "type": "error" }, + { "inputs": [], "name": "FileUrlAlreadyUsed", "type": "error" }, + { "inputs": [], "name": "InvalidInitialization", "type": "error" }, + { + "inputs": [ + { "internalType": "uint256", "name": "schemaId", "type": "uint256" } + ], + "name": "InvalidSchemaId", + "type": "error" + }, + { "inputs": [], "name": "InvalidUrl", "type": "error" }, + { "inputs": [], "name": "NoPermission", "type": "error" }, + { "inputs": [], "name": "NotFileOwner", "type": "error" }, + { "inputs": [], "name": "NotInitializing", "type": "error" }, + { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, + { + "inputs": [ + { "internalType": "bytes32", "name": "slot", "type": "bytes32" } + ], + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fileId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "url", + "type": "string" + } + ], + "name": "FileAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fileId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "schemaId", + "type": "uint256" + } + ], + "name": "FileAddedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fileId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "PermissionGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fileId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proofIndex", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "dlpId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "score", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "proofUrl", + "type": "string" + } + ], + "name": "ProofAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fileId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "refinerId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "url", + "type": "string" + } + ], + "name": "RefinementAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fileId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "refinerId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "url", + "type": "string" + } + ], + "name": "RefinementUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAINTAINER_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REFINEMENT_SERVICE_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "string", "name": "url", "type": "string" }], + "name": "addFile", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" }, + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "addFilePermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "url", "type": "string" }, + { "internalType": "address", "name": "ownerAddress", "type": "address" }, + { + "components": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "internalType": "struct IDataRegistry.Permission[]", + "name": "permissions", + "type": "tuple[]" + } + ], + "name": "addFileWithPermissions", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "url", "type": "string" }, + { "internalType": "address", "name": "ownerAddress", "type": "address" }, + { + "components": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "internalType": "struct IDataRegistry.Permission[]", + "name": "permissions", + "type": "tuple[]" + }, + { "internalType": "uint256", "name": "schemaId", "type": "uint256" } + ], + "name": "addFileWithPermissionsAndSchema", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "url", "type": "string" }, + { "internalType": "uint256", "name": "schemaId", "type": "uint256" } + ], + "name": "addFileWithSchema", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" }, + { + "components": [ + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { + "components": [ + { "internalType": "uint256", "name": "score", "type": "uint256" }, + { "internalType": "uint256", "name": "dlpId", "type": "uint256" }, + { "internalType": "string", - "name": "url", + "name": "metadata", "type": "string" - } - ], - "name": "FileAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "PermissionGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "ownerAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proofIndex", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "dlpId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "score", - "type": "uint256" - }, - { - "indexed": false, + }, + { "internalType": "string", "name": "proofUrl", "type": "string" - } - ], - "name": "ProofAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAINTAINER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UPGRADE_INTERFACE_VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { + }, + { "internalType": "string", - "name": "url", + "name": "instruction", "type": "string" - } - ], - "name": "addFile", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { + } + ], + "internalType": "struct IDataRegistry.ProofData", + "name": "data", + "type": "tuple" + } + ], + "internalType": "struct IDataRegistry.Proof", + "name": "proof", + "type": "tuple" + } + ], + "name": "addProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" }, + { "internalType": "uint256", "name": "refinerId", "type": "uint256" }, + { "internalType": "string", "name": "url", "type": "string" }, + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "addRefinementWithPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataRefinerRegistry", + "outputs": [ + { + "internalType": "contract IDataRefinerRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emitLegacyEvents", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "string", "name": "url", "type": "string" }], + "name": "fileIdByUrl", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "filePermissions", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" }, + { "internalType": "uint256", "name": "index", "type": "uint256" } + ], + "name": "fileProofs", + "outputs": [ + { + "components": [ + { "internalType": "bytes", "name": "signature", "type": "bytes" }, + { + "components": [ + { "internalType": "uint256", "name": "score", "type": "uint256" }, + { "internalType": "uint256", "name": "dlpId", "type": "uint256" }, + { "internalType": "string", - "name": "key", + "name": "metadata", "type": "string" - } - ], - "name": "addFilePermission", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { + }, + { "internalType": "string", - "name": "url", + "name": "proofUrl", "type": "string" - }, - { - "internalType": "address", - "name": "ownerAddress", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "string", - "name": "key", - "type": "string" - } - ], - "internalType": "struct IDataRegistry.Permission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "name": "addFileWithPermissions", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "score", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dlpId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "proofUrl", - "type": "string" - }, - { - "internalType": "string", - "name": "instruction", - "type": "string" - } - ], - "internalType": "struct IDataRegistry.ProofData", - "name": "data", - "type": "tuple" - } - ], - "internalType": "struct IDataRegistry.Proof", - "name": "proof", - "type": "tuple" - } - ], - "name": "addProof", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { + }, + { "internalType": "string", - "name": "url", + "name": "instruction", "type": "string" - } - ], - "name": "fileIdByUrl", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "filePermissions", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "fileProofs", - "outputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "score", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dlpId", - "type": "uint256" - }, - { - "internalType": "string", - "name": "metadata", - "type": "string" - }, - { - "internalType": "string", - "name": "proofUrl", - "type": "string" - }, - { - "internalType": "string", - "name": "instruction", - "type": "string" - } - ], - "internalType": "struct IDataRegistry.ProofData", - "name": "data", - "type": "tuple" - } - ], - "internalType": "struct IDataRegistry.Proof", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fileId", - "type": "uint256" - } - ], - "name": "files", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "ownerAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "url", - "type": "string" - }, - { - "internalType": "uint256", - "name": "addedAtBlock", - "type": "uint256" - } - ], - "internalType": "struct IDataRegistry.FileResponse", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "filesCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "trustedForwarderAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "ownerAddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "multicall", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedForwarder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "trustedForwarderAddress", - "type": "address" - } - ], - "name": "updateTrustedForwarder", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - } -] \ No newline at end of file + } + ], + "internalType": "struct IDataRegistry.ProofData", + "name": "data", + "type": "tuple" + } + ], + "internalType": "struct IDataRegistry.Proof", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" }, + { "internalType": "uint256", "name": "refinerId", "type": "uint256" } + ], + "name": "fileRefinements", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "fileId", "type": "uint256" } + ], + "name": "files", + "outputs": [ + { + "components": [ + { "internalType": "uint256", "name": "id", "type": "uint256" }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { "internalType": "string", "name": "url", "type": "string" }, + { "internalType": "uint256", "name": "schemaId", "type": "uint256" }, + { + "internalType": "uint256", + "name": "addedAtBlock", + "type": "uint256" + } + ], + "internalType": "struct IDataRegistry.FileResponse", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "filesCount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" } + ], + "name": "getRoleAdmin", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "hasRole", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trustedForwarderAddress", + "type": "address" + }, + { "internalType": "address", "name": "ownerAddress", "type": "address" } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "forwarder", "type": "address" } + ], + "name": "isTrustedForwarder", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } + ], + "name": "multicall", + "outputs": [ + { "internalType": "bytes[]", "name": "results", "type": "bytes[]" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "bytes32", "name": "adminRole", "type": "bytes32" } + ], + "name": "setRoleAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } + ], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IDataRefinerRegistry", + "name": "newDataRefinerRegistry", + "type": "address" + } + ], + "name": "updateDataRefinerRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bool", "name": "newEmitLegacyEvents", "type": "bool" } + ], + "name": "updateEmitLegacyEvents", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "trustedForwarderAddress", + "type": "address" + } + ], + "name": "updateTrustedForwarder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/src/lib/contract/v3/data-registry.ts b/src/lib/contract/v3/data-registry.ts index 0202080..9733beb 100644 --- a/src/lib/contract/v3/data-registry.ts +++ b/src/lib/contract/v3/data-registry.ts @@ -4,6 +4,7 @@ import { Epoch, PerformanceDlpEpochUser } from "../../../../generated/schema"; import { FileAdded as FileAddedEvent, + FileAddedV2 as FileAddedV2Event, ProofAdded as FileProofAdded, } from "../../../../generated/DataRegistryImplementationV3/DataRegistryImplementationV3"; import { getOrCreateTotalsForDlpEpochPerformance } from "../../entity/totals"; @@ -36,6 +37,22 @@ export function handleFileAddedV3(event: FileAddedEvent): void { ); } +// Handler for the new FileAddedV2 event that includes schemaId +// This event was added to support schema association with files +export function handleFileAddedV2V3(event: FileAddedV2Event): void { + logDataRegistryEvent("FileAddedV2", event.transaction.hash.toHex()); + + // Create file entity using shared utility with the schemaId from the event + createFileFromEvent( + event.params.fileId.toString(), + event.params.ownerAddress.toHex(), + event.params.url, + event.block, + event.transaction, + event.params.schemaId, + ); +} + export function handleDataRegistryProofAddedV3(event: FileProofAdded): void { logDataRegistryEvent("ProofAdded", event.transaction.hash.toHex()); diff --git a/subgraph.moksha.yaml b/subgraph.moksha.yaml index 6fba950..0065af0 100644 --- a/subgraph.moksha.yaml +++ b/subgraph.moksha.yaml @@ -108,6 +108,8 @@ dataSources: eventHandlers: - event: FileAdded(indexed uint256,indexed address,string) handler: handleFileAddedV3 + - event: FileAddedV2(indexed uint256,indexed address,string,uint256) + handler: handleFileAddedV2V3 - event: ProofAdded(indexed uint256,indexed address,uint256,indexed uint256,uint256,string) handler: handleDataRegistryProofAddedV3 file: ./src/mapping.ts diff --git a/subgraph.vana-moksha.yaml b/subgraph.vana-moksha.yaml index 4aee99f..19c1e40 100644 --- a/subgraph.vana-moksha.yaml +++ b/subgraph.vana-moksha.yaml @@ -108,6 +108,8 @@ dataSources: eventHandlers: - event: FileAdded(indexed uint256,indexed address,string) handler: handleFileAddedV3 + - event: FileAddedV2(indexed uint256,indexed address,string,uint256) + handler: handleFileAddedV2V3 - event: ProofAdded(indexed uint256,indexed address,uint256,indexed uint256,uint256,string) handler: handleDataRegistryProofAddedV3 file: ./src/mapping.ts @@ -339,6 +341,8 @@ dataSources: eventHandlers: - event: FileAdded(indexed uint256,indexed address,string) handler: handleFileAddedV3 + - event: FileAddedV2(indexed uint256,indexed address,string,uint256) + handler: handleFileAddedV2V3 - event: ProofAdded(indexed uint256,indexed address,uint256,indexed uint256,uint256,string) handler: handleDataRegistryProofAddedV3 file: ./src/mapping.ts diff --git a/subgraph.vana.yaml b/subgraph.vana.yaml index a218c08..e5191ff 100644 --- a/subgraph.vana.yaml +++ b/subgraph.vana.yaml @@ -107,6 +107,8 @@ dataSources: eventHandlers: - event: FileAdded(indexed uint256,indexed address,string) handler: handleFileAddedV3 + - event: FileAddedV2(indexed uint256,indexed address,string,uint256) + handler: handleFileAddedV2V3 - event: ProofAdded(indexed uint256,indexed address,uint256,indexed uint256,uint256,string) handler: handleDataRegistryProofAddedV3 file: ./src/mapping.ts