diff --git a/docker-compose.yml b/docker-compose.yml index 904c780..c7bc649 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -73,7 +73,6 @@ services: DATABASE_URL: postgres://ponder:ponder@postgres-calibnet:5432/ponder RPC_URL: ${CALIBNET_RPC_URL:?} PORT: 17827 - PONDER_EXPERIMENTAL_DB: platform # Writes tables to the named schema; auto-creates views in public so the # server queries unqualified table names. The active schema name is # deployment state, not code: set CALIBNET_DATA_SCHEMA in .env and bump it @@ -98,7 +97,6 @@ services: DATABASE_URL: postgres://ponder:ponder@postgres-mainnet:5432/ponder RPC_URL: ${MAINNET_RPC_URL:?} PORT: 17828 - PONDER_EXPERIMENTAL_DB: platform command: ["npm", "start", "--", "--schema", "${MAINNET_DATA_SCHEMA:-data_v1}", "--views-schema", "public"] restart: unless-stopped volumes: diff --git a/indexer/abis/PoRepMarket.ts b/indexer/abis/PoRepMarket.ts index 9100744..098c17e 100644 --- a/indexer/abis/PoRepMarket.ts +++ b/indexer/abis/PoRepMarket.ts @@ -1,1838 +1,1773 @@ -// PoRep Market (fidlabs/porep-market) mainnet V1 ABI. -// Source: fidlabs/porep-market@8a20c1a (branch v1) abis/PoRepMarket.json +// PoRep Market (fidlabs/porep-market) mainnet V1 ABI, from the verified deployed implementation +// 0x5A8934817B39391E9e02a07e333d3C3ac9251e0B behind proxy 0xBD669aBd1188F52e82aF114E17aCE2842DCc0Eb4. +// The repo ABI at fidlabs/porep-market@8a20c1a adds a manifestHash to DealProposalCreated that the +// deployed contract does not emit, so regenerate from the deployment, not the repo. export const PoRepMarketAbi = [ { - "type": "constructor", "inputs": [], - "stateMutability": "nonpayable" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", "inputs": [], - "outputs": [ + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ { - "name": "", - "type": "bytes32", - "internalType": "bytes32" + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" } ], - "stateMutability": "view" + "name": "AccessControlUnauthorizedAccount", + "type": "error" }, { - "type": "function", - "name": "EPOCHS_IN_MONTH", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "uint256", - "internalType": "uint256" + "internalType": "address", + "name": "target", + "type": "address" } ], - "stateMutability": "view" + "name": "AddressEmptyCode", + "type": "error" }, { - "type": "function", - "name": "MAX_DEAL_DURATION_DAYS", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "uint32", - "internalType": "uint32" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" } ], - "stateMutability": "view" + "name": "CallerIsNotValidator", + "type": "error" }, { - "type": "function", - "name": "MIN_DEAL_DURATION_DAYS", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "uint32", - "internalType": "uint32" + "internalType": "uint256", + "name": "padding", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPadding", + "type": "uint256" } ], - "stateMutability": "view" + "name": "DealCompletionPaddingTooHigh", + "type": "error" }, { - "type": "function", - "name": "SECTOR_SIZE", "inputs": [], - "outputs": [ + "name": "DealDoesNotExist", + "type": "error" + }, + { + "inputs": [ { - "name": "", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expirationBlock", + "type": "uint256" } ], - "stateMutability": "view" + "name": "DealNotExpiredYet", + "type": "error" }, { - "type": "function", - "name": "UPGRADER_ROLE", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "bytes32", - "internalType": "bytes32" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "enum PoRepTypes.DealState", + "name": "currentState", + "type": "uint8" + }, + { + "internalType": "enum PoRepTypes.DealState", + "name": "expectedState", + "type": "uint8" } ], - "stateMutability": "view" + "name": "DealNotInExpectedState", + "type": "error" }, { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "string", - "internalType": "string" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" } ], - "stateMutability": "view" + "name": "DealNotRejectable", + "type": "error" }, { - "type": "function", - "name": "acceptDeal", "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyManifestLocation", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAllocationSizeForDealCompletion", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidClientSmartContractAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDealDuration", + "type": "error" }, { - "type": "function", - "name": "completeDeal", "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint256", + "name": "totalPerMonth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epochsInMonth", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "InvalidDealPricePerSectorPerMonth", + "type": "error" }, { - "type": "function", - "name": "getClientSmartContract", "inputs": [], - "outputs": [ + "name": "InvalidDealProposalExpiration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDealSize", + "type": "error" + }, + { + "inputs": [ { - "name": "", - "type": "address", - "internalType": "address" + "internalType": "uint8", + "name": "value", + "type": "uint8" } ], - "stateMutability": "view" + "name": "InvalidIndexingPct", + "type": "error" }, { - "type": "function", - "name": "getCompletedDeals", "inputs": [], - "outputs": [ + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidOrganizationAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRailId", + "type": "error" + }, + { + "inputs": [ { - "name": "completedDeals", - "type": "tuple[]", - "internalType": "struct PoRepTypes.DealProposal[]", - "components": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "client", - "type": "address", - "internalType": "address" - }, - { - "name": "provider", - "type": "uint64", - "internalType": "CommonTypes.FilActorId" - }, - { - "name": "requirements", - "type": "tuple", - "internalType": "struct SLITypes.SLIThresholds", - "components": [ - { - "name": "retrievabilityBps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "bandwidthMbps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "latencyMs", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "indexingPct", - "type": "uint8", - "internalType": "uint8" - } - ] - }, - { - "name": "terms", - "type": "tuple", - "internalType": "struct SLITypes.DealTerms", - "components": [ - { - "name": "dealSizeBytes", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pricePerSectorPerMonth", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "durationDays", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "validator", - "type": "address", - "internalType": "address" - }, - { - "name": "state", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" - }, - { - "name": "railId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proposedAtBlock", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "manifestLocation", - "type": "string", - "internalType": "string" - }, - { - "name": "manifestHash", - "type": "bytes32", - "internalType": "bytes32" - } - ] + "internalType": "uint16", + "name": "value", + "type": "uint16" } ], - "stateMutability": "view" + "name": "InvalidRetrievabilityBps", + "type": "error" }, { - "type": "function", - "name": "getDealCompletionPadding", "inputs": [], - "outputs": [ + "name": "NoProviderFoundForDeal", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "NotTheClientAddress", + "type": "error" + }, + { + "inputs": [ { - "name": "", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rejector", + "type": "address" } ], - "stateMutability": "view" + "name": "NotTheClientOrStorageProviderOrAdmin", + "type": "error" }, { - "type": "function", - "name": "getDealProposal", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" + }, + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" } ], - "outputs": [ + "name": "NotTheControllingAddress", + "type": "error" + }, + { + "inputs": [ { - "name": "", - "type": "tuple", - "internalType": "struct PoRepTypes.DealProposal", - "components": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "client", - "type": "address", - "internalType": "address" - }, - { - "name": "provider", - "type": "uint64", - "internalType": "CommonTypes.FilActorId" - }, - { - "name": "requirements", - "type": "tuple", - "internalType": "struct SLITypes.SLIThresholds", - "components": [ - { - "name": "retrievabilityBps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "bandwidthMbps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "latencyMs", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "indexingPct", - "type": "uint8", - "internalType": "uint8" - } - ] - }, - { - "name": "terms", - "type": "tuple", - "internalType": "struct SLITypes.DealTerms", - "components": [ - { - "name": "dealSizeBytes", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pricePerSectorPerMonth", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "durationDays", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "validator", - "type": "address", - "internalType": "address" - }, - { - "name": "state", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" - }, - { - "name": "railId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proposedAtBlock", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "manifestLocation", - "type": "string", - "internalType": "string" - }, - { - "name": "manifestHash", - "type": "bytes32", - "internalType": "bytes32" - } - ] + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" } ], - "stateMutability": "view" + "name": "NotTheDealValidator", + "type": "error" }, { - "type": "function", - "name": "getDealProposalExpiration", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" } ], - "stateMutability": "view" + "name": "NotTheRegisteredValidator", + "type": "error" }, { - "type": "function", - "name": "getDeals", "inputs": [], - "outputs": [ + "name": "RailIdAlreadySet", + "type": "error" + }, + { + "inputs": [], + "name": "TooLongManifestLocation", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" + }, + { + "inputs": [ { - "name": "deals", - "type": "tuple[]", - "internalType": "struct PoRepTypes.DealProposal[]", - "components": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "client", - "type": "address", - "internalType": "address" - }, - { - "name": "provider", - "type": "uint64", - "internalType": "CommonTypes.FilActorId" - }, - { - "name": "requirements", - "type": "tuple", - "internalType": "struct SLITypes.SLIThresholds", - "components": [ - { - "name": "retrievabilityBps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "bandwidthMbps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "latencyMs", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "indexingPct", - "type": "uint8", - "internalType": "uint8" - } - ] - }, - { - "name": "terms", - "type": "tuple", - "internalType": "struct SLITypes.DealTerms", - "components": [ - { - "name": "dealSizeBytes", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pricePerSectorPerMonth", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "durationDays", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "validator", - "type": "address", - "internalType": "address" - }, - { - "name": "state", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" - }, - { - "name": "railId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proposedAtBlock", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "manifestLocation", - "type": "string", - "internalType": "string" - }, - { - "name": "manifestHash", - "type": "bytes32", - "internalType": "bytes32" - } - ] + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" } ], - "stateMutability": "view" + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" }, { - "type": "function", - "name": "getDealsForOrganizationByState", "inputs": [ { - "name": "organization", - "type": "address", - "internalType": "address" - }, - { - "name": "state", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" } ], - "outputs": [ + "name": "ValidatorAlreadySet", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "name": "deals", - "type": "tuple[]", - "internalType": "struct PoRepTypes.DealProposal[]", - "components": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "client", - "type": "address", - "internalType": "address" - }, - { - "name": "provider", - "type": "uint64", - "internalType": "CommonTypes.FilActorId" - }, - { - "name": "requirements", - "type": "tuple", - "internalType": "struct SLITypes.SLIThresholds", - "components": [ - { - "name": "retrievabilityBps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "bandwidthMbps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "latencyMs", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "indexingPct", - "type": "uint8", - "internalType": "uint8" - } - ] - }, - { - "name": "terms", - "type": "tuple", - "internalType": "struct SLITypes.DealTerms", - "components": [ - { - "name": "dealSizeBytes", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pricePerSectorPerMonth", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "durationDays", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "validator", - "type": "address", - "internalType": "address" - }, - { - "name": "state", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" - }, - { - "name": "railId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "proposedAtBlock", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "manifestLocation", - "type": "string", - "internalType": "string" - }, - { - "name": "manifestHash", - "type": "bytes32", - "internalType": "bytes32" - } - ] + "indexed": true, + "internalType": "address", + "name": "clientSmartContract", + "type": "address" } ], - "stateMutability": "view" + "name": "ClientSmartContractUpdated", + "type": "event" }, { - "type": "function", - "name": "getManifestHash", + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ + "type": "uint256" + }, { - "name": "manifestHash", - "type": "bytes32", - "internalType": "bytes32" + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" } ], - "stateMutability": "view" + "name": "DealAccepted", + "type": "event" }, { - "type": "function", - "name": "getManifestLocation", + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ + "type": "uint256" + }, { - "name": "manifestLocation", - "type": "string", - "internalType": "string" + "indexed": true, + "internalType": "address", + "name": "client", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "actualSizeBytes", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" } ], - "stateMutability": "view" + "name": "DealCompleted", + "type": "event" }, { - "type": "function", - "name": "getRoleAdmin", + "anonymous": false, "inputs": [ { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ + "indexed": true, + "internalType": "uint256", + "name": "oldPadding", + "type": "uint256" + }, { - "name": "", - "type": "bytes32", - "internalType": "bytes32" + "indexed": true, + "internalType": "uint256", + "name": "newPadding", + "type": "uint256" } ], - "stateMutability": "view" + "name": "DealCompletionPaddingUpdated", + "type": "event" }, { - "type": "function", - "name": "getSPRegistryContract", - "inputs": [], - "outputs": [ + "anonymous": false, + "inputs": [ { - "name": "", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "client", + "type": "address" + }, + { + "indexed": true, + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "retrievabilityBps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "bandwidthMbps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "latencyMs", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "indexingPct", + "type": "uint8" + } + ], + "indexed": false, + "internalType": "struct SLITypes.SLIThresholds", + "name": "requirements", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "string", + "name": "manifestLocation", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalDealSize", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposedAtBlock", + "type": "uint256" } ], - "stateMutability": "view" + "name": "DealProposalCreated", + "type": "event" }, { - "type": "function", - "name": "getValidatorFactoryContract", - "inputs": [], - "outputs": [ + "anonymous": false, + "inputs": [ { - "name": "", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "uint256", + "name": "newDealProposalExpiration", + "type": "uint256" } ], - "stateMutability": "view" + "name": "DealProposalExpirationUpdated", + "type": "event" }, { - "type": "function", - "name": "grantRole", + "anonymous": false, "inputs": [ { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" + "indexed": true, + "internalType": "uint256", + "name": "dealId", + "type": "uint256" }, { - "name": "account", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "uint256", + "name": "expiredAtBlock", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "DealProposalExpired", + "type": "event" }, { - "type": "function", - "name": "hasRole", + "anonymous": false, "inputs": [ { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" + "indexed": true, + "internalType": "uint256", + "name": "dealId", + "type": "uint256" }, { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" + "indexed": true, + "internalType": "address", + "name": "rejector", + "type": "address" } ], - "stateMutability": "view" + "name": "DealRejected", + "type": "event" }, { - "type": "function", - "name": "initialize", + "anonymous": false, "inputs": [ { - "name": "_admin", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "uint256", + "name": "dealId", + "type": "uint256" }, { - "name": "_validatorFactory", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "address", + "name": "terminator", + "type": "address" }, { - "name": "_spRegistry", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "uint256", + "name": "endEpoch", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "DealTerminated", + "type": "event" }, { - "type": "function", - "name": "proposeDeal", + "anonymous": false, "inputs": [ { - "name": "requirements", - "type": "tuple", - "internalType": "struct SLITypes.SLIThresholds", - "components": [ - { - "name": "retrievabilityBps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "bandwidthMbps", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "latencyMs", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "indexingPct", - "type": "uint8", - "internalType": "uint8" - } - ] - }, - { - "name": "terms", - "type": "tuple", - "internalType": "struct SLITypes.DealTerms", - "components": [ - { - "name": "dealSizeBytes", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pricePerSectorPerMonth", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "durationDays", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "manifestInfo", - "type": "tuple", - "internalType": "struct PoRepTypes.ManifestStruct", - "components": [ - { - "name": "location", - "type": "string", - "internalType": "string" - }, - { - "name": "hash", - "type": "bytes32", - "internalType": "bytes32" - } - ] + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "Initialized", + "type": "event" }, { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ + "anonymous": false, + "inputs": [ { - "name": "", - "type": "bytes32", - "internalType": "bytes32" + "indexed": true, + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "oldManifestLocation", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "newManifestLocation", + "type": "string" } ], - "stateMutability": "view" + "name": "ManifestLocationUpdated", + "type": "event" }, { - "type": "function", - "name": "rejectAcceptedDeal", + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "railId", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "RailIdUpdated", + "type": "event" }, { - "type": "function", - "name": "rejectDeal", + "anonymous": false, "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "RoleAdminChanged", + "type": "event" }, { - "type": "function", - "name": "rejectExpiredDeal", + "anonymous": false, "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "RoleGranted", + "type": "event" }, { - "type": "function", - "name": "renounceRole", + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "bytes32", "name": "role", - "type": "bytes32", - "internalType": "bytes32" + "type": "bytes32" }, { - "name": "callerConfirmation", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" }, { - "type": "function", - "name": "revokeRole", + "anonymous": false, "inputs": [ { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" + "indexed": true, + "internalType": "uint256", + "name": "dealId", + "type": "uint256" }, { - "name": "account", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "ValidatorUpdated", + "type": "event" }, { - "type": "function", - "name": "setClientSmartContract", - "inputs": [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - "name": "_clientSmartContract", - "type": "address", - "internalType": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "setDealCompletionPadding", - "inputs": [ + "inputs": [], + "name": "EPOCHS_IN_MONTH", + "outputs": [ { - "name": "padding", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "setNewDealProposalExpiration", - "inputs": [ + "inputs": [], + "name": "MAX_DEAL_DURATION_DAYS", + "outputs": [ { - "name": "newDealProposalExpiration", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], + "inputs": [], + "name": "MIN_DEAL_DURATION_DAYS", "outputs": [ { + "internalType": "uint32", "name": "", - "type": "bool", - "internalType": "bool" + "type": "uint32" } ], - "stateMutability": "view" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "terminateDeal", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "terminator", - "type": "address", - "internalType": "address" - }, + "inputs": [], + "name": "SECTOR_SIZE", + "outputs": [ { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "updateManifestLocation", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ { - "name": "newManifestLocation", - "type": "string", - "internalType": "string" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "updateRailId", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [ { - "name": "railId", - "type": "uint256", - "internalType": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "updateValidator", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" } ], + "name": "acceptDeal", "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "function", - "name": "upgradeToAndCall", "inputs": [ { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" } ], + "name": "completeDeal", "outputs": [], - "stateMutability": "payable" + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "event", - "name": "ClientSmartContractUpdated", - "inputs": [ + "inputs": [], + "name": "getClientSmartContract", + "outputs": [ { - "name": "clientSmartContract", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "address", + "name": "", + "type": "address" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "DealAccepted", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, + "inputs": [], + "name": "getCompletedDeals", + "outputs": [ { - "name": "provider", - "type": "uint64", - "indexed": true, - "internalType": "CommonTypes.FilActorId" + "components": [ + { + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "client", + "type": "address" + }, + { + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "retrievabilityBps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "bandwidthMbps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "latencyMs", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "indexingPct", + "type": "uint8" + } + ], + "internalType": "struct SLITypes.SLIThresholds", + "name": "requirements", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "dealSizeBytes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pricePerSectorPerMonth", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "durationDays", + "type": "uint32" + } + ], + "internalType": "struct SLITypes.DealTerms", + "name": "terms", + "type": "tuple" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "internalType": "enum PoRepTypes.DealState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "railId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposedAtBlock", + "type": "uint256" + }, + { + "internalType": "string", + "name": "manifestLocation", + "type": "string" + } + ], + "internalType": "struct PoRepTypes.DealProposal[]", + "name": "completedDeals", + "type": "tuple[]" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "DealCompleted", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "client", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "actualSizeBytes", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, + "inputs": [], + "name": "getDealCompletionPadding", + "outputs": [ { - "name": "provider", - "type": "uint64", - "indexed": true, - "internalType": "CommonTypes.FilActorId" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "DealCompletionPaddingUpdated", "inputs": [ { - "name": "oldPadding", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "newPadding", - "type": "uint256", - "indexed": true, - "internalType": "uint256" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" } ], - "anonymous": false - }, - { - "type": "event", - "name": "DealProposalCreated", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "client", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "provider", - "type": "uint64", - "indexed": true, - "internalType": "CommonTypes.FilActorId" - }, + "name": "getDealProposal", + "outputs": [ { - "name": "requirements", - "type": "tuple", - "indexed": false, - "internalType": "struct SLITypes.SLIThresholds", "components": [ { - "name": "retrievabilityBps", - "type": "uint16", - "internalType": "uint16" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "client", + "type": "address" + }, + { + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "retrievabilityBps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "bandwidthMbps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "latencyMs", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "indexingPct", + "type": "uint8" + } + ], + "internalType": "struct SLITypes.SLIThresholds", + "name": "requirements", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "dealSizeBytes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pricePerSectorPerMonth", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "durationDays", + "type": "uint32" + } + ], + "internalType": "struct SLITypes.DealTerms", + "name": "terms", + "type": "tuple" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" }, { - "name": "bandwidthMbps", - "type": "uint16", - "internalType": "uint16" + "internalType": "enum PoRepTypes.DealState", + "name": "state", + "type": "uint8" }, { - "name": "latencyMs", - "type": "uint16", - "internalType": "uint16" + "internalType": "uint256", + "name": "railId", + "type": "uint256" }, { - "name": "indexingPct", - "type": "uint8", - "internalType": "uint8" + "internalType": "uint256", + "name": "proposedAtBlock", + "type": "uint256" + }, + { + "internalType": "string", + "name": "manifestLocation", + "type": "string" } - ] - }, - { - "name": "manifestLocation", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "manifestHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "totalDealSize", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "proposedAtBlock", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DealProposalExpirationUpdated", - "inputs": [ - { - "name": "newDealProposalExpiration", - "type": "uint256", - "indexed": true, - "internalType": "uint256" + ], + "internalType": "struct PoRepTypes.DealProposal", + "name": "", + "type": "tuple" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "DealProposalExpired", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, + "inputs": [], + "name": "getDealProposalExpiration", + "outputs": [ { - "name": "expiredAtBlock", - "type": "uint256", - "indexed": true, - "internalType": "uint256" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "DealRejected", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, + "inputs": [], + "name": "getDeals", + "outputs": [ { - "name": "rejector", - "type": "address", - "indexed": true, - "internalType": "address" + "components": [ + { + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "client", + "type": "address" + }, + { + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "retrievabilityBps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "bandwidthMbps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "latencyMs", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "indexingPct", + "type": "uint8" + } + ], + "internalType": "struct SLITypes.SLIThresholds", + "name": "requirements", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "dealSizeBytes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pricePerSectorPerMonth", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "durationDays", + "type": "uint32" + } + ], + "internalType": "struct SLITypes.DealTerms", + "name": "terms", + "type": "tuple" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "internalType": "enum PoRepTypes.DealState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "railId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposedAtBlock", + "type": "uint256" + }, + { + "internalType": "string", + "name": "manifestLocation", + "type": "string" + } + ], + "internalType": "struct PoRepTypes.DealProposal[]", + "name": "deals", + "type": "tuple[]" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "DealTerminated", "inputs": [ { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "terminator", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "address", + "name": "organization", + "type": "address" }, { - "name": "endEpoch", - "type": "uint256", - "indexed": true, - "internalType": "uint256" + "internalType": "enum PoRepTypes.DealState", + "name": "state", + "type": "uint8" } ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ + "name": "getDealsForOrganizationByState", + "outputs": [ { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" + "components": [ + { + "internalType": "uint256", + "name": "dealId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "client", + "type": "address" + }, + { + "internalType": "CommonTypes.FilActorId", + "name": "provider", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "retrievabilityBps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "bandwidthMbps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "latencyMs", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "indexingPct", + "type": "uint8" + } + ], + "internalType": "struct SLITypes.SLIThresholds", + "name": "requirements", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "dealSizeBytes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pricePerSectorPerMonth", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "durationDays", + "type": "uint32" + } + ], + "internalType": "struct SLITypes.DealTerms", + "name": "terms", + "type": "tuple" + }, + { + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "internalType": "enum PoRepTypes.DealState", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "railId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposedAtBlock", + "type": "uint256" + }, + { + "internalType": "string", + "name": "manifestLocation", + "type": "string" + } + ], + "internalType": "struct PoRepTypes.DealProposal[]", + "name": "deals", + "type": "tuple[]" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "ManifestLocationUpdated", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "oldManifestLocation", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "newManifestLocation", - "type": "string", - "indexed": false, - "internalType": "string" + "type": "uint256" } ], - "anonymous": false - }, - { - "type": "event", - "name": "RailIdUpdated", - "inputs": [ - { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, + "name": "getManifestLocation", + "outputs": [ { - "name": "railId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" + "internalType": "string", + "name": "manifestLocation", + "type": "string" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "RoleAdminChanged", "inputs": [ { + "internalType": "bytes32", "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" + "type": "bytes32" } ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, + "name": "getRoleAdmin", + "outputs": [ { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, + { + "inputs": [], + "name": "getSPRegistryContract", + "outputs": [ { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "address", + "name": "", + "type": "address" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "Upgraded", - "inputs": [ + "inputs": [], + "name": "getValidatorFactoryContract", + "outputs": [ { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "address", + "name": "", + "type": "address" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "ValidatorUpdated", "inputs": [ { - "name": "dealId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "name": "validator", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "address", + "name": "account", + "type": "address" } ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessControlBadConfirmation", - "inputs": [] + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "AccessControlUnauthorizedAccount", "inputs": [ { - "name": "account", - "type": "address", - "internalType": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "name": "neededRole", - "type": "bytes32", - "internalType": "bytes32" + "internalType": "address", + "name": "account", + "type": "address" } - ] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ + ], + "name": "hasRole", + "outputs": [ { - "name": "target", - "type": "address", - "internalType": "address" + "internalType": "bool", + "name": "", + "type": "bool" } - ] + ], + "stateMutability": "view", + "type": "function" }, { - "type": "error", - "name": "CallerIsNotValidator", "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "internalType": "address", + "name": "_admin", + "type": "address" }, { - "name": "caller", - "type": "address", - "internalType": "address" + "internalType": "address", + "name": "_validatorFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_spRegistry", + "type": "address" } - ] + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "DealCompletionPaddingTooHigh", "inputs": [ { - "name": "padding", - "type": "uint256", - "internalType": "uint256" + "components": [ + { + "internalType": "uint16", + "name": "retrievabilityBps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "bandwidthMbps", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "latencyMs", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "indexingPct", + "type": "uint8" + } + ], + "internalType": "struct SLITypes.SLIThresholds", + "name": "requirements", + "type": "tuple" }, { - "name": "maxPadding", - "type": "uint256", - "internalType": "uint256" + "components": [ + { + "internalType": "uint256", + "name": "dealSizeBytes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pricePerSectorPerMonth", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "durationDays", + "type": "uint32" + } + ], + "internalType": "struct SLITypes.DealTerms", + "name": "terms", + "type": "tuple" + }, + { + "internalType": "string", + "name": "manifestLocation", + "type": "string" } - ] + ], + "name": "proposeDeal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "DealDoesNotExist", - "inputs": [] + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" }, { - "type": "error", - "name": "DealNotExpiredYet", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentBlock", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "expirationBlock", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" } - ] + ], + "name": "rejectAcceptedDeal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "DealNotInExpectedState", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentState", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" - }, - { - "name": "expectedState", - "type": "uint8", - "internalType": "enum PoRepTypes.DealState" + "type": "uint256" } - ] + ], + "name": "rejectDeal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "DealNotRejectable", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" } - ] + ], + "name": "rejectExpiredDeal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "ERC1967InvalidImplementation", "inputs": [ { - "name": "implementation", - "type": "address", - "internalType": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "EmptyManifestHash", - "inputs": [] - }, - { - "type": "error", - "name": "EmptyManifestLocation", - "inputs": [] - }, - { - "type": "error", - "name": "FailedCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAllocationSizeForDealCompletion", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidClientSmartContractAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidDealDuration", - "inputs": [] + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "InvalidDealPricePerSectorPerMonth", "inputs": [ { - "name": "totalPerMonth", - "type": "uint256", - "internalType": "uint256" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "name": "epochsInMonth", - "type": "uint256", - "internalType": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } - ] - }, - { - "type": "error", - "name": "InvalidDealProposalExpiration", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidDealSize", - "inputs": [] + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "InvalidIndexingPct", "inputs": [ { - "name": "value", - "type": "uint8", - "internalType": "uint8" + "internalType": "address", + "name": "_clientSmartContract", + "type": "address" } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidOrganizationAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidRailId", - "inputs": [] + ], + "name": "setClientSmartContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "InvalidRetrievabilityBps", "inputs": [ { - "name": "value", - "type": "uint16", - "internalType": "uint16" + "internalType": "uint256", + "name": "padding", + "type": "uint256" } - ] - }, - { - "type": "error", - "name": "NoProviderFoundForDeal", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] + ], + "name": "setDealCompletionPadding", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "NotTheClientAddress", - "inputs": [] + "inputs": [ + { + "internalType": "uint256", + "name": "newDealProposalExpiration", + "type": "uint256" + } + ], + "name": "setNewDealProposalExpiration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "NotTheClientOrStorageProviderOrAdmin", "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" - }, + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ { - "name": "rejector", - "type": "address", - "internalType": "address" + "internalType": "bool", + "name": "", + "type": "bool" } - ] + ], + "stateMutability": "view", + "type": "function" }, { - "type": "error", - "name": "NotTheControllingAddress", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" }, { - "name": "msgSender", - "type": "address", - "internalType": "address" + "internalType": "address", + "name": "terminator", + "type": "address" }, { - "name": "provider", - "type": "uint64", - "internalType": "CommonTypes.FilActorId" + "internalType": "uint256", + "name": "endEpoch", + "type": "uint256" } - ] + ], + "name": "terminateDeal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "NotTheDealValidator", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" }, { - "name": "validator", - "type": "address", - "internalType": "address" + "internalType": "string", + "name": "newManifestLocation", + "type": "string" } - ] + ], + "name": "updateManifestLocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "NotTheRegisteredValidator", "inputs": [ { + "internalType": "uint256", "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "type": "uint256" }, { - "name": "validator", - "type": "address", - "internalType": "address" + "internalType": "uint256", + "name": "railId", + "type": "uint256" } - ] - }, - { - "type": "error", - "name": "RailIdAlreadySet", - "inputs": [] - }, - { - "type": "error", - "name": "TooLongManifestLocation", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] + ], + "name": "updateRailId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", "inputs": [ { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" + "internalType": "uint256", + "name": "dealId", + "type": "uint256" } - ] + ], + "name": "updateValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "error", - "name": "ValidatorAlreadySet", "inputs": [ { - "name": "dealId", - "type": "uint256", - "internalType": "uint256" + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } - ] - }, - { - "type": "error", - "name": "ValidatorNotSet", - "inputs": [] + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" } ] as const diff --git a/indexer/package-lock.json b/indexer/package-lock.json index b96b1fd..cef3dcd 100644 --- a/indexer/package-lock.json +++ b/indexer/package-lock.json @@ -8,7 +8,7 @@ "dependencies": { "hono": "^4.13", "multiformats": "^14", - "ponder": "npm:@rvagg/ponder@0.17.4-filecoin.1", + "ponder": "npm:@rvagg/ponder@0.17.4-filecoin.2", "viem": "^2.56" }, "devDependencies": { @@ -3044,9 +3044,9 @@ }, "node_modules/ponder": { "name": "@rvagg/ponder", - "version": "0.17.4-filecoin.1", - "resolved": "https://registry.npmjs.org/@rvagg/ponder/-/ponder-0.17.4-filecoin.1.tgz", - "integrity": "sha512-Za+MZkZINaC5JBtAHvCWetXdXhfwDBGHOACOGfqvspIJEzg5gcAo5Syrhcu03i56Pe5E7oYj927KLXa+NXJPVA==", + "version": "0.17.4-filecoin.2", + "resolved": "https://registry.npmjs.org/@rvagg/ponder/-/ponder-0.17.4-filecoin.2.tgz", + "integrity": "sha512-RD2/3A1pomxsCs2XxRmdTtlyYUtT45qNpLmF5yE0wut6/gxLuI0rjxQ4AJkYuveJNc3oZMTSuwH7LuEMJezhJg==", "license": "MIT", "dependencies": { "@babel/code-frame": "^7.23.4", diff --git a/indexer/package.json b/indexer/package.json index 1d6b51f..b1b119e 100644 --- a/indexer/package.json +++ b/indexer/package.json @@ -19,7 +19,7 @@ "dependencies": { "hono": "^4.13", "multiformats": "^14", - "ponder": "npm:@rvagg/ponder@0.17.4-filecoin.1", + "ponder": "npm:@rvagg/ponder@0.17.4-filecoin.2", "viem": "^2.56" }, "overrides": { diff --git a/indexer/ponder.config.ts b/indexer/ponder.config.ts index 0f62d70..1e1c83c 100644 --- a/indexer/ponder.config.ts +++ b/indexer/ponder.config.ts @@ -44,6 +44,8 @@ export default createConfig({ id: network.CHAIN_ID, rpc: rpcTransport(readEnv("RPC_URL", network.RPC_URL, strictEnv)), pollingInterval: 30_000, + // Lotus caps eth_getLogs at 2880 blocks per request and rejects larger ranges outright. + ethGetLogsBlockRange: 2880, }, }, accounts: { diff --git a/indexer/src/porep.ts b/indexer/src/porep.ts index ae4aad4..98c253e 100644 --- a/indexer/src/porep.ts +++ b/indexer/src/porep.ts @@ -37,7 +37,7 @@ function sliColumns(t: { ponder.on("PoRepMarket:DealProposalCreated", async ({ event, context }) => { await recordTx(event, context) - const { dealId, client, provider, requirements, manifestLocation, manifestHash, totalDealSize, proposedAtBlock } = + const { dealId, client, provider, requirements, manifestLocation, totalDealSize, proposedAtBlock } = event.args await context.db.insert(porepDealProposalCreated).values({ id: eventId(event), @@ -46,7 +46,6 @@ ponder.on("PoRepMarket:DealProposalCreated", async ({ event, context }) => { providerId: provider, ...sliColumns(requirements), manifestLocation, - manifestHash, totalDealSize, proposedAtBlock, ...eventMeta(event), diff --git a/indexer/src/schema-defs.ts b/indexer/src/schema-defs.ts index a85c6bb..ed1273d 100644 --- a/indexer/src/schema-defs.ts +++ b/indexer/src/schema-defs.ts @@ -767,7 +767,7 @@ export const TABLES: Record = { // per-deal Validator contract as the FilecoinPay operator. V1 events (V2 not indexed). // Bridge to payment data via porep_rail_id_updated. porep_deal_proposal_created: { - description: "PoRep Market deal proposed. client = payer, provider_id = SP Filecoin actor id (uint64), the four SLI columns are the deal's required thresholds, manifestHash = content id, totalDealSize in bytes. Price is recorded in porep_sp_price_updated. Bridge to the payment rail via porep_rail_id_updated.rail_id -> fp_rail_created.rail_id", + description: "PoRep Market deal proposed. client = payer, provider_id = SP Filecoin actor id (uint64), the four SLI columns are the deal's required thresholds, totalDealSize in bytes. Price is recorded in porep_sp_price_updated. Bridge to the payment rail via porep_rail_id_updated.rail_id -> fp_rail_created.rail_id", columns: { dealId: { type: "bigint" }, client: { type: "hex", note: "payer address" }, @@ -777,7 +777,6 @@ export const TABLES: Record = { latencyMs: { type: "int", note: "required SLI: latency, ms" }, indexingPct: { type: "int", note: "required SLI: indexing, percent" }, manifestLocation: { type: "text" }, - manifestHash: { type: "hex", note: "bytes32 content-addressed deal data hash" }, totalDealSize: { type: "bigint", note: "bytes" }, proposedAtBlock: { type: "bigint" }, }, diff --git a/indexer/test/porep-events.test.ts b/indexer/test/porep-events.test.ts index ea36cc7..0a449b5 100644 --- a/indexer/test/porep-events.test.ts +++ b/indexer/test/porep-events.test.ts @@ -33,9 +33,9 @@ test("PoRepMarket ABI decodes DealProposalCreated requirements as numbers", () = const data = encodeAbiParameters( [ { type: "tuple", components: [{ name: "retrievabilityBps", type: "uint16" }, { name: "bandwidthMbps", type: "uint16" }, { name: "latencyMs", type: "uint16" }, { name: "indexingPct", type: "uint8" }] }, - { type: "string" }, { type: "bytes32" }, { type: "uint256" }, { type: "uint256" }, + { type: "string" }, { type: "uint256" }, { type: "uint256" }, ], - [{ retrievabilityBps: 9500, bandwidthMbps: 100, latencyMs: 250, indexingPct: 80 }, "ipfs://manifest", hex(`0x${"11".repeat(32)}`), 1024n, 5_934_202n], + [{ retrievabilityBps: 9500, bandwidthMbps: 100, latencyMs: 250, indexingPct: 80 }, "ipfs://manifest", 1024n, 5_934_202n], ) const d = decodeEventLog({ abi: PoRepMarketAbi, data, topics: [t0, t1, t2, t3] }) assert.equal(d.eventName, "DealProposalCreated") @@ -43,4 +43,7 @@ test("PoRepMarket ABI decodes DealProposalCreated requirements as numbers", () = assert.equal(typeof d.args.requirements.retrievabilityBps, "number") assert.equal(d.args.requirements.retrievabilityBps, 9500) assert.equal(d.args.manifestLocation, "ipfs://manifest") + // Pin the tail: the deployed event has no manifestHash, so these follow the string directly. + assert.equal(d.args.totalDealSize, 1024n) + assert.equal(d.args.proposedAtBlock, 5_934_202n) })