From 9ee86cb85e765797c0206ba3c0744063d7ccdf96 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 10 Feb 2025 17:52:58 -0300 Subject: [PATCH 01/79] feat: add basic handlers for stake management in Horizon, and update old ones --- abis/HorizonStaking.json | 2408 +++++++++++++++++++++++++++++++ abis/SubgraphService.json | 2287 +++++++++++++++++++++++++++++ schema.graphql | 31 +- src/mappings/helpers/helpers.ts | 2 + src/mappings/horizonStaking.ts | 78 + src/mappings/staking.ts | 4 + subgraph.template.yaml | 28 + 7 files changed, 4835 insertions(+), 3 deletions(-) create mode 100644 abis/HorizonStaking.json create mode 100644 abis/SubgraphService.json create mode 100644 src/mappings/horizonStaking.ts diff --git a/abis/HorizonStaking.json b/abis/HorizonStaking.json new file mode 100644 index 00000000..b1089b90 --- /dev/null +++ b/abis/HorizonStaking.json @@ -0,0 +1,2408 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "controller", + "type": "address", + "internalType": "address" + }, + { + "name": "stakingExtensionAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "subgraphDataServiceAddress", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "fallback", + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "acceptProvisionParameters", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "acceptProxy", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "contract IGraphProxy" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "acceptProxyAndCall", + "inputs": [ + { + "name": "_proxy", + "type": "address", + "internalType": "contract IGraphProxy" + }, + { + "name": "_data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addToDelegationPool", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addToProvision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "clearThawingPeriod", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "delegate", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "delegate", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minSharesOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deprovision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "nThawRequests", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getDelegatedTokensAvailable", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDelegation", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "delegator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IHorizonStakingTypes.Delegation", + "components": [ + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDelegationFeeCut", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "paymentType", + "type": "uint8", + "internalType": "enum IGraphPayments.PaymentTypes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDelegationPool", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IHorizonStakingTypes.DelegationPool", + "components": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokensThawing", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "sharesThawing", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "thawingNonce", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getIdleStake", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMaxThawingPeriod", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProviderTokensAvailable", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProvision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IHorizonStakingTypes.Provision", + "components": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokensThawing", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "sharesThawing", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxVerifierCut", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "thawingPeriod", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "createdAt", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "maxVerifierCutPending", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "thawingPeriodPending", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "thawingNonce", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getServiceProvider", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IHorizonStakingTypes.ServiceProvider", + "components": [ + { + "name": "tokensStaked", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokensProvisioned", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getStake", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThawRequest", + "inputs": [ + { + "name": "requestType", + "type": "uint8", + "internalType": "enum IHorizonStakingTypes.ThawRequestType" + }, + { + "name": "thawRequestId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct IHorizonStakingTypes.ThawRequest", + "components": [ + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "thawingUntil", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "next", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "thawingNonce", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThawRequestList", + "inputs": [ + { + "name": "requestType", + "type": "uint8", + "internalType": "enum IHorizonStakingTypes.ThawRequestType" + }, + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct LinkedList.List", + "components": [ + { + "name": "head", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "tail", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThawedTokens", + "inputs": [ + { + "name": "requestType", + "type": "uint8", + "internalType": "enum IHorizonStakingTypes.ThawRequestType" + }, + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTokensAvailable", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "delegationRatio", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isAllowedLockedVerifier", + "inputs": [ + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isAuthorized", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isDelegationSlashingEnabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "multicall", + "inputs": [ + { + "name": "data", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "results", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "provision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxVerifierCut", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "thawingPeriod", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "provisionLocked", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxVerifierCut", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "thawingPeriod", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "redelegate", + "inputs": [ + { + "name": "oldServiceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "oldVerifier", + "type": "address", + "internalType": "address" + }, + { + "name": "newServiceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "newVerifier", + "type": "address", + "internalType": "address" + }, + { + "name": "minSharesForNewProvider", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "nThawRequests", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "reprovision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "oldVerifier", + "type": "address", + "internalType": "address" + }, + { + "name": "newVerifier", + "type": "address", + "internalType": "address" + }, + { + "name": "nThawRequests", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAllowedLockedVerifier", + "inputs": [ + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setDelegationFeeCut", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "paymentType", + "type": "uint8", + "internalType": "enum IGraphPayments.PaymentTypes" + }, + { + "name": "feeCut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setDelegationSlashingEnabled", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMaxThawingPeriod", + "inputs": [ + { + "name": "maxThawingPeriod", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setOperator", + "inputs": [ + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setOperatorLocked", + "inputs": [ + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setProvisionParameters", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "newMaxVerifierCut", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "newThawingPeriod", + "type": "uint64", + "internalType": "uint64" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "slash", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokensVerifier", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "verifierDestination", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "stake", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "stakeTo", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "stakeToProvision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "thaw", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "undelegate", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "undelegate", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unstake", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawDelegated", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "nThawRequests", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawDelegated", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AllowedLockedVerifierSet", + "inputs": [ + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DelegatedTokensWithdrawn", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "delegator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DelegationFeeCutSet", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "paymentType", + "type": "uint8", + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes" + }, + { + "name": "feeCut", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DelegationSlashed", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DelegationSlashingEnabled", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "DelegationSlashingSkipped", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GraphDirectoryInitialized", + "inputs": [ + { + "name": "graphToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphStaking", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphPayments", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphEscrow", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphController", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphEpochManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphRewardsManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphTokenGateway", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphProxyAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphCuration", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HorizonStakeDeposited", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HorizonStakeLocked", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "until", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HorizonStakeWithdrawn", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MaxThawingPeriodSet", + "inputs": [ + { + "name": "maxThawingPeriod", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorSet", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "operator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionCreated", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "maxVerifierCut", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "thawingPeriod", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionIncreased", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionParametersSet", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "maxVerifierCut", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "thawingPeriod", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionParametersStaged", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "maxVerifierCut", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "thawingPeriod", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionSlashed", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionThawed", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeDelegatedWithdrawn", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "delegator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThawRequestCreated", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "shares", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "thawingUntil", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "thawRequestId", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThawRequestFulfilled", + "inputs": [ + { + "name": "thawRequestId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "shares", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "thawingUntil", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "valid", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThawRequestsFulfilled", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "thawRequestsFulfilled", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "requestType", + "type": "uint8", + "indexed": false, + "internalType": "enum IHorizonStakingTypes.ThawRequestType" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThawingPeriodCleared", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "TokensDelegated", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "delegator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "shares", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokensDeprovisioned", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokensToDelegationPoolAdded", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokensUndelegated", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "delegator", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "VerifierTokensSent", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "destination", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "FailedInnerCall", + "inputs": [] + }, + { + "type": "error", + "name": "GraphDirectoryInvalidZeroAddress", + "inputs": [ + { + "name": "contractName", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingCallerIsServiceProvider", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingInsufficientDelegationTokens", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minTokens", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInsufficientIdleStake", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minTokens", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInsufficientShares", + "inputs": [ + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minShares", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInsufficientStakeForLegacyAllocations", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minTokens", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInsufficientTokens", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minRequired", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidDelegationFeeCut", + "inputs": [ + { + "name": "feeCut", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidDelegationPool", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidDelegationPoolState", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidMaxVerifierCut", + "inputs": [ + { + "name": "maxVerifierCut", + "type": "uint32", + "internalType": "uint32" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidProvision", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidServiceProviderZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingInvalidThawRequestType", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingInvalidThawingPeriod", + "inputs": [ + { + "name": "thawingPeriod", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "maxThawingPeriod", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingInvalidVerifierZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingInvalidZeroShares", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingInvalidZeroTokens", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingNotAuthorized", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "verifier", + "type": "address", + "internalType": "address" + }, + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingNothingThawing", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingProvisionAlreadyExists", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingSlippageProtection", + "inputs": [ + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "minShares", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingStillThawing", + "inputs": [ + { + "name": "until", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingTooManyThawRequests", + "inputs": [] + }, + { + "type": "error", + "name": "HorizonStakingTooManyTokens", + "inputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxTokens", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "HorizonStakingVerifierNotAllowed", + "inputs": [ + { + "name": "verifier", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "LinkedListEmptyList", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedListInvalidIterations", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedListInvalidZeroId", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedListMaxElementsExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "ManagedIsPaused", + "inputs": [] + }, + { + "type": "error", + "name": "ManagedOnlyController", + "inputs": [] + }, + { + "type": "error", + "name": "ManagedOnlyGovernor", + "inputs": [] + }, + { + "type": "error", + "name": "PPMMathInvalidMulPPM", + "inputs": [ + { + "name": "a", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "b", + "type": "uint256", + "internalType": "uint256" + } + ] + } +] \ No newline at end of file diff --git a/abis/SubgraphService.json b/abis/SubgraphService.json new file mode 100644 index 00000000..3da88ad2 --- /dev/null +++ b/abis/SubgraphService.json @@ -0,0 +1,2287 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "graphController", + "type": "address", + "internalType": "address" + }, + { + "name": "disputeManager", + "type": "address", + "internalType": "address" + }, + { + "name": "tapCollector", + "type": "address", + "internalType": "address" + }, + { + "name": "curation", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "acceptProvisionPendingParameters", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "allocationProvisionTracker", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "claims", + "inputs": [ + { + "name": "claimId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "createdAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "releasableAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "nextClaim", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "claimsLists", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "head", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "tail", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "nonce", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "count", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "closeStaleAllocation", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "collect", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "paymentType", + "type": "uint8", + "internalType": "enum IGraphPayments.PaymentTypes" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "curationFeesCut", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "delegationRatio", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "eip712Domain", + "inputs": [], + "outputs": [ + { + "name": "fields", + "type": "bytes1", + "internalType": "bytes1" + }, + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "version", + "type": "string", + "internalType": "string" + }, + { + "name": "chainId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "verifyingContract", + "type": "address", + "internalType": "address" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "extensions", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "encodeAllocationProof", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "feesProvisionTracker", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocation", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct Allocation.State", + "components": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "createdAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "closedAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastPOIPresentedAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accRewardsPerAllocatedToken", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "accRewardsPending", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAllocationData", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDelegationRatio", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getLegacyAllocation", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct LegacyAllocation.State", + "components": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProvisionTokensRange", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSubgraphAllocatedTokens", + "inputs": [ + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getThawingPeriodRange", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVerifierCutRange", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "indexers", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "registeredAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "url", + "type": "string", + "internalType": "string" + }, + { + "name": "geoHash", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "minimumProvisionTokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maximumDelegationRatio", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "stakeToFeesRatio", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "isActiveAllocation", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isOverAllocated", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isStaleAllocation", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maxPOIStaleness", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maximumProvisionTokens", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maximumThawingPeriod", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "maximumVerifierCut", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "migrateLegacyAllocation", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "internalType": "address" + }, + { + "name": "subgraphDeploymentID", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minimumProvisionTokens", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumThawingPeriod", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint64", + "internalType": "uint64" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "minimumVerifierCut", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "multicall", + "inputs": [ + { + "name": "data", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "results", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "pauseGuardians", + "inputs": [ + { + "name": "pauseGuardian", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "allowed", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "register", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "releaseStake", + "inputs": [ + { + "name": "numClaimsToRelease", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "resizeAllocation", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "rewardsDestination", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "destination", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setCurationCut", + "inputs": [ + { + "name": "curationCut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setDelegationRatio", + "inputs": [ + { + "name": "delegationRatio", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMaxPOIStaleness", + "inputs": [ + { + "name": "maxPOIStaleness", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinimumProvisionTokens", + "inputs": [ + { + "name": "minimumProvisionTokens", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPauseGuardian", + "inputs": [ + { + "name": "pauseGuardian", + "type": "address", + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRewardsDestination", + "inputs": [ + { + "name": "rewardsDestination", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setStakeToFeesRatio", + "inputs": [ + { + "name": "stakeToFeesRatio_", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "slash", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "stakeToFeesRatio", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "startService", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "stopService", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AllocationClosed", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AllocationCreated", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AllocationResized", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newTokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "oldTokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CurationCutSet", + "inputs": [ + { + "name": "curationCut", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DelegationRatioSet", + "inputs": [ + { + "name": "ratio", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "EIP712DomainChanged", + "inputs": [], + "anonymous": false + }, + { + "type": "event", + "name": "GraphDirectoryInitialized", + "inputs": [ + { + "name": "graphToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphStaking", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphPayments", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphEscrow", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphController", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphEpochManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphRewardsManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphTokenGateway", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphProxyAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphCuration", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "IndexingRewardsCollected", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokensRewards", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensIndexerRewards", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensDelegationRewards", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "poi", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "currentEpoch", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "LegacyAllocationMigrated", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "subgraphDeploymentId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MaxPOIStalenessSet", + "inputs": [ + { + "name": "maxPOIStaleness", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PauseGuardianSet", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionPendingParametersAccepted", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProvisionTokensRangeSet", + "inputs": [ + { + "name": "min", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "max", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "QueryFeesCollected", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokensCollected", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensCurators", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RewardsDestinationSet", + "inputs": [ + { + "name": "indexer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "rewardsDestination", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServicePaymentCollected", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "feeType", + "type": "uint8", + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServiceProviderRegistered", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServiceProviderSlashed", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServiceStarted", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServiceStopped", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeClaimLocked", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "claimId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "unlockTimestamp", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeClaimReleased", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "claimId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "releasableAt", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeClaimsReleased", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "claimsCount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensReleased", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakeToFeesRatioSet", + "inputs": [ + { + "name": "ratio", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SubgraphServiceDirectoryInitialized", + "inputs": [ + { + "name": "subgraphService", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "disputeManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "tapCollector", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "curation", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ThawingPeriodRangeSet", + "inputs": [ + { + "name": "min", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "max", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "VerifierCutRangeSet", + "inputs": [ + { + "name": "min", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + }, + { + "name": "max", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AllocationAlreadyExists", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AllocationClosed", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + }, + { + "name": "closedAt", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AllocationDoesNotExist", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AllocationManagerAllocationClosed", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AllocationManagerAllocationSameSize", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "AllocationManagerInvalidAllocationProof", + "inputs": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AllocationManagerInvalidZeroAllocationId", + "inputs": [] + }, + { + "type": "error", + "name": "DataServiceFeesClaimNotFound", + "inputs": [ + { + "name": "claimId", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "DataServiceFeesZeroTokens", + "inputs": [] + }, + { + "type": "error", + "name": "DataServicePausableNotPauseGuardian", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "DataServicePausablePauseGuardianNoChange", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "allowed", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "type": "error", + "name": "DirectoryNotDisputeManager", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + }, + { + "name": "disputeManager", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ECDSAInvalidSignature", + "inputs": [] + }, + { + "type": "error", + "name": "ECDSAInvalidSignatureLength", + "inputs": [ + { + "name": "length", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ECDSAInvalidSignatureS", + "inputs": [ + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedInnerCall", + "inputs": [] + }, + { + "type": "error", + "name": "GraphDirectoryInvalidZeroAddress", + "inputs": [ + { + "name": "contractName", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "LegacyAllocationAlreadyExists", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "LinkedListEmptyList", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedListInvalidIterations", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedListInvalidZeroId", + "inputs": [] + }, + { + "type": "error", + "name": "LinkedListMaxElementsExceeded", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "PPMMathInvalidMulPPM", + "inputs": [ + { + "name": "a", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "b", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ProvisionManagerInvalidRange", + "inputs": [ + { + "name": "min", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "max", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ProvisionManagerInvalidValue", + "inputs": [ + { + "name": "message", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "min", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "max", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ProvisionManagerNotAuthorized", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "caller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ProvisionManagerProvisionNotFound", + "inputs": [ + { + "name": "serviceProvider", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ProvisionTrackerInsufficientTokens", + "inputs": [ + { + "name": "tokensAvailable", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokensRequired", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceAllocationIsAltruistic", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceAllocationNotAuthorized", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + }, + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceCannotForceCloseAllocation", + "inputs": [ + { + "name": "allocationId", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceEmptyGeohash", + "inputs": [] + }, + { + "type": "error", + "name": "SubgraphServiceEmptyUrl", + "inputs": [] + }, + { + "type": "error", + "name": "SubgraphServiceInconsistentCollection", + "inputs": [ + { + "name": "balanceBefore", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "balanceAfter", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceIndexerAlreadyRegistered", + "inputs": [] + }, + { + "type": "error", + "name": "SubgraphServiceIndexerMismatch", + "inputs": [ + { + "name": "providedIndexer", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedIndexer", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceIndexerNotRegistered", + "inputs": [ + { + "name": "indexer", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceInvalidCurationCut", + "inputs": [ + { + "name": "curationCut", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceInvalidPaymentType", + "inputs": [ + { + "name": "paymentType", + "type": "uint8", + "internalType": "enum IGraphPayments.PaymentTypes" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceInvalidRAV", + "inputs": [ + { + "name": "ravIndexer", + "type": "address", + "internalType": "address" + }, + { + "name": "allocationIndexer", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "SubgraphServiceInvalidZeroStakeToFeesRatio", + "inputs": [] + } +] \ No newline at end of file diff --git a/schema.graphql b/schema.graphql index 622f7204..71f4179b 100644 --- a/schema.graphql +++ b/schema.graphql @@ -86,6 +86,8 @@ type GraphNetwork @entity { totalTokensClaimable: BigInt! # TODO - see https://github.com/graphprotocol/graph-network-subgraph/issues/89 "Total tokens that are currently locked or withdrawable in the network from unstaking" totalUnstakedTokensLocked: BigInt! + "Total GRT currently in provisions" + totalTokensProvisioned: BigInt! "Total GRT currently in allocation" totalTokensAllocated: BigInt! "Total delegated tokens in the protocol" @@ -231,6 +233,16 @@ type GraphNetwork @entity { currentL1BlockNumber: BigInt } +type DataService @entity { + "Verifier address" + id: ID! + + "Total GRT currently in provisions for this DataService" + totalTokensProvisioned: BigInt! + "Total GRT currently in allocations for this DataService" + totalTokensAllocated: BigInt! +} + """ An account within the graph network. Contains metadata and all relevant data for this accounts delegating, curating, and indexing. @@ -675,6 +687,8 @@ type Indexer @entity { # Staking data "CURRENT tokens staked in the protocol. Decreases on withdraw, not on lock" stakedTokens: BigInt! + "CURRENT tokens provisioned to data services in the protocol. In the V1 protocol, all staked tokens were always provisioned since there was only one data service" + provisionedTokens: BigInt! "CURRENT tokens allocated on all subgraphs" allocatedTokens: BigInt! "NOT IMPLEMENTED - Tokens that have been unstaked and withdrawn" @@ -764,6 +778,9 @@ type Indexer @entity { "Count of how many times this indexer has been forced to close an allocation" forcedClosures: Int! + # Provisioning + provisions: [Provision!]! @derivedFrom(field: "indexer") + # Metrics "NOT IMPLEMENTED - Total return this indexer has earned" totalReturn: BigDecimal! @@ -771,9 +788,6 @@ type Indexer @entity { annualizedReturn: BigDecimal! # You must multiple by 100 to get percentage "NOT IMPLEMENTED - Staking efficiency of the indexer" stakingEfficiency: BigDecimal! - - # Query fees breakdown by payment address - } type PaymentSource @entity { @@ -815,6 +829,17 @@ type IndexerQueryFeePaymentAggregation @entity { paymentSource: PaymentSource! } +type Provision @entity { + "Join ID of indexer address (service provider) and DataService address (verifier)" + id: ID! + + indexer: Indexer! + + service: DataService! + + tokensProvisioned: BigInt! +} + """ A state channel Allocation representing a single Indexer-SubgraphDeployment stake """ diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index b19d91e7..7803a443 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -136,6 +136,7 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): I indexer.stakedTokens = BigInt.fromI32(0) indexer.transferredToL2 = false indexer.stakedTokensTransferredToL2 = BigInt.fromI32(0) + indexer.provisionedTokens = BigInt.fromI32(0) indexer.allocatedTokens = BigInt.fromI32(0) indexer.lockedTokens = BigInt.fromI32(0) indexer.unstakedTokens = BigInt.fromI32(0) @@ -552,6 +553,7 @@ export function createOrLoadGraphNetwork( graphNetwork.totalTokensStaked = BigInt.fromI32(0) graphNetwork.totalTokensClaimable = BigInt.fromI32(0) graphNetwork.totalUnstakedTokensLocked = BigInt.fromI32(0) + graphNetwork.totalTokensProvisioned = BigInt.fromI32(0) graphNetwork.totalTokensAllocated = BigInt.fromI32(0) graphNetwork.totalDelegatedTokens = BigInt.fromI32(0) graphNetwork.totalTokensSignalled = BigInt.fromI32(0) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts new file mode 100644 index 00000000..43e50c28 --- /dev/null +++ b/src/mappings/horizonStaking.ts @@ -0,0 +1,78 @@ +import { BigInt } from '@graphprotocol/graph-ts' +import { addresses } from '../../config/addresses.template' +import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn} from '../types/HorizonStaking/HorizonStaking' +import { Indexer } from '../types/schema' +import { calculateCapacities, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexer, updateAdvancedIndexerMetrics } from './helpers/helpers' + + +export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void { + // To Do + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + // update indexer + let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) + let previousStake = indexer.stakedTokens + indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = calculateCapacities(indexer as Indexer) + indexer.save() + + // Update graph network + graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.plus(event.params.tokens) + if (previousStake == BigInt.fromI32(0)) { + graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount + 1 + } + graphNetwork.save() + + // Update epoch + let epoch = createOrLoadEpoch( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!, + ) + epoch.stakeDeposited = epoch.stakeDeposited.plus(event.params.tokens) + epoch.save() +} + +export function handleHorizonStakeLocked(event: HorizonStakeLocked): void { + // To Do + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + // update indexer + let id = event.params.serviceProvider.toHexString() + let indexer = Indexer.load(id)! + let oldLockedTokens = indexer.lockedTokens + indexer.lockedTokens = event.params.tokens + indexer.tokensLockedUntil = event.params.until.toI32() + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = calculateCapacities(indexer as Indexer) + indexer.save() + + // update graph network + // the tokens from the event replace the previously locked tokens + // from this indexer + graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.plus( + event.params.tokens, + ).minus(oldLockedTokens) + if (indexer.stakedTokens == indexer.lockedTokens) { + graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount - 1 + } + graphNetwork.save() +} + +export function handleHorizonStakeWithdrawn(event: HorizonStakeWithdrawn): void { + // To Do + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + // update indexer + let id = event.params.serviceProvider.toHexString() + let indexer = Indexer.load(id)! + indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) + indexer.lockedTokens = indexer.lockedTokens.minus(event.params.tokens) + indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = calculateCapacities(indexer as Indexer) + indexer.save() + + // Update graph network + graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) + graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.minus( + event.params.tokens, + ) + graphNetwork.save() +} diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index c720dbdb..d61834a3 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -76,12 +76,14 @@ export function handleStakeDeposited(event: StakeDeposited): void { let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) let previousStake = indexer.stakedTokens indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) + indexer.provisionedTokens = indexer.provisionedTokens.plus(event.params.tokens) indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() // Update graph network graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.plus(event.params.tokens) + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.plus(event.params.tokens) if (previousStake == BigInt.fromI32(0)) { graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount + 1 } @@ -136,6 +138,7 @@ export function handleStakeWithdrawn(event: StakeWithdrawn): void { let id = event.params.indexer.toHexString() let indexer = Indexer.load(id)! indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) + indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) indexer.lockedTokens = indexer.lockedTokens.minus(event.params.tokens) indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn indexer = updateAdvancedIndexerMetrics(indexer as Indexer) @@ -144,6 +147,7 @@ export function handleStakeWithdrawn(event: StakeWithdrawn): void { // Update graph network graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.minus( event.params.tokens, ) diff --git a/subgraph.template.yaml b/subgraph.template.yaml index c51094bb..850b2095 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -377,6 +377,34 @@ dataSources: eventHandlers: - event: ParameterUpdated(string) handler: handleParameterUpdated + - kind: ethereum/contract + name: HorizonStaking + network: {{network}} + source: + address: "{{staking}}" + abi: HorizonStaking + startBlock: {{blockNumber}} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./src/mappings/staking.ts + entities: + - GraphNetwork + abis: + - name: HorizonStaking + file: ./abis/HorizonStaking.json + - name: GraphToken + file: ./node_modules/@graphprotocol/contracts/dist/abis/GraphToken.json + - name: EpochManager + file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json + eventHandlers: + - event: HorizonStakeDeposited(indexed address,uint256) + handler: handleHorizonStakeDeposited + - event: HorizonStakeLocked(indexed address,uint256,uint256) + handler: handleHorizonStakeLocked + - event: HorizonStakeWithdrawn(indexed address,uint256) + handler: handleHorizonStakeWithdrawn - kind: ethereum/contract name: Curation network: {{network}} From 721d93db9b4e9d1e4a55f6a31fb867e9c85dcfb3 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 10 Feb 2025 18:30:15 -0300 Subject: [PATCH 02/79] fix: potential issue for Stage 2 --- src/mappings/horizonStaking.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 43e50c28..c5c277e5 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -63,7 +63,7 @@ export function handleHorizonStakeWithdrawn(event: HorizonStakeWithdrawn): void let id = event.params.serviceProvider.toHexString() let indexer = Indexer.load(id)! indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) - indexer.lockedTokens = indexer.lockedTokens.minus(event.params.tokens) + indexer.lockedTokens = BigInt.fromI32(0) // set to 0 to prevent issues when Stage 2 comes indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) From cdbbe77853499f1912545948d55c80f5662ee04f Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 13 Feb 2025 01:34:08 -0300 Subject: [PATCH 03/79] fix: comments from latest round of reviews --- schema.graphql | 8 ++++---- src/mappings/staking.ts | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/schema.graphql b/schema.graphql index 71f4179b..95969531 100644 --- a/schema.graphql +++ b/schema.graphql @@ -234,7 +234,7 @@ type GraphNetwork @entity { } type DataService @entity { - "Verifier address" + "Data Service address" id: ID! "Total GRT currently in provisions for this DataService" @@ -687,7 +687,7 @@ type Indexer @entity { # Staking data "CURRENT tokens staked in the protocol. Decreases on withdraw, not on lock" stakedTokens: BigInt! - "CURRENT tokens provisioned to data services in the protocol. In the V1 protocol, all staked tokens were always provisioned since there was only one data service" + "CURRENT tokens provisioned to data services in the protocol. In the V1 protocol, all staked tokens were always provisioned to an implicit 'subgraph data service'" provisionedTokens: BigInt! "CURRENT tokens allocated on all subgraphs" allocatedTokens: BigInt! @@ -830,12 +830,12 @@ type IndexerQueryFeePaymentAggregation @entity { } type Provision @entity { - "Join ID of indexer address (service provider) and DataService address (verifier)" + "Join ID of indexer address (service provider) and DataService address" id: ID! indexer: Indexer! - service: DataService! + dataService: DataService! tokensProvisioned: BigInt! } diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index d61834a3..c720dbdb 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -76,14 +76,12 @@ export function handleStakeDeposited(event: StakeDeposited): void { let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) let previousStake = indexer.stakedTokens indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) - indexer.provisionedTokens = indexer.provisionedTokens.plus(event.params.tokens) indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() // Update graph network graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.plus(event.params.tokens) - graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.plus(event.params.tokens) if (previousStake == BigInt.fromI32(0)) { graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount + 1 } @@ -138,7 +136,6 @@ export function handleStakeWithdrawn(event: StakeWithdrawn): void { let id = event.params.indexer.toHexString() let indexer = Indexer.load(id)! indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) - indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) indexer.lockedTokens = indexer.lockedTokens.minus(event.params.tokens) indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn indexer = updateAdvancedIndexerMetrics(indexer as Indexer) @@ -147,7 +144,6 @@ export function handleStakeWithdrawn(event: StakeWithdrawn): void { // Update graph network graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) - graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.minus( event.params.tokens, ) From f9a676bba2f6122a896dc77d359fb39930c70401 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 13 Feb 2025 01:46:06 -0300 Subject: [PATCH 04/79] fix: more fixes from reviews, and fixed addresses import preventing build --- src/mappings/horizonStaking.ts | 88 ++++++++++++++++------------------ src/mappings/staking.ts | 5 +- subgraph.template.yaml | 2 +- 3 files changed, 44 insertions(+), 51 deletions(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index c5c277e5..c1c5b410 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,12 +1,11 @@ import { BigInt } from '@graphprotocol/graph-ts' -import { addresses } from '../../config/addresses.template' -import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn} from '../types/HorizonStaking/HorizonStaking' +import { addresses } from '../../config/addresses' +import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn } from '../types/HorizonStaking/HorizonStaking' import { Indexer } from '../types/schema' import { calculateCapacities, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexer, updateAdvancedIndexerMetrics } from './helpers/helpers' export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void { - // To Do let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) // update indexer let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) @@ -15,64 +14,61 @@ export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() - + // Update graph network graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.plus(event.params.tokens) - if (previousStake == BigInt.fromI32(0)) { - graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount + 1 + if (previousStake.isZero()) { + graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount + 1 } graphNetwork.save() - + // Update epoch let epoch = createOrLoadEpoch( - addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!, + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!, ) epoch.stakeDeposited = epoch.stakeDeposited.plus(event.params.tokens) epoch.save() } export function handleHorizonStakeLocked(event: HorizonStakeLocked): void { - // To Do - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - // update indexer - let id = event.params.serviceProvider.toHexString() - let indexer = Indexer.load(id)! - let oldLockedTokens = indexer.lockedTokens - indexer.lockedTokens = event.params.tokens - indexer.tokensLockedUntil = event.params.until.toI32() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) - indexer = calculateCapacities(indexer as Indexer) - indexer.save() + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + // update indexer + let id = event.params.serviceProvider.toHexString() + let indexer = Indexer.load(id)! + indexer.lockedTokens = event.params.tokens + indexer.tokensLockedUntil = event.params.until.toI32() + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = calculateCapacities(indexer as Indexer) + indexer.save() - // update graph network - // the tokens from the event replace the previously locked tokens - // from this indexer - graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.plus( - event.params.tokens, - ).minus(oldLockedTokens) - if (indexer.stakedTokens == indexer.lockedTokens) { - graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount - 1 - } - graphNetwork.save() + // update graph network + graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.plus( + event.params.tokens, + ) + graphNetwork.save() } export function handleHorizonStakeWithdrawn(event: HorizonStakeWithdrawn): void { - // To Do - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - // update indexer - let id = event.params.serviceProvider.toHexString() - let indexer = Indexer.load(id)! - indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) - indexer.lockedTokens = BigInt.fromI32(0) // set to 0 to prevent issues when Stage 2 comes - indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) - indexer = calculateCapacities(indexer as Indexer) - indexer.save() + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + // update indexer + let id = event.params.serviceProvider.toHexString() + let indexer = Indexer.load(id)! + indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) + indexer.lockedTokens = BigInt.fromI32(0) // set to 0 to prevent issues when Stage 2 comes + indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = calculateCapacities(indexer as Indexer) + indexer.save() - // Update graph network - graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) - graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.minus( - event.params.tokens, - ) - graphNetwork.save() + // Update graph network + graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) + graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.minus( + event.params.tokens, + ) + // We might want to introduce the notion of "provisioned indexer count" or "active indexer count" + // to each data service since that's what this particular count wanted to convey. + if (indexer.stakedTokens.isZero()) { + graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount - 1 + } + graphNetwork.save() } diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index c720dbdb..a35d7b52 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -106,7 +106,6 @@ export function handleStakeLocked(event: StakeLocked): void { // update indexer let id = event.params.indexer.toHexString() let indexer = Indexer.load(id)! - let oldLockedTokens = indexer.lockedTokens indexer.lockedTokens = event.params.tokens indexer.tokensLockedUntil = event.params.until.toI32() indexer = updateAdvancedIndexerMetrics(indexer as Indexer) @@ -114,11 +113,9 @@ export function handleStakeLocked(event: StakeLocked): void { indexer.save() // update graph network - // the tokens from the event replace the previously locked tokens - // from this indexer graphNetwork.totalUnstakedTokensLocked = graphNetwork.totalUnstakedTokensLocked.plus( event.params.tokens, - ).minus(oldLockedTokens) + ) if (indexer.stakedTokens == indexer.lockedTokens) { graphNetwork.stakedIndexersCount = graphNetwork.stakedIndexersCount - 1 } diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 850b2095..ff4b23ce 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -388,7 +388,7 @@ dataSources: kind: ethereum/events apiVersion: 0.0.7 language: wasm/assemblyscript - file: ./src/mappings/staking.ts + file: ./src/mappings/horizonStaking.ts entities: - GraphNetwork abis: From 49808b42e0f59372390baa3635d42867d599d348 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Tue, 11 Feb 2025 02:43:31 -0300 Subject: [PATCH 05/79] feat: add initial provision management, without thawing tracking --- schema.graphql | 29 +++++++ src/mappings/helpers/helpers.ts | 39 ++++++++++ src/mappings/horizonStaking.ts | 129 ++++++++++++++++++++++++++++++-- subgraph.template.yaml | 22 ++++++ 4 files changed, 214 insertions(+), 5 deletions(-) diff --git a/schema.graphql b/schema.graphql index 95969531..89807977 100644 --- a/schema.graphql +++ b/schema.graphql @@ -88,6 +88,8 @@ type GraphNetwork @entity { totalUnstakedTokensLocked: BigInt! "Total GRT currently in provisions" totalTokensProvisioned: BigInt! + "Total GRT currently thawing from provisions" + totalTokensThawing: BigInt! "Total GRT currently in allocation" totalTokensAllocated: BigInt! "Total delegated tokens in the protocol" @@ -239,8 +241,12 @@ type DataService @entity { "Total GRT currently in provisions for this DataService" totalTokensProvisioned: BigInt! + "Total GRT currently thawing from provisions for this DataService" + totalTokensThawing: BigInt! "Total GRT currently in allocations for this DataService" totalTokensAllocated: BigInt! + + provisions: [Provision!]! @derivedFrom(field: "service") } """ @@ -689,6 +695,8 @@ type Indexer @entity { stakedTokens: BigInt! "CURRENT tokens provisioned to data services in the protocol. In the V1 protocol, all staked tokens were always provisioned to an implicit 'subgraph data service'" provisionedTokens: BigInt! + "CURRENT tokens thawing from provisions to data services in the protocol. Only for Horizon" + thawingTokens: BigInt! "CURRENT tokens allocated on all subgraphs" allocatedTokens: BigInt! "NOT IMPLEMENTED - Tokens that have been unstaked and withdrawn" @@ -838,6 +846,27 @@ type Provision @entity { dataService: DataService! tokensProvisioned: BigInt! + + "Service provider tokens that are being thawed (and will stop being slashable soon)" + tokensThawing: BigInt! + + "Shares representing the thawing tokens" + sharesThawing: BigInt! + + "Max amount that can be taken by the verifier when slashing, expressed in parts-per-million of the amount slashed" + maxVerifierCut: Int! + + "Time, in seconds, tokens must thaw before being withdrawn" + thawingPeriod: BigInt! + + "Timestamp when the provision was created" + createdAt: BigInt! + + "Pending value for maxVerifierCut. Verifier needs to accept it before it becomes active" + maxVerifierCutPending: Int! + + "Pending value for thawingPeriod. Verifier needs to accept it before it becomes active" + thawingPeriodPending: BigInt! } """ diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 7803a443..8ff45eca 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -26,6 +26,8 @@ import { CurrentSubgraphDeploymentRelation, PaymentSource, IndexerQueryFeePaymentAggregation, + Provision, + DataService, } from '../../types/schema' import { SubgraphDeploymentManifest as SubgraphDeploymentManifestTemplate @@ -137,6 +139,7 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): I indexer.transferredToL2 = false indexer.stakedTokensTransferredToL2 = BigInt.fromI32(0) indexer.provisionedTokens = BigInt.fromI32(0) + indexer.thawingTokens = BigInt.fromI32(0) indexer.allocatedTokens = BigInt.fromI32(0) indexer.lockedTokens = BigInt.fromI32(0) indexer.unstakedTokens = BigInt.fromI32(0) @@ -188,6 +191,41 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): I return indexer as Indexer } +export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: Bytes, timestamp: BigInt): Provision { + let id = joinID([indexerAddress.toHexString(), verifierAddress.toHexString()]) + let provision = Provision.load(id) + if (provision == null) { + provision = new Provision(id) + provision.indexer = indexerAddress.toHexString() + provision.service = verifierAddress.toHexString() + provision.tokensProvisioned = BigInt.fromI32(0) + provision.tokensThawing = BigInt.fromI32(0) + provision.sharesThawing = BigInt.fromI32(0) + provision.createdAt = timestamp + provision.maxVerifierCut = 0 + provision.maxVerifierCutPending = 0 + provision.thawingPeriod = BigInt.fromI32(0) + provision.thawingPeriodPending = BigInt.fromI32(0) + provision.save() + } + + return provision as Provision +} + +export function createOrLoadDataService(verifierAddress: Bytes): DataService { + let id = verifierAddress.toHexString() + let service = DataService.load(id) + if (service == null) { + service = new DataService(id) + service.totalTokensAllocated = BigInt.fromI32(0) + service.totalTokensProvisioned = BigInt.fromI32(0) + service.totalTokensThawing = BigInt.fromI32(0) + service.save() + } + + return service as DataService +} + export function createOrLoadPaymentSource(paymentAddress: Bytes): PaymentSource { let id = paymentAddress.toHexString() let paymentSource = PaymentSource.load(id) @@ -554,6 +592,7 @@ export function createOrLoadGraphNetwork( graphNetwork.totalTokensClaimable = BigInt.fromI32(0) graphNetwork.totalUnstakedTokensLocked = BigInt.fromI32(0) graphNetwork.totalTokensProvisioned = BigInt.fromI32(0) + graphNetwork.totalTokensThawing = BigInt.fromI32(0) graphNetwork.totalTokensAllocated = BigInt.fromI32(0) graphNetwork.totalDelegatedTokens = BigInt.fromI32(0) graphNetwork.totalTokensSignalled = BigInt.fromI32(0) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index c1c5b410..1312e740 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,9 +1,20 @@ -import { BigInt } from '@graphprotocol/graph-ts' +import { BigInt, log } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' -import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn } from '../types/HorizonStaking/HorizonStaking' -import { Indexer } from '../types/schema' -import { calculateCapacities, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexer, updateAdvancedIndexerMetrics } from './helpers/helpers' - +import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, TokensDeprovisioned } from '../types/HorizonStaking/HorizonStaking' +import { Indexer, GraphNetwork } from '../types/schema' +import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' +import { + ProvisionCreated, + ProvisionIncreased, + ProvisionParametersSet, + ProvisionParametersStaged, + ProvisionSlashed, + ProvisionThawed, + ThawRequestCreated, + ThawRequestFulfilled, + ThawRequestsFulfilled, + ThawingPeriodCleared +} from '../types/HorizonStaking/HorizonStaking' export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void { let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) @@ -72,3 +83,111 @@ export function handleHorizonStakeWithdrawn(event: HorizonStakeWithdrawn): void } graphNetwork.save() } + +export function handleProvisionCreated(event: ProvisionCreated): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let dataService = createOrLoadDataService(event.params.verifier) + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + + indexer.provisionedTokens = indexer.provisionedTokens.plus(event.params.tokens) + indexer.save() + + dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.plus(event.params.tokens) + dataService.save() + + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.plus(event.params.tokens) + graphNetwork.save() + + provision.tokensProvisioned = provision.tokensProvisioned.plus(event.params.tokens) + provision.maxVerifierCut = event.params.maxVerifierCut + provision.maxVerifierCutPending = event.params.maxVerifierCut + provision.thawingPeriod = event.params.thawingPeriod + provision.thawingPeriodPending = event.params.thawingPeriod + provision.save() +} + +export function handleProvisionIncreased(event: ProvisionIncreased): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let dataService = createOrLoadDataService(event.params.verifier) + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + + indexer.provisionedTokens = indexer.provisionedTokens.plus(event.params.tokens) + indexer.save() + + dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.plus(event.params.tokens) + dataService.save() + + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.plus(event.params.tokens) + graphNetwork.save() + + provision.tokensProvisioned = provision.tokensProvisioned.plus(event.params.tokens) + provision.save() +} + +export function handleProvisionThawed(event: ProvisionThawed): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let dataService = createOrLoadDataService(event.params.verifier) + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + + indexer.thawingTokens = indexer.thawingTokens.plus(event.params.tokens) + indexer.save() + + dataService.totalTokensThawing = dataService.totalTokensThawing.plus(event.params.tokens) + dataService.save() + + graphNetwork.totalTokensThawing = graphNetwork.totalTokensThawing.plus(event.params.tokens) + graphNetwork.save() + + provision.tokensThawing = provision.tokensThawing.plus(event.params.tokens) + provision.save() +} + +export function handleTokensDeprovisioned(event: TokensDeprovisioned): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let dataService = createOrLoadDataService(event.params.verifier) + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + + indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) + indexer.save() + + dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.minus(event.params.tokens) + dataService.save() + + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) + graphNetwork.save() + + provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) + provision.save() +} + +export function handleProvisionParametersSet(event: ProvisionParametersSet): void { + // To Do +} + +export function handleProvisionParametersStaged(event: ProvisionParametersStaged): void { + // To Do +} + +export function handleProvisionSlashed(event: ProvisionSlashed): void { + // To Do +} + +export function handleThawRequestCreated(event: ThawRequestCreated): void { + // To Do +} + +export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { + // To Do +} + +export function handleThawRequestsFulfilled(event: ThawRequestsFulfilled): void { + // To Do +} + +export function handleThawingPeriodCleared(event: ThawingPeriodCleared): void { + // To Do +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index ff4b23ce..c916346f 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -405,6 +405,28 @@ dataSources: handler: handleHorizonStakeLocked - event: HorizonStakeWithdrawn(indexed address,uint256) handler: handleHorizonStakeWithdrawn + - event: ProvisionCreated(indexed address,indexed address,uint256,uint32,uint64) + handler: handleProvisionCreated + - event: ProvisionIncreased(indexed address,indexed address,uint256) + handler: handleProvisionIncreased + - event: TokensDeprovisioned(indexed address,indexed address,uint256) + handler: handleTokensDeprovisioned + - event: ProvisionParametersSet(indexed address,indexed address,uint32,uint64) + handler: handleProvisionParametersSet + - event: ProvisionParametersStaged(indexed address,indexed address,uint32,uint64) + handler: handleProvisionParametersStaged + - event: ProvisionSlashed(indexed address,indexed address,uint256) + handler: handleProvisionSlashed + - event: ProvisionThawed(indexed address,indexed address,uint256) + handler: handleProvisionThawed + - event: ThawRequestCreated(indexed address,indexed address,indexed address,uint256,uint64,bytes32) + handler: handleThawRequestCreated + - event: ThawRequestFulfilled(indexed bytes32,uint256,uint256,uint64,bool) + handler: handleThawRequestFulfilled + - event: ThawRequestsFulfilled(indexed address,indexed address,indexed address,uint256,uint256,uint8) + handler: handleThawRequestsFulfilled + - event: ThawingPeriodCleared() + handler: handleThawingPeriodCleared - kind: ethereum/contract name: Curation network: {{network}} From 353e18f53362d039bc9c5c07d441357e71a63572 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 12 Feb 2025 01:21:25 -0300 Subject: [PATCH 06/79] feat: basic implementation for ThawRequests --- schema.graphql | 35 +++++++++++++++++++++++++--------- src/mappings/horizonStaking.ts | 32 ++++++++++++++++++------------- subgraph.template.yaml | 4 ---- 3 files changed, 45 insertions(+), 26 deletions(-) diff --git a/schema.graphql b/schema.graphql index 89807977..e9e1825a 100644 --- a/schema.graphql +++ b/schema.graphql @@ -847,28 +847,45 @@ type Provision @entity { tokensProvisioned: BigInt! + "Timestamp when the provision was created" + createdAt: BigInt! + "Service provider tokens that are being thawed (and will stop being slashable soon)" tokensThawing: BigInt! - "Shares representing the thawing tokens" - sharesThawing: BigInt! - "Max amount that can be taken by the verifier when slashing, expressed in parts-per-million of the amount slashed" maxVerifierCut: Int! - "Time, in seconds, tokens must thaw before being withdrawn" - thawingPeriod: BigInt! - - "Timestamp when the provision was created" - createdAt: BigInt! - "Pending value for maxVerifierCut. Verifier needs to accept it before it becomes active" maxVerifierCutPending: Int! + "Time, in seconds, tokens must thaw before being withdrawn" + thawingPeriod: BigInt! + "Pending value for thawingPeriod. Verifier needs to accept it before it becomes active" thawingPeriodPending: BigInt! } +type ThawRequest @entity { + id: ID! + + indexer: Indexer! + + service: DataService! + + owner: GraphAccount! + + "Shares representing the thawing tokens" + shares: BigInt! + + "Tokens thawed" + tokens: BigInt! + + thawingUntil: BigInt! + + valid: Boolean +} + """ A state channel Allocation representing a single Indexer-SubgraphDeployment stake """ diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 1312e740..85570993 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,8 +1,8 @@ import { BigInt, log } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, TokensDeprovisioned } from '../types/HorizonStaking/HorizonStaking' -import { Indexer, GraphNetwork } from '../types/schema' -import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' +import { Indexer, GraphNetwork, ThawRequest } from '../types/schema' +import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -177,17 +177,23 @@ export function handleProvisionSlashed(event: ProvisionSlashed): void { } export function handleThawRequestCreated(event: ThawRequestCreated): void { - // To Do + let dataService = createOrLoadDataService(event.params.verifier) + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let owner = createOrLoadGraphAccount(event.params.owner, event.block.timestamp) + + let request = new ThawRequest(event.params.thawRequestId.toHexString()) + request.indexer = indexer.id + request.service = dataService.id + request.owner = owner.id + request.shares = event.params.shares + request.tokens = BigInt.fromI32(0) + request.thawingUntil = event.params.thawingUntil + request.save() } export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { - // To Do -} - -export function handleThawRequestsFulfilled(event: ThawRequestsFulfilled): void { - // To Do -} - -export function handleThawingPeriodCleared(event: ThawingPeriodCleared): void { - // To Do -} + let request = ThawRequest.load(event.params.thawRequestId.toHexString()) + request.tokens = event.params.tokens + request.valid = event.params.valid + request.save() +} \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index c916346f..4036bfec 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -423,10 +423,6 @@ dataSources: handler: handleThawRequestCreated - event: ThawRequestFulfilled(indexed bytes32,uint256,uint256,uint64,bool) handler: handleThawRequestFulfilled - - event: ThawRequestsFulfilled(indexed address,indexed address,indexed address,uint256,uint256,uint8) - handler: handleThawRequestsFulfilled - - event: ThawingPeriodCleared() - handler: handleThawingPeriodCleared - kind: ethereum/contract name: Curation network: {{network}} From 4fee2d0d5516534ec3b3cf28c681a7fac812d1a4 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 13 Feb 2025 02:10:20 -0300 Subject: [PATCH 07/79] fix: schema --- schema.graphql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index e9e1825a..dadf5e5d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -246,7 +246,7 @@ type DataService @entity { "Total GRT currently in allocations for this DataService" totalTokensAllocated: BigInt! - provisions: [Provision!]! @derivedFrom(field: "service") + provisions: [Provision!]! @derivedFrom(field: "dataService") } """ From 89ec3ed683b49d9bf62fa9509099ad06a73e5d2d Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 13 Feb 2025 02:17:22 -0300 Subject: [PATCH 08/79] fix: maxVerifierCut/Pending wrong types, schema issues and more --- schema.graphql | 6 +++--- src/mappings/helpers/helpers.ts | 7 +++---- src/mappings/horizonStaking.ts | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/schema.graphql b/schema.graphql index dadf5e5d..f915cc7b 100644 --- a/schema.graphql +++ b/schema.graphql @@ -854,10 +854,10 @@ type Provision @entity { tokensThawing: BigInt! "Max amount that can be taken by the verifier when slashing, expressed in parts-per-million of the amount slashed" - maxVerifierCut: Int! + maxVerifierCut: BigInt! "Pending value for maxVerifierCut. Verifier needs to accept it before it becomes active" - maxVerifierCutPending: Int! + maxVerifierCutPending: BigInt! "Time, in seconds, tokens must thaw before being withdrawn" thawingPeriod: BigInt! @@ -871,7 +871,7 @@ type ThawRequest @entity { indexer: Indexer! - service: DataService! + dataService: DataService! owner: GraphAccount! diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 8ff45eca..10a08d7e 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -197,13 +197,12 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By if (provision == null) { provision = new Provision(id) provision.indexer = indexerAddress.toHexString() - provision.service = verifierAddress.toHexString() + provision.dataService = verifierAddress.toHexString() provision.tokensProvisioned = BigInt.fromI32(0) provision.tokensThawing = BigInt.fromI32(0) - provision.sharesThawing = BigInt.fromI32(0) provision.createdAt = timestamp - provision.maxVerifierCut = 0 - provision.maxVerifierCutPending = 0 + provision.maxVerifierCut = BigInt.fromI32(0) + provision.maxVerifierCutPending = BigInt.fromI32(0) provision.thawingPeriod = BigInt.fromI32(0) provision.thawingPeriodPending = BigInt.fromI32(0) provision.save() diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 85570993..d9613323 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -183,7 +183,7 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { let request = new ThawRequest(event.params.thawRequestId.toHexString()) request.indexer = indexer.id - request.service = dataService.id + request.dataService = dataService.id request.owner = owner.id request.shares = event.params.shares request.tokens = BigInt.fromI32(0) @@ -192,7 +192,7 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { } export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { - let request = ThawRequest.load(event.params.thawRequestId.toHexString()) + let request = ThawRequest.load(event.params.thawRequestId.toHexString())! request.tokens = event.params.tokens request.valid = event.params.valid request.save() From 67a0f5cfb0cbc8f2f8e867308e8fdbeadf20be20 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 13 Feb 2025 02:24:37 -0300 Subject: [PATCH 09/79] feat: added ProvisionSlashed support --- src/mappings/horizonStaking.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index d9613323..25875716 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -173,7 +173,25 @@ export function handleProvisionParametersStaged(event: ProvisionParametersStaged } export function handleProvisionSlashed(event: ProvisionSlashed): void { - // To Do + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let dataService = createOrLoadDataService(event.params.verifier) + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + + // Due to thawing tokens potentially getting cancelled, we will need to figure the thawing situation + indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) + indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) + indexer.save() + + dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.minus(event.params.tokens) + dataService.save() + + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) + graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) + graphNetwork.save() + + provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) + provision.save() } export function handleThawRequestCreated(event: ThawRequestCreated): void { From 9517b035b2e774e72fe73972fbb144d159131f20 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 12 Feb 2025 02:34:18 -0300 Subject: [PATCH 10/79] feat: add ParametersSet and Staged support for provisions --- src/mappings/horizonStaking.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 25875716..c920c06a 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -165,11 +165,17 @@ export function handleTokensDeprovisioned(event: TokensDeprovisioned): void { } export function handleProvisionParametersSet(event: ProvisionParametersSet): void { - // To Do + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + provision.thawingPeriod = event.params.thawingPeriod + provision.maxVerifierCut = event.params.maxVerifierCut + provision.save() } export function handleProvisionParametersStaged(event: ProvisionParametersStaged): void { - // To Do + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + provision.thawingPeriodPending = event.params.thawingPeriod + provision.maxVerifierCutPending = event.params.maxVerifierCut + provision.save() } export function handleProvisionSlashed(event: ProvisionSlashed): void { From 7c2bd905e2ed63c2e9458eabfdf72f6ba7e74051 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 13 Feb 2025 01:28:38 -0300 Subject: [PATCH 11/79] chore: placeholder for SetOperator and DelegationFeeCutSet --- src/mappings/horizonStaking.ts | 14 +++++++++++++- subgraph.template.yaml | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index c920c06a..918342c6 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,6 +1,6 @@ import { BigInt, log } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' -import { HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, TokensDeprovisioned } from '../types/HorizonStaking/HorizonStaking' +import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned } from '../types/HorizonStaking/HorizonStaking' import { Indexer, GraphNetwork, ThawRequest } from '../types/schema' import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' import { @@ -178,6 +178,18 @@ export function handleProvisionParametersStaged(event: ProvisionParametersStaged provision.save() } +export function handleOperatorSet(event: OperatorSet): void { + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + // To Do + provision.save() +} + +export function handleDelegationFeeCutSet(event: DelegationFeeCutSet): void { + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + // To Do + provision.save() +} + export function handleProvisionSlashed(event: ProvisionSlashed): void { let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) let dataService = createOrLoadDataService(event.params.verifier) diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 4036bfec..3f2361b7 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -423,6 +423,10 @@ dataSources: handler: handleThawRequestCreated - event: ThawRequestFulfilled(indexed bytes32,uint256,uint256,uint64,bool) handler: handleThawRequestFulfilled + - event: OperatorSet(indexed address,indexed address,indexed address,bool) + handler: handleOperatorSet + - event: DelegationFeeCutSet(indexed address,indexed address,indexed uint8,uint256) + handler: handleDelegationFeeCutSet - kind: ethereum/contract name: Curation network: {{network}} From 9f52dc70407285c986d792ebfead27e9ab198f17 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Tue, 18 Feb 2025 02:04:25 -0300 Subject: [PATCH 12/79] feat: added new OperatorSet and DelegationFeeCutSet event support --- schema.graphql | 32 ++++++++++++++++++++++ src/mappings/helpers/helpers.ts | 19 +++++++++++++ src/mappings/horizonStaking.ts | 48 +++++++++++++++++++++++++++++---- 3 files changed, 94 insertions(+), 5 deletions(-) diff --git a/schema.graphql b/schema.graphql index f915cc7b..961e6428 100644 --- a/schema.graphql +++ b/schema.graphql @@ -273,6 +273,8 @@ type GraphAccount @entity { operatorOf: [GraphAccount!]! @derivedFrom(field: "operators") "Operators of this Graph Accounts" operators: [GraphAccount!]! + "Operators of this Graph Accounts" + provisionedOperators: [Operator!]! # GRT info "Graph token balance" @@ -837,6 +839,21 @@ type IndexerQueryFeePaymentAggregation @entity { paymentSource: PaymentSource! } +type Operator @entity { + "Joint address of all 3 parties involved (Operator, Indexer, DataService)" + id: ID! + + operatorOf: [GraphAccount!]! @derivedFrom(field: "provisionedOperators") + + operator: GraphAccount! + + indexer: Indexer! + + dataService: DataService! + + allowed: Boolean! +} + type Provision @entity { "Join ID of indexer address (service provider) and DataService address" id: ID! @@ -864,6 +881,21 @@ type Provision @entity { "Pending value for thawingPeriod. Verifier needs to accept it before it becomes active" thawingPeriodPending: BigInt! + + # Cuts for subgraph service. Percentage of rewards that the delegation pool receives + queryFeeCut: BigInt! + + indexingFeeCut: BigInt! + + indexingRewardsCut: BigInt! + + # Might want to add polymorphic handling of different fee cuts through a generic hashmap in the future +} + +enum PaymentTypes { + QueryFee, + IndexingFee, + IndexingRewards } type ThawRequest @entity { diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 10a08d7e..49657375 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -28,6 +28,7 @@ import { IndexerQueryFeePaymentAggregation, Provision, DataService, + Operator, } from '../../types/schema' import { SubgraphDeploymentManifest as SubgraphDeploymentManifestTemplate @@ -205,6 +206,9 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.maxVerifierCutPending = BigInt.fromI32(0) provision.thawingPeriod = BigInt.fromI32(0) provision.thawingPeriodPending = BigInt.fromI32(0) + provision.queryFeeCut = BigInt.fromI32(0) + provision.indexingFeeCut = BigInt.fromI32(0) + provision.indexingRewardsCut = BigInt.fromI32(0) provision.save() } @@ -225,6 +229,21 @@ export function createOrLoadDataService(verifierAddress: Bytes): DataService { return service as DataService } +export function createOrLoadOperator(address: Bytes, verifierAddress: Bytes, indexerAddress: Bytes): Operator { + let id = joinID([address.toHexString(), indexerAddress.toHexString(), verifierAddress.toHexString()]) + let operator = Operator.load(id) + if (operator == null) { + operator = new Operator(id) + operator.allowed = false + operator.operator = address.toHexString() + operator.indexer = indexerAddress.toHexString() + operator.dataService = verifierAddress.toHexString() + operator.save() + } + + return operator as Operator +} + export function createOrLoadPaymentSource(paymentAddress: Bytes): PaymentSource { let id = paymentAddress.toHexString() let paymentSource = PaymentSource.load(id) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 918342c6..95a337ca 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -2,7 +2,7 @@ import { BigInt, log } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned } from '../types/HorizonStaking/HorizonStaking' import { Indexer, GraphNetwork, ThawRequest } from '../types/schema' -import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' +import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -179,14 +179,52 @@ export function handleProvisionParametersStaged(event: ProvisionParametersStaged } export function handleOperatorSet(event: OperatorSet): void { - let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) - // To Do - provision.save() + let indexerGraphAccount = createOrLoadGraphAccount(event.params.serviceProvider, event.block.timestamp) + let operator = createOrLoadOperator(event.params.operator, event.params.verifier, event.params.serviceProvider) + let operators = indexerGraphAccount.operators + // Will have to handle legacy operators list, and horizon provisionedOperators list for extra context + let operatorsIndex = operators.indexOf(event.params.operator.toHexString()) + if (operatorsIndex != -1) { + // false - it existed, and we set it to false, so remove from operators + if (!event.params.allowed) { + operators.splice(operatorsIndex, 1) + } + } else { + // true - it did not exist before, and we say add, so add + if (event.params.allowed) { + operators.push(event.params.operator.toHexString()) + // Create the operator as a graph account + createOrLoadGraphAccount(event.params.operator, event.block.timestamp) + } + } + + let provisionedOperators = indexerGraphAccount.provisionedOperators + let provisionedOperatorsIndex = provisionedOperators.indexOf(event.params.operator.toHexString()) + if (provisionedOperatorsIndex != -1) { + // false - it existed, and we set it to false, so remove from operators and update operator + if (!event.params.allowed) { + operators.splice(provisionedOperatorsIndex, 1) + } + } else { + // true - it did not exist before, and we say add, so add + if (event.params.allowed) { + operators.push(event.params.operator.toHexString()) + // Create the operator as a graph account + createOrLoadGraphAccount(event.params.operator, event.block.timestamp) + } + } + operator.allowed = event.params.allowed + operator.save() + indexerGraphAccount.operators = operators + indexerGraphAccount.provisionedOperators = provisionedOperators + indexerGraphAccount.save() } export function handleDelegationFeeCutSet(event: DelegationFeeCutSet): void { let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) - // To Do + provision.queryFeeCut = event.params.paymentType == 0 ? event.params.feeCut : provision.queryFeeCut + provision.indexingFeeCut = event.params.paymentType == 1 ? event.params.feeCut : provision.indexingFeeCut + provision.indexingRewardsCut = event.params.paymentType == 2 ? event.params.feeCut : provision.indexingRewardsCut provision.save() } From dadddd95662e197d98463ffae38799f84761ee91 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Tue, 18 Feb 2025 02:07:58 -0300 Subject: [PATCH 13/79] fix: provisionedOperators missing init --- src/mappings/helpers/helpers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 49657375..3f1d4547 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -475,6 +475,7 @@ export function createOrLoadGraphAccount(owner: Bytes, timeStamp: BigInt): Graph graphAccount = new GraphAccount(id) graphAccount.createdAt = timeStamp.toI32() graphAccount.operators = [] + graphAccount.provisionedOperators = [] graphAccount.balance = BigInt.fromI32(0) graphAccount.balanceReceivedFromL1Signalling = BigInt.fromI32(0) graphAccount.balanceReceivedFromL1Delegation = BigInt.fromI32(0) From a404cba7477a3d084883e8ca8f7dc62b7d5ea826 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Tue, 18 Feb 2025 02:50:17 -0300 Subject: [PATCH 14/79] feat: added basic delegation pool management --- src/mappings/helpers/helpers.ts | 12 ++++++++++++ src/mappings/horizonStaking.ts | 26 +++++++++++++++++--------- subgraph.template.yaml | 2 ++ 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 3f1d4547..6faf1fbe 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -909,6 +909,18 @@ export function updateAdvancedIndexerMetrics(indexer: Indexer): Indexer { return indexer as Indexer } +export function updateAdvancedIndexerMetricsHorizon(indexer: Indexer, provision: Provision): Indexer { + indexer.ownStakeRatio = calculateOwnStakeRatio(indexer as Indexer) + indexer.delegatedStakeRatio = calculateDelegatedStakeRatio(indexer as Indexer) + indexer.indexingRewardEffectiveCut = provision.indexingRewardsCut.toBigDecimal() + indexer.queryFeeEffectiveCut = provision.queryFeeCut.toBigDecimal() + indexer.indexerRewardsOwnGenerationRatio = calculateIndexerRewardOwnGenerationRatio( + indexer as Indexer, + ) + indexer.overDelegationDilution = calculateOverdelegationDilution(indexer as Indexer) + return indexer as Indexer +} + export function updateDelegationExchangeRate(indexer: Indexer): Indexer { indexer.delegationExchangeRate = indexer.delegatedTokens .toBigDecimal() diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 95a337ca..a085403a 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,8 +1,8 @@ -import { BigInt, log } from '@graphprotocol/graph-ts' +import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' -import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned } from '../types/HorizonStaking/HorizonStaking' -import { Indexer, GraphNetwork, ThawRequest } from '../types/schema' -import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateAdvancedIndexerMetrics } from './helpers/helpers' +import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned, TokensToDelegationPoolAdded } from '../types/HorizonStaking/HorizonStaking' +import { Indexer, ThawRequest } from '../types/schema' +import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateAdvancedIndexerMetrics, updateAdvancedIndexerMetricsHorizon, updateDelegationExchangeRate } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -12,8 +12,6 @@ import { ProvisionThawed, ThawRequestCreated, ThawRequestFulfilled, - ThawRequestsFulfilled, - ThawingPeriodCleared } from '../types/HorizonStaking/HorizonStaking' export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void { @@ -22,7 +20,7 @@ export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) let previousStake = indexer.stakedTokens indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) // Can't rely on provision here, will need to figure out a way indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -48,7 +46,7 @@ export function handleHorizonStakeLocked(event: HorizonStakeLocked): void { let indexer = Indexer.load(id)! indexer.lockedTokens = event.params.tokens indexer.tokensLockedUntil = event.params.until.toI32() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) // Can't rely on provision here, will need to figure out a way indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -67,7 +65,7 @@ export function handleHorizonStakeWithdrawn(event: HorizonStakeWithdrawn): void indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) indexer.lockedTokens = BigInt.fromI32(0) // set to 0 to prevent issues when Stage 2 comes indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) // Can't rely on provision here, will need to figure out a way indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -270,4 +268,14 @@ export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { request.tokens = event.params.tokens request.valid = event.params.valid request.save() +} + +export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolAdded): void { + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) + indexer = updateAdvancedIndexerMetricsHorizon(indexer, provision) + indexer = updateDelegationExchangeRate(indexer) + indexer = calculateCapacities(indexer) + indexer.save() } \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 3f2361b7..4b9e6b87 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -427,6 +427,8 @@ dataSources: handler: handleOperatorSet - event: DelegationFeeCutSet(indexed address,indexed address,indexed uint8,uint256) handler: handleDelegationFeeCutSet + - event: TokensToDelegationPoolAdded(indexed address,indexed address,uint256) + handler: handleTokensToDelegationPoolAdded - kind: ethereum/contract name: Curation network: {{network}} From f55ca4143faf4a22aab624c91f98f13cd25ccc51 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 19 Feb 2025 01:44:53 -0300 Subject: [PATCH 15/79] feat: added provision delegated fields --- schema.graphql | 8 ++++++++ src/mappings/helpers/helpers.ts | 3 +++ src/mappings/horizonStaking.ts | 8 ++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/schema.graphql b/schema.graphql index 961e6428..650e3c2d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -890,6 +890,14 @@ type Provision @entity { indexingRewardsCut: BigInt! # Might want to add polymorphic handling of different fee cuts through a generic hashmap in the future + + # Delegation + "Tokens delegated to the provision" + delegatedTokens: BigInt! + "Total shares of the delegator pool" + delegatorShares: BigInt! + "Exchange rate of of tokens received for each share" + delegationExchangeRate: BigDecimal! } enum PaymentTypes { diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 6faf1fbe..970de53f 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -209,6 +209,9 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.queryFeeCut = BigInt.fromI32(0) provision.indexingFeeCut = BigInt.fromI32(0) provision.indexingRewardsCut = BigInt.fromI32(0) + provision.delegatedTokens = BigInt.fromI32(0) + provision.delegatorShares = BigInt.fromI32(0) + provision.delegationExchangeRate = BigInt.fromI32(0).toBigDecimal() provision.save() } diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index a085403a..022e03bc 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -273,9 +273,9 @@ export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolAdded): void { let indexer = Indexer.load(event.params.serviceProvider.toHexString())! let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) - indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) - indexer = updateAdvancedIndexerMetricsHorizon(indexer, provision) - indexer = updateDelegationExchangeRate(indexer) - indexer = calculateCapacities(indexer) + provision.delegatedTokens = provision.delegatedTokens.plus(event.params.tokens) + provision.save() + + indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) // this only serves as a general tracker, but the real deal is per provision indexer.save() } \ No newline at end of file From 9b2275f7140bf7e6e316de9074a33e59a4079d75 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 19 Feb 2025 01:46:56 -0300 Subject: [PATCH 16/79] feat: removed advanced metrics for indexer on horizon since it makes no sense --- src/mappings/helpers/helpers.ts | 12 ------------ src/mappings/horizonStaking.ts | 8 +------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 970de53f..19cb75d2 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -912,18 +912,6 @@ export function updateAdvancedIndexerMetrics(indexer: Indexer): Indexer { return indexer as Indexer } -export function updateAdvancedIndexerMetricsHorizon(indexer: Indexer, provision: Provision): Indexer { - indexer.ownStakeRatio = calculateOwnStakeRatio(indexer as Indexer) - indexer.delegatedStakeRatio = calculateDelegatedStakeRatio(indexer as Indexer) - indexer.indexingRewardEffectiveCut = provision.indexingRewardsCut.toBigDecimal() - indexer.queryFeeEffectiveCut = provision.queryFeeCut.toBigDecimal() - indexer.indexerRewardsOwnGenerationRatio = calculateIndexerRewardOwnGenerationRatio( - indexer as Indexer, - ) - indexer.overDelegationDilution = calculateOverdelegationDilution(indexer as Indexer) - return indexer as Indexer -} - export function updateDelegationExchangeRate(indexer: Indexer): Indexer { indexer.delegationExchangeRate = indexer.delegatedTokens .toBigDecimal() diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 022e03bc..0af83856 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -2,7 +2,7 @@ import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned, TokensToDelegationPoolAdded } from '../types/HorizonStaking/HorizonStaking' import { Indexer, ThawRequest } from '../types/schema' -import { calculateCapacities, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateAdvancedIndexerMetrics, updateAdvancedIndexerMetricsHorizon, updateDelegationExchangeRate } from './helpers/helpers' +import { createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -20,8 +20,6 @@ export function handleHorizonStakeDeposited(event: HorizonStakeDeposited): void let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) let previousStake = indexer.stakedTokens indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) // Can't rely on provision here, will need to figure out a way - indexer = calculateCapacities(indexer as Indexer) indexer.save() // Update graph network @@ -46,8 +44,6 @@ export function handleHorizonStakeLocked(event: HorizonStakeLocked): void { let indexer = Indexer.load(id)! indexer.lockedTokens = event.params.tokens indexer.tokensLockedUntil = event.params.until.toI32() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) // Can't rely on provision here, will need to figure out a way - indexer = calculateCapacities(indexer as Indexer) indexer.save() // update graph network @@ -65,8 +61,6 @@ export function handleHorizonStakeWithdrawn(event: HorizonStakeWithdrawn): void indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) indexer.lockedTokens = BigInt.fromI32(0) // set to 0 to prevent issues when Stage 2 comes indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) // Can't rely on provision here, will need to figure out a way - indexer = calculateCapacities(indexer as Indexer) indexer.save() // Update graph network From 33f0c3b803e67a23d400acca59cdac9961cfb9d5 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 19 Feb 2025 02:03:52 -0300 Subject: [PATCH 17/79] feat: prepared configs, placeholder mapping file --- config/addresses.template.ts | 2 + config/arbitrumGoerliAddressScript.ts | 51 ------------------------ config/arbitrumSepoliaAddressScript.ts | 1 + config/goerliAddressScript.ts | 52 ------------------------ config/ipfs.json | 3 -- config/mainnetAddressScript.ts | 52 ------------------------ config/mainnetArbitrumAddressScript.ts | 5 +++ config/no-ipfs.json | 3 -- config/sepoliaAddressScript.ts | 55 -------------------------- config/testAddressesL1.ts | 1 + config/testAddressesL2.ts | 1 + src/mappings/subgraphService.ts | 1 + subgraph.template.yaml | 26 ++++++++++++ 13 files changed, 37 insertions(+), 216 deletions(-) delete mode 100644 config/arbitrumGoerliAddressScript.ts delete mode 100644 config/goerliAddressScript.ts delete mode 100644 config/ipfs.json delete mode 100644 config/mainnetAddressScript.ts delete mode 100644 config/no-ipfs.json delete mode 100644 config/sepoliaAddressScript.ts create mode 100644 src/mappings/subgraphService.ts diff --git a/config/addresses.template.ts b/config/addresses.template.ts index dda69c57..3121b7e5 100644 --- a/config/addresses.template.ts +++ b/config/addresses.template.ts @@ -20,6 +20,7 @@ export class Addresses { l1GraphTokenGateway: string l2GraphTokenGateway: string ethereumDIDRegistry: string + subgraphService: string isL1: boolean } @@ -45,5 +46,6 @@ export let addresses: Addresses = { l1GraphTokenGateway: '{{l1GraphTokenGateway}}', l2GraphTokenGateway: '{{l2GraphTokenGateway}}', ethereumDIDRegistry: '{{ethereumDIDRegistry}}', + subgraphService: '{{subgraphService}}', isL1: {{isL1}}, } diff --git a/config/arbitrumGoerliAddressScript.ts b/config/arbitrumGoerliAddressScript.ts deleted file mode 100644 index d83f9f4b..00000000 --- a/config/arbitrumGoerliAddressScript.ts +++ /dev/null @@ -1,51 +0,0 @@ -import * as fs from 'fs' -import * as mustache from 'mustache' -import * as networkAddresses from '@graphprotocol/contracts/addresses.json' -import { Addresses } from './addresses.template' - -// mustache doesn't like numbered object keys -// eslint-disable-next-line @typescript-eslint/no-explicit-any -let renameAddresses: any = networkAddresses -renameAddresses['arbgor'] = networkAddresses['421613'] - -export let addresses: Addresses = { - controller: '{{arbgor.Controller.address}}', - graphToken: '{{arbgor.L2GraphToken.address}}', - epochManager: '{{arbgor.EpochManager.address}}', - disputeManager: '{{arbgor.DisputeManager.address}}', - staking: '{{arbgor.L2Staking.address}}', - stakingExtension: '{{arbgor.StakingExtension.address}}', - curation: '{{arbgor.L2Curation.address}}', - rewardsManager: '{{arbgor.RewardsManager.address}}', - serviceRegistry: '{{arbgor.ServiceRegistry.address}}', - gns: '{{arbgor.L2GNS.address}}', - ens: '{{arbgor.IENS.address}}', - ensPublicResolver: '{{arbgor.IPublicResolver.address}}', - blockNumber: '', - bridgeBlockNumber: '', - network: '', - tokenLockManager: '', - subgraphNFT: '{{arbgor.SubgraphNFT.address}}', - l1GraphTokenGateway: '', - l2GraphTokenGateway: '{{arbgor.L2GraphTokenGateway.address}}', - ethereumDIDRegistry: '{{arbgor.IEthereumDIDRegistry.address}}', - isL1: false, -} - -const main = (): void => { - try { - let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses)) - output.blockNumber = '1023264' // Protocol deployment - output.bridgeBlockNumber = '1023272' // Bridge deployment block on L2 - output.network = 'arbitrum-goerli' - output.useTokenLockManager = false - if(output.ens == '') { - output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) - } catch (e) { - console.log(`Error saving artifacts: ${e.message}`) - } -} - -main() diff --git a/config/arbitrumSepoliaAddressScript.ts b/config/arbitrumSepoliaAddressScript.ts index bde52f92..44334c9d 100644 --- a/config/arbitrumSepoliaAddressScript.ts +++ b/config/arbitrumSepoliaAddressScript.ts @@ -29,6 +29,7 @@ export let addresses: Addresses = { l1GraphTokenGateway: '', l2GraphTokenGateway: '{{arbsep.L2GraphTokenGateway.address}}', ethereumDIDRegistry: '{{arbsep.EthereumDIDRegistry.address}}', + subgraphService: '{{arbsep.SubgraphService.address}}', isL1: false, } diff --git a/config/goerliAddressScript.ts b/config/goerliAddressScript.ts deleted file mode 100644 index f0a48f71..00000000 --- a/config/goerliAddressScript.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as fs from 'fs' -import * as mustache from 'mustache' -import * as networkAddresses from '@graphprotocol/contracts/addresses.json' -import { Addresses } from './addresses.template' - -// mustache doesn't like numbered object keys -// eslint-disable-next-line @typescript-eslint/no-explicit-any -let renameAddresses: any = networkAddresses -renameAddresses['goerli'] = networkAddresses['5'] - -export let addresses: Addresses = { - controller: '{{goerli.Controller.address}}', - graphToken: '{{goerli.GraphToken.address}}', - epochManager: '{{goerli.EpochManager.address}}', - disputeManager: '{{goerli.DisputeManager.address}}', - staking: '{{goerli.L1Staking.address}}', - stakingExtension: '{{goerli.StakingExtension.address}}', - curation: '{{goerli.Curation.address}}', - rewardsManager: '{{goerli.RewardsManager.address}}', - serviceRegistry: '{{goerli.ServiceRegistry.address}}', - gns: '{{goerli.L1GNS.address}}', - ens: '{{goerli.IENS.address}}', - ensPublicResolver: '{{goerli.IPublicResolver.address}}', - blockNumber: '', - bridgeBlockNumber: '', - network: '', - tokenLockManager: '', - subgraphNFT: '{{goerli.SubgraphNFT.address}}', - l1GraphTokenGateway: '{{goerli.L1GraphTokenGateway.address}}', - l2GraphTokenGateway: '', - ethereumDIDRegistry: '{{goerli.IEthereumDIDRegistry.address}}', - isL1: true, -} - -const main = (): void => { - try { - let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses)) - output.blockNumber = '7210000' // Hardcoded from before first contract deploy of the latest phase - output.bridgeBlockNumber = '7891183' // Bridge deployment block on L1 - output.network = 'goerli' - output.tokenLockManager = '0x9a7a54e86560f4304d8862Ea00F45D1090c59ac8' // we don't have one, this is rinkebys' - output.useTokenLockManager = true - if(output.ens == '') { - output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) - } catch (e) { - console.log(`Error saving artifacts: ${e.message}`) - } -} - -main() diff --git a/config/ipfs.json b/config/ipfs.json deleted file mode 100644 index ab467581..00000000 --- a/config/ipfs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ipfs": true -} diff --git a/config/mainnetAddressScript.ts b/config/mainnetAddressScript.ts deleted file mode 100644 index 4ddba6e9..00000000 --- a/config/mainnetAddressScript.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as fs from 'fs' -import * as mustache from 'mustache' -import * as networkAddresses from '@graphprotocol/contracts/addresses.json' -import { Addresses } from './addresses.template' - -// mustache doesn't like numbered object keys -// eslint-disable-next-line @typescript-eslint/no-explicit-any -let renameAddresses: any = networkAddresses -renameAddresses['mainnet'] = networkAddresses['1'] - -export let addresses: Addresses = { - controller: '{{mainnet.Controller.address}}', - graphToken: '{{mainnet.GraphToken.address}}', - epochManager: '{{mainnet.EpochManager.address}}', - disputeManager: '{{mainnet.DisputeManager.address}}', - staking: '{{mainnet.L1Staking.address}}', - stakingExtension: '{{mainnet.StakingExtension.address}}', - curation: '{{mainnet.Curation.address}}', - rewardsManager: '{{mainnet.RewardsManager.address}}', - serviceRegistry: '{{mainnet.ServiceRegistry.address}}', - gns: '{{mainnet.L1GNS.address}}', - ens: '{{mainnet.IENS.address}}', - ensPublicResolver: '{{mainnet.IPublicResolver.address}}', - blockNumber: '', - bridgeBlockNumber: '', - network: '', - tokenLockManager: '', - subgraphNFT: '{{mainnet.SubgraphNFT.address}}', - l1GraphTokenGateway: '{{mainnet.L1GraphTokenGateway.address}}', - l2GraphTokenGateway: '', - ethereumDIDRegistry: '{{mainnet.IEthereumDIDRegistry.address}}', - isL1: true, -} - -const main = (): void => { - try { - let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses)) - output.blockNumber = '11440000' // Hardcoded a few thousand blocks before 1st contract deployed - output.network = 'mainnet' - output.bridgeBlockNumber = '16083315' // Bridge deployment block on L1 - output.tokenLockManager = '0xFCf78AC094288D7200cfdB367A8CD07108dFa128' - output.useTokenLockManager = true - if(output.ens == '') { - output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) - } catch (e) { - console.log(`Error saving artifacts: ${e.message}`) - } -} - -main() diff --git a/config/mainnetArbitrumAddressScript.ts b/config/mainnetArbitrumAddressScript.ts index b8fb1985..9384be1e 100644 --- a/config/mainnetArbitrumAddressScript.ts +++ b/config/mainnetArbitrumAddressScript.ts @@ -29,6 +29,7 @@ export let addresses: Addresses = { l1GraphTokenGateway: '', l2GraphTokenGateway: '{{arbitrum.L2GraphTokenGateway.address}}', ethereumDIDRegistry: '{{arbitrum.IEthereumDIDRegistry.address}}', + subgraphService: '{{arbitrum.SubgraphService.address}}', isL1: false, } @@ -46,6 +47,10 @@ const main = (): void => { if(output.ens == '') { output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } + // remove once we have proper packages + if(output.subgraphService == '') { + output.subgraphService = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { console.log(`Error saving artifacts: ${e.message}`) diff --git a/config/no-ipfs.json b/config/no-ipfs.json deleted file mode 100644 index ee53b3b9..00000000 --- a/config/no-ipfs.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "ipfs": false -} diff --git a/config/sepoliaAddressScript.ts b/config/sepoliaAddressScript.ts deleted file mode 100644 index 3fe4cf3c..00000000 --- a/config/sepoliaAddressScript.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as fs from 'fs' -import * as mustache from 'mustache' -import * as networkAddresses from '@graphprotocol/contracts/addresses.json' -import { Addresses } from './addresses.template' - -// mustache doesn't like numbered object keys -// eslint-disable-next-line @typescript-eslint/no-explicit-any -let renameAddresses: any = networkAddresses -renameAddresses['sepolia'] = networkAddresses['11155111'] - -export let addresses: Addresses = { - controller: '{{sepolia.Controller.address}}', - graphToken: '{{sepolia.GraphToken.address}}', - epochManager: '{{sepolia.EpochManager.address}}', - disputeManager: '{{sepolia.DisputeManager.address}}', - staking: '{{sepolia.L1Staking.address}}', - stakingExtension: '{{sepolia.StakingExtension.address}}', - curation: '{{sepolia.Curation.address}}', - rewardsManager: '{{sepolia.RewardsManager.address}}', - serviceRegistry: '{{sepolia.ServiceRegistry.address}}', - gns: '{{sepolia.L1GNS.address}}', - ens: '{{sepolia.IENS.address}}', - ensPublicResolver: '{{sepolia.IPublicResolver.address}}', - blockNumber: '', - bridgeBlockNumber: '', - network: '', - tokenLockManager: '', - subgraphNFT: '{{sepolia.SubgraphNFT.address}}', - l1GraphTokenGateway: '{{sepolia.L1GraphTokenGateway.address}}', - l2GraphTokenGateway: '', - ethereumDIDRegistry: '{{sepolia.EthereumDIDRegistry.address}}', - isL1: true, -} - -const main = (): void => { - try { - let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses)) - output.blockNumber = '4454000' - output.bridgeBlockNumber = '4454000' - output.network = 'sepolia' - //output.tokenLockManager = '0x9a7a54e86560f4304d8862Ea00F45D1090c59ac8' // we don't have one, this is rinkebys' - output.useTokenLockManager = false - if(output.ens == '') { - output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - if(output.ethereumDIDRegistry == '') { - output.ethereumDIDRegistry = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) - } catch (e) { - console.log(`Error saving artifacts: ${e.message}`) - } -} - -main() diff --git a/config/testAddressesL1.ts b/config/testAddressesL1.ts index d4eacb42..56bbbb32 100644 --- a/config/testAddressesL1.ts +++ b/config/testAddressesL1.ts @@ -29,6 +29,7 @@ export let addresses: Addresses = { l1GraphTokenGateway: '0x0000000000000000000000000000000000000000', l2GraphTokenGateway: '', ethereumDIDRegistry: '0x0000000000000000000000000000000000000000', + subgraphService: '0x0000000000000000000000000000000000000000', isL1: true, } diff --git a/config/testAddressesL2.ts b/config/testAddressesL2.ts index c18dbb4f..0fab2b9a 100644 --- a/config/testAddressesL2.ts +++ b/config/testAddressesL2.ts @@ -29,6 +29,7 @@ export let addresses: Addresses = { l1GraphTokenGateway: '', l2GraphTokenGateway: '0x0000000000000000000000000000000000000000', ethereumDIDRegistry: '0x0000000000000000000000000000000000000000', + subgraphService: '0x0000000000000000000000000000000000000000', isL1: false, } diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts new file mode 100644 index 00000000..423e1c85 --- /dev/null +++ b/src/mappings/subgraphService.ts @@ -0,0 +1 @@ +// ToDo \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 4b9e6b87..857af4b2 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -429,6 +429,32 @@ dataSources: handler: handleDelegationFeeCutSet - event: TokensToDelegationPoolAdded(indexed address,indexed address,uint256) handler: handleTokensToDelegationPoolAdded + - kind: ethereum/contract + name: SubgraphService + network: {{network}} + source: + address: "{{subgraphService}}" + abi: SubgraphService + startBlock: {{blockNumber}} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./src/mappings/subgraphService.ts + entities: + - GraphNetwork + abis: + - name: SubgraphService + file: ./abis/SubgraphService.json + - name: GraphToken + file: ./node_modules/@graphprotocol/contracts/dist/abis/GraphToken.json + - name: EpochManager + file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json + eventHandlers: + - event: ServiceProviderRegistered(indexed address,bytes) + handler: handleServiceProviderRegistered + - event: RewardsDestinationSet(indexed address,indexed address) + handler: handleRewardsDestinationSet - kind: ethereum/contract name: Curation network: {{network}} From 9570a04e076a3600cd5936bfb86316e311f641ec Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 20 Feb 2025 01:26:38 -0300 Subject: [PATCH 18/79] feat: added basic service registry for Horizon --- schema.graphql | 7 +++++++ src/mappings/subgraphService.ts | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index 650e3c2d..543a342d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -898,6 +898,13 @@ type Provision @entity { delegatorShares: BigInt! "Exchange rate of of tokens received for each share" delegationExchangeRate: BigDecimal! + + "Service registry URL for the indexer" + url: String + "Geohash of the indexer. Shows where their indexer is located in the world" + geoHash: String + "Address set as rewards destination for payments to the service provider" + rewardsDestination: Bytes } enum PaymentTypes { diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 423e1c85..3a5b6b64 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1 +1,17 @@ -// ToDo \ No newline at end of file +import { ethereum } from "@graphprotocol/graph-ts" +import { RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" +import { createOrLoadProvision } from "./helpers/helpers" + +export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { + let decodedCalldata = ethereum.decode('(string,string,address)', event.params.data).toTuple() + let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) + provision.url = decodedCalldata[0].toString() + provision.geoHash = decodedCalldata[1].toString() + provision.save() +} + +export function handleRewardsDestinationSet(event: RewardsDestinationSet): void { + let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) + provision.rewardsDestination = event.params.rewardsDestination + provision.save() +} From a24e02cd1e8e9485732bb361b178cb93d5621fbe Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 24 Feb 2025 04:12:42 -0300 Subject: [PATCH 19/79] fix: abi.decode potential decoding failure --- src/mappings/subgraphService.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 3a5b6b64..1ba54400 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,13 +1,18 @@ -import { ethereum } from "@graphprotocol/graph-ts" +import { ethereum, ValueKind, log } from "@graphprotocol/graph-ts" import { RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" import { createOrLoadProvision } from "./helpers/helpers" export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { - let decodedCalldata = ethereum.decode('(string,string,address)', event.params.data).toTuple() - let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) - provision.url = decodedCalldata[0].toString() - provision.geoHash = decodedCalldata[1].toString() - provision.save() + let decodedCalldata = ethereum.decode('(string,string,address)', event.params.data) + if( decodedCalldata != null && decodedCalldata.kind == ethereum.ValueKind.TUPLE) { + let tupleData = decodedCalldata.toTuple() + let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) + provision.url = tupleData[0].toString() + provision.geoHash = tupleData[1].toString() + provision.save() + } else { + log.warning("ServiceProviderRegistered failed to decode: {}", [event.params.data.toHexString()]) + } } export function handleRewardsDestinationSet(event: RewardsDestinationSet): void { From cbe7db7415b9f06e3f6a5aecaefab616e1094d09 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 20 Feb 2025 02:07:57 -0300 Subject: [PATCH 20/79] chore: placeholder event handlers --- src/mappings/subgraphService.ts | 22 +++++++++++++++++++++- subgraph.template.yaml | 6 ++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 1ba54400..04c7a3c1 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,5 +1,5 @@ import { ethereum, ValueKind, log } from "@graphprotocol/graph-ts" -import { RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" +import { AllocationClosed, AllocationCreated, AllocationResized, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" import { createOrLoadProvision } from "./helpers/helpers" export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { @@ -20,3 +20,23 @@ export function handleRewardsDestinationSet(event: RewardsDestinationSet): void provision.rewardsDestination = event.params.rewardsDestination provision.save() } + +export function handleAllocationClosed(event: AllocationClosed): void { + let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) + // To Do + provision.save() +} + + +export function handleAllocationCreated(event: AllocationCreated): void { + let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) + // To Do + provision.save() +} + + +export function handleAllocationResized(event: AllocationResized): void { + let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) + // To Do + provision.save() +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 857af4b2..34b6d4a8 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -455,6 +455,12 @@ dataSources: handler: handleServiceProviderRegistered - event: RewardsDestinationSet(indexed address,indexed address) handler: handleRewardsDestinationSet + - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256) + handler: handleAllocationClosed + - event: AllocationCreated(indexed address,indexed address,indexed bytes32,uint256) + handler: handleAllocationCreated + - event: AllocationResized(indexed address,indexed address,indexed bytes32,uint256,uint256) + handler: handleAllocationResized - kind: ethereum/contract name: Curation network: {{network}} From 414a76b08b77c0da78210f60f0909985e133d025 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 24 Feb 2025 03:07:17 -0300 Subject: [PATCH 21/79] chore: updated ABIs --- abis/HorizonStaking.json | 4833 +++++++++++++++++++------------------ abis/SubgraphService.json | 4552 +++++++++++++++++----------------- subgraph.template.yaml | 10 +- 3 files changed, 4701 insertions(+), 4694 deletions(-) diff --git a/abis/HorizonStaking.json b/abis/HorizonStaking.json index b1089b90..6472aeaa 100644 --- a/abis/HorizonStaking.json +++ b/abis/HorizonStaking.json @@ -1,2408 +1,2431 @@ [ { - "type": "constructor", - "inputs": [ - { - "name": "controller", - "type": "address", - "internalType": "address" - }, - { - "name": "stakingExtensionAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "subgraphDataServiceAddress", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "fallback", - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "acceptProvisionParameters", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptProxy", - "inputs": [ - { - "name": "_proxy", - "type": "address", - "internalType": "contract IGraphProxy" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptProxyAndCall", - "inputs": [ - { - "name": "_proxy", - "type": "address", - "internalType": "contract IGraphProxy" - }, - { - "name": "_data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addToDelegationPool", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addToProvision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "clearThawingPeriod", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "delegate", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "delegate", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minSharesOut", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "deprovision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "nThawRequests", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getDelegatedTokensAvailable", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getDelegation", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "delegator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IHorizonStakingTypes.Delegation", - "components": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getDelegationFeeCut", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "paymentType", - "type": "uint8", - "internalType": "enum IGraphPayments.PaymentTypes" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getDelegationPool", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IHorizonStakingTypes.DelegationPool", - "components": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tokensThawing", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "sharesThawing", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "thawingNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getIdleStake", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMaxThawingPeriod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProviderTokensAvailable", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProvision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IHorizonStakingTypes.Provision", - "components": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tokensThawing", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "sharesThawing", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxVerifierCut", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "thawingPeriod", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "createdAt", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "maxVerifierCutPending", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "thawingPeriodPending", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "thawingNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getServiceProvider", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IHorizonStakingTypes.ServiceProvider", - "components": [ - { - "name": "tokensStaked", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tokensProvisioned", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getStake", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThawRequest", - "inputs": [ - { - "name": "requestType", - "type": "uint8", - "internalType": "enum IHorizonStakingTypes.ThawRequestType" - }, - { - "name": "thawRequestId", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IHorizonStakingTypes.ThawRequest", - "components": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "thawingUntil", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "next", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "thawingNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThawRequestList", - "inputs": [ - { - "name": "requestType", - "type": "uint8", - "internalType": "enum IHorizonStakingTypes.ThawRequestType" - }, - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct LinkedList.List", - "components": [ - { - "name": "head", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "tail", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThawedTokens", - "inputs": [ - { - "name": "requestType", - "type": "uint8", - "internalType": "enum IHorizonStakingTypes.ThawRequestType" - }, - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTokensAvailable", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationRatio", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isAllowedLockedVerifier", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isAuthorized", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isDelegationSlashingEnabled", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "multicall", - "inputs": [ - { - "name": "data", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [ - { - "name": "results", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "provision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxVerifierCut", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "thawingPeriod", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "provisionLocked", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxVerifierCut", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "thawingPeriod", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "redelegate", - "inputs": [ - { - "name": "oldServiceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "oldVerifier", - "type": "address", - "internalType": "address" - }, - { - "name": "newServiceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "newVerifier", - "type": "address", - "internalType": "address" - }, - { - "name": "minSharesForNewProvider", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "nThawRequests", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "reprovision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "oldVerifier", - "type": "address", - "internalType": "address" - }, - { - "name": "newVerifier", - "type": "address", - "internalType": "address" - }, - { - "name": "nThawRequests", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAllowedLockedVerifier", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDelegationFeeCut", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "paymentType", - "type": "uint8", - "internalType": "enum IGraphPayments.PaymentTypes" - }, - { - "name": "feeCut", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDelegationSlashingEnabled", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMaxThawingPeriod", - "inputs": [ - { - "name": "maxThawingPeriod", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setOperator", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setOperatorLocked", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setProvisionParameters", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "newMaxVerifierCut", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "newThawingPeriod", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "slash", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tokensVerifier", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifierDestination", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "stake", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "stakeTo", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "stakeToProvision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "thaw", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "undelegate", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "undelegate", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unstake", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdraw", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawDelegated", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "nThawRequests", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawDelegated", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AllowedLockedVerifierSet", - "inputs": [ - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DelegatedTokensWithdrawn", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "delegator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DelegationFeeCutSet", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "paymentType", - "type": "uint8", - "indexed": true, - "internalType": "enum IGraphPayments.PaymentTypes" - }, - { - "name": "feeCut", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DelegationSlashed", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DelegationSlashingEnabled", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "DelegationSlashingSkipped", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GraphDirectoryInitialized", - "inputs": [ - { - "name": "graphToken", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "graphStaking", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "graphPayments", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphEscrow", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphController", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "graphEpochManager", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphRewardsManager", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphTokenGateway", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphProxyAdmin", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphCuration", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "HorizonStakeDeposited", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "HorizonStakeLocked", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "until", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "HorizonStakeWithdrawn", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MaxThawingPeriodSet", - "inputs": [ - { - "name": "maxThawingPeriod", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OperatorSet", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "operator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionCreated", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "maxVerifierCut", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "thawingPeriod", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionIncreased", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionParametersSet", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "maxVerifierCut", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "thawingPeriod", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionParametersStaged", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "maxVerifierCut", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "thawingPeriod", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionSlashed", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionThawed", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeDelegatedWithdrawn", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "delegator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThawRequestCreated", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "thawingUntil", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "thawRequestId", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThawRequestFulfilled", - "inputs": [ - { - "name": "thawRequestId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "thawingUntil", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "valid", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThawRequestsFulfilled", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "thawRequestsFulfilled", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "requestType", - "type": "uint8", - "indexed": false, - "internalType": "enum IHorizonStakingTypes.ThawRequestType" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThawingPeriodCleared", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "TokensDelegated", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "delegator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TokensDeprovisioned", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TokensToDelegationPoolAdded", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TokensUndelegated", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "delegator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VerifierTokensSent", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "destination", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "GraphDirectoryInvalidZeroAddress", - "inputs": [ - { - "name": "contractName", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingCallerIsServiceProvider", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingInsufficientDelegationTokens", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minTokens", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInsufficientIdleStake", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minTokens", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInsufficientShares", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minShares", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInsufficientStakeForLegacyAllocations", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minTokens", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInsufficientTokens", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minRequired", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidDelegationFeeCut", - "inputs": [ - { - "name": "feeCut", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidDelegationPool", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidDelegationPoolState", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidMaxVerifierCut", - "inputs": [ - { - "name": "maxVerifierCut", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidProvision", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidServiceProviderZeroAddress", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingInvalidThawRequestType", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingInvalidThawingPeriod", - "inputs": [ - { - "name": "thawingPeriod", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "maxThawingPeriod", - "type": "uint64", - "internalType": "uint64" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingInvalidVerifierZeroAddress", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingInvalidZeroShares", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingInvalidZeroTokens", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingNotAuthorized", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "verifier", - "type": "address", - "internalType": "address" - }, - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingNothingThawing", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingProvisionAlreadyExists", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingSlippageProtection", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minShares", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingStillThawing", - "inputs": [ - { - "name": "until", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingTooManyThawRequests", - "inputs": [] - }, - { - "type": "error", - "name": "HorizonStakingTooManyTokens", - "inputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxTokens", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "HorizonStakingVerifierNotAllowed", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "LinkedListEmptyList", - "inputs": [] - }, - { - "type": "error", - "name": "LinkedListInvalidIterations", - "inputs": [] - }, - { - "type": "error", - "name": "LinkedListInvalidZeroId", - "inputs": [] - }, - { - "type": "error", - "name": "LinkedListMaxElementsExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "ManagedIsPaused", - "inputs": [] - }, - { - "type": "error", - "name": "ManagedOnlyController", - "inputs": [] - }, - { - "type": "error", - "name": "ManagedOnlyGovernor", - "inputs": [] - }, - { - "type": "error", - "name": "PPMMathInvalidMulPPM", - "inputs": [ - { - "name": "a", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "b", - "type": "uint256", - "internalType": "uint256" - } - ] + "inputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "internalType": "address", + "name": "stakingExtensionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "subgraphDataServiceAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "contractName", + "type": "bytes" + } + ], + "name": "GraphDirectoryInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingCallerIsServiceProvider", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientDelegationTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientIdleStake", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShares", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientShares", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientStakeForLegacyAllocations", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minRequired", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeCut", + "type": "uint256" + } + ], + "name": "HorizonStakingInvalidDelegationFeeCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidDelegationPool", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidDelegationPoolState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + } + ], + "name": "HorizonStakingInvalidMaxVerifierCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidProvision", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidServiceProviderZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidThawRequestType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxThawingPeriod", + "type": "uint64" + } + ], + "name": "HorizonStakingInvalidThawingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidVerifier", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidVerifierZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidZeroShares", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidZeroTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "HorizonStakingNotAuthorized", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingNothingThawing", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingProvisionAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShares", + "type": "uint256" + } + ], + "name": "HorizonStakingSlippageProtection", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "until", + "type": "uint256" + } + ], + "name": "HorizonStakingStillThawing", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingTooManyThawRequests", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingTooManyTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingVerifierNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListEmptyList", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidIterations", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidZeroId", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListMaxElementsExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "ManagedIsPaused", + "type": "error" + }, + { + "inputs": [], + "name": "ManagedOnlyController", + "type": "error" + }, + { + "inputs": [], + "name": "ManagedOnlyGovernor", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "PPMMathInvalidMulPPM", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "AllowedLockedVerifierSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DelegatedTokensWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeCut", + "type": "uint256" + } + ], + "name": "DelegationFeeCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DelegationSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DelegationSlashingEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DelegationSlashingSkipped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "graphToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphStaking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphPayments", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEscrow", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEpochManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphRewardsManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTokenGateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphProxyAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphCuration", + "type": "address" + } + ], + "name": "GraphDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "HorizonStakeDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "until", + "type": "uint256" + } + ], + "name": "HorizonStakeLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "HorizonStakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "maxThawingPeriod", + "type": "uint64" + } + ], + "name": "MaxThawingPeriodSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "ProvisionCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ProvisionIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "ProvisionParametersSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "ProvisionParametersStaged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ProvisionSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ProvisionThawed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "StakeDelegatedWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingUntil", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "thawRequestId", + "type": "bytes32" + } + ], + "name": "ThawRequestCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "thawRequestId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingUntil", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bool", + "name": "valid", + "type": "bool" + } + ], + "name": "ThawRequestFulfilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "thawRequestsFulfilled", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ThawRequestsFulfilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ThawingPeriodCleared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "TokensDelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "TokensDeprovisioned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "TokensToDelegationPoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "TokensUndelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "VerifierTokensSent", + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "acceptProvisionParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGraphProxy", + "name": "_proxy", + "type": "address" + } + ], + "name": "acceptProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGraphProxy", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "acceptProxyAndCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "addToDelegationPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "addToProvision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clearThawingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minSharesOut", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "deprovision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getDelegatedTokensAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "getDelegation", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.Delegation", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + } + ], + "name": "getDelegationFeeCut", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getDelegationPool", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensThawing", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sharesThawing", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "thawingNonce", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.DelegationPool", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "getIdleStake", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxThawingPeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getProviderTokensAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getProvision", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensThawing", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sharesThawing", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "createdAt", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "maxVerifierCutPending", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriodPending", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "thawingNonce", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.Provision", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "getServiceProvider", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokensStaked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensProvisioned", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.ServiceProvider", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "getStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "thawRequestId", + "type": "bytes32" + } + ], + "name": "getThawRequest", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "thawingUntil", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "next", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "thawingNonce", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.ThawRequest", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getThawRequestList", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "head", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "tail", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "internalType": "struct LinkedList.List", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getThawedTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delegationRatio", + "type": "uint32" + } + ], + "name": "getTokensAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "isAllowedLockedVerifier", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isAuthorized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isDelegationSlashingEnabled", + "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": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "provision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "provisionLocked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oldServiceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "oldVerifier", + "type": "address" + }, + { + "internalType": "address", + "name": "newServiceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "newVerifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minSharesForNewProvider", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "redelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "oldVerifier", + "type": "address" + }, + { + "internalType": "address", + "name": "newVerifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "reprovision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setAllowedLockedVerifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "feeCut", + "type": "uint256" + } + ], + "name": "setDelegationFeeCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setDelegationSlashingEnabled", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "maxThawingPeriod", + "type": "uint64" + } + ], + "name": "setMaxThawingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setOperatorLocked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint32", + "name": "newMaxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "newThawingPeriod", + "type": "uint64" + } + ], + "name": "setProvisionParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensVerifier", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifierDestination", + "type": "address" + } + ], + "name": "slash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "stakeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "stakeToProvision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "thaw", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "undelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "undelegate", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "withdrawDelegated", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "withdrawDelegated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" } -] \ No newline at end of file + ] \ No newline at end of file diff --git a/abis/SubgraphService.json b/abis/SubgraphService.json index 3da88ad2..f2ffdcc6 100644 --- a/abis/SubgraphService.json +++ b/abis/SubgraphService.json @@ -1,2287 +1,2271 @@ [ { - "type": "constructor", - "inputs": [ - { - "name": "graphController", - "type": "address", - "internalType": "address" - }, - { - "name": "disputeManager", - "type": "address", - "internalType": "address" - }, - { - "name": "tapCollector", - "type": "address", - "internalType": "address" - }, - { - "name": "curation", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptProvisionPendingParameters", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "allocationProvisionTracker", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "claims", - "inputs": [ - { - "name": "claimId", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "createdAt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "releasableAt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "nextClaim", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "claimsLists", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "head", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "tail", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "closeStaleAllocation", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "collect", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "paymentType", - "type": "uint8", - "internalType": "enum IGraphPayments.PaymentTypes" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "curationFeesCut", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "delegationRatio", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "encodeAllocationProof", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "feesProvisionTracker", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllocation", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct Allocation.State", - "components": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "createdAt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closedAt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lastPOIPresentedAt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accRewardsPerAllocatedToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accRewardsPending", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllocationData", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getDelegationRatio", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLegacyAllocation", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct LegacyAllocation.State", - "components": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProvisionTokensRange", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getSubgraphAllocatedTokens", - "inputs": [ - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThawingPeriodRange", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getVerifierCutRange", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "indexers", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "registeredAt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "url", - "type": "string", - "internalType": "string" - }, - { - "name": "geoHash", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "minimumProvisionTokens", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maximumDelegationRatio", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "stakeToFeesRatio", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isActiveAllocation", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isOverAllocated", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isStaleAllocation", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxPOIStaleness", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maximumProvisionTokens", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maximumThawingPeriod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maximumVerifierCut", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "migrateLegacyAllocation", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "internalType": "address" - }, - { - "name": "subgraphDeploymentID", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "minimumProvisionTokens", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "minimumThawingPeriod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "minimumVerifierCut", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "multicall", - "inputs": [ - { - "name": "data", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [ - { - "name": "results", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pauseGuardians", - "inputs": [ - { - "name": "pauseGuardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "allowed", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "paused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "register", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "releaseStake", - "inputs": [ - { - "name": "numClaimsToRelease", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resizeAllocation", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rewardsDestination", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "destination", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setCurationCut", - "inputs": [ - { - "name": "curationCut", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDelegationRatio", - "inputs": [ - { - "name": "delegationRatio", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMaxPOIStaleness", - "inputs": [ - { - "name": "maxPOIStaleness", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMinimumProvisionTokens", - "inputs": [ - { - "name": "minimumProvisionTokens", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPauseGuardian", - "inputs": [ - { - "name": "pauseGuardian", - "type": "address", - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setRewardsDestination", - "inputs": [ - { - "name": "rewardsDestination", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setStakeToFeesRatio", - "inputs": [ - { - "name": "stakeToFeesRatio_", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "slash", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "stakeToFeesRatio", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "startService", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "stopService", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unpause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AllocationClosed", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AllocationCreated", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AllocationResized", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newTokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "oldTokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CurationCutSet", - "inputs": [ - { - "name": "curationCut", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DelegationRatioSet", - "inputs": [ - { - "name": "ratio", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "GraphDirectoryInitialized", - "inputs": [ - { - "name": "graphToken", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "graphStaking", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "graphPayments", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphEscrow", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphController", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "graphEpochManager", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphRewardsManager", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphTokenGateway", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphProxyAdmin", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "graphCuration", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "IndexingRewardsCollected", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tokensRewards", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "tokensIndexerRewards", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "tokensDelegationRewards", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "poi", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "currentEpoch", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LegacyAllocationMigrated", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "subgraphDeploymentId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MaxPOIStalenessSet", - "inputs": [ - { - "name": "maxPOIStaleness", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PauseGuardianSet", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Paused", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionPendingParametersAccepted", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProvisionTokensRangeSet", - "inputs": [ - { - "name": "min", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "QueryFeesCollected", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokensCollected", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "tokensCurators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsDestinationSet", - "inputs": [ - { - "name": "indexer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "rewardsDestination", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ServicePaymentCollected", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "feeType", - "type": "uint8", - "indexed": true, - "internalType": "enum IGraphPayments.PaymentTypes" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ServiceProviderRegistered", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ServiceProviderSlashed", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ServiceStarted", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ServiceStopped", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeClaimLocked", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "claimId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "unlockTimestamp", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeClaimReleased", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "claimId", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tokens", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "releasableAt", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeClaimsReleased", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "claimsCount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "tokensReleased", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StakeToFeesRatioSet", - "inputs": [ - { - "name": "ratio", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SubgraphServiceDirectoryInitialized", - "inputs": [ - { - "name": "subgraphService", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "disputeManager", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "tapCollector", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "curation", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThawingPeriodRangeSet", - "inputs": [ - { - "name": "min", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "max", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Unpaused", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VerifierCutRangeSet", - "inputs": [ - { - "name": "min", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "max", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AllocationAlreadyExists", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AllocationClosed", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - }, - { - "name": "closedAt", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "AllocationDoesNotExist", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AllocationManagerAllocationClosed", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AllocationManagerAllocationSameSize", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - }, - { - "name": "tokens", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "AllocationManagerInvalidAllocationProof", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AllocationManagerInvalidZeroAllocationId", - "inputs": [] - }, - { - "type": "error", - "name": "DataServiceFeesClaimNotFound", - "inputs": [ - { - "name": "claimId", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "DataServiceFeesZeroTokens", - "inputs": [] - }, - { - "type": "error", - "name": "DataServicePausableNotPauseGuardian", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "DataServicePausablePauseGuardianNoChange", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "allowed", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "type": "error", - "name": "DirectoryNotDisputeManager", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "disputeManager", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "EnforcedPause", - "inputs": [] - }, - { - "type": "error", - "name": "ExpectedPause", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "GraphDirectoryInvalidZeroAddress", - "inputs": [ - { - "name": "contractName", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "LegacyAllocationAlreadyExists", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "LinkedListEmptyList", - "inputs": [] - }, - { - "type": "error", - "name": "LinkedListInvalidIterations", - "inputs": [] - }, - { - "type": "error", - "name": "LinkedListInvalidZeroId", - "inputs": [] - }, - { - "type": "error", - "name": "LinkedListMaxElementsExceeded", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "PPMMathInvalidMulPPM", - "inputs": [ - { - "name": "a", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "b", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ProvisionManagerInvalidRange", - "inputs": [ - { - "name": "min", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ProvisionManagerInvalidValue", - "inputs": [ - { - "name": "message", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "min", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ProvisionManagerNotAuthorized", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - }, - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ProvisionManagerProvisionNotFound", - "inputs": [ - { - "name": "serviceProvider", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ProvisionTrackerInsufficientTokens", - "inputs": [ - { - "name": "tokensAvailable", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tokensRequired", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceAllocationIsAltruistic", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceAllocationNotAuthorized", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - }, - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceCannotForceCloseAllocation", - "inputs": [ - { - "name": "allocationId", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceEmptyGeohash", - "inputs": [] - }, - { - "type": "error", - "name": "SubgraphServiceEmptyUrl", - "inputs": [] - }, - { - "type": "error", - "name": "SubgraphServiceInconsistentCollection", - "inputs": [ - { - "name": "balanceBefore", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "balanceAfter", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceIndexerAlreadyRegistered", - "inputs": [] - }, - { - "type": "error", - "name": "SubgraphServiceIndexerMismatch", - "inputs": [ - { - "name": "providedIndexer", - "type": "address", - "internalType": "address" - }, - { - "name": "expectedIndexer", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceIndexerNotRegistered", - "inputs": [ - { - "name": "indexer", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceInvalidCurationCut", - "inputs": [ - { - "name": "curationCut", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceInvalidPaymentType", - "inputs": [ - { - "name": "paymentType", - "type": "uint8", - "internalType": "enum IGraphPayments.PaymentTypes" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceInvalidRAV", - "inputs": [ - { - "name": "ravIndexer", - "type": "address", - "internalType": "address" - }, - { - "name": "allocationIndexer", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SubgraphServiceInvalidZeroStakeToFeesRatio", - "inputs": [] + "inputs": [ + { + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "internalType": "address", + "name": "disputeManager", + "type": "address" + }, + { + "internalType": "address", + "name": "graphTallyCollector", + "type": "address" + }, + { + "internalType": "address", + "name": "curation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closedAt", + "type": "uint256" + } + ], + "name": "AllocationClosed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationDoesNotExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationManagerAllocationClosed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "AllocationManagerAllocationSameSize", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationManagerInvalidAllocationProof", + "type": "error" + }, + { + "inputs": [], + "name": "AllocationManagerInvalidZeroAllocationId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + } + ], + "name": "DataServiceFeesClaimNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "DataServiceFeesZeroTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "DataServicePausableNotPauseGuardian", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "DataServicePausablePauseGuardianNoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "disputeManager", + "type": "address" + } + ], + "name": "DirectoryNotDisputeManager", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "contractName", + "type": "bytes" + } + ], + "name": "GraphDirectoryInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "LegacyAllocationAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListEmptyList", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidIterations", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidZeroId", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListMaxElementsExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "PPMMathInvalidMulPPM", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ProvisionManagerInvalidRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ProvisionManagerInvalidValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "ProvisionManagerNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "ProvisionManagerProvisionNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokensAvailable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensRequired", + "type": "uint256" + } + ], + "name": "ProvisionTrackerInsufficientTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "SubgraphServiceAllocationIsAltruistic", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "SubgraphServiceAllocationNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "SubgraphServiceCannotForceCloseAllocation", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceEmptyGeohash", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceEmptyUrl", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balanceBefore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceAfter", + "type": "uint256" + } + ], + "name": "SubgraphServiceInconsistentCollection", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceIndexerAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "providedIndexer", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedIndexer", + "type": "address" + } + ], + "name": "SubgraphServiceIndexerMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "SubgraphServiceIndexerNotRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "collectionId", + "type": "bytes32" + } + ], + "name": "SubgraphServiceInvalidCollectionId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "curationCut", + "type": "uint256" + } + ], + "name": "SubgraphServiceInvalidCurationCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + } + ], + "name": "SubgraphServiceInvalidPaymentType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ravIndexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationIndexer", + "type": "address" + } + ], + "name": "SubgraphServiceInvalidRAV", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceInvalidZeroStakeToFeesRatio", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "AllocationClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currentEpoch", + "type": "uint256" + } + ], + "name": "AllocationCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldTokens", + "type": "uint256" + } + ], + "name": "AllocationResized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "curationCut", + "type": "uint256" + } + ], + "name": "CurationCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "ratio", + "type": "uint32" + } + ], + "name": "DelegationRatioSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "graphToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphStaking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphPayments", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEscrow", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEpochManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphRewardsManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTokenGateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphProxyAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphCuration", + "type": "address" + } + ], + "name": "GraphDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensIndexerRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensDelegationRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "poi", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currentEpoch", + "type": "uint256" + } + ], + "name": "IndexingRewardsCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "name": "LegacyAllocationMigrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxPOIStaleness", + "type": "uint256" + } + ], + "name": "MaxPOIStalenessSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "PauseGuardianSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "ProvisionPendingParametersAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ProvisionTokensRangeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensCollected", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensCurators", + "type": "uint256" + } + ], + "name": "QueryFeesCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardsDestination", + "type": "address" + } + ], + "name": "RewardsDestinationSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "feeType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ServicePaymentCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "ServiceProviderRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ServiceProviderSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "ServiceStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "ServiceStopped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTimestamp", + "type": "uint256" + } + ], + "name": "StakeClaimLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "releasableAt", + "type": "uint256" + } + ], + "name": "StakeClaimReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "claimsCount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensReleased", + "type": "uint256" + } + ], + "name": "StakeClaimsReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ratio", + "type": "uint256" + } + ], + "name": "StakeToFeesRatioSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "subgraphService", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "disputeManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTallyCollector", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "curation", + "type": "address" + } + ], + "name": "SubgraphServiceDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "min", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "max", + "type": "uint64" + } + ], + "name": "ThawingPeriodRangeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "min", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "max", + "type": "uint32" + } + ], + "name": "VerifierCutRangeSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "acceptProvisionPendingParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "allocationProvisionTracker", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + } + ], + "name": "claims", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "releasableAt", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "nextClaim", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "claimsLists", + "outputs": [ + { + "internalType": "bytes32", + "name": "head", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "tail", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "closeStaleAllocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "curationFeesCut", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delegationRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "encodeAllocationProof", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "feesProvisionTracker", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "getAllocation", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "closedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastPOIPresentedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPerAllocatedToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPending", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAtEpoch", + "type": "uint256" + } + ], + "internalType": "struct Allocation.State", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "getAllocationData", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDelegationRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "getLegacyAllocation", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "internalType": "struct LegacyAllocation.State", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProvisionTokensRange", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "name": "getSubgraphAllocatedTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getThawingPeriodRange", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifierCutRange", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "indexers", + "outputs": [ + { + "internalType": "uint256", + "name": "registeredAt", + "type": "uint256" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "string", + "name": "geoHash", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minimumProvisionTokens", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maximumDelegationRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "stakeToFeesRatio", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "isOverAllocated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxPOIStaleness", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maximumProvisionTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maximumThawingPeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maximumVerifierCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "migrateLegacyAllocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "minimumProvisionTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumThawingPeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minimumVerifierCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "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": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauseGuardian", + "type": "address" + } + ], + "name": "pauseGuardians", + "outputs": [ + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "register", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numClaimsToRelease", + "type": "uint256" + } + ], + "name": "releaseStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "resizeAllocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "rewardsDestination", + "outputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "curationCut", + "type": "uint256" + } + ], + "name": "setCurationCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "delegationRatio", + "type": "uint32" + } + ], + "name": "setDelegationRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxPOIStaleness", + "type": "uint256" + } + ], + "name": "setMaxPOIStaleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minimumProvisionTokens", + "type": "uint256" + } + ], + "name": "setMinimumProvisionTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauseGuardian", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setPauseGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rewardsDestination", + "type": "address" + } + ], + "name": "setRewardsDestination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "stakeToFeesRatio_", + "type": "uint256" + } + ], + "name": "setStakeToFeesRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "slash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakeToFeesRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "startService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "stopService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } -] \ No newline at end of file + ] \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 34b6d4a8..1c8d28b3 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -419,9 +419,9 @@ dataSources: handler: handleProvisionSlashed - event: ProvisionThawed(indexed address,indexed address,uint256) handler: handleProvisionThawed - - event: ThawRequestCreated(indexed address,indexed address,indexed address,uint256,uint64,bytes32) + - event: ThawRequestCreated(indexed uint8,indexed address,indexed address,address,uint256,uint64,bytes32) handler: handleThawRequestCreated - - event: ThawRequestFulfilled(indexed bytes32,uint256,uint256,uint64,bool) + - event: ThawRequestFulfilled(indexed uint8,indexed bytes32,uint256,uint256,uint64,bool) handler: handleThawRequestFulfilled - event: OperatorSet(indexed address,indexed address,indexed address,bool) handler: handleOperatorSet @@ -455,12 +455,12 @@ dataSources: handler: handleServiceProviderRegistered - event: RewardsDestinationSet(indexed address,indexed address) handler: handleRewardsDestinationSet - - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256) - handler: handleAllocationClosed - - event: AllocationCreated(indexed address,indexed address,indexed bytes32,uint256) + - event: AllocationCreated(indexed address,indexed address,indexed bytes32,uint256,uint256) handler: handleAllocationCreated - event: AllocationResized(indexed address,indexed address,indexed bytes32,uint256,uint256) handler: handleAllocationResized + - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256) + handler: handleAllocationClosed - kind: ethereum/contract name: Curation network: {{network}} From 396dbc6dc71e16c33e457f2ecb8423eb62bb38cd Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 24 Feb 2025 04:05:33 -0300 Subject: [PATCH 22/79] feat: implemented AllocationCreated, Closed and Resized --- schema.graphql | 31 ++++++- src/mappings/helpers/helpers.ts | 3 + src/mappings/subgraphService.ts | 143 ++++++++++++++++++++++++++++++-- 3 files changed, 166 insertions(+), 11 deletions(-) diff --git a/schema.graphql b/schema.graphql index 543a342d..0ca6b80c 100644 --- a/schema.graphql +++ b/schema.graphql @@ -864,6 +864,15 @@ type Provision @entity { tokensProvisioned: BigInt! + tokensAllocated: BigInt! + + totalAllocationCount: BigInt! + + allocationCount: Int! + + "Active allocations of stake for this Provision" + allocations: [Allocation!]! @derivedFrom(field: "activeForProvision") + "Timestamp when the provision was created" createdAt: BigInt! @@ -934,17 +943,21 @@ type ThawRequest @entity { } """ -A state channel Allocation representing a single Indexer-SubgraphDeployment stake +A state channel Allocation representing a single Indexer/Provision-SubgraphDeployment stake """ type Allocation @entity { "Channel Address" id: ID! "Indexer of this allocation" indexer: Indexer! + "Provision of this allocation (for Horizon allocations only)" + provision: Provision "Creator of the allocation - can be the operator or the indexer" creator: Bytes! "If the Allocation is active it shows the indexer. If closed, it is null" activeForIndexer: Indexer + "If the Allocation is active it shows the provision. If closed, it is null" + activeForProvision: Provision "Subgraph deployment that is being allocated to" subgraphDeployment: SubgraphDeployment! "Tokens allocation in this allocation" @@ -987,10 +1000,12 @@ type Allocation @entity { createdAt: Int! "Timestamp this allocation was closed at" closedAt: Int - "POI submitted with a closed allocation" + "POI submitted when closing allocations in the legacy protocol. Also reflects the latest POI submitted for a Horizon payment collection" poi: Bytes + "POIs submitted when collecting payments in Horizon" + pois: [PoiSubmission!]! @derivedFrom(field: "allocation") - # Indexer cut settings at start and close + # Indexer/Provision cut settings at start and close indexingRewardCutAtStart: Int! indexingRewardEffectiveCutAtStart: BigDecimal! queryFeeCutAtStart: Int! @@ -1008,6 +1023,16 @@ type Allocation @entity { annualizedReturn: BigDecimal! } +type PoiSubmission @entity { + id: ID! + + allocation: Allocation! + + poi: Bytes! + + submittedAtEpoch: Int! +} + enum AllocationStatus { Null # == indexer == address(0) Active # == not Null && tokens > 0 # diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 19cb75d2..2c5829c7 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -200,6 +200,9 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.indexer = indexerAddress.toHexString() provision.dataService = verifierAddress.toHexString() provision.tokensProvisioned = BigInt.fromI32(0) + provision.tokensAllocated = BigInt.fromI32(0) + provision.totalAllocationCount = BigInt.fromI32(0) + provision.allocationCount = 0 provision.tokensThawing = BigInt.fromI32(0) provision.createdAt = timestamp provision.maxVerifierCut = BigInt.fromI32(0) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 04c7a3c1..93608512 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,6 +1,8 @@ -import { ethereum, ValueKind, log } from "@graphprotocol/graph-ts" +import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" import { AllocationClosed, AllocationCreated, AllocationResized, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" -import { createOrLoadProvision } from "./helpers/helpers" +import { createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadProvision, createOrLoadSubgraphDeployment } from "./helpers/helpers" +import { Allocation, GraphAccount, Indexer } from "../types/schema" +import { addresses } from "../../config/addresses" export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { let decodedCalldata = ethereum.decode('(string,string,address)', event.params.data) @@ -21,22 +23,147 @@ export function handleRewardsDestinationSet(event: RewardsDestinationSet): void provision.save() } -export function handleAllocationClosed(event: AllocationClosed): void { +export function handleAllocationCreated(event: AllocationCreated): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let subgraphDeploymentID = event.params.subgraphDeploymentId.toHexString() + let indexerID = event.params.indexer.toHexString() + let allocationID = event.params.allocationId.toHexString() + + // update indexer + let indexer = Indexer.load(indexerID)! + indexer.allocatedTokens = indexer.allocatedTokens.plus(event.params.tokens) + indexer.totalAllocationCount = indexer.totalAllocationCount.plus(BigInt.fromI32(1)) + indexer.allocationCount = indexer.allocationCount + 1 + indexer.save() + + // update provision let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) - // To Do + provision.tokensAllocated = provision.tokensAllocated.plus(event.params.tokens) + provision.totalAllocationCount = provision.totalAllocationCount.plus(BigInt.fromI32(1)) + provision.allocationCount = provision.allocationCount + 1 provision.save() + + // update graph network + graphNetwork.totalTokensAllocated = graphNetwork.totalTokensAllocated.plus(event.params.tokens) + graphNetwork.allocationCount = graphNetwork.allocationCount + 1 + graphNetwork.activeAllocationCount = graphNetwork.activeAllocationCount + 1 + graphNetwork.save() + + // update subgraph deployment + let deployment = createOrLoadSubgraphDeployment(subgraphDeploymentID, event.block.timestamp) + deployment.stakedTokens = deployment.stakedTokens.plus(event.params.tokens) + deployment.save() + + // create allocation + let allocation = new Allocation(allocationID) + allocation.indexer = indexerID + allocation.provision = provision.id + allocation.creator = event.transaction.from + allocation.activeForIndexer = indexerID + allocation.activeForProvision = provision.id + allocation.subgraphDeployment = subgraphDeploymentID + allocation.allocatedTokens = event.params.tokens + allocation.effectiveAllocation = BigInt.fromI32(0) + allocation.createdAtEpoch = event.params.currentEpoch.toI32() + allocation.createdAtBlockHash = event.block.hash + allocation.createdAtBlockNumber = ( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber! + ).toI32() + allocation.queryFeesCollected = BigInt.fromI32(0) + allocation.queryFeeRebates = BigInt.fromI32(0) + allocation.distributedRebates = BigInt.fromI32(0) + allocation.curatorRewards = BigInt.fromI32(0) + allocation.indexingRewards = BigInt.fromI32(0) + allocation.indexingIndexerRewards = BigInt.fromI32(0) + allocation.indexingDelegatorRewards = BigInt.fromI32(0) + allocation.delegationFees = BigInt.fromI32(0) + allocation.status = 'Active' + allocation.totalReturn = BigDecimal.fromString('0') + allocation.annualizedReturn = BigDecimal.fromString('0') + allocation.createdAt = event.block.timestamp.toI32() + allocation.indexingRewardCutAtStart = provision.indexingRewardsCut + allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardsCut.toBigDecimal() + allocation.queryFeeCutAtStart = provision.queryFeeCut + allocation.queryFeeEffectiveCutAtStart = provision.queryFeeCut.toBigDecimal() + allocation.save() } +export function handleAllocationClosed(event: AllocationClosed): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let indexerID = event.params.indexer.toHexString() + let allocationID = event.params.allocationId.toHexString() -export function handleAllocationCreated(event: AllocationCreated): void { + // update indexer + let indexer = Indexer.load(indexerID)! + const indexerAccount = GraphAccount.load(indexer.account)! + const closedByIndexer = event.transaction.from == event.params.indexer + const closedByOperator = indexerAccount.operators.includes(event.transaction.from.toHexString()) + + if (!closedByIndexer && !closedByOperator) { + indexer.forcedClosures = indexer.forcedClosures + 1 + } + indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) + indexer.allocationCount = indexer.allocationCount - 1 + indexer.save() + + // update provision let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) - // To Do + provision.tokensAllocated = provision.tokensAllocated.minus(event.params.tokens) + provision.allocationCount = provision.allocationCount - 1 provision.save() -} + // update allocation + let allocation = Allocation.load(allocationID)! + allocation.poolClosedIn = graphNetwork.currentEpoch + allocation.activeForIndexer = null + allocation.closedAtEpoch = graphNetwork.currentEpoch + allocation.closedAtBlockHash = event.block.hash + allocation.closedAtBlockNumber = ( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber! + ).toI32() + allocation.status = 'Closed' + allocation.closedAt = event.block.timestamp.toI32() + allocation.indexingRewardCutAtStart = provision.indexingRewardsCut + allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardsCut.toBigDecimal() + allocation.queryFeeCutAtStart = provision.queryFeeCut + allocation.queryFeeEffectiveCutAtStart = provision.queryFeeCut.toBigDecimal() + allocation.save() + + // update epoch - We do it here to have more epochs created, instead of seeing none created + // Likely this problem would go away with a live network with long epochs + let epoch = createOrLoadEpoch( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!, + ) + epoch.save() + + let subgraphDeploymentID = event.params.subgraphDeploymentId.toHexString() + let deployment = createOrLoadSubgraphDeployment(subgraphDeploymentID, event.block.timestamp) + deployment.stakedTokens = deployment.stakedTokens.minus(event.params.tokens) + deployment.save() + + // update graph network + graphNetwork.activeAllocationCount = graphNetwork.activeAllocationCount - 1 + graphNetwork.totalTokensAllocated = graphNetwork.totalTokensAllocated.minus(event.params.tokens) + graphNetwork.save() +} export function handleAllocationResized(event: AllocationResized): void { + let allocationID = event.params.allocationId.toHexString() + let indexerID = event.params.indexer.toHexString() + let diffTokens = event.params.newTokens.minus(event.params.oldTokens) + + // update indexer + let indexer = Indexer.load(indexerID)! + indexer.allocatedTokens = indexer.allocatedTokens.plus(diffTokens) + indexer.save() + + // update provision let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) - // To Do + provision.tokensAllocated = provision.tokensAllocated.plus(diffTokens) provision.save() + + // update allocation + let allocation = Allocation.load(allocationID)! + allocation.allocatedTokens = event.params.newTokens + allocation.save() } From 9c76ef1359cac88f50b1a39a0aa578c42c80e10b Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 24 Feb 2025 04:17:01 -0300 Subject: [PATCH 23/79] fix: build issues --- src/mappings/subgraphService.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 93608512..d0342038 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -81,9 +81,9 @@ export function handleAllocationCreated(event: AllocationCreated): void { allocation.totalReturn = BigDecimal.fromString('0') allocation.annualizedReturn = BigDecimal.fromString('0') allocation.createdAt = event.block.timestamp.toI32() - allocation.indexingRewardCutAtStart = provision.indexingRewardsCut + allocation.indexingRewardCutAtStart = provision.indexingRewardsCut.toI32() allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardsCut.toBigDecimal() - allocation.queryFeeCutAtStart = provision.queryFeeCut + allocation.queryFeeCutAtStart = provision.queryFeeCut.toI32() allocation.queryFeeEffectiveCutAtStart = provision.queryFeeCut.toBigDecimal() allocation.save() } @@ -114,7 +114,7 @@ export function handleAllocationClosed(event: AllocationClosed): void { // update allocation let allocation = Allocation.load(allocationID)! - allocation.poolClosedIn = graphNetwork.currentEpoch + allocation.poolClosedIn = graphNetwork.currentEpoch.toString() allocation.activeForIndexer = null allocation.closedAtEpoch = graphNetwork.currentEpoch allocation.closedAtBlockHash = event.block.hash @@ -123,9 +123,9 @@ export function handleAllocationClosed(event: AllocationClosed): void { ).toI32() allocation.status = 'Closed' allocation.closedAt = event.block.timestamp.toI32() - allocation.indexingRewardCutAtStart = provision.indexingRewardsCut + allocation.indexingRewardCutAtStart = provision.indexingRewardsCut.toI32() allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardsCut.toBigDecimal() - allocation.queryFeeCutAtStart = provision.queryFeeCut + allocation.queryFeeCutAtStart = provision.queryFeeCut.toI32() allocation.queryFeeEffectiveCutAtStart = provision.queryFeeCut.toBigDecimal() allocation.save() From 926bb93b223e91daae1585ac26a1b7e28d2da2a4 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 24 Feb 2025 04:27:07 -0300 Subject: [PATCH 24/79] chore: placeholder handler definition --- src/mappings/subgraphService.ts | 14 +++++++++++++- subgraph.template.yaml | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index d0342038..73d47f67 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,5 +1,5 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" -import { AllocationClosed, AllocationCreated, AllocationResized, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" +import { AllocationClosed, AllocationCreated, AllocationResized, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" import { createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadProvision, createOrLoadSubgraphDeployment } from "./helpers/helpers" import { Allocation, GraphAccount, Indexer } from "../types/schema" import { addresses } from "../../config/addresses" @@ -167,3 +167,15 @@ export function handleAllocationResized(event: AllocationResized): void { allocation.allocatedTokens = event.params.newTokens allocation.save() } + +export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): void { + let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) + // To Do + provision.save() +} + +export function handleQueryFeesCollected(event: QueryFeesCollected): void { + let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) + // To Do + provision.save() +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 1c8d28b3..18bfa2e0 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -461,6 +461,10 @@ dataSources: handler: handleAllocationResized - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256) handler: handleAllocationClosed + - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,uint256) + handler: handleIndexingRewardsCollected + - event: QueryFeesCollected(indexed address,uint256,uint256) + handler: handleQueryFeesCollected - kind: ethereum/contract name: Curation network: {{network}} From b811361f7b3f26262969dc50546c4139ec7e9864 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Tue, 25 Feb 2025 02:04:27 -0300 Subject: [PATCH 25/79] feat: added indexing rewards collection handler --- schema.graphql | 8 ++++ src/mappings/horizonStaking.ts | 9 +++- src/mappings/subgraphService.ts | 76 ++++++++++++++++++++++++++++++--- 3 files changed, 86 insertions(+), 7 deletions(-) diff --git a/schema.graphql b/schema.graphql index 0ca6b80c..99e1dcfd 100644 --- a/schema.graphql +++ b/schema.graphql @@ -900,6 +900,14 @@ type Provision @entity { # Might want to add polymorphic handling of different fee cuts through a generic hashmap in the future + # Indexing rewards. Keeping the same naming from Indexer entity to make it easier to understand + "Total indexing rewards earned by this indexer. Including delegation rewards" + rewardsEarned: BigInt! + "The total amount of indexing rewards the indexer kept" + indexerIndexingRewards: BigInt! + "The total amount of indexing rewards given to delegators" + delegatorIndexingRewards: BigInt! + # Delegation "Tokens delegated to the provision" delegatedTokens: BigInt! diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 0af83856..3253cea6 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -2,7 +2,7 @@ import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned, TokensToDelegationPoolAdded } from '../types/HorizonStaking/HorizonStaking' import { Indexer, ThawRequest } from '../types/schema' -import { createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision } from './helpers/helpers' +import { createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateDelegationExchangeRate } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -265,11 +265,18 @@ export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { } export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolAdded): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) let indexer = Indexer.load(event.params.serviceProvider.toHexString())! let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) provision.delegatedTokens = provision.delegatedTokens.plus(event.params.tokens) provision.save() indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) // this only serves as a general tracker, but the real deal is per provision + if (indexer.delegatorShares != BigInt.fromI32(0)) { + indexer = updateDelegationExchangeRate(indexer as Indexer) + } indexer.save() + + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens) + graphNetwork.save() } \ No newline at end of file diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 73d47f67..e1756e92 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,12 +1,12 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" import { AllocationClosed, AllocationCreated, AllocationResized, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" -import { createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadProvision, createOrLoadSubgraphDeployment } from "./helpers/helpers" -import { Allocation, GraphAccount, Indexer } from "../types/schema" +import { createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" +import { Allocation, GraphAccount, Indexer, PoiSubmission } from "../types/schema" import { addresses } from "../../config/addresses" export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { let decodedCalldata = ethereum.decode('(string,string,address)', event.params.data) - if( decodedCalldata != null && decodedCalldata.kind == ethereum.ValueKind.TUPLE) { + if (decodedCalldata != null && decodedCalldata.kind == ethereum.ValueKind.TUPLE) { let tupleData = decodedCalldata.toTuple() let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) provision.url = tupleData[0].toString() @@ -169,13 +169,77 @@ export function handleAllocationResized(event: AllocationResized): void { } export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let indexerID = event.params.indexer.toHexString() + let allocationID = event.params.allocationId.toHexString() + + // update indexer + let indexer = Indexer.load(indexerID)! + indexer.rewardsEarned = indexer.rewardsEarned.plus(event.params.tokensRewards) + indexer.indexerIndexingRewards = indexer.indexerIndexingRewards.plus(event.params.tokensIndexerRewards) + indexer.delegatorIndexingRewards = indexer.delegatorIndexingRewards.plus(event.params.tokensDelegationRewards) + indexer.save() + + // update provision let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) - // To Do + provision.rewardsEarned = provision.rewardsEarned.plus(event.params.tokensRewards) + provision.indexerIndexingRewards = provision.indexerIndexingRewards.plus(event.params.tokensIndexerRewards) + provision.delegatorIndexingRewards = provision.delegatorIndexingRewards.plus(event.params.tokensDelegationRewards) + // No need to update delegated tokens, as that happens in handleTokensToDelegationPoolAdded provision.save() + + // update allocation + let allocation = Allocation.load(allocationID)! + allocation.indexingRewards = allocation.indexingRewards.plus(event.params.tokensRewards) + allocation.indexingIndexerRewards = allocation.indexingIndexerRewards.plus(event.params.tokensIndexerRewards) + allocation.indexingDelegatorRewards = allocation.indexingDelegatorRewards.plus( + event.params.tokensDelegationRewards, + ) + allocation.save() + + // Create PoI submission + let poiSubmission = new PoiSubmission(joinID([event.transaction.hash.toHexString(), event.logIndex.toString()])) + poiSubmission.allocation = allocation.id + poiSubmission.poi = event.params.poi + poiSubmission.submittedAtEpoch = event.params.currentEpoch.toI32() + poiSubmission.save() + + // Update epoch + let epoch = createOrLoadEpoch((addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!)) + epoch.totalRewards = epoch.totalRewards.plus(event.params.tokensRewards) + epoch.totalIndexerRewards = epoch.totalIndexerRewards.plus(event.params.tokensIndexerRewards) + epoch.totalDelegatorRewards = epoch.totalDelegatorRewards.plus(event.params.tokensDelegationRewards) + epoch.save() + + // update subgraph deployment + let subgraphDeploymentID = allocation.subgraphDeployment + let subgraphDeployment = createOrLoadSubgraphDeployment( + subgraphDeploymentID, + event.block.timestamp, + ) + subgraphDeployment.indexingRewardAmount = subgraphDeployment.indexingRewardAmount.plus( + event.params.tokensRewards, + ) + subgraphDeployment.indexingIndexerRewardAmount = subgraphDeployment.indexingIndexerRewardAmount.plus( + event.params.tokensIndexerRewards, + ) + subgraphDeployment.indexingDelegatorRewardAmount = subgraphDeployment.indexingDelegatorRewardAmount.plus( + event.params.tokensDelegationRewards, + ) + subgraphDeployment.save() + + // update graph network + graphNetwork.totalIndexingRewards = graphNetwork.totalIndexingRewards.plus(event.params.tokensRewards) + graphNetwork.totalIndexingIndexerRewards = graphNetwork.totalIndexingIndexerRewards.plus( + event.params.tokensIndexerRewards, + ) + graphNetwork.totalIndexingDelegatorRewards = graphNetwork.totalIndexingDelegatorRewards.plus( + event.params.tokensDelegationRewards, + ) + // No need to update delegated tokens, as that happens in handleTokensToDelegationPoolAdded + graphNetwork.save() } export function handleQueryFeesCollected(event: QueryFeesCollected): void { - let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) // To Do - provision.save() } From 7cf9e114eef5889841cd28ccb3e1dbb41c6aaa68 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 26 Feb 2025 04:10:35 -0300 Subject: [PATCH 26/79] feat: add QueryFeesCollected support --- abis/HorizonStaking.json | 4860 +++++++++++++++---------------- abis/SubgraphService.json | 4511 ++++++++++++++-------------- schema.graphql | 4 + src/mappings/subgraphService.ts | 71 +- subgraph.template.yaml | 2 +- 5 files changed, 4745 insertions(+), 4703 deletions(-) diff --git a/abis/HorizonStaking.json b/abis/HorizonStaking.json index 6472aeaa..67eb616b 100644 --- a/abis/HorizonStaking.json +++ b/abis/HorizonStaking.json @@ -1,2431 +1,2431 @@ [ - { - "inputs": [ - { - "internalType": "address", - "name": "controller", - "type": "address" - }, - { - "internalType": "address", - "name": "stakingExtensionAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "subgraphDataServiceAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "contractName", - "type": "bytes" - } - ], - "name": "GraphDirectoryInvalidZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingCallerIsServiceProvider", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minTokens", - "type": "uint256" - } - ], - "name": "HorizonStakingInsufficientDelegationTokens", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minTokens", - "type": "uint256" - } - ], - "name": "HorizonStakingInsufficientIdleStake", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minShares", - "type": "uint256" - } - ], - "name": "HorizonStakingInsufficientShares", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minTokens", - "type": "uint256" - } - ], - "name": "HorizonStakingInsufficientStakeForLegacyAllocations", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minRequired", - "type": "uint256" - } - ], - "name": "HorizonStakingInsufficientTokens", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "feeCut", - "type": "uint256" - } - ], - "name": "HorizonStakingInvalidDelegationFeeCut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "HorizonStakingInvalidDelegationPool", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "HorizonStakingInvalidDelegationPoolState", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - } - ], - "name": "HorizonStakingInvalidMaxVerifierCut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "HorizonStakingInvalidProvision", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingInvalidServiceProviderZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingInvalidThawRequestType", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "maxThawingPeriod", - "type": "uint64" - } - ], - "name": "HorizonStakingInvalidThawingPeriod", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "HorizonStakingInvalidVerifier", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingInvalidVerifierZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingInvalidZeroShares", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingInvalidZeroTokens", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "HorizonStakingNotAuthorized", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingNothingThawing", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingProvisionAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minShares", - "type": "uint256" - } - ], - "name": "HorizonStakingSlippageProtection", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "until", - "type": "uint256" - } - ], - "name": "HorizonStakingStillThawing", - "type": "error" - }, - { - "inputs": [], - "name": "HorizonStakingTooManyThawRequests", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTokens", - "type": "uint256" - } - ], - "name": "HorizonStakingTooManyTokens", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "HorizonStakingVerifierNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListEmptyList", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListInvalidIterations", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListInvalidZeroId", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListMaxElementsExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "ManagedIsPaused", - "type": "error" - }, - { - "inputs": [], - "name": "ManagedOnlyController", - "type": "error" - }, - { - "inputs": [], - "name": "ManagedOnlyGovernor", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "a", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "b", - "type": "uint256" - } - ], - "name": "PPMMathInvalidMulPPM", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "AllowedLockedVerifierSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DelegatedTokensWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum IGraphPayments.PaymentTypes", - "name": "paymentType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeCut", - "type": "uint256" - } - ], - "name": "DelegationFeeCutSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DelegationSlashed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "DelegationSlashingEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DelegationSlashingSkipped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "graphToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "graphStaking", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphPayments", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphEscrow", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "graphController", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphEpochManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphRewardsManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphTokenGateway", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphProxyAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphCuration", - "type": "address" - } - ], - "name": "GraphDirectoryInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "HorizonStakeDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "until", - "type": "uint256" - } - ], - "name": "HorizonStakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "HorizonStakeWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "maxThawingPeriod", - "type": "uint64" - } - ], - "name": "MaxThawingPeriodSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "OperatorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - } - ], - "name": "ProvisionCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ProvisionIncreased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - } - ], - "name": "ProvisionParametersSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - } - ], - "name": "ProvisionParametersStaged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ProvisionSlashed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ProvisionThawed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "StakeDelegatedWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum IHorizonStakingTypes.ThawRequestType", - "name": "requestType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "thawingUntil", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "thawRequestId", - "type": "bytes32" - } - ], - "name": "ThawRequestCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum IHorizonStakingTypes.ThawRequestType", - "name": "requestType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "thawRequestId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "thawingUntil", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bool", - "name": "valid", - "type": "bool" - } - ], - "name": "ThawRequestFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "enum IHorizonStakingTypes.ThawRequestType", - "name": "requestType", - "type": "uint8" - }, - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "thawRequestsFulfilled", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ThawRequestsFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ThawingPeriodCleared", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "TokensDelegated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "TokensDeprovisioned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "TokensToDelegationPoolAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "TokensUndelegated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "VerifierTokensSent", - "type": "event" - }, - { - "stateMutability": "nonpayable", - "type": "fallback" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "acceptProvisionParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IGraphProxy", - "name": "_proxy", - "type": "address" - } - ], - "name": "acceptProxy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IGraphProxy", - "name": "_proxy", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "acceptProxyAndCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "addToDelegationPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "addToProvision", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clearThawingPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minSharesOut", - "type": "uint256" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nThawRequests", - "type": "uint256" - } - ], - "name": "deprovision", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "getDelegatedTokensAvailable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "getDelegation", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "internalType": "struct IHorizonStakingTypes.Delegation", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "enum IGraphPayments.PaymentTypes", - "name": "paymentType", - "type": "uint8" - } - ], - "name": "getDelegationFeeCut", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "getDelegationPool", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensThawing", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesThawing", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "thawingNonce", - "type": "uint256" - } - ], - "internalType": "struct IHorizonStakingTypes.DelegationPool", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "getIdleStake", - "outputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxThawingPeriod", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "getProviderTokensAvailable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "getProvision", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensThawing", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesThawing", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "createdAt", - "type": "uint64" - }, - { - "internalType": "uint32", - "name": "maxVerifierCutPending", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "thawingPeriodPending", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "thawingNonce", - "type": "uint256" - } - ], - "internalType": "struct IHorizonStakingTypes.Provision", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "getServiceProvider", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokensStaked", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensProvisioned", - "type": "uint256" - } - ], - "internalType": "struct IHorizonStakingTypes.ServiceProvider", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "getStake", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum IHorizonStakingTypes.ThawRequestType", - "name": "requestType", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "thawRequestId", - "type": "bytes32" - } - ], - "name": "getThawRequest", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "internalType": "uint64", - "name": "thawingUntil", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "next", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "thawingNonce", - "type": "uint256" - } - ], - "internalType": "struct IHorizonStakingTypes.ThawRequest", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum IHorizonStakingTypes.ThawRequestType", - "name": "requestType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "getThawRequestList", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "head", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "tail", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } - ], - "internalType": "struct LinkedList.List", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum IHorizonStakingTypes.ThawRequestType", - "name": "requestType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "getThawedTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint32", - "name": "delegationRatio", - "type": "uint32" - } - ], - "name": "getTokensAvailable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "verifier", - "type": "address" - } - ], - "name": "isAllowedLockedVerifier", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isAuthorized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isDelegationSlashingEnabled", - "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": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - } - ], - "name": "provision", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maxVerifierCut", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "thawingPeriod", - "type": "uint64" - } - ], - "name": "provisionLocked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "oldServiceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "oldVerifier", - "type": "address" - }, - { - "internalType": "address", - "name": "newServiceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "newVerifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minSharesForNewProvider", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nThawRequests", - "type": "uint256" - } - ], - "name": "redelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "oldVerifier", - "type": "address" - }, - { - "internalType": "address", - "name": "newVerifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nThawRequests", - "type": "uint256" - } - ], - "name": "reprovision", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "setAllowedLockedVerifier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "enum IGraphPayments.PaymentTypes", - "name": "paymentType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "feeCut", - "type": "uint256" - } - ], - "name": "setDelegationFeeCut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "setDelegationSlashingEnabled", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "maxThawingPeriod", - "type": "uint64" - } - ], - "name": "setMaxThawingPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "setOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "setOperatorLocked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint32", - "name": "newMaxVerifierCut", - "type": "uint32" - }, - { - "internalType": "uint64", - "name": "newThawingPeriod", - "type": "uint64" - } - ], - "name": "setProvisionParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensVerifier", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifierDestination", - "type": "address" - } - ], - "name": "slash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "stakeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "stakeToProvision", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "thaw", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "undelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "undelegate", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "unstake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "verifier", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nThawRequests", - "type": "uint256" - } - ], - "name": "withdrawDelegated", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrawDelegated", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] \ No newline at end of file + { + "inputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "internalType": "address", + "name": "stakingExtensionAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "subgraphDataServiceAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "contractName", + "type": "bytes" + } + ], + "name": "GraphDirectoryInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingCallerIsServiceProvider", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientDelegationTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientIdleStake", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShares", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientShares", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientStakeForLegacyAllocations", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minRequired", + "type": "uint256" + } + ], + "name": "HorizonStakingInsufficientTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeCut", + "type": "uint256" + } + ], + "name": "HorizonStakingInvalidDelegationFeeCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidDelegationPool", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidDelegationPoolState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + } + ], + "name": "HorizonStakingInvalidMaxVerifierCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidProvision", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidServiceProviderZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidThawRequestType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxThawingPeriod", + "type": "uint64" + } + ], + "name": "HorizonStakingInvalidThawingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingInvalidVerifier", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidVerifierZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidZeroShares", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingInvalidZeroTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "HorizonStakingNotAuthorized", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingNothingThawing", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingProvisionAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShares", + "type": "uint256" + } + ], + "name": "HorizonStakingSlippageProtection", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "until", + "type": "uint256" + } + ], + "name": "HorizonStakingStillThawing", + "type": "error" + }, + { + "inputs": [], + "name": "HorizonStakingTooManyThawRequests", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTokens", + "type": "uint256" + } + ], + "name": "HorizonStakingTooManyTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "HorizonStakingVerifierNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListEmptyList", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidIterations", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidZeroId", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListMaxElementsExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "ManagedIsPaused", + "type": "error" + }, + { + "inputs": [], + "name": "ManagedOnlyController", + "type": "error" + }, + { + "inputs": [], + "name": "ManagedOnlyGovernor", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "PPMMathInvalidMulPPM", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "AllowedLockedVerifierSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DelegatedTokensWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeCut", + "type": "uint256" + } + ], + "name": "DelegationFeeCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DelegationSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DelegationSlashingEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DelegationSlashingSkipped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "graphToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphStaking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphPayments", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEscrow", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEpochManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphRewardsManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTokenGateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphProxyAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphCuration", + "type": "address" + } + ], + "name": "GraphDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "HorizonStakeDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "until", + "type": "uint256" + } + ], + "name": "HorizonStakeLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "HorizonStakeWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "maxThawingPeriod", + "type": "uint64" + } + ], + "name": "MaxThawingPeriodSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "ProvisionCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ProvisionIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "ProvisionParametersSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "ProvisionParametersStaged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ProvisionSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ProvisionThawed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "StakeDelegatedWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingUntil", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "thawRequestId", + "type": "bytes32" + } + ], + "name": "ThawRequestCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "thawRequestId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "thawingUntil", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bool", + "name": "valid", + "type": "bool" + } + ], + "name": "ThawRequestFulfilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "thawRequestsFulfilled", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ThawRequestsFulfilled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ThawingPeriodCleared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "TokensDelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "TokensDeprovisioned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "TokensToDelegationPoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "TokensUndelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "VerifierTokensSent", + "type": "event" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "acceptProvisionParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGraphProxy", + "name": "_proxy", + "type": "address" + } + ], + "name": "acceptProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGraphProxy", + "name": "_proxy", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "acceptProxyAndCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "addToDelegationPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "addToProvision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clearThawingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minSharesOut", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "deprovision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getDelegatedTokensAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "getDelegation", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.Delegation", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + } + ], + "name": "getDelegationFeeCut", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getDelegationPool", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensThawing", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sharesThawing", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "thawingNonce", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.DelegationPool", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "getIdleStake", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxThawingPeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getProviderTokensAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "getProvision", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensThawing", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sharesThawing", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "createdAt", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "maxVerifierCutPending", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriodPending", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "thawingNonce", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.Provision", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "getServiceProvider", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokensStaked", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensProvisioned", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.ServiceProvider", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "getStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "thawRequestId", + "type": "bytes32" + } + ], + "name": "getThawRequest", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "thawingUntil", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "next", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "thawingNonce", + "type": "uint256" + } + ], + "internalType": "struct IHorizonStakingTypes.ThawRequest", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getThawRequestList", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "head", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "tail", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "internalType": "struct LinkedList.List", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IHorizonStakingTypes.ThawRequestType", + "name": "requestType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getThawedTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delegationRatio", + "type": "uint32" + } + ], + "name": "getTokensAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + } + ], + "name": "isAllowedLockedVerifier", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isAuthorized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isDelegationSlashingEnabled", + "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": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "provision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "thawingPeriod", + "type": "uint64" + } + ], + "name": "provisionLocked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oldServiceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "oldVerifier", + "type": "address" + }, + { + "internalType": "address", + "name": "newServiceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "newVerifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minSharesForNewProvider", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "redelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "oldVerifier", + "type": "address" + }, + { + "internalType": "address", + "name": "newVerifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "reprovision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setAllowedLockedVerifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "feeCut", + "type": "uint256" + } + ], + "name": "setDelegationFeeCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setDelegationSlashingEnabled", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "maxThawingPeriod", + "type": "uint64" + } + ], + "name": "setMaxThawingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setOperatorLocked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint32", + "name": "newMaxVerifierCut", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "newThawingPeriod", + "type": "uint64" + } + ], + "name": "setProvisionParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensVerifier", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifierDestination", + "type": "address" + } + ], + "name": "slash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "stakeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "stakeToProvision", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "thaw", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "undelegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "undelegate", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "verifier", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nThawRequests", + "type": "uint256" + } + ], + "name": "withdrawDelegated", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "withdrawDelegated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] \ No newline at end of file diff --git a/abis/SubgraphService.json b/abis/SubgraphService.json index f2ffdcc6..3fa424a0 100644 --- a/abis/SubgraphService.json +++ b/abis/SubgraphService.json @@ -1,2271 +1,2242 @@ [ - { - "inputs": [ - { - "internalType": "address", - "name": "graphController", - "type": "address" - }, - { - "internalType": "address", - "name": "disputeManager", - "type": "address" - }, - { - "internalType": "address", - "name": "graphTallyCollector", - "type": "address" - }, - { - "internalType": "address", - "name": "curation", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "AllocationAlreadyExists", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "internalType": "uint256", - "name": "closedAt", - "type": "uint256" - } - ], - "name": "AllocationClosed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "AllocationDoesNotExist", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "AllocationManagerAllocationClosed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "AllocationManagerAllocationSameSize", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "AllocationManagerInvalidAllocationProof", - "type": "error" - }, - { - "inputs": [], - "name": "AllocationManagerInvalidZeroAllocationId", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "claimId", - "type": "bytes32" - } - ], - "name": "DataServiceFeesClaimNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "DataServiceFeesZeroTokens", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "DataServicePausableNotPauseGuardian", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "DataServicePausablePauseGuardianNoChange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "internalType": "address", - "name": "disputeManager", - "type": "address" - } - ], - "name": "DirectoryNotDisputeManager", - "type": "error" - }, - { - "inputs": [], - "name": "ECDSAInvalidSignature", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "ECDSAInvalidSignatureLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "ECDSAInvalidSignatureS", - "type": "error" - }, - { - "inputs": [], - "name": "EnforcedPause", - "type": "error" - }, - { - "inputs": [], - "name": "ExpectedPause", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "contractName", - "type": "bytes" - } - ], - "name": "GraphDirectoryInvalidZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "LegacyAllocationAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListEmptyList", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListInvalidIterations", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListInvalidZeroId", - "type": "error" - }, - { - "inputs": [], - "name": "LinkedListMaxElementsExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "a", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "b", - "type": "uint256" - } - ], - "name": "PPMMathInvalidMulPPM", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "name": "ProvisionManagerInvalidRange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "message", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "name": "ProvisionManagerInvalidValue", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "ProvisionManagerNotAuthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "ProvisionManagerProvisionNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokensAvailable", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensRequired", - "type": "uint256" - } - ], - "name": "ProvisionTrackerInsufficientTokens", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "SubgraphServiceAllocationIsAltruistic", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "SubgraphServiceAllocationNotAuthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "SubgraphServiceCannotForceCloseAllocation", - "type": "error" - }, - { - "inputs": [], - "name": "SubgraphServiceEmptyGeohash", - "type": "error" - }, - { - "inputs": [], - "name": "SubgraphServiceEmptyUrl", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "balanceBefore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balanceAfter", - "type": "uint256" - } - ], - "name": "SubgraphServiceInconsistentCollection", - "type": "error" - }, - { - "inputs": [], - "name": "SubgraphServiceIndexerAlreadyRegistered", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "providedIndexer", - "type": "address" - }, - { - "internalType": "address", - "name": "expectedIndexer", - "type": "address" - } - ], - "name": "SubgraphServiceIndexerMismatch", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - } - ], - "name": "SubgraphServiceIndexerNotRegistered", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "collectionId", - "type": "bytes32" - } - ], - "name": "SubgraphServiceInvalidCollectionId", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "curationCut", - "type": "uint256" - } - ], - "name": "SubgraphServiceInvalidCurationCut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "enum IGraphPayments.PaymentTypes", - "name": "paymentType", - "type": "uint8" - } - ], - "name": "SubgraphServiceInvalidPaymentType", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ravIndexer", - "type": "address" - }, - { - "internalType": "address", - "name": "allocationIndexer", - "type": "address" - } - ], - "name": "SubgraphServiceInvalidRAV", - "type": "error" - }, - { - "inputs": [], - "name": "SubgraphServiceInvalidZeroStakeToFeesRatio", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "AllocationClosed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "currentEpoch", - "type": "uint256" - } - ], - "name": "AllocationCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldTokens", - "type": "uint256" - } - ], - "name": "AllocationResized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "curationCut", - "type": "uint256" - } - ], - "name": "CurationCutSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "ratio", - "type": "uint32" - } - ], - "name": "DelegationRatioSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "graphToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "graphStaking", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphPayments", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphEscrow", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "graphController", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphEpochManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphRewardsManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphTokenGateway", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphProxyAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphCuration", - "type": "address" - } - ], - "name": "GraphDirectoryInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensIndexerRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensDelegationRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "poi", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "currentEpoch", - "type": "uint256" - } - ], - "name": "IndexingRewardsCollected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - } - ], - "name": "LegacyAllocationMigrated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "maxPOIStaleness", - "type": "uint256" - } - ], - "name": "MaxPOIStalenessSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "PauseGuardianSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "ProvisionPendingParametersAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "name": "ProvisionTokensRangeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensCollected", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensCurators", - "type": "uint256" - } - ], - "name": "QueryFeesCollected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardsDestination", - "type": "address" - } - ], - "name": "RewardsDestinationSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "enum IGraphPayments.PaymentTypes", - "name": "feeType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ServicePaymentCollected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "ServiceProviderRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "ServiceProviderSlashed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "ServiceStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "ServiceStopped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "claimId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "unlockTimestamp", - "type": "uint256" - } - ], - "name": "StakeClaimLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "claimId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "releasableAt", - "type": "uint256" - } - ], - "name": "StakeClaimReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "serviceProvider", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "claimsCount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensReleased", - "type": "uint256" - } - ], - "name": "StakeClaimsReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "ratio", - "type": "uint256" - } - ], - "name": "StakeToFeesRatioSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "subgraphService", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "disputeManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphTallyCollector", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "curation", - "type": "address" - } - ], - "name": "SubgraphServiceDirectoryInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "min", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "max", - "type": "uint64" - } - ], - "name": "ThawingPeriodRangeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "min", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "max", - "type": "uint32" - } - ], - "name": "VerifierCutRangeSet", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "acceptProvisionPendingParameters", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - } - ], - "name": "allocationProvisionTracker", - "outputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "claimId", - "type": "bytes32" - } - ], - "name": "claims", - "outputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "releasableAt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nextClaim", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "claimsLists", - "outputs": [ - { - "internalType": "bytes32", - "name": "head", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "tail", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "closeStaleAllocation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "enum IGraphPayments.PaymentTypes", - "name": "paymentType", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "collect", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "curationFeesCut", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delegationRatio", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "encodeAllocationProof", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "serviceProvider", - "type": "address" - } - ], - "name": "feesProvisionTracker", - "outputs": [ - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "getAllocation", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "closedAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastPOIPresentedAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accRewardsPerAllocatedToken", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accRewardsPending", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdAtEpoch", - "type": "uint256" - } - ], - "internalType": "struct Allocation.State", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "getAllocationData", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDelegationRatio", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "getLegacyAllocation", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - } - ], - "internalType": "struct LegacyAllocation.State", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getProvisionTokensRange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - } - ], - "name": "getSubgraphAllocatedTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getThawingPeriodRange", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVerifierCutRange", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - } - ], - "name": "indexers", - "outputs": [ - { - "internalType": "uint256", - "name": "registeredAt", - "type": "uint256" - }, - { - "internalType": "string", - "name": "url", - "type": "string" - }, - { - "internalType": "string", - "name": "geoHash", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "minimumProvisionTokens", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "maximumDelegationRatio", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "stakeToFeesRatio", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - } - ], - "name": "isOverAllocated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxPOIStaleness", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maximumProvisionTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maximumThawingPeriod", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maximumVerifierCut", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentID", - "type": "bytes32" - } - ], - "name": "migrateLegacyAllocation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "minimumProvisionTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minimumThawingPeriod", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minimumVerifierCut", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "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": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pauseGuardian", - "type": "address" - } - ], - "name": "pauseGuardians", - "outputs": [ - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "register", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "numClaimsToRelease", - "type": "uint256" - } - ], - "name": "releaseStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "resizeAllocation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - } - ], - "name": "rewardsDestination", - "outputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "curationCut", - "type": "uint256" - } - ], - "name": "setCurationCut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "delegationRatio", - "type": "uint32" - } - ], - "name": "setDelegationRatio", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxPOIStaleness", - "type": "uint256" - } - ], - "name": "setMaxPOIStaleness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "minimumProvisionTokens", - "type": "uint256" - } - ], - "name": "setMinimumProvisionTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pauseGuardian", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "name": "setPauseGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "rewardsDestination", - "type": "address" - } - ], - "name": "setRewardsDestination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "stakeToFeesRatio_", - "type": "uint256" - } - ], - "name": "setStakeToFeesRatio", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "slash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakeToFeesRatio", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "startService", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "stopService", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] \ No newline at end of file + { + "inputs": [ + { + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "internalType": "address", + "name": "disputeManager", + "type": "address" + }, + { + "internalType": "address", + "name": "graphTallyCollector", + "type": "address" + }, + { + "internalType": "address", + "name": "curation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closedAt", + "type": "uint256" + } + ], + "name": "AllocationClosed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationDoesNotExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationManagerAllocationClosed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "AllocationManagerAllocationSameSize", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "AllocationManagerInvalidAllocationProof", + "type": "error" + }, + { + "inputs": [], + "name": "AllocationManagerInvalidZeroAllocationId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + } + ], + "name": "DataServiceFeesClaimNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "DataServiceFeesZeroTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "DataServicePausableNotPauseGuardian", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "DataServicePausablePauseGuardianNoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "disputeManager", + "type": "address" + } + ], + "name": "DirectoryNotDisputeManager", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "contractName", + "type": "bytes" + } + ], + "name": "GraphDirectoryInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "LegacyAllocationAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListEmptyList", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidIterations", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListInvalidZeroId", + "type": "error" + }, + { + "inputs": [], + "name": "LinkedListMaxElementsExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "PPMMathInvalidMulPPM", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ProvisionManagerInvalidRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ProvisionManagerInvalidValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "ProvisionManagerNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "ProvisionManagerProvisionNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokensAvailable", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensRequired", + "type": "uint256" + } + ], + "name": "ProvisionTrackerInsufficientTokens", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "SubgraphServiceAllocationIsAltruistic", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "SubgraphServiceAllocationNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "SubgraphServiceCannotForceCloseAllocation", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceEmptyGeohash", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceEmptyUrl", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balanceBefore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceAfter", + "type": "uint256" + } + ], + "name": "SubgraphServiceInconsistentCollection", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceIndexerAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "providedIndexer", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedIndexer", + "type": "address" + } + ], + "name": "SubgraphServiceIndexerMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "SubgraphServiceIndexerNotRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "collectionId", + "type": "bytes32" + } + ], + "name": "SubgraphServiceInvalidCollectionId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "curationCut", + "type": "uint256" + } + ], + "name": "SubgraphServiceInvalidCurationCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + } + ], + "name": "SubgraphServiceInvalidPaymentType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ravIndexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationIndexer", + "type": "address" + } + ], + "name": "SubgraphServiceInvalidRAV", + "type": "error" + }, + { + "inputs": [], + "name": "SubgraphServiceInvalidZeroStakeToFeesRatio", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "AllocationClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currentEpoch", + "type": "uint256" + } + ], + "name": "AllocationCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldTokens", + "type": "uint256" + } + ], + "name": "AllocationResized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "curationCut", + "type": "uint256" + } + ], + "name": "CurationCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "ratio", + "type": "uint32" + } + ], + "name": "DelegationRatioSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "graphToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphStaking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphPayments", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEscrow", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEpochManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphRewardsManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTokenGateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphProxyAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphCuration", + "type": "address" + } + ], + "name": "GraphDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensIndexerRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensDelegationRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "poi", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "currentEpoch", + "type": "uint256" + } + ], + "name": "IndexingRewardsCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "name": "LegacyAllocationMigrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxPOIStaleness", + "type": "uint256" + } + ], + "name": "MaxPOIStalenessSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "PauseGuardianSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "ProvisionPendingParametersAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ProvisionTokensRangeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensCollected", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensCurators", + "type": "uint256" + } + ], + "name": "QueryFeesCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardsDestination", + "type": "address" + } + ], + "name": "RewardsDestinationSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "feeType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ServicePaymentCollected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "ServiceProviderRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "ServiceProviderSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "ServiceStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "ServiceStopped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "unlockTimestamp", + "type": "uint256" + } + ], + "name": "StakeClaimLocked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "releasableAt", + "type": "uint256" + } + ], + "name": "StakeClaimReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "serviceProvider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "claimsCount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensReleased", + "type": "uint256" + } + ], + "name": "StakeClaimsReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ratio", + "type": "uint256" + } + ], + "name": "StakeToFeesRatioSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "subgraphService", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "disputeManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTallyCollector", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "curation", + "type": "address" + } + ], + "name": "SubgraphServiceDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "min", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "max", + "type": "uint64" + } + ], + "name": "ThawingPeriodRangeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "min", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "max", + "type": "uint32" + } + ], + "name": "VerifierCutRangeSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "acceptProvisionPendingParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "allocationProvisionTracker", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "claimId", + "type": "bytes32" + } + ], + "name": "claims", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "releasableAt", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "nextClaim", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "claimsLists", + "outputs": [ + { + "internalType": "bytes32", + "name": "head", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "tail", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "closeStaleAllocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "enum IGraphPayments.PaymentTypes", + "name": "paymentType", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "curationFeesCut", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "encodeAllocationProof", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "serviceProvider", + "type": "address" + } + ], + "name": "feesProvisionTracker", + "outputs": [ + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "getAllocation", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "closedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastPOIPresentedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPerAllocatedToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPending", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAtEpoch", + "type": "uint256" + } + ], + "internalType": "struct Allocation.State", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "getAllocationData", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCuration", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDelegationRatio", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDisputeManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGraphTallyCollector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "getLegacyAllocation", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "internalType": "struct LegacyAllocation.State", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProvisionTokensRange", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "name": "getSubgraphAllocatedTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getThawingPeriodRange", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifierCutRange", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "indexers", + "outputs": [ + { + "internalType": "uint256", + "name": "registeredAt", + "type": "uint256" + }, + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "string", + "name": "geoHash", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minimumProvisionTokens", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "maximumDelegationRatio", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "stakeToFeesRatio", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "isOverAllocated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxPOIStaleness", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentID", + "type": "bytes32" + } + ], + "name": "migrateLegacyAllocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauseGuardian", + "type": "address" + } + ], + "name": "pauseGuardians", + "outputs": [ + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "register", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numClaimsToRelease", + "type": "uint256" + } + ], + "name": "releaseStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "resizeAllocation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "rewardsDestination", + "outputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "curationCut", + "type": "uint256" + } + ], + "name": "setCurationCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "delegationRatio", + "type": "uint32" + } + ], + "name": "setDelegationRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxPOIStaleness", + "type": "uint256" + } + ], + "name": "setMaxPOIStaleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minimumProvisionTokens", + "type": "uint256" + } + ], + "name": "setMinimumProvisionTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pauseGuardian", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + } + ], + "name": "setPauseGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rewardsDestination", + "type": "address" + } + ], + "name": "setRewardsDestination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "stakeToFeesRatio_", + "type": "uint256" + } + ], + "name": "setStakeToFeesRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "slash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakeToFeesRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "startService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "stopService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/schema.graphql b/schema.graphql index 99e1dcfd..721ba75f 100644 --- a/schema.graphql +++ b/schema.graphql @@ -908,6 +908,10 @@ type Provision @entity { "The total amount of indexing rewards given to delegators" delegatorIndexingRewards: BigInt! + # Query fees + "Total query fees collected. Includes the portion given to delegators" + queryFeesCollected: BigInt! + # Delegation "Tokens delegated to the provision" delegatedTokens: BigInt! diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index e1756e92..7ef17c62 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,7 +1,7 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" import { AllocationClosed, AllocationCreated, AllocationResized, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" -import { createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" -import { Allocation, GraphAccount, Indexer, PoiSubmission } from "../types/schema" +import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" +import { Allocation, GraphAccount, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { @@ -242,4 +242,71 @@ export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): export function handleQueryFeesCollected(event: QueryFeesCollected): void { // To Do + + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let subgraphDeploymentID = event.params.subgraphDeploymentId.toHexString() + let indexerID = event.params.serviceProvider.toHexString() + let allocationID = event.params.allocationId.toHexString() + let paymentAddress = event.params.payer + + // update indexer + let indexer = Indexer.load(indexerID)! + indexer.queryFeesCollected = indexer.queryFeesCollected.plus(event.params.tokensCollected) + indexer.save() + + // update provision + let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) + provision.queryFeesCollected = provision.queryFeesCollected.plus(event.params.tokensCollected) + provision.save() + + // Replicate for payment source specific aggregation + let paymentAggregation = createOrLoadIndexerQueryFeePaymentAggregation(paymentAddress, event.params.serviceProvider) + paymentAggregation.queryFeesCollected = paymentAggregation.queryFeesCollected.plus(event.params.tokensCollected) + paymentAggregation.save() + + // update allocation + let allocation = Allocation.load(allocationID)! + allocation.queryFeesCollected = allocation.queryFeesCollected.plus(event.params.tokensCollected) + allocation.curatorRewards = allocation.curatorRewards.plus(event.params.tokensCurators) + allocation.save() + + // Update epoch + let epoch = createOrLoadEpoch( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!, + ) + epoch.totalQueryFees = epoch.totalQueryFees.plus(event.params.tokensCollected).plus(event.params.tokensCurators) + epoch.queryFeesCollected = epoch.queryFeesCollected.plus(event.params.tokensCollected) + epoch.curatorQueryFees = epoch.curatorQueryFees.plus(event.params.tokensCurators) + epoch.save() + + // update subgraph deployment + let deployment = SubgraphDeployment.load(subgraphDeploymentID)! + deployment.queryFeesAmount = deployment.queryFeesAmount.plus(event.params.tokensCollected) + deployment.signalledTokens = deployment.signalledTokens.plus(event.params.tokensCurators) + deployment.curatorFeeRewards = deployment.curatorFeeRewards.plus(event.params.tokensCurators) + deployment.pricePerShare = calculatePricePerShare(deployment as SubgraphDeployment) + deployment.save() + + batchUpdateSubgraphSignalledTokens(deployment as SubgraphDeployment) + + // update graph network + graphNetwork.totalQueryFees = graphNetwork.totalQueryFees.plus(event.params.tokensCollected).plus(event.params.tokensCurators) + graphNetwork.totalIndexerQueryFeesCollected = graphNetwork.totalIndexerQueryFeesCollected.plus( + event.params.tokensCollected, + ) + graphNetwork.totalCuratorQueryFees = graphNetwork.totalCuratorQueryFees.plus( + event.params.tokensCurators, + ) + graphNetwork.save() + + // Replicate for payment source specific data + let paymentSource = createOrLoadPaymentSource(paymentAddress) + paymentSource.totalQueryFees = paymentSource.totalQueryFees.plus(event.params.tokensCollected).plus(event.params.tokensCurators) + paymentSource.totalIndexerQueryFeesCollected = paymentSource.totalIndexerQueryFeesCollected.plus( + event.params.tokensCollected, + ) + paymentSource.totalCuratorQueryFees = paymentSource.totalCuratorQueryFees.plus( + event.params.tokensCurators, + ) + paymentSource.save() } diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 18bfa2e0..96c7b177 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -463,7 +463,7 @@ dataSources: handler: handleAllocationClosed - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,uint256) handler: handleIndexingRewardsCollected - - event: QueryFeesCollected(indexed address,uint256,uint256) + - event: QueryFeesCollected(indexed address,indexed address,indexed address,bytes32,uint256,uint256) handler: handleQueryFeesCollected - kind: ethereum/contract name: Curation From 6b3584ec038b0320c1688f3373bf032b80ce884a Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 27 Feb 2025 01:24:56 -0300 Subject: [PATCH 27/79] feat: added QueryFeesCollected handler with latest contract changes --- schema.graphql | 9 +++++-- src/mappings/helpers/helpers.ts | 1 + src/mappings/staking.ts | 2 ++ src/mappings/subgraphService.ts | 45 ++++++++++++++++++++++++++++----- 4 files changed, 48 insertions(+), 9 deletions(-) diff --git a/schema.graphql b/schema.graphql index 721ba75f..c12b4561 100644 --- a/schema.graphql +++ b/schema.graphql @@ -575,11 +575,12 @@ type SubgraphDeployment @entity { indexingDelegatorRewardAmount: BigInt! "Total query fees earned by this Subgraph Deployment, without curator query fees" queryFeesAmount: BigInt! - "Total query fee rebates earned from the protocol, through the rebates formula. Does not include delegation fees" + "Total query fee rebates earned from the protocol, through the rebates formula. Does not include delegation query fees" queryFeeRebates: BigInt! "Total curator rewards from fees" curatorFeeRewards: BigInt! - # TODO - We can add a field here for delegation fees earned when calling claim() + "Total query fee rebates earned from the protocol, through the rebates formula. Does not include indexer query fees" + delegatorsQueryFeeRebates: BigInt! # Subgraph deployment curation bonding curve "CURRENT signalled tokens in the bonding curve" @@ -911,6 +912,10 @@ type Provision @entity { # Query fees "Total query fees collected. Includes the portion given to delegators" queryFeesCollected: BigInt! + "Query fee amount collected from the protocol. Does not include portion given to delegators" + providerQueryFees: BigInt! + "Query fee amount collected from the protocol for Delegators. Does not include portion taken by the provider" + delegatorQueryFees: BigInt! # Delegation "Tokens delegated to the provision" diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 2c5829c7..a70eef19 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -102,6 +102,7 @@ export function createOrLoadSubgraphDeployment( deployment.indexingDelegatorRewardAmount = BigInt.fromI32(0) deployment.queryFeesAmount = BigInt.fromI32(0) deployment.queryFeeRebates = BigInt.fromI32(0) + deployment.delegatorsQueryFeeRebates = BigInt.fromI32(0) deployment.curatorFeeRewards = BigInt.fromI32(0) deployment.signalledTokensReceivedOnL2 = BigInt.fromI32(0) deployment.signalledTokensSentToL2 = BigInt.fromI32(0) diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index a35d7b52..ab4a2c71 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -673,6 +673,7 @@ export function handleRebateClaimed(event: RebateClaimed): void { // update subgraph deployment let subgraphDeployment = SubgraphDeployment.load(subgraphDeploymentID)! subgraphDeployment.queryFeeRebates = subgraphDeployment.queryFeeRebates.plus(event.params.tokens) + subgraphDeployment.delegatorsQueryFeeRebates = subgraphDeployment.delegatorsQueryFeeRebates.plus(event.params.delegationFees) subgraphDeployment.save() // update graph network @@ -751,6 +752,7 @@ export function handleRebateCollected(event: RebateCollected): void { deployment.curatorFeeRewards = deployment.curatorFeeRewards.plus(event.params.curationFees) deployment.pricePerShare = calculatePricePerShare(deployment as SubgraphDeployment) deployment.queryFeeRebates = deployment.queryFeeRebates.plus(event.params.queryRebates) + deployment.delegatorsQueryFeeRebates = deployment.delegatorsQueryFeeRebates.plus(event.params.delegationRewards) deployment.save() batchUpdateSubgraphSignalledTokens(deployment as SubgraphDeployment) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 7ef17c62..dd27b7e0 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -241,33 +241,49 @@ export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): } export function handleQueryFeesCollected(event: QueryFeesCollected): void { - // To Do - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) let subgraphDeploymentID = event.params.subgraphDeploymentId.toHexString() let indexerID = event.params.serviceProvider.toHexString() let allocationID = event.params.allocationId.toHexString() let paymentAddress = event.params.payer - // update indexer - let indexer = Indexer.load(indexerID)! - indexer.queryFeesCollected = indexer.queryFeesCollected.plus(event.params.tokensCollected) - indexer.save() - // update provision let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) + + let delegationPoolQueryFees = + provision.delegatedTokens == BigInt.fromI32(0) + ? event.params.tokensCollected + : event.params.tokensCollected + .times(provision.queryFeeCut) + .div(BigInt.fromI32(1000000)) + let indexerQueryFees = event.params.tokensCollected.minus(delegationPoolQueryFees) + provision.queryFeesCollected = provision.queryFeesCollected.plus(event.params.tokensCollected) + provision.providerQueryFees = provision.providerQueryFees.plus(indexerQueryFees) + provision.delegatorQueryFees = provision.delegatorQueryFees.plus(delegationPoolQueryFees) provision.save() + // update indexer + let indexer = Indexer.load(indexerID)! + indexer.queryFeesCollected = indexer.queryFeesCollected.plus(event.params.tokensCollected) + indexer.queryFeeRebates = indexer.queryFeeRebates.plus(indexerQueryFees) + indexer.delegatorQueryFees = indexer.delegatorQueryFees.plus(delegationPoolQueryFees) + indexer.save() + // Replicate for payment source specific aggregation let paymentAggregation = createOrLoadIndexerQueryFeePaymentAggregation(paymentAddress, event.params.serviceProvider) paymentAggregation.queryFeesCollected = paymentAggregation.queryFeesCollected.plus(event.params.tokensCollected) + paymentAggregation.queryFeeRebates = paymentAggregation.queryFeeRebates.plus(indexerQueryFees) + paymentAggregation.delegatorQueryFees = paymentAggregation.delegatorQueryFees.plus(delegationPoolQueryFees) paymentAggregation.save() // update allocation let allocation = Allocation.load(allocationID)! allocation.queryFeesCollected = allocation.queryFeesCollected.plus(event.params.tokensCollected) allocation.curatorRewards = allocation.curatorRewards.plus(event.params.tokensCurators) + allocation.queryFeeRebates = allocation.queryFeeRebates.plus(indexerQueryFees) + allocation.distributedRebates = allocation.distributedRebates.plus(event.params.tokensCollected) + allocation.delegationFees = allocation.delegationFees.plus(delegationPoolQueryFees) allocation.save() // Update epoch @@ -277,6 +293,7 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void { epoch.totalQueryFees = epoch.totalQueryFees.plus(event.params.tokensCollected).plus(event.params.tokensCurators) epoch.queryFeesCollected = epoch.queryFeesCollected.plus(event.params.tokensCollected) epoch.curatorQueryFees = epoch.curatorQueryFees.plus(event.params.tokensCurators) + epoch.queryFeeRebates = epoch.queryFeeRebates.plus(event.params.tokensCollected) epoch.save() // update subgraph deployment @@ -285,6 +302,8 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void { deployment.signalledTokens = deployment.signalledTokens.plus(event.params.tokensCurators) deployment.curatorFeeRewards = deployment.curatorFeeRewards.plus(event.params.tokensCurators) deployment.pricePerShare = calculatePricePerShare(deployment as SubgraphDeployment) + deployment.queryFeeRebates = deployment.queryFeeRebates.plus(indexerQueryFees) + deployment.delegatorsQueryFeeRebates = deployment.delegatorsQueryFeeRebates.plus(delegationPoolQueryFees) deployment.save() batchUpdateSubgraphSignalledTokens(deployment as SubgraphDeployment) @@ -297,6 +316,12 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void { graphNetwork.totalCuratorQueryFees = graphNetwork.totalCuratorQueryFees.plus( event.params.tokensCurators, ) + graphNetwork.totalIndexerQueryFeeRebates = graphNetwork.totalIndexerQueryFeeRebates.plus( + indexerQueryFees, + ) + graphNetwork.totalDelegatorQueryFeeRebates = graphNetwork.totalDelegatorQueryFeeRebates.plus( + delegationPoolQueryFees, + ) graphNetwork.save() // Replicate for payment source specific data @@ -308,5 +333,11 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void { paymentSource.totalCuratorQueryFees = paymentSource.totalCuratorQueryFees.plus( event.params.tokensCurators, ) + paymentSource.totalIndexerQueryFeeRebates = paymentSource.totalIndexerQueryFeeRebates.plus( + indexerQueryFees, + ) + paymentSource.totalDelegatorQueryFeeRebates = paymentSource.totalDelegatorQueryFeeRebates.plus( + delegationPoolQueryFees, + ) paymentSource.save() } From af1ab1ca033d629cdd24a8cce436645e2f1ce31d Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 27 Feb 2025 01:33:23 -0300 Subject: [PATCH 28/79] feat: add GraphPayments abi --- abis/GraphPayments.json | 317 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 abis/GraphPayments.json diff --git a/abis/GraphPayments.json b/abis/GraphPayments.json new file mode 100644 index 00000000..156f9b05 --- /dev/null +++ b/abis/GraphPayments.json @@ -0,0 +1,317 @@ +[ + { + "type": "constructor", + "inputs": [ + { + "name": "controller", + "type": "address", + "internalType": "address" + }, + { + "name": "protocolPaymentCut", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "PROTOCOL_PAYMENT_CUT", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "collect", + "inputs": [ + { + "name": "paymentType", + "type": "uint8", + "internalType": "enum IGraphPayments.PaymentTypes" + }, + { + "name": "receiver", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "dataService", + "type": "address", + "internalType": "address" + }, + { + "name": "dataServiceCut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "multicall", + "inputs": [ + { + "name": "data", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "results", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "GraphDirectoryInitialized", + "inputs": [ + { + "name": "graphToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphStaking", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphPayments", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphEscrow", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphController", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "graphEpochManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphRewardsManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphTokenGateway", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphProxyAdmin", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "graphCuration", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GraphPaymentCollected", + "inputs": [ + { + "name": "paymentType", + "type": "uint8", + "indexed": true, + "internalType": "enum IGraphPayments.PaymentTypes" + }, + { + "name": "payer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "receiver", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "dataService", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensProtocol", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensDataService", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensDelegationPool", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "tokensReceiver", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "FailedInnerCall", + "inputs": [] + }, + { + "type": "error", + "name": "GraphDirectoryInvalidZeroAddress", + "inputs": [ + { + "name": "contractName", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "type": "error", + "name": "GraphPaymentsInvalidCut", + "inputs": [ + { + "name": "cut", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "GraphPaymentsInvalidProtocolPaymentCut", + "inputs": [ + { + "name": "protocolPaymentCut", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "PPMMathInvalidMulPPM", + "inputs": [ + { + "name": "a", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "b", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "PPMMathInvalidPPM", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ] + } +] \ No newline at end of file From 1aa856bfd2c6d44e257d5788386b4ed2daa60994 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 27 Feb 2025 01:58:53 -0300 Subject: [PATCH 29/79] feat: add tax tracking for Horizon through GraphPayments --- config/addresses.template.ts | 2 ++ config/arbitrumSepoliaAddressScript.ts | 8 ++++++++ config/mainnetArbitrumAddressScript.ts | 4 ++++ config/testAddressesL1.ts | 1 + config/testAddressesL2.ts | 1 + src/mappings/graphPayments.ts | 25 +++++++++++++++++++++++++ subgraph.template.yaml | 24 ++++++++++++++++++++++++ 7 files changed, 65 insertions(+) create mode 100644 src/mappings/graphPayments.ts diff --git a/config/addresses.template.ts b/config/addresses.template.ts index 3121b7e5..89df6658 100644 --- a/config/addresses.template.ts +++ b/config/addresses.template.ts @@ -21,6 +21,7 @@ export class Addresses { l2GraphTokenGateway: string ethereumDIDRegistry: string subgraphService: string + graphPayments: string isL1: boolean } @@ -47,5 +48,6 @@ export let addresses: Addresses = { l2GraphTokenGateway: '{{l2GraphTokenGateway}}', ethereumDIDRegistry: '{{ethereumDIDRegistry}}', subgraphService: '{{subgraphService}}', + graphPayments: '{{graphPayments}}', isL1: {{isL1}}, } diff --git a/config/arbitrumSepoliaAddressScript.ts b/config/arbitrumSepoliaAddressScript.ts index 44334c9d..35f7daf0 100644 --- a/config/arbitrumSepoliaAddressScript.ts +++ b/config/arbitrumSepoliaAddressScript.ts @@ -30,6 +30,7 @@ export let addresses: Addresses = { l2GraphTokenGateway: '{{arbsep.L2GraphTokenGateway.address}}', ethereumDIDRegistry: '{{arbsep.EthereumDIDRegistry.address}}', subgraphService: '{{arbsep.SubgraphService.address}}', + graphPayments: '{{arbsep.GraphPayments.address}}', isL1: false, } @@ -46,6 +47,13 @@ const main = (): void => { if(output.ethereumDIDRegistry == '') { output.ethereumDIDRegistry = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } + // remove once we have proper packages + if(output.subgraphService == '') { + output.subgraphService = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } + if(output.graphPayments == '') { + output.graphPayments = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { console.log(`Error saving artifacts: ${e.message}`) diff --git a/config/mainnetArbitrumAddressScript.ts b/config/mainnetArbitrumAddressScript.ts index 9384be1e..97f74e18 100644 --- a/config/mainnetArbitrumAddressScript.ts +++ b/config/mainnetArbitrumAddressScript.ts @@ -30,6 +30,7 @@ export let addresses: Addresses = { l2GraphTokenGateway: '{{arbitrum.L2GraphTokenGateway.address}}', ethereumDIDRegistry: '{{arbitrum.IEthereumDIDRegistry.address}}', subgraphService: '{{arbitrum.SubgraphService.address}}', + graphPayments: '{{arbitrum.GraphPayments.address}}', isL1: false, } @@ -51,6 +52,9 @@ const main = (): void => { if(output.subgraphService == '') { output.subgraphService = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } + if(output.graphPayments == '') { + output.graphPayments = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { console.log(`Error saving artifacts: ${e.message}`) diff --git a/config/testAddressesL1.ts b/config/testAddressesL1.ts index 56bbbb32..b6faebe5 100644 --- a/config/testAddressesL1.ts +++ b/config/testAddressesL1.ts @@ -30,6 +30,7 @@ export let addresses: Addresses = { l2GraphTokenGateway: '', ethereumDIDRegistry: '0x0000000000000000000000000000000000000000', subgraphService: '0x0000000000000000000000000000000000000000', + graphPayments: '0x0000000000000000000000000000000000000000', isL1: true, } diff --git a/config/testAddressesL2.ts b/config/testAddressesL2.ts index 0fab2b9a..4bfc932c 100644 --- a/config/testAddressesL2.ts +++ b/config/testAddressesL2.ts @@ -30,6 +30,7 @@ export let addresses: Addresses = { l2GraphTokenGateway: '0x0000000000000000000000000000000000000000', ethereumDIDRegistry: '0x0000000000000000000000000000000000000000', subgraphService: '0x0000000000000000000000000000000000000000', + graphPayments: '0x0000000000000000000000000000000000000000', isL1: false, } diff --git a/src/mappings/graphPayments.ts b/src/mappings/graphPayments.ts new file mode 100644 index 00000000..408560ee --- /dev/null +++ b/src/mappings/graphPayments.ts @@ -0,0 +1,25 @@ +import { addresses } from "../../config/addresses" +import { GraphPaymentCollected } from "../types/GraphPayments/GraphPayments" +import { createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadPaymentSource } from "./helpers/helpers" + +export function handleGraphPaymentCollected(event: GraphPaymentCollected): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + + // Update epoch + let epoch = createOrLoadEpoch( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!, + ) + epoch.taxedQueryFees = epoch.taxedQueryFees.plus(event.params.tokensProtocol) + epoch.save() + + // update graph network + graphNetwork.totalTaxedQueryFees = graphNetwork.totalTaxedQueryFees.plus(event.params.tokensProtocol) + graphNetwork.save() + + // Replicate for payment source specific data + let paymentSource = createOrLoadPaymentSource(event.params.payer) + paymentSource.totalTaxedQueryFees = paymentSource.totalTaxedQueryFees.plus(event.params.tokensProtocol) + paymentSource.save() + + // Might want to add data service tax tracking here +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 96c7b177..7b3bb3f3 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -465,6 +465,30 @@ dataSources: handler: handleIndexingRewardsCollected - event: QueryFeesCollected(indexed address,indexed address,indexed address,bytes32,uint256,uint256) handler: handleQueryFeesCollected + - kind: ethereum/contract + name: GraphPayments + network: {{network}} + source: + address: "{{graphPayments}}" + abi: GraphPayments + startBlock: {{blockNumber}} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./src/mappings/graphPayments.ts + entities: + - GraphNetwork + abis: + - name: GraphPayments + file: ./abis/GraphPayments.json + - name: GraphToken + file: ./node_modules/@graphprotocol/contracts/dist/abis/GraphToken.json + - name: EpochManager + file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json + eventHandlers: + - event: GraphPaymentCollected(indexed uint8,indexed address,address,indexed address,uint256,uint256,uint256,uint256,uint256) + handler: handleGraphPaymentCollected - kind: ethereum/contract name: Curation network: {{network}} From 4c3030abdec53494318849a1d5fdb7a15da6cc30 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 27 Feb 2025 02:36:24 -0300 Subject: [PATCH 30/79] feat: placeholders and manifest changes for delegation --- src/mappings/horizonStaking.ts | 24 +++++++++++++++++++++++- subgraph.template.yaml | 10 ++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 3253cea6..cb6a5f72 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,6 +1,6 @@ import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' -import { DelegationFeeCutSet, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, TokensDeprovisioned, TokensToDelegationPoolAdded } from '../types/HorizonStaking/HorizonStaking' +import { DelegatedTokensWithdrawn, DelegationFeeCutSet, DelegationSlashed, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, StakeDelegatedWithdrawn, TokensDelegated, TokensDeprovisioned, TokensToDelegationPoolAdded, TokensUndelegated } from '../types/HorizonStaking/HorizonStaking' import { Indexer, ThawRequest } from '../types/schema' import { createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateDelegationExchangeRate } from './helpers/helpers' import { @@ -279,4 +279,26 @@ export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolA graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens) graphNetwork.save() +} + +// Delegation + +export function handleTokensDelegated(event: TokensDelegated): void { + // To Do +} + +export function handleDelegationSlashed(event: DelegationSlashed): void { + // To Do +} + +export function handleTokensUndelegated(event: TokensUndelegated): void { + // To Do +} + +export function handleDelegatedTokensWithdrawn(event: DelegatedTokensWithdrawn): void { + // To Do +} + +export function handleStakeDelegatedWithdrawn(event: StakeDelegatedWithdrawn): void { + // To Do } \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 7b3bb3f3..2cbdc33a 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -429,6 +429,16 @@ dataSources: handler: handleDelegationFeeCutSet - event: TokensToDelegationPoolAdded(indexed address,indexed address,uint256) handler: handleTokensToDelegationPoolAdded + - event: TokensDelegated(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleTokensDelegated + - event: DelegationSlashed(indexed address,indexed address,uint256) + handler: handleDelegationSlashed + - event: TokensUndelegated(indexed address,indexed address,indexed address,uint256) + handler: handleTokensUndelegated + - event: DelegatedTokensWithdrawn(indexed address,indexed address,indexed address,uint256) + handler: handleDelegatedTokensWithdrawn + - event: StakeDelegatedWithdrawn(indexed address,indexed address,uint256) + handler: handleStakeDelegatedWithdrawn - kind: ethereum/contract name: SubgraphService network: {{network}} From 1956b90b8f76f64509a546eb05c17d8eeaa5c7c1 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 3 Mar 2025 20:35:00 -0300 Subject: [PATCH 31/79] feat: added horizon delegation events support --- abis/HorizonStaking.json | 35 ++++++- schema.graphql | 20 +++- src/mappings/helpers/helpers.ts | 118 ++++++++++++++++++++- src/mappings/horizonStaking.ts | 176 ++++++++++++++++++++++++++++++-- subgraph.template.yaml | 4 +- 5 files changed, 331 insertions(+), 22 deletions(-) diff --git a/abis/HorizonStaking.json b/abis/HorizonStaking.json index 67eb616b..1b2a72f6 100644 --- a/abis/HorizonStaking.json +++ b/abis/HorizonStaking.json @@ -254,6 +254,11 @@ "name": "HorizonStakingInvalidZeroTokens", "type": "error" }, + { + "inputs": [], + "name": "HorizonStakingLegacySlashFailed", + "type": "error" + }, { "inputs": [ { @@ -280,6 +285,11 @@ "name": "HorizonStakingNothingThawing", "type": "error" }, + { + "inputs": [], + "name": "HorizonStakingNothingToWithdraw", + "type": "error" + }, { "inputs": [], "name": "HorizonStakingProvisionAlreadyExists", @@ -1159,6 +1169,12 @@ "internalType": "uint256", "name": "tokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" } ], "name": "TokensUndelegated", @@ -1517,7 +1533,7 @@ "outputs": [ { "internalType": "uint256", - "name": "tokens", + "name": "", "type": "uint256" } ], @@ -1682,6 +1698,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getStakingExtension", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -2423,9 +2452,5 @@ ], "stateMutability": "nonpayable", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" } ] \ No newline at end of file diff --git a/schema.graphql b/schema.graphql index c12b4561..d388b553 100644 --- a/schema.graphql +++ b/schema.graphql @@ -893,12 +893,22 @@ type Provision @entity { thawingPeriodPending: BigInt! # Cuts for subgraph service. Percentage of rewards that the delegation pool receives + "Raw query fee cut. In Horizon this is amount of query fees that the delegation pool receives in PPM" queryFeeCut: BigInt! + "Raw indexing fee cut. In Horizon this is amount of indexing fees that the delegation pool receives in PPM" indexingFeeCut: BigInt! + "Raw indexing rewards cut. In Horizon this is amount of indexing rewards that the delegation pool receives in PPM" indexingRewardsCut: BigInt! + "The percent of indexing rewards generated by the delegated stake that the Indexer keeps for itself" + indexingRewardEffectiveCut: BigDecimal! + "The percent of query rebate rewards generated by the delegated stake that the Indexer keeps for itself" + queryFeeEffectiveCut: BigDecimal! + "The percent of reward dilution delegators experience because of overdelegation. Overdelegated stake can't be used to generate rewards but still gets accounted while distributing the generated rewards. This causes dilution of the rewards for the rest of the pool." + overDelegationDilution: BigDecimal! + # Might want to add polymorphic handling of different fee cuts through a generic hashmap in the future # Indexing rewards. Keeping the same naming from Indexer entity to make it easier to understand @@ -924,6 +934,10 @@ type Provision @entity { delegatorShares: BigInt! "Exchange rate of of tokens received for each share" delegationExchangeRate: BigDecimal! + "Ratio between the amount of the indexers own stake over the total usable stake." + ownStakeRatio: BigDecimal! + "Ratio between the amount of delegated stake over the total usable stake." + delegatedStakeRatio: BigDecimal! "Service registry URL for the indexer" url: String @@ -1111,8 +1125,12 @@ Delegator stake for a single Indexer type DelegatedStake @entity { "Concatenation of Delegator address and Indexer address" id: ID! - "Index the stake is delegated to" + "Indexer the stake is delegated to" indexer: Indexer! + "DataService the stake is delegated to. Only for Horizon delegations" + dataService: DataService + "Provision the stake is delegated to. Only for Horizon delegations" + provision: Provision "Delegator" delegator: Delegator! "CUMULATIVE tokens delegated" diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index a70eef19..93d815d2 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -348,6 +348,46 @@ export function createOrLoadDelegatedStake( } return delegatedStake as DelegatedStake } + +export function createOrLoadDelegatedStakeForProvision( + delegator: string, + indexer: string, + dataService: string, + timestamp: i32, +): DelegatedStake { + let provisionId = joinID([indexer, dataService]) + let id = joinID([delegator, provisionId]) + let delegatedStake = DelegatedStake.load(id) + if (delegatedStake == null) { + delegatedStake = new DelegatedStake(id) + delegatedStake.indexer = indexer + delegatedStake.dataService = dataService + delegatedStake.provision = provisionId + delegatedStake.delegator = delegator + delegatedStake.stakedTokens = BigInt.fromI32(0) + delegatedStake.transferredToL2 = false + delegatedStake.stakedTokensTransferredToL2 = BigInt.fromI32(0) + delegatedStake.unstakedTokens = BigInt.fromI32(0) + delegatedStake.lockedTokens = BigInt.fromI32(0) + delegatedStake.lockedUntil = 0 + delegatedStake.shareAmount = BigInt.fromI32(0) + delegatedStake.personalExchangeRate = BigDecimal.fromString('1') + delegatedStake.realizedRewards = BigDecimal.fromString('0') + delegatedStake.createdAt = timestamp + + delegatedStake.save() + + let delegatorEntity = Delegator.load(delegator)! + delegatorEntity.stakesCount = delegatorEntity.stakesCount + 1 + delegatorEntity.save() + + let graphNetwork = GraphNetwork.load('1')! + graphNetwork.delegationCount = graphNetwork.delegationCount + 1 + graphNetwork.save() + } + return delegatedStake as DelegatedStake +} + export function createOrLoadCurator(curatorAddress: Bytes, timestamp: BigInt): Curator { let id = curatorAddress.toHexString() let curator = Curator.load(id) @@ -916,6 +956,68 @@ export function updateAdvancedIndexerMetrics(indexer: Indexer): Indexer { return indexer as Indexer } +export function calculateOwnStakeRatioForProvision(provision: Provision): BigDecimal { + let totalTokens = provision.tokensProvisioned.plus(provision.delegatedTokens) + return totalTokens == BigInt.fromI32(0) + ? BigDecimal.fromString('0') + : provision.tokensProvisioned.toBigDecimal().div(totalTokens.toBigDecimal()) +} + +export function calculateDelegatedStakeRatioForProvision(provision: Provision): BigDecimal { + let totalTokens = provision.tokensProvisioned.plus(provision.delegatedTokens) + return totalTokens == BigInt.fromI32(0) + ? BigDecimal.fromString('0') + : provision.delegatedTokens.toBigDecimal().div(totalTokens.toBigDecimal()) +} + +export function calculateIndexingRewardEffectiveCutForProvision(provision: Provision): BigDecimal { + let delegatorCut = + provision.indexingRewardsCut.toBigDecimal() / + BigDecimal.fromString('1000000') + return provision.delegatedStakeRatio == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : BigDecimal.fromString('1') - delegatorCut / provision.delegatedStakeRatio +} + +export function calculateQueryFeeEffectiveCutForProvision(provision: Provision): BigDecimal { + let delegatorCut = + provision.queryFeeCut.toBigDecimal() / BigDecimal.fromString('1000000') + return provision.delegatedStakeRatio == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : BigDecimal.fromString('1') - delegatorCut / provision.delegatedStakeRatio +} + +export function calculateIndexerRewardOwnGenerationRatioForProvision(provision: Provision): BigDecimal { + let rewardCut = + provision.indexingRewardsCut.toBigDecimal() / BigDecimal.fromString('1000000') + return provision.ownStakeRatio == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : rewardCut / provision.ownStakeRatio +} + +export function calculateOverdelegationDilutionForProvision(provision: Provision): BigDecimal { + let provisionedTokensBD = provision.tokensProvisioned.toBigDecimal() + let delegatedTokensBD = provision.delegatedTokens.toBigDecimal() + let graphNetwork = GraphNetwork.load('1')! + let delegationRatioBD = BigInt.fromI32(graphNetwork.delegationRatio).toBigDecimal() + let maxDelegatedStake = provisionedTokensBD * delegationRatioBD + return provisionedTokensBD == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : BigDecimal.fromString('1') - maxDelegatedStake / max(maxDelegatedStake, delegatedTokensBD) +} + +export function updateAdvancedProvisionMetrics(provision: Provision): Provision { + provision.ownStakeRatio = calculateOwnStakeRatioForProvision(provision as Provision) + provision.delegatedStakeRatio = calculateDelegatedStakeRatioForProvision(provision as Provision) + provision.indexingRewardEffectiveCut = calculateIndexingRewardEffectiveCutForProvision(provision as Provision) + provision.queryFeeEffectiveCut = calculateQueryFeeEffectiveCutForProvision(provision as Provision) + provision.indexerRewardsOwnGenerationRatio = calculateIndexerRewardOwnGenerationRatioForProvision( + provision as Provision, + ) + provision.overDelegationDilution = calculateOverdelegationDilutionForProvision(provision as Provision) + return provision as Provision +} + export function updateDelegationExchangeRate(indexer: Indexer): Indexer { indexer.delegationExchangeRate = indexer.delegatedTokens .toBigDecimal() @@ -924,6 +1026,14 @@ export function updateDelegationExchangeRate(indexer: Indexer): Indexer { return indexer as Indexer } +export function updateDelegationExchangeRateForProvision(provision: Provision): Provision { + provision.delegationExchangeRate = provision.delegatedTokens + .toBigDecimal() + .div(provision.delegatorShares.toBigDecimal()) + .truncate(18) + return provision as Provision +} + // TODO - this is broken if we change the delegatio ratio // Need to remove, or find a fix export function calculateCapacities(indexer: Indexer): Indexer { @@ -957,10 +1067,10 @@ export function calculatePricePerShare(deployment: SubgraphDeployment): BigDecim deployment.signalAmount == BigInt.fromI32(0) ? BigDecimal.fromString('0') : deployment.signalledTokens - .toBigDecimal() - .div(deployment.signalAmount.toBigDecimal()) - .times(BigInt.fromI32(reserveRatioMultiplier).toBigDecimal()) - .truncate(18) + .toBigDecimal() + .div(deployment.signalAmount.toBigDecimal()) + .times(BigInt.fromI32(reserveRatioMultiplier).toBigDecimal()) + .truncate(18) return pricePerShare } diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index cb6a5f72..40519a75 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,8 +1,8 @@ import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' import { DelegatedTokensWithdrawn, DelegationFeeCutSet, DelegationSlashed, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, StakeDelegatedWithdrawn, TokensDelegated, TokensDeprovisioned, TokensToDelegationPoolAdded, TokensUndelegated } from '../types/HorizonStaking/HorizonStaking' -import { Indexer, ThawRequest } from '../types/schema' -import { createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, updateDelegationExchangeRate } from './helpers/helpers' +import { DelegatedStake, Delegator, Indexer, Provision, ThawRequest } from '../types/schema' +import { calculateCapacities, createOrLoadDataService, createOrLoadDelegatedStake, createOrLoadDelegatedStakeForProvision, createOrLoadDelegator, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, joinID, updateAdvancedIndexerMetrics, updateAdvancedProvisionMetrics, updateDelegationExchangeRate, updateDelegationExchangeRateForProvision } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -284,21 +284,179 @@ export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolA // Delegation export function handleTokensDelegated(event: TokensDelegated): void { - // To Do + let zeroShares = event.params.shares.equals(BigInt.fromI32(0)) + + let dataService = createOrLoadDataService(event.params.verifier) + // Might want to track some stuff here in the future + dataService.save() + + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + provision.delegatedTokens = provision.delegatedTokens.plus(event.params.tokens) + provision.delegatorShares = provision.delegatorShares.plus(event.params.shares) + if (provision.delegatorShares != BigInt.fromI32(0)) { + provision = updateDelegationExchangeRateForProvision(provision as Provision) + } + provision = updateAdvancedProvisionMetrics(provision as Provision) + provision.save() + + // update indexer + let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) + indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) + indexer.delegatorShares = indexer.delegatorShares.plus(event.params.shares) + indexer.save() + + // update delegator + let delegatorID = event.params.delegator.toHexString() + let delegator = createOrLoadDelegator(event.params.delegator, event.block.timestamp) + delegator.totalStakedTokens = delegator.totalStakedTokens.plus(event.params.tokens) + delegator.save() + + // update delegated stake + let delegatedStake = createOrLoadDelegatedStakeForProvision( + delegatorID, + indexer.id, + dataService.id, + event.block.timestamp.toI32(), + ) + + if (!zeroShares) { + let previousExchangeRate = delegatedStake.personalExchangeRate + let previousShares = delegatedStake.shareAmount + let averageCostBasisTokens = previousExchangeRate + .times(previousShares.toBigDecimal()) + .plus(event.params.tokens.toBigDecimal()) + let averageCostBasisShares = previousShares.plus(event.params.shares) + if (averageCostBasisShares.gt(BigInt.fromI32(0))) { + delegatedStake.personalExchangeRate = averageCostBasisTokens + .div(averageCostBasisShares.toBigDecimal()) + .truncate(18) + } + } + + let isStakeBecomingActive = delegatedStake.shareAmount.isZero() && !event.params.shares.isZero() + + delegatedStake.stakedTokens = delegatedStake.stakedTokens.plus(event.params.tokens) + delegatedStake.shareAmount = delegatedStake.shareAmount.plus(event.params.shares) + delegatedStake.lastDelegatedAt = event.block.timestamp.toI32() + delegatedStake.save() + + // reload delegator to avoid edge case where we can overwrite stakesCount if stake is new + delegator = Delegator.load(delegatorID) as Delegator + + // upgrade graph network + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens) + + if (isStakeBecomingActive) { + graphNetwork.activeDelegationCount = graphNetwork.activeDelegationCount + 1 + delegator.activeStakesCount = delegator.activeStakesCount + 1 + // Is delegator becoming active because of the stake becoming active? + if (delegator.activeStakesCount == 1) { + graphNetwork.activeDelegatorCount = graphNetwork.activeDelegatorCount + 1 + } + } + + graphNetwork.save() + delegator.save() } export function handleDelegationSlashed(event: DelegationSlashed): void { - // To Do + // This is a delegation pool wide change, no particular delegation or delegator can be updated here. + + // update provision + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + provision.delegatedTokens = provision.delegatedTokens.minus(event.params.tokens) + if (provision.delegatorShares != BigInt.fromI32(0)) { + provision = updateDelegationExchangeRateForProvision(provision as Provision) + } + provision = updateAdvancedProvisionMetrics(provision as Provision) + provision.save() + + // update indexer + let indexerID = event.params.serviceProvider.toHexString() + let indexer = Indexer.load(indexerID)! + indexer.delegatedTokens = indexer.delegatedTokens.minus(event.params.tokens) + indexer.save() + + // upgrade graph network + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.minus(event.params.tokens) + graphNetwork.save() } export function handleTokensUndelegated(event: TokensUndelegated): void { - // To Do + // update provision + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + + let beforeUpdateDelegationExchangeRate = provision.delegationExchangeRate + + provision.delegatedTokens = provision.delegatedTokens.minus(event.params.tokens) + provision.delegatorShares = provision.delegatorShares.minus(event.params.shares) + if (provision.delegatorShares != BigInt.fromI32(0)) { + provision = updateDelegationExchangeRateForProvision(provision as Provision) + } + provision = updateAdvancedProvisionMetrics(provision as Provision) + provision.save() + + // update indexer + let indexerID = event.params.serviceProvider.toHexString() + let indexer = Indexer.load(indexerID)! + indexer.delegatedTokens = indexer.delegatedTokens.minus(event.params.tokens) + indexer.delegatorShares = indexer.delegatorShares.minus(event.params.shares) + indexer.save() + + // update delegated stake + let delegatorID = event.params.delegator.toHexString() + let id = joinID([delegatorID, provision.id]) + let delegatedStake = DelegatedStake.load(id)! + + let isStakeBecomingInactive = + !delegatedStake.shareAmount.isZero() && delegatedStake.shareAmount == event.params.shares + + delegatedStake.unstakedTokens = delegatedStake.unstakedTokens.plus(event.params.tokens) + delegatedStake.shareAmount = delegatedStake.shareAmount.minus(event.params.shares) + delegatedStake.lockedTokens = delegatedStake.lockedTokens.plus(event.params.tokens) + //delegatedStake.lockedUntil = event.params.until.toI32() // until always updates and overwrites the past lockedUntil time + delegatedStake.lastUndelegatedAt = event.block.timestamp.toI32() + + let currentBalance = event.params.shares.toBigDecimal().times(beforeUpdateDelegationExchangeRate) + let oldBalance = event.params.shares.toBigDecimal().times(delegatedStake.personalExchangeRate) + let realizedRewards = currentBalance.minus(oldBalance) + + delegatedStake.realizedRewards = delegatedStake.realizedRewards.plus(realizedRewards) + delegatedStake.save() + + // update delegator + let delegator = Delegator.load(delegatorID)! + delegator.totalUnstakedTokens = delegator.totalUnstakedTokens.plus(event.params.tokens) + delegator.totalRealizedRewards = delegator.totalRealizedRewards.plus(realizedRewards) + + // upgrade graph network + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.minus(event.params.tokens) + + if (isStakeBecomingInactive) { + graphNetwork.activeDelegationCount = graphNetwork.activeDelegationCount - 1 + delegator.activeStakesCount = delegator.activeStakesCount - 1 + // Is delegator becoming inactive because of the stake becoming inactive? + if (delegator.activeStakesCount == 0) { + graphNetwork.activeDelegatorCount = graphNetwork.activeDelegatorCount - 1 + } + } + + graphNetwork.save() + delegator.save() } export function handleDelegatedTokensWithdrawn(event: DelegatedTokensWithdrawn): void { - // To Do -} + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + // might want to track locked/thawing tokens in provision too + provision.save() -export function handleStakeDelegatedWithdrawn(event: StakeDelegatedWithdrawn): void { - // To Do + // update delegated stake + let delegatorID = event.params.delegator.toHexString() + let id = joinID([delegatorID, provision.id]) + let delegatedStake = DelegatedStake.load(id)! + delegatedStake.lockedTokens = delegatedStake.lockedTokens.minus(event.params.tokens) + delegatedStake.save() } \ No newline at end of file diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 2cbdc33a..34b1f105 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -433,12 +433,10 @@ dataSources: handler: handleTokensDelegated - event: DelegationSlashed(indexed address,indexed address,uint256) handler: handleDelegationSlashed - - event: TokensUndelegated(indexed address,indexed address,indexed address,uint256) + - event: TokensUndelegated(indexed address,indexed address,indexed address,uint256,uint256) handler: handleTokensUndelegated - event: DelegatedTokensWithdrawn(indexed address,indexed address,indexed address,uint256) handler: handleDelegatedTokensWithdrawn - - event: StakeDelegatedWithdrawn(indexed address,indexed address,uint256) - handler: handleStakeDelegatedWithdrawn - kind: ethereum/contract name: SubgraphService network: {{network}} From c646fed0522e0a58b8ab080dd5e4502ca21c7b19 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Thu, 6 Mar 2025 01:12:50 -0300 Subject: [PATCH 32/79] fix: missing inits --- schema.graphql | 2 ++ src/mappings/helpers/helpers.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/schema.graphql b/schema.graphql index d388b553..86526577 100644 --- a/schema.graphql +++ b/schema.graphql @@ -938,6 +938,8 @@ type Provision @entity { ownStakeRatio: BigDecimal! "Ratio between the amount of delegated stake over the total usable stake." delegatedStakeRatio: BigDecimal! + "Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake" + indexerRewardsOwnGenerationRatio: BigDecimal! "Service registry URL for the indexer" url: String diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 93d815d2..f2f233c0 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -216,6 +216,11 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.delegatedTokens = BigInt.fromI32(0) provision.delegatorShares = BigInt.fromI32(0) provision.delegationExchangeRate = BigInt.fromI32(0).toBigDecimal() + provision.indexingRewardEffectiveCut = BigInt.fromI32(0).toBigDecimal() + provision.queryFeeEffectiveCut = BigInt.fromI32(0).toBigDecimal() + provision.ownStakeRatio = BigInt.fromI32(0).toBigDecimal() + provision.delegatedStakeRatio = BigInt.fromI32(0).toBigDecimal() + provision.indexerRewardsOwnGenerationRatio = BigInt.fromI32(0).toBigDecimal() provision.save() } From add1dc5ec5830d860f164a709f35e62138a9272a Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sun, 30 Mar 2025 17:37:10 -0300 Subject: [PATCH 33/79] fix: address gh pr feedback --- schema.graphql | 15 +++++++++++---- src/mappings/helpers/helpers.ts | 13 +++++++++---- src/mappings/horizonStaking.ts | 8 +++++--- src/mappings/subgraphService.ts | 10 ++++++++-- subgraph.template.yaml | 2 ++ 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/schema.graphql b/schema.graphql index 86526577..fdf94006 100644 --- a/schema.graphql +++ b/schema.graphql @@ -246,6 +246,9 @@ type DataService @entity { "Total GRT currently in allocations for this DataService" totalTokensAllocated: BigInt! + "Ratio of max staked delegation tokens to indexers stake that earns rewards" + delegationRatio: Int + provisions: [Provision!]! @derivedFrom(field: "dataService") } @@ -867,6 +870,10 @@ type Provision @entity { tokensAllocated: BigInt! + tokensSlashedServiceProvider: BigInt! + + tokensSlashedDelegationPool: BigInt! + totalAllocationCount: BigInt! allocationCount: Int! @@ -904,7 +911,7 @@ type Provision @entity { "The percent of indexing rewards generated by the delegated stake that the Indexer keeps for itself" indexingRewardEffectiveCut: BigDecimal! - "The percent of query rebate rewards generated by the delegated stake that the Indexer keeps for itself" + "The percent of query fees generated by the delegated stake that the Indexer keeps for itself" queryFeeEffectiveCut: BigDecimal! "The percent of reward dilution delegators experience because of overdelegation. Overdelegated stake can't be used to generate rewards but still gets accounted while distributing the generated rewards. This causes dilution of the rewards for the rest of the pool." overDelegationDilution: BigDecimal! @@ -934,11 +941,11 @@ type Provision @entity { delegatorShares: BigInt! "Exchange rate of of tokens received for each share" delegationExchangeRate: BigDecimal! - "Ratio between the amount of the indexers own stake over the total usable stake." + "Ratio between the amount of the indexers own stake over the total usable stake (capped by the delegationRatio)." ownStakeRatio: BigDecimal! - "Ratio between the amount of delegated stake over the total usable stake." + "Ratio between the amount of delegated stake over the total usable stake (capped by the delegationRatio)." delegatedStakeRatio: BigDecimal! - "Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake" + "Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake, the value can be over 100% or below depending on the amount of delegation and cuts set" indexerRewardsOwnGenerationRatio: BigDecimal! "Service registry URL for the indexer" diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index f2f233c0..1787efbe 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -202,6 +202,8 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.dataService = verifierAddress.toHexString() provision.tokensProvisioned = BigInt.fromI32(0) provision.tokensAllocated = BigInt.fromI32(0) + provision.tokensSlashedServiceProvider = BigInt.fromI32(0) + provision.tokensSlashedDelegationPool = BigInt.fromI32(0) provision.totalAllocationCount = BigInt.fromI32(0) provision.allocationCount = 0 provision.tokensThawing = BigInt.fromI32(0) @@ -993,18 +995,21 @@ export function calculateQueryFeeEffectiveCutForProvision(provision: Provision): } export function calculateIndexerRewardOwnGenerationRatioForProvision(provision: Provision): BigDecimal { - let rewardCut = + let delegatorCut = provision.indexingRewardsCut.toBigDecimal() / BigDecimal.fromString('1000000') return provision.ownStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') - : rewardCut / provision.ownStakeRatio + : (BigDecimal.fromString('1') - delegatorCut) / provision.ownStakeRatio } export function calculateOverdelegationDilutionForProvision(provision: Provision): BigDecimal { let provisionedTokensBD = provision.tokensProvisioned.toBigDecimal() let delegatedTokensBD = provision.delegatedTokens.toBigDecimal() - let graphNetwork = GraphNetwork.load('1')! - let delegationRatioBD = BigInt.fromI32(graphNetwork.delegationRatio).toBigDecimal() + let dataService = DataService.load(provision.dataService)! + if (dataService.delegationRatio == null) { + return BigDecimal.fromString('0') + } + let delegationRatioBD = BigInt.fromI32(dataService.delegationRatio).toBigDecimal() let maxDelegatedStake = provisionedTokensBD * delegationRatioBD return provisionedTokensBD == BigDecimal.fromString('0') ? BigDecimal.fromString('0') diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 40519a75..3407d6a2 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -230,15 +230,16 @@ export function handleProvisionSlashed(event: ProvisionSlashed): void { indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) indexer.save() - + dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.minus(event.params.tokens) dataService.save() - + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) graphNetwork.save() - + provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) + provision.tokensSlashedServiceProvider = provision.tokensSlashedServiceProvider.plus(event.params.tokens) provision.save() } @@ -366,6 +367,7 @@ export function handleDelegationSlashed(event: DelegationSlashed): void { // update provision let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) provision.delegatedTokens = provision.delegatedTokens.minus(event.params.tokens) + provision.tokensSlashedDelegationPool = provision.tokensSlashedDelegationPool.plus(event.params.tokens) if (provision.delegatorShares != BigInt.fromI32(0)) { provision = updateDelegationExchangeRateForProvision(provision as Provision) } diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index dd27b7e0..fe686087 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,6 +1,6 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" -import { AllocationClosed, AllocationCreated, AllocationResized, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" -import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" +import { AllocationClosed, AllocationCreated, AllocationResized, DelegationRatioSet, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" +import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" import { Allocation, GraphAccount, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" @@ -23,6 +23,12 @@ export function handleRewardsDestinationSet(event: RewardsDestinationSet): void provision.save() } +export function handleDelegationRatioSet(event: DelegationRatioSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.delegationRatio = event.params.ratio + dataService.save() +} + export function handleAllocationCreated(event: AllocationCreated): void { let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) let subgraphDeploymentID = event.params.subgraphDeploymentId.toHexString() diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 34b1f105..156c77a2 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -473,6 +473,8 @@ dataSources: handler: handleIndexingRewardsCollected - event: QueryFeesCollected(indexed address,indexed address,indexed address,bytes32,uint256,uint256) handler: handleQueryFeesCollected + - event: DelegationRatioSet(uint32) + handler: handleDelegationRatioSet - kind: ethereum/contract name: GraphPayments network: {{network}} From 3ee2ea1f3403a1eeb437ec4937c8e96d304a1e18 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sun, 30 Mar 2025 18:05:59 -0300 Subject: [PATCH 34/79] fix: build issues and feedback from PaymentCollection PR --- schema.graphql | 4 ++-- src/mappings/graphPayments.ts | 1 + src/mappings/subgraphService.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/schema.graphql b/schema.graphql index fdf94006..7fe20c8a 100644 --- a/schema.graphql +++ b/schema.graphql @@ -930,8 +930,8 @@ type Provision @entity { "Total query fees collected. Includes the portion given to delegators" queryFeesCollected: BigInt! "Query fee amount collected from the protocol. Does not include portion given to delegators" - providerQueryFees: BigInt! - "Query fee amount collected from the protocol for Delegators. Does not include portion taken by the provider" + indexerQueryFees: BigInt! + "Query fee amount collected from the protocol for Delegators. Does not include portion taken by the indexer" delegatorQueryFees: BigInt! # Delegation diff --git a/src/mappings/graphPayments.ts b/src/mappings/graphPayments.ts index 408560ee..6a159149 100644 --- a/src/mappings/graphPayments.ts +++ b/src/mappings/graphPayments.ts @@ -17,6 +17,7 @@ export function handleGraphPaymentCollected(event: GraphPaymentCollected): void graphNetwork.save() // Replicate for payment source specific data + // Payer here is the PaymentsEscrow in most cases, might need to figure out how to know who funded the escrow in the future let paymentSource = createOrLoadPaymentSource(event.params.payer) paymentSource.totalTaxedQueryFees = paymentSource.totalTaxedQueryFees.plus(event.params.tokensProtocol) paymentSource.save() diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index fe686087..f9c1d3d4 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -25,7 +25,7 @@ export function handleRewardsDestinationSet(event: RewardsDestinationSet): void export function handleDelegationRatioSet(event: DelegationRatioSet): void { let dataService = createOrLoadDataService(event.address) - dataService.delegationRatio = event.params.ratio + dataService.delegationRatio = event.params.ratio.toI32() dataService.save() } @@ -265,7 +265,7 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void { let indexerQueryFees = event.params.tokensCollected.minus(delegationPoolQueryFees) provision.queryFeesCollected = provision.queryFeesCollected.plus(event.params.tokensCollected) - provision.providerQueryFees = provision.providerQueryFees.plus(indexerQueryFees) + provision.indexerQueryFees = provision.indexerQueryFees.plus(indexerQueryFees) provision.delegatorQueryFees = provision.delegatorQueryFees.plus(delegationPoolQueryFees) provision.save() From 8085cf784dd0652e2f9f09946c626221d399dfc9 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sun, 30 Mar 2025 20:25:00 -0300 Subject: [PATCH 35/79] fix: addressed AllocationManagement pr feedback --- schema.graphql | 6 ++++++ src/mappings/staking.ts | 11 +++++++++-- src/mappings/subgraphService.ts | 20 +++++++++++++------- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/schema.graphql b/schema.graphql index 7fe20c8a..2110b3cd 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1044,6 +1044,12 @@ type Allocation @entity { poi: Bytes "POIs submitted when collecting payments in Horizon" pois: [PoiSubmission!]! @derivedFrom(field: "allocation") + "Number of POIs submitted for this allocation. Only available for Horizon allocations" + poiCount: BigInt + "Whether this allocation was created in the legacy protocol. If true, the allocation will not have a provision since it's not a Horizon allocation" + isLegacy: Boolean! + "Whether this allocation was forced closed. Force closures in Horizon can happen when the latest PoI is stale, compared to the legacy protocol, where force closures can happen when the allocation hasn't been closed within the max amount of epochs" + forceClosed: Boolean # Indexer/Provision cut settings at start and close indexingRewardCutAtStart: Int! diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index ab4a2c71..db5551c2 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -374,6 +374,7 @@ export function handleAllocationCreated(event: AllocationCreated): void { allocation.indexingRewardEffectiveCutAtStart = indexer.indexingRewardEffectiveCut allocation.queryFeeCutAtStart = indexer.queryFeeCut allocation.queryFeeEffectiveCutAtStart = indexer.queryFeeEffectiveCut + allocation.isLegacy = true allocation.save() } @@ -493,12 +494,16 @@ export function handleAllocationClosed(event: AllocationClosed): void { // update indexer let indexer = Indexer.load(indexerID)! + let allocation = Allocation.load(allocationID)! const indexerAccount = GraphAccount.load(indexer.account)! const closedByIndexer = event.params.sender == event.params.indexer const closedByOperator = indexerAccount.operators.includes(event.params.sender.toHexString()) if (!closedByIndexer && !closedByOperator) { indexer.forcedClosures = indexer.forcedClosures + 1 + allocation.forceClosed = true + } else { + allocation.forceClosed = false } indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) indexer.allocationCount = indexer.allocationCount - 1 @@ -507,7 +512,6 @@ export function handleAllocationClosed(event: AllocationClosed): void { indexer.save() // update allocation - let allocation = Allocation.load(allocationID)! allocation.poolClosedIn = event.params.epoch.toString() allocation.activeForIndexer = null allocation.closedAtEpoch = event.params.epoch.toI32() @@ -561,12 +565,16 @@ export function handleAllocationClosedCobbDouglas(event: AllocationClosed1): voi // update indexer let indexer = Indexer.load(indexerID)! + let allocation = Allocation.load(allocationID)! const indexerAccount = GraphAccount.load(indexer.account)! const closedByIndexer = event.params.sender == event.params.indexer const closedByOperator = indexerAccount.operators.includes(event.params.sender.toHexString()) if (!closedByIndexer && !closedByOperator) { indexer.forcedClosures = indexer.forcedClosures + 1 + allocation.forceClosed = true + } else { + allocation.forceClosed = false } indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) indexer.allocationCount = indexer.allocationCount - 1 @@ -575,7 +583,6 @@ export function handleAllocationClosedCobbDouglas(event: AllocationClosed1): voi indexer.save() // update allocation - let allocation = Allocation.load(allocationID)! allocation.poolClosedIn = event.params.epoch.toString() allocation.activeForIndexer = null allocation.closedAtEpoch = event.params.epoch.toI32() diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index f9c1d3d4..6efed72c 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -88,9 +88,11 @@ export function handleAllocationCreated(event: AllocationCreated): void { allocation.annualizedReturn = BigDecimal.fromString('0') allocation.createdAt = event.block.timestamp.toI32() allocation.indexingRewardCutAtStart = provision.indexingRewardsCut.toI32() - allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardsCut.toBigDecimal() + allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardEffectiveCut allocation.queryFeeCutAtStart = provision.queryFeeCut.toI32() - allocation.queryFeeEffectiveCutAtStart = provision.queryFeeCut.toBigDecimal() + allocation.queryFeeEffectiveCutAtStart = provision.queryFeeEffectiveCut + allocation.poiCount = BigInt.fromI32(0) + allocation.isLegacy = false allocation.save() } @@ -101,12 +103,16 @@ export function handleAllocationClosed(event: AllocationClosed): void { // update indexer let indexer = Indexer.load(indexerID)! + let allocation = Allocation.load(allocationID)! const indexerAccount = GraphAccount.load(indexer.account)! const closedByIndexer = event.transaction.from == event.params.indexer const closedByOperator = indexerAccount.operators.includes(event.transaction.from.toHexString()) if (!closedByIndexer && !closedByOperator) { indexer.forcedClosures = indexer.forcedClosures + 1 + allocation.forceClosed = true + } else { + allocation.forceClosed = false } indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) indexer.allocationCount = indexer.allocationCount - 1 @@ -119,7 +125,6 @@ export function handleAllocationClosed(event: AllocationClosed): void { provision.save() // update allocation - let allocation = Allocation.load(allocationID)! allocation.poolClosedIn = graphNetwork.currentEpoch.toString() allocation.activeForIndexer = null allocation.closedAtEpoch = graphNetwork.currentEpoch @@ -129,10 +134,10 @@ export function handleAllocationClosed(event: AllocationClosed): void { ).toI32() allocation.status = 'Closed' allocation.closedAt = event.block.timestamp.toI32() - allocation.indexingRewardCutAtStart = provision.indexingRewardsCut.toI32() - allocation.indexingRewardEffectiveCutAtStart = provision.indexingRewardsCut.toBigDecimal() - allocation.queryFeeCutAtStart = provision.queryFeeCut.toI32() - allocation.queryFeeEffectiveCutAtStart = provision.queryFeeCut.toBigDecimal() + allocation.indexingRewardCutAtClose = provision.indexingRewardsCut.toI32() + allocation.indexingRewardEffectiveCutAtClose = provision.indexingRewardEffectiveCut + allocation.queryFeeCutAtClose = provision.queryFeeCut.toI32() + allocation.queryFeeEffectiveCutAtClose = provision.queryFeeEffectiveCut allocation.save() // update epoch - We do it here to have more epochs created, instead of seeing none created @@ -201,6 +206,7 @@ export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): allocation.indexingDelegatorRewards = allocation.indexingDelegatorRewards.plus( event.params.tokensDelegationRewards, ) + allocation.poiCount = allocation.poiCount!.plus(BigInt.fromI32(1)) allocation.save() // Create PoI submission From e2de8d43958dfe968744e632cdb99f99f95cfc3d Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sun, 30 Mar 2025 23:01:02 -0300 Subject: [PATCH 36/79] fix: address feedback from Subgraph Indexing Registration PR --- schema.graphql | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/schema.graphql b/schema.graphql index 2110b3cd..07d5f1d3 100644 --- a/schema.graphql +++ b/schema.graphql @@ -858,6 +858,15 @@ type Operator @entity { allowed: Boolean! } + +""" + For the Horizon Stage 1 subgraph, the Provision entity will be mimicking the Indexer entity as closely as possible. + That means that the Provision entity will contain some fields that are particular for the Subgraph Service, even if in Horizon + a Provision could be for a different Data Service from the Subgraph Service. + This is to make the data closer to the legacy protocol, given that the Subgraph Service will be the first Data Service to be supported + + Once the Stage 2 subgraph is implemented, the Provision entity will have to be more generic, and particular data service fields will need to be restructured. +""" type Provision @entity { "Join ID of indexer address (service provider) and DataService address" id: ID! From c8854a9c7ab383f7975f903549da77b04e3f3994 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sun, 30 Mar 2025 23:15:22 -0300 Subject: [PATCH 37/79] fix: address feedback from Delegation Pool pr --- schema.graphql | 2 +- src/mappings/horizonStaking.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index 07d5f1d3..4688488d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -948,7 +948,7 @@ type Provision @entity { delegatedTokens: BigInt! "Total shares of the delegator pool" delegatorShares: BigInt! - "Exchange rate of of tokens received for each share" + "Exchange rate of tokens received for each share" delegationExchangeRate: BigDecimal! "Ratio between the amount of the indexers own stake over the total usable stake (capped by the delegationRatio)." ownStakeRatio: BigDecimal! diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 3407d6a2..42be6276 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -270,6 +270,9 @@ export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolA let indexer = Indexer.load(event.params.serviceProvider.toHexString())! let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) provision.delegatedTokens = provision.delegatedTokens.plus(event.params.tokens) + if (provision.delegatorShares != BigInt.fromI32(0)) { + provision = updateDelegationExchangeRateForProvision(provision as Provision) + } provision.save() indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) // this only serves as a general tracker, but the real deal is per provision From 88e42051b6fabe60d824eb2505798da2f96bb240 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sun, 30 Mar 2025 23:24:54 -0300 Subject: [PATCH 38/79] fix: addressed provision config PR feedback --- schema.graphql | 18 ++++++------------ src/mappings/helpers/helpers.ts | 12 ++++++------ src/mappings/horizonStaking.ts | 22 +++++++++++----------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/schema.graphql b/schema.graphql index 4688488d..ee5c29b4 100644 --- a/schema.graphql +++ b/schema.graphql @@ -274,10 +274,10 @@ type GraphAccount @entity { # Operator info "Operator of other Graph Accounts" operatorOf: [GraphAccount!]! @derivedFrom(field: "operators") - "Operators of this Graph Accounts" + "Operators of this Graph Account" operators: [GraphAccount!]! - "Operators of this Graph Accounts" - provisionedOperators: [Operator!]! + "Horizon Operators of this Graph Account" + horizonOperators: [HorizonOperator!]! # GRT info "Graph token balance" @@ -843,11 +843,11 @@ type IndexerQueryFeePaymentAggregation @entity { paymentSource: PaymentSource! } -type Operator @entity { +type HorizonOperator @entity { "Joint address of all 3 parties involved (Operator, Indexer, DataService)" id: ID! - operatorOf: [GraphAccount!]! @derivedFrom(field: "provisionedOperators") + operatorOf: [GraphAccount!]! @derivedFrom(field: "horizonOperators") operator: GraphAccount! @@ -908,7 +908,7 @@ type Provision @entity { "Pending value for thawingPeriod. Verifier needs to accept it before it becomes active" thawingPeriodPending: BigInt! - # Cuts for subgraph service. Percentage of rewards that the delegation pool receives + # Percentage of rewards/fees that the delegation pool receives "Raw query fee cut. In Horizon this is amount of query fees that the delegation pool receives in PPM" queryFeeCut: BigInt! @@ -965,12 +965,6 @@ type Provision @entity { rewardsDestination: Bytes } -enum PaymentTypes { - QueryFee, - IndexingFee, - IndexingRewards -} - type ThawRequest @entity { id: ID! diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 1787efbe..3665dd73 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -28,7 +28,7 @@ import { IndexerQueryFeePaymentAggregation, Provision, DataService, - Operator, + HorizonOperator, } from '../../types/schema' import { SubgraphDeploymentManifest as SubgraphDeploymentManifestTemplate @@ -243,11 +243,11 @@ export function createOrLoadDataService(verifierAddress: Bytes): DataService { return service as DataService } -export function createOrLoadOperator(address: Bytes, verifierAddress: Bytes, indexerAddress: Bytes): Operator { +export function createOrLoadHorizonOperator(address: Bytes, verifierAddress: Bytes, indexerAddress: Bytes): HorizonOperator { let id = joinID([address.toHexString(), indexerAddress.toHexString(), verifierAddress.toHexString()]) - let operator = Operator.load(id) + let operator = HorizonOperator.load(id) if (operator == null) { - operator = new Operator(id) + operator = new HorizonOperator(id) operator.allowed = false operator.operator = address.toHexString() operator.indexer = indexerAddress.toHexString() @@ -255,7 +255,7 @@ export function createOrLoadOperator(address: Bytes, verifierAddress: Bytes, ind operator.save() } - return operator as Operator + return operator as HorizonOperator } export function createOrLoadPaymentSource(paymentAddress: Bytes): PaymentSource { @@ -529,7 +529,7 @@ export function createOrLoadGraphAccount(owner: Bytes, timeStamp: BigInt): Graph graphAccount = new GraphAccount(id) graphAccount.createdAt = timeStamp.toI32() graphAccount.operators = [] - graphAccount.provisionedOperators = [] + graphAccount.horizonOperators = [] graphAccount.balance = BigInt.fromI32(0) graphAccount.balanceReceivedFromL1Signalling = BigInt.fromI32(0) graphAccount.balanceReceivedFromL1Delegation = BigInt.fromI32(0) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 42be6276..26bc4d0a 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -2,7 +2,7 @@ import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' import { DelegatedTokensWithdrawn, DelegationFeeCutSet, DelegationSlashed, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, StakeDelegatedWithdrawn, TokensDelegated, TokensDeprovisioned, TokensToDelegationPoolAdded, TokensUndelegated } from '../types/HorizonStaking/HorizonStaking' import { DelegatedStake, Delegator, Indexer, Provision, ThawRequest } from '../types/schema' -import { calculateCapacities, createOrLoadDataService, createOrLoadDelegatedStake, createOrLoadDelegatedStakeForProvision, createOrLoadDelegator, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadIndexer, createOrLoadOperator, createOrLoadProvision, joinID, updateAdvancedIndexerMetrics, updateAdvancedProvisionMetrics, updateDelegationExchangeRate, updateDelegationExchangeRateForProvision } from './helpers/helpers' +import { calculateCapacities, createOrLoadDataService, createOrLoadDelegatedStake, createOrLoadDelegatedStakeForProvision, createOrLoadDelegator, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadHorizonOperator, createOrLoadIndexer, createOrLoadProvision, joinID, updateAdvancedIndexerMetrics, updateAdvancedProvisionMetrics, updateDelegationExchangeRate, updateDelegationExchangeRateForProvision } from './helpers/helpers' import { ProvisionCreated, ProvisionIncreased, @@ -172,9 +172,9 @@ export function handleProvisionParametersStaged(event: ProvisionParametersStaged export function handleOperatorSet(event: OperatorSet): void { let indexerGraphAccount = createOrLoadGraphAccount(event.params.serviceProvider, event.block.timestamp) - let operator = createOrLoadOperator(event.params.operator, event.params.verifier, event.params.serviceProvider) + let operator = createOrLoadHorizonOperator(event.params.operator, event.params.verifier, event.params.serviceProvider) let operators = indexerGraphAccount.operators - // Will have to handle legacy operators list, and horizon provisionedOperators list for extra context + // Will have to handle legacy operators list, and horizon horizonOperators list for extra context let operatorsIndex = operators.indexOf(event.params.operator.toHexString()) if (operatorsIndex != -1) { // false - it existed, and we set it to false, so remove from operators @@ -190,12 +190,12 @@ export function handleOperatorSet(event: OperatorSet): void { } } - let provisionedOperators = indexerGraphAccount.provisionedOperators - let provisionedOperatorsIndex = provisionedOperators.indexOf(event.params.operator.toHexString()) - if (provisionedOperatorsIndex != -1) { + let horizonOperators = indexerGraphAccount.horizonOperators + let horizonOperatorsIndex = horizonOperators.indexOf(event.params.operator.toHexString()) + if (horizonOperatorsIndex != -1) { // false - it existed, and we set it to false, so remove from operators and update operator if (!event.params.allowed) { - operators.splice(provisionedOperatorsIndex, 1) + operators.splice(horizonOperatorsIndex, 1) } } else { // true - it did not exist before, and we say add, so add @@ -208,7 +208,7 @@ export function handleOperatorSet(event: OperatorSet): void { operator.allowed = event.params.allowed operator.save() indexerGraphAccount.operators = operators - indexerGraphAccount.provisionedOperators = provisionedOperators + indexerGraphAccount.horizonOperators = horizonOperators indexerGraphAccount.save() } @@ -230,14 +230,14 @@ export function handleProvisionSlashed(event: ProvisionSlashed): void { indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) indexer.save() - + dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.minus(event.params.tokens) dataService.save() - + graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) graphNetwork.totalTokensStaked = graphNetwork.totalTokensStaked.minus(event.params.tokens) graphNetwork.save() - + provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) provision.tokensSlashedServiceProvider = provision.tokensSlashedServiceProvider.plus(event.params.tokens) provision.save() From bf89036babd2068e03489508a4ea4a6d5a56b65d Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 31 Mar 2025 00:11:02 -0300 Subject: [PATCH 39/79] fix: most of the feedback from ProvisionManagement PR --- schema.graphql | 4 +++- src/mappings/horizonStaking.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/schema.graphql b/schema.graphql index ee5c29b4..d744a4df 100644 --- a/schema.graphql +++ b/schema.graphql @@ -982,7 +982,9 @@ type ThawRequest @entity { thawingUntil: BigInt! - valid: Boolean + fulfilledAsValid: Boolean + + fulfilled: Boolean! } """ diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 26bc4d0a..554feb83 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -153,6 +153,7 @@ export function handleTokensDeprovisioned(event: TokensDeprovisioned): void { graphNetwork.save() provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) + provision.tokensThawing = provision.tokensThawing.plus(event.params.tokens) provision.save() } @@ -239,6 +240,7 @@ export function handleProvisionSlashed(event: ProvisionSlashed): void { graphNetwork.save() provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) + // To DO, update thawing tokens according to the accounting calculation from the contract provision.tokensSlashedServiceProvider = provision.tokensSlashedServiceProvider.plus(event.params.tokens) provision.save() } @@ -255,13 +257,15 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { request.shares = event.params.shares request.tokens = BigInt.fromI32(0) request.thawingUntil = event.params.thawingUntil + request.fulfilled = false request.save() } export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { let request = ThawRequest.load(event.params.thawRequestId.toHexString())! request.tokens = event.params.tokens - request.valid = event.params.valid + request.fulfilledAsValid = event.params.valid + request.fulfilled = true request.save() } From 85124e5275fc3f7a2df012faeb6fcd3c1713be98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 14 Apr 2025 16:42:11 -0300 Subject: [PATCH 40/79] fix: use new nomenclature for staking contract in address book MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- config/arbitrumSepoliaAddressScript.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/arbitrumSepoliaAddressScript.ts b/config/arbitrumSepoliaAddressScript.ts index 35f7daf0..851f6dd3 100644 --- a/config/arbitrumSepoliaAddressScript.ts +++ b/config/arbitrumSepoliaAddressScript.ts @@ -13,8 +13,8 @@ export let addresses: Addresses = { graphToken: '{{arbsep.L2GraphToken.address}}', epochManager: '{{arbsep.EpochManager.address}}', disputeManager: '{{arbsep.DisputeManager.address}}', - staking: '{{arbsep.L2Staking.address}}', - stakingExtension: '{{arbsep.StakingExtension.address}}', + staking: '{{arbsep.HorizonStaking.address}}', + stakingExtension: '{{arbsep.HorizonStaking.address}}', curation: '{{arbsep.L2Curation.address}}', rewardsManager: '{{arbsep.RewardsManager.address}}', serviceRegistry: '{{arbsep.ServiceRegistry.address}}', From 2c2cb315528260a4ef1e667799f230a2557b4a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 15 Apr 2025 16:28:44 -0300 Subject: [PATCH 41/79] fix: add missing properties to provision initializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/helpers/helpers.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 3665dd73..66076b23 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -215,14 +215,24 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.queryFeeCut = BigInt.fromI32(0) provision.indexingFeeCut = BigInt.fromI32(0) provision.indexingRewardsCut = BigInt.fromI32(0) + provision.indexingRewardEffectiveCut = BigInt.fromI32(0).toBigDecimal() + provision.queryFeeEffectiveCut = BigInt.fromI32(0).toBigDecimal() + provision.overDelegationDilution = BigInt.fromI32(0).toBigDecimal() + provision.rewardsEarned = BigInt.fromI32(0) + provision.indexerIndexingRewards = BigInt.fromI32(0) + provision.delegatorIndexingRewards = BigInt.fromI32(0) + provision.queryFeesCollected = BigInt.fromI32(0) + provision.indexerQueryFees = BigInt.fromI32(0) + provision.delegatorQueryFees = BigInt.fromI32(0) provision.delegatedTokens = BigInt.fromI32(0) provision.delegatorShares = BigInt.fromI32(0) provision.delegationExchangeRate = BigInt.fromI32(0).toBigDecimal() - provision.indexingRewardEffectiveCut = BigInt.fromI32(0).toBigDecimal() - provision.queryFeeEffectiveCut = BigInt.fromI32(0).toBigDecimal() provision.ownStakeRatio = BigInt.fromI32(0).toBigDecimal() provision.delegatedStakeRatio = BigInt.fromI32(0).toBigDecimal() provision.indexerRewardsOwnGenerationRatio = BigInt.fromI32(0).toBigDecimal() + provision.url = '' + provision.geoHash = '' + provision.rewardsDestination = Bytes.fromI32(0) provision.save() } From de21a8be242f8aa3e727e8f70fa506fabe6f4add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Wed, 16 Apr 2025 16:33:32 -0300 Subject: [PATCH 42/79] fix: proper decoding for ServiceProviderRegistered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- config/localNetworkAddressScript.ts | 64 +++++++++++++++++++++++++++++ package.json | 5 +-- schema.graphql | 2 + src/mappings/helpers/decoder.ts | 20 +++++++++ src/mappings/helpers/helpers.ts | 4 ++ src/mappings/subgraphService.ts | 21 ++++++++-- 6 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 config/localNetworkAddressScript.ts create mode 100644 src/mappings/helpers/decoder.ts diff --git a/config/localNetworkAddressScript.ts b/config/localNetworkAddressScript.ts new file mode 100644 index 00000000..f6e67b0a --- /dev/null +++ b/config/localNetworkAddressScript.ts @@ -0,0 +1,64 @@ +import * as fs from 'fs' +import * as mustache from 'mustache' +// Replace with proper imports once the packages are published +import * as networkAddresses from '/opt/contracts.json' +import { Addresses } from './addresses.template' + +// mustache doesn't like numbered object keys +// eslint-disable-next-line @typescript-eslint/no-explicit-any +let renameAddresses: any = networkAddresses +renameAddresses['localnetwork'] = networkAddresses['1337'] + +export let addresses: Addresses = { + controller: '{{localnetwork.Controller.address}}', + graphToken: '{{localnetwork.L2GraphToken.address}}', + epochManager: '{{localnetwork.EpochManager.address}}', + disputeManager: '{{localnetwork.DisputeManager.address}}', + staking: '{{localnetwork.HorizonStaking.address}}', + stakingExtension: '{{localnetwork.HorizonStaking.address}}', + curation: '{{localnetwork.L2Curation.address}}', + rewardsManager: '{{localnetwork.RewardsManager.address}}', + serviceRegistry: '0x0000000000000000000000000000000000000000', + gns: '{{localnetwork.L2GNS.address}}', + ens: '{{localnetwork.IENS.address}}', + ensPublicResolver: '{{localnetwork.IPublicResolver.address}}', + blockNumber: '', + bridgeBlockNumber: '', + network: '', + tokenLockManager: '', + subgraphNFT: '{{localnetwork.SubgraphNFT.address}}', + l1GraphTokenGateway: '', + l2GraphTokenGateway: '{{localnetwork.L2GraphTokenGateway.address}}', + ethereumDIDRegistry: '{{localnetwork.EthereumDIDRegistry.address}}', + subgraphService: '{{localnetwork.SubgraphService.address}}', + graphPayments: '{{localnetwork.GraphPayments.address}}', + isL1: false, +} + +const main = (): void => { + try { + let output = JSON.parse(mustache.render(JSON.stringify(addresses), renameAddresses)) + output.blockNumber = '1' + output.bridgeBlockNumber = '1' + output.network = 'hardhat' + output.useTokenLockManager = false + if(output.ens == '') { + output.ens = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } + if(output.ethereumDIDRegistry == '') { + output.ethereumDIDRegistry = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } + // remove once we have proper packages + if(output.subgraphService == '') { + output.subgraphService = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } + if(output.graphPayments == '') { + output.graphPayments = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } + fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) + } catch (e) { + console.log(`Error saving artifacts: ${e.message}`) + } +} + +main() diff --git a/package.json b/package.json index 262abf34..6d6fffa5 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "devDependencies": { "@graphprotocol/contracts": "6.2.0", "@graphprotocol/graph-cli": "0.68.5", - "@graphprotocol/graph-ts": "0.32.0", + "@graphprotocol/graph-ts": "0.38.0", "@types/node": "^14.0.13", "@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/parser": "^3.3.0", @@ -57,6 +57,5 @@ "bugs": { "url": "https://github.com/graphprotocol/graph-network-subgraph/issues" }, - "homepage": "https://github.com/graphprotocol/graph-network-subgraph#readme", - "dependencies": {} + "homepage": "https://github.com/graphprotocol/graph-network-subgraph#readme" } diff --git a/schema.graphql b/schema.graphql index d744a4df..59b08b53 100644 --- a/schema.graphql +++ b/schema.graphql @@ -693,6 +693,8 @@ type Indexer @entity { url: String "Geohash of the indexer. Shows where their indexer is located in the world" geoHash: String + "Address that receives the rewards from the indexer" + rewardsDestination: Bytes "Default display name is the current default name. Used for filtered queries" defaultDisplayName: String diff --git a/src/mappings/helpers/decoder.ts b/src/mappings/helpers/decoder.ts new file mode 100644 index 00000000..a78eb895 --- /dev/null +++ b/src/mappings/helpers/decoder.ts @@ -0,0 +1,20 @@ +import { ByteArray, Bytes } from '@graphprotocol/graph-ts'; + + +// Wrap arguments with this function if (and only if) one of the arguments is an array or 'bytes' or 'string' (i.e. variable length arg) +// See: +// - https://medium.com/@r2d2_68242/indexing-transaction-input-data-in-a-subgraph-6ff5c55abf20 +// - https://ethereum.stackexchange.com/questions/114582/the-graph-nodes-cant-decode-abi-encoded-data-containing-arrays +// - https://github.com/enzymefinance/subgraphs/blob/main/packages/utils/utils/decode.ts +export function tuplePrefixBytes(input: Bytes): Bytes { + let inputTypedArray = input.subarray(0); + + let tuplePrefix = ByteArray.fromHexString('0x0000000000000000000000000000000000000000000000000000000000000020'); + + let inputAsTuple = new Uint8Array(tuplePrefix.length + inputTypedArray.length); + + inputAsTuple.set(tuplePrefix, 0); + inputAsTuple.set(inputTypedArray, tuplePrefix.length); + + return Bytes.fromUint8Array(inputAsTuple); +} \ No newline at end of file diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 66076b23..087346e9 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -178,6 +178,10 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): I indexer.annualizedReturn = BigDecimal.fromString('0') indexer.stakingEfficiency = BigDecimal.fromString('0') + indexer.url = '' + indexer.geoHash = '' + indexer.rewardsDestination = Address.fromString('0x0000000000000000000000000000000000000000') + let graphAccount = createOrLoadGraphAccount(indexerAddress, timestamp) graphAccount.indexer = id graphAccount.save() diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 6efed72c..6a9f6978 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -3,15 +3,30 @@ import { AllocationClosed, AllocationCreated, AllocationResized, DelegationRatio import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" import { Allocation, GraphAccount, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" +import { tuplePrefixBytes } from "./helpers/decoder" +import { createOrLoadIndexer } from "./helpers/helpers" export function handleServiceProviderRegistered(event: ServiceProviderRegistered): void { - let decodedCalldata = ethereum.decode('(string,string,address)', event.params.data) + let decodedCalldata = ethereum.decode('(string,string,address)', tuplePrefixBytes(event.params.data)) if (decodedCalldata != null && decodedCalldata.kind == ethereum.ValueKind.TUPLE) { let tupleData = decodedCalldata.toTuple() + let url = tupleData[0].toString() + let geoHash = tupleData[1].toString() + let rewardsDestination = tupleData[2].toAddress() + + // Update provision let provision = createOrLoadProvision(event.params.serviceProvider, event.address, event.block.timestamp) - provision.url = tupleData[0].toString() - provision.geoHash = tupleData[1].toString() + provision.url = url + provision.geoHash = geoHash + provision.rewardsDestination = rewardsDestination provision.save() + + // Update indexer + let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) + indexer.url = url + indexer.geoHash = geoHash + indexer.rewardsDestination = rewardsDestination + indexer.save() } else { log.warning("ServiceProviderRegistered failed to decode: {}", [event.params.data.toHexString()]) } From f4b038c09841c937c9f50da7bfbdcc4a2b9bec2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Wed, 16 Apr 2025 16:49:51 -0300 Subject: [PATCH 43/79] fix: update indexer entity on RewardsDestinationSet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/subgraphService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 6a9f6978..d3ad588d 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -33,9 +33,15 @@ export function handleServiceProviderRegistered(event: ServiceProviderRegistered } export function handleRewardsDestinationSet(event: RewardsDestinationSet): void { + // Update provision let provision = createOrLoadProvision(event.params.indexer, event.address, event.block.timestamp) provision.rewardsDestination = event.params.rewardsDestination provision.save() + + // Update indexer + let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) + indexer.rewardsDestination = event.params.rewardsDestination + indexer.save() } export function handleDelegationRatioSet(event: DelegationRatioSet): void { From 300c8df39ebc41c9df09773c567ab1380238b9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Wed, 16 Apr 2025 17:51:06 -0300 Subject: [PATCH 44/79] feat: add isLegacy boolean to indexer entity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- schema.graphql | 3 +++ src/mappings/helpers/helpers.ts | 12 +++++++++++- src/mappings/serviceRegistry.ts | 4 ++-- src/mappings/staking.ts | 8 ++++---- src/mappings/subgraphService.ts | 3 +++ 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/schema.graphql b/schema.graphql index 59b08b53..da822f6d 100644 --- a/schema.graphql +++ b/schema.graphql @@ -698,6 +698,9 @@ type Indexer @entity { "Default display name is the current default name. Used for filtered queries" defaultDisplayName: String + "Whether the indexer is a legacy indexer. This is true for all indexers registered before the Horizon upgrade" + isLegacy: Boolean! + # Staking data "CURRENT tokens staked in the protocol. Decreases on withdraw, not on lock" stakedTokens: BigInt! diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 087346e9..e93f285f 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -129,7 +129,7 @@ export function createOrLoadSubgraphDeployment( return deployment as SubgraphDeployment } -export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): Indexer { +export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): Indexer { let id = indexerAddress.toHexString() let indexer = Indexer.load(id) if (indexer == null) { @@ -137,6 +137,9 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): I indexer.createdAt = timestamp.toI32() indexer.account = id + // By default we assume indexers are not legacy. Legacy codepaths should flip this to true + indexer.isLegacy = false + indexer.stakedTokens = BigInt.fromI32(0) indexer.transferredToL2 = false indexer.stakedTokensTransferredToL2 = BigInt.fromI32(0) @@ -197,6 +200,13 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt): I return indexer as Indexer } +export function createOrLoadLegacyIndexer(indexerAddress: Bytes, timestamp: BigInt): Indexer { + let indexer = createOrLoadIndexer(indexerAddress, timestamp) + indexer.isLegacy = true + indexer.save() + return indexer +} + export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: Bytes, timestamp: BigInt): Provision { let id = joinID([indexerAddress.toHexString(), verifierAddress.toHexString()]) let provision = Provision.load(id) diff --git a/src/mappings/serviceRegistry.ts b/src/mappings/serviceRegistry.ts index e401c82d..69c92074 100644 --- a/src/mappings/serviceRegistry.ts +++ b/src/mappings/serviceRegistry.ts @@ -1,7 +1,7 @@ import { ServiceRegistered, ServiceUnregistered } from '../types/ServiceRegistry/ServiceRegistry' import { Indexer } from '../types/schema' -import { createOrLoadIndexer, createOrLoadGraphAccount } from './helpers/helpers' +import { createOrLoadLegacyIndexer, createOrLoadGraphAccount } from './helpers/helpers' /** * @dev handleServiceRegistered @@ -11,7 +11,7 @@ export function handleServiceRegistered(event: ServiceRegistered): void { // Creates Graph Account, if needed createOrLoadGraphAccount(event.params.indexer, event.block.timestamp) - let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) + let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) indexer.url = event.params.url indexer.geoHash = event.params.geohash indexer.save() diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index db5551c2..d77fd5d4 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -33,7 +33,7 @@ import { import { createOrLoadSubgraphDeployment, - createOrLoadIndexer, + createOrLoadLegacyIndexer, createOrLoadPool, createOrLoadEpoch, joinID, @@ -53,7 +53,7 @@ import { addresses } from '../../config/addresses' export function handleDelegationParametersUpdated(event: DelegationParametersUpdated): void { let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) + let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) indexer.indexingRewardCut = event.params.indexingRewardCut.toI32() indexer.queryFeeCut = event.params.queryFeeCut.toI32() indexer.delegatorParameterCooldown = event.params.cooldownBlocks.toI32() @@ -73,7 +73,7 @@ export function handleDelegationParametersUpdated(event: DelegationParametersUpd export function handleStakeDeposited(event: StakeDeposited): void { let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) // update indexer - let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) + let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) let previousStake = indexer.stakedTokens indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) indexer = updateAdvancedIndexerMetrics(indexer as Indexer) @@ -177,7 +177,7 @@ export function handleStakeDelegated(event: StakeDelegated): void { let zeroShares = event.params.shares.equals(BigInt.fromI32(0)) // update indexer - let indexer = createOrLoadIndexer(event.params.indexer, event.block.timestamp) + let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) indexer.delegatorShares = indexer.delegatorShares.plus(event.params.shares) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index d3ad588d..9d935b76 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -26,6 +26,9 @@ export function handleServiceProviderRegistered(event: ServiceProviderRegistered indexer.url = url indexer.geoHash = geoHash indexer.rewardsDestination = rewardsDestination + + // Change legacy status in case the indexer was created before the Horizon upgrade + indexer.isLegacy = false indexer.save() } else { log.warning("ServiceProviderRegistered failed to decode: {}", [event.params.data.toHexString()]) From 32d94567e0d17ea45ed89155e1425498f88e0085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 17 Apr 2025 14:40:49 -0300 Subject: [PATCH 45/79] fix: couple fixes for thaw/deprovision flows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- abis/HorizonStaking.json | 6 ++++++ src/mappings/horizonStaking.ts | 6 +++++- subgraph.template.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/abis/HorizonStaking.json b/abis/HorizonStaking.json index 1b2a72f6..24ce6816 100644 --- a/abis/HorizonStaking.json +++ b/abis/HorizonStaking.json @@ -959,6 +959,12 @@ "internalType": "bytes32", "name": "thawRequestId", "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" } ], "name": "ThawRequestCreated", diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 554feb83..40f5bad5 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -144,16 +144,19 @@ export function handleTokensDeprovisioned(event: TokensDeprovisioned): void { let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) indexer.provisionedTokens = indexer.provisionedTokens.minus(event.params.tokens) + indexer.thawingTokens = indexer.thawingTokens.minus(event.params.tokens) indexer.save() dataService.totalTokensProvisioned = dataService.totalTokensProvisioned.minus(event.params.tokens) + dataService.totalTokensThawing = dataService.totalTokensThawing.minus(event.params.tokens) dataService.save() graphNetwork.totalTokensProvisioned = graphNetwork.totalTokensProvisioned.minus(event.params.tokens) + graphNetwork.totalTokensThawing = graphNetwork.totalTokensThawing.minus(event.params.tokens) graphNetwork.save() provision.tokensProvisioned = provision.tokensProvisioned.minus(event.params.tokens) - provision.tokensThawing = provision.tokensThawing.plus(event.params.tokens) + provision.tokensThawing = provision.tokensThawing.minus(event.params.tokens) provision.save() } @@ -258,6 +261,7 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { request.tokens = BigInt.fromI32(0) request.thawingUntil = event.params.thawingUntil request.fulfilled = false + request.fulfilledAsValid = false request.save() } diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 156c77a2..47591cd2 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -419,7 +419,7 @@ dataSources: handler: handleProvisionSlashed - event: ProvisionThawed(indexed address,indexed address,uint256) handler: handleProvisionThawed - - event: ThawRequestCreated(indexed uint8,indexed address,indexed address,address,uint256,uint64,bytes32) + - event: ThawRequestCreated(indexed uint8,indexed address,indexed address,address,uint256,uint64,bytes32,uint256) handler: handleThawRequestCreated - event: ThawRequestFulfilled(indexed uint8,indexed bytes32,uint256,uint256,uint64,bool) handler: handleThawRequestFulfilled From aaa98128c40034582652356122daffb949c4144c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 21 Apr 2025 15:51:34 -0300 Subject: [PATCH 46/79] fix: update data service entity on allo creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/subgraphService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 9d935b76..d10e9894 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -79,6 +79,11 @@ export function handleAllocationCreated(event: AllocationCreated): void { graphNetwork.activeAllocationCount = graphNetwork.activeAllocationCount + 1 graphNetwork.save() + // update data service + let dataService = createOrLoadDataService(event.address) + dataService.totalTokensAllocated = dataService.totalTokensAllocated.plus(event.params.tokens) + dataService.save() + // update subgraph deployment let deployment = createOrLoadSubgraphDeployment(subgraphDeploymentID, event.block.timestamp) deployment.stakedTokens = deployment.stakedTokens.plus(event.params.tokens) From 47c734a96457c45024b4acf2470e0f7d3339ea87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 21 Apr 2025 16:01:41 -0300 Subject: [PATCH 47/79] fix: update missing entities in allocation resize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/subgraphService.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index d10e9894..bde792fa 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -206,6 +206,22 @@ export function handleAllocationResized(event: AllocationResized): void { let allocation = Allocation.load(allocationID)! allocation.allocatedTokens = event.params.newTokens allocation.save() + + // update data service + let dataService = createOrLoadDataService(event.address) + dataService.totalTokensAllocated = dataService.totalTokensAllocated.plus(diffTokens) + dataService.save() + + // update subgraph deployment + let subgraphDeploymentID = allocation.subgraphDeployment + let deployment = createOrLoadSubgraphDeployment(subgraphDeploymentID, event.block.timestamp) + deployment.stakedTokens = deployment.stakedTokens.plus(diffTokens) + deployment.save() + + // update graph network + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.totalTokensAllocated = graphNetwork.totalTokensAllocated.plus(diffTokens) + graphNetwork.save() } export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): void { From 2f1c688807e304ac0bed01b980eb790d011923a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 21 Apr 2025 16:35:41 -0300 Subject: [PATCH 48/79] fix: update allocation close to latest signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- abis/SubgraphService.json | 6 ++++++ src/mappings/subgraphService.ts | 15 ++++++++------- subgraph.template.yaml | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/abis/SubgraphService.json b/abis/SubgraphService.json index 3fa424a0..92f1bfba 100644 --- a/abis/SubgraphService.json +++ b/abis/SubgraphService.json @@ -574,6 +574,12 @@ "internalType": "uint256", "name": "tokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "forceClosed", + "type": "bool" } ], "name": "AllocationClosed", diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index bde792fa..f8a69688 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -133,16 +133,11 @@ export function handleAllocationClosed(event: AllocationClosed): void { // update indexer let indexer = Indexer.load(indexerID)! let allocation = Allocation.load(allocationID)! - const indexerAccount = GraphAccount.load(indexer.account)! - const closedByIndexer = event.transaction.from == event.params.indexer - const closedByOperator = indexerAccount.operators.includes(event.transaction.from.toHexString()) - if (!closedByIndexer && !closedByOperator) { + if (event.params.forceClosed) { indexer.forcedClosures = indexer.forcedClosures + 1 - allocation.forceClosed = true - } else { - allocation.forceClosed = false } + indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) indexer.allocationCount = indexer.allocationCount - 1 indexer.save() @@ -154,6 +149,7 @@ export function handleAllocationClosed(event: AllocationClosed): void { provision.save() // update allocation + allocation.forceClosed = event.params.forceClosed allocation.poolClosedIn = graphNetwork.currentEpoch.toString() allocation.activeForIndexer = null allocation.closedAtEpoch = graphNetwork.currentEpoch @@ -185,6 +181,11 @@ export function handleAllocationClosed(event: AllocationClosed): void { graphNetwork.activeAllocationCount = graphNetwork.activeAllocationCount - 1 graphNetwork.totalTokensAllocated = graphNetwork.totalTokensAllocated.minus(event.params.tokens) graphNetwork.save() + + // update data service + let dataService = createOrLoadDataService(event.address) + dataService.totalTokensAllocated = dataService.totalTokensAllocated.minus(event.params.tokens) + dataService.save() } export function handleAllocationResized(event: AllocationResized): void { diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 47591cd2..11f9629b 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -467,7 +467,7 @@ dataSources: handler: handleAllocationCreated - event: AllocationResized(indexed address,indexed address,indexed bytes32,uint256,uint256) handler: handleAllocationResized - - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256) + - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256,bool) handler: handleAllocationClosed - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,uint256) handler: handleIndexingRewardsCollected From 36148ac36d062e583d34cb8d26f4a077bdcef9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 21 Apr 2025 17:26:16 -0300 Subject: [PATCH 49/79] feat: add governance events handlers to horizon staking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- schema.graphql | 9 ++++++++- src/mappings/helpers/helpers.ts | 4 ++++ src/mappings/horizonStaking.ts | 28 ++++++++++++++++++++++++++-- subgraph.template.yaml | 8 ++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/schema.graphql b/schema.graphql index da822f6d..145ee75b 100644 --- a/schema.graphql +++ b/schema.graphql @@ -50,7 +50,7 @@ type GraphNetwork @entity { channelDisputeEpochs: Int! "Epochs to wait before delegators can settle" maxAllocationEpochs: Int! - "Time in blocks needed to wait to unstake" + "Time in blocks needed to wait to unstake. Set to 0 to signal Graph Horizon's transition period end." thawingPeriod: Int! "Minimum time an Indexer must use for resetting their Delegation parameters" delegationParametersCooldown: Int! @@ -70,6 +70,10 @@ type GraphNetwork @entity { delegationTaxPercentage: Int! "Asset holder for the protocol" assetHolders: [Bytes!] + "Maximum allowed thawing period for provisions, in seconds" + maxThawingPeriod: BigInt! + "True if delegation slashing is enabled" + delegationSlashingEnabled: Boolean! # Transfers to L2 totals "Total amount of indexer stake transferred to L2" @@ -250,6 +254,9 @@ type DataService @entity { delegationRatio: Int provisions: [Provision!]! @derivedFrom(field: "dataService") + + "True if allowed for usage with token lock wallets" + allowedWithTokenLockWallets: Boolean! } """ diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index e93f285f..d2d93418 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -261,6 +261,7 @@ export function createOrLoadDataService(verifierAddress: Bytes): DataService { service.totalTokensAllocated = BigInt.fromI32(0) service.totalTokensProvisioned = BigInt.fromI32(0) service.totalTokensThawing = BigInt.fromI32(0) + service.allowedWithTokenLockWallets = false service.save() } @@ -769,6 +770,9 @@ export function createOrLoadGraphNetwork( graphNetwork.totalGRTWithdrawn = BigInt.fromI32(0) graphNetwork.totalGRTWithdrawnConfirmed = BigInt.fromI32(0) + graphNetwork.maxThawingPeriod = BigInt.fromI32(0) + graphNetwork.delegationSlashingEnabled = false + graphNetwork.save() } if (!addresses.isL1) { diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 40f5bad5..b6151aff 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -1,6 +1,6 @@ import { BigInt } from '@graphprotocol/graph-ts' import { addresses } from '../../config/addresses' -import { DelegatedTokensWithdrawn, DelegationFeeCutSet, DelegationSlashed, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, OperatorSet, StakeDelegatedWithdrawn, TokensDelegated, TokensDeprovisioned, TokensToDelegationPoolAdded, TokensUndelegated } from '../types/HorizonStaking/HorizonStaking' +import { AllowedLockedVerifierSet, DelegatedTokensWithdrawn, DelegationFeeCutSet, DelegationSlashed, DelegationSlashingEnabled, HorizonStakeDeposited, HorizonStakeLocked, HorizonStakeWithdrawn, MaxThawingPeriodSet, OperatorSet, StakeDelegatedWithdrawn, ThawingPeriodCleared, TokensDelegated, TokensDeprovisioned, TokensToDelegationPoolAdded, TokensUndelegated } from '../types/HorizonStaking/HorizonStaking' import { DelegatedStake, Delegator, Indexer, Provision, ThawRequest } from '../types/schema' import { calculateCapacities, createOrLoadDataService, createOrLoadDelegatedStake, createOrLoadDelegatedStakeForProvision, createOrLoadDelegator, createOrLoadEpoch, createOrLoadGraphAccount, createOrLoadGraphNetwork, createOrLoadHorizonOperator, createOrLoadIndexer, createOrLoadProvision, joinID, updateAdvancedIndexerMetrics, updateAdvancedProvisionMetrics, updateDelegationExchangeRate, updateDelegationExchangeRateForProvision } from './helpers/helpers' import { @@ -472,4 +472,28 @@ export function handleDelegatedTokensWithdrawn(event: DelegatedTokensWithdrawn): let delegatedStake = DelegatedStake.load(id)! delegatedStake.lockedTokens = delegatedStake.lockedTokens.minus(event.params.tokens) delegatedStake.save() -} \ No newline at end of file +} + +export function handleMaxThawingPeriodSet(event: MaxThawingPeriodSet): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.maxThawingPeriod = event.params.maxThawingPeriod + graphNetwork.save() +} + +export function handleThawingPeriodCleared(event: ThawingPeriodCleared): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.thawingPeriod = 0 + graphNetwork.save() +} + +export function handleDelegationSlashingEnabled(event: DelegationSlashingEnabled): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.delegationSlashingEnabled = true + graphNetwork.save() +} + +export function handleAllowedLockedVerifierSet(event: AllowedLockedVerifierSet): void { + let dataService = createOrLoadDataService(event.params.verifier) + dataService.allowedWithTokenLockWallets = event.params.allowed + dataService.save() +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 11f9629b..22cc671e 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -437,6 +437,14 @@ dataSources: handler: handleTokensUndelegated - event: DelegatedTokensWithdrawn(indexed address,indexed address,indexed address,uint256) handler: handleDelegatedTokensWithdrawn + - event: MaxThawingPeriodSet(uint64) + handler: handleMaxThawingPeriodSet + - event: ThawingPeriodCleared() + handler: handleThawingPeriodCleared + - event: DelegationSlashingEnabled() + handler: handleDelegationSlashingEnabled + - event: AllowedLockedVerifierSet(indexed address,bool) + handler: handleAllowedLockedVerifierSet - kind: ethereum/contract name: SubgraphService network: {{network}} From 0a219a3f0b6d1682b8c2c7951e925f0cedff4932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 21 Apr 2025 17:57:44 -0300 Subject: [PATCH 50/79] feat: more missing governance events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- schema.graphql | 2 ++ src/mappings/helpers/helpers.ts | 1 + src/mappings/subgraphService.ts | 8 +++++++- subgraph.template.yaml | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index 145ee75b..61d8fedc 100644 --- a/schema.graphql +++ b/schema.graphql @@ -252,6 +252,8 @@ type DataService @entity { "Ratio of max staked delegation tokens to indexers stake that earns rewards" delegationRatio: Int + "Curation cut for this DataService" + curationCut: BigInt! provisions: [Provision!]! @derivedFrom(field: "dataService") diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index d2d93418..dd5c6d74 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -262,6 +262,7 @@ export function createOrLoadDataService(verifierAddress: Bytes): DataService { service.totalTokensProvisioned = BigInt.fromI32(0) service.totalTokensThawing = BigInt.fromI32(0) service.allowedWithTokenLockWallets = false + service.curationCut = BigInt.fromI32(0) service.save() } diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index f8a69688..022175cd 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,5 +1,5 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" -import { AllocationClosed, AllocationCreated, AllocationResized, DelegationRatioSet, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" +import { AllocationClosed, AllocationCreated, AllocationResized, CurationCutSet, DelegationRatioSet, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" import { Allocation, GraphAccount, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" @@ -399,3 +399,9 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void { ) paymentSource.save() } + +export function handleCurationCutSet(event: CurationCutSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.curationCut = event.params.curationCut + dataService.save() +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 22cc671e..bf95abb2 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -483,6 +483,8 @@ dataSources: handler: handleQueryFeesCollected - event: DelegationRatioSet(uint32) handler: handleDelegationRatioSet + - event: CurationCutSet(uint256) + handler: handleCurationCutSet - kind: ethereum/contract name: GraphPayments network: {{network}} From db7dac64fb74b0d6f59bbbd71f2a4bb4e52e58dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 22 Apr 2025 09:56:39 -0300 Subject: [PATCH 51/79] feat: add more missing events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- schema.graphql | 24 ++++++++++++++++++++-- src/mappings/helpers/helpers.ts | 8 ++++++++ src/mappings/subgraphService.ts | 35 ++++++++++++++++++++++++++++++++- subgraph.template.yaml | 10 ++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) diff --git a/schema.graphql b/schema.graphql index 61d8fedc..4400c9ab 100644 --- a/schema.graphql +++ b/schema.graphql @@ -250,15 +250,35 @@ type DataService @entity { "Total GRT currently in allocations for this DataService" totalTokensAllocated: BigInt! + "Minimum provision tokens for this DataService" + minimumProvisionTokens: BigInt! + "Maximum provision tokens for this DataService" + maximumProvisionTokens: BigInt! + + "Minimum verifier cut for this DataService" + minimumVerifierCut: BigInt! + "Maximum verifier cut for this DataService" + maximumVerifierCut: BigInt! + + "Minimum thawing period for this DataService" + minimumThawingPeriod: BigInt! + "Maximum thawing period for this DataService" + maximumThawingPeriod: BigInt! + "Ratio of max staked delegation tokens to indexers stake that earns rewards" delegationRatio: Int - "Curation cut for this DataService" - curationCut: BigInt! provisions: [Provision!]! @derivedFrom(field: "dataService") "True if allowed for usage with token lock wallets" allowedWithTokenLockWallets: Boolean! + + "[SubgraphService] Curation cut for this DataService" + curationCut: BigInt! + "[SubgraphService] Max POI staleness" + maxPOIStaleness: BigInt! + "[SubgraphService] Stake to fees ratio" + stakeToFeesRatio: BigInt! } """ diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index dd5c6d74..f7884a6e 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -263,6 +263,14 @@ export function createOrLoadDataService(verifierAddress: Bytes): DataService { service.totalTokensThawing = BigInt.fromI32(0) service.allowedWithTokenLockWallets = false service.curationCut = BigInt.fromI32(0) + service.maxPOIStaleness = BigInt.fromI32(0) + service.stakeToFeesRatio = BigInt.fromI32(0) + service.minimumProvisionTokens = BigInt.fromI32(0) + service.maximumProvisionTokens = BigInt.fromI32(0) + service.minimumVerifierCut = BigInt.fromI32(0) + service.maximumVerifierCut = BigInt.fromI32(0) + service.minimumThawingPeriod = BigInt.fromI32(0) + service.maximumThawingPeriod = BigInt.fromI32(0) service.save() } diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 022175cd..f535a70d 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,5 +1,5 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" -import { AllocationClosed, AllocationCreated, AllocationResized, CurationCutSet, DelegationRatioSet, IndexingRewardsCollected, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered } from "../types/SubgraphService/SubgraphService" +import { AllocationClosed, AllocationCreated, AllocationResized, CurationCutSet, DelegationRatioSet, IndexingRewardsCollected, MaxPOIStalenessSet, ProvisionTokensRangeSet, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered, StakeToFeesRatioSet, ThawingPeriodRangeSet, VerifierCutRangeSet } from "../types/SubgraphService/SubgraphService" import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" import { Allocation, GraphAccount, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" @@ -405,3 +405,36 @@ export function handleCurationCutSet(event: CurationCutSet): void { dataService.curationCut = event.params.curationCut dataService.save() } + +export function handleMaxPOIStalenessSet(event: MaxPOIStalenessSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.maxPOIStaleness = event.params.maxPOIStaleness + dataService.save() +} + +export function handleStakeToFeesRatioSet(event: StakeToFeesRatioSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.stakeToFeesRatio = event.params.ratio + dataService.save() +} + +export function handleProvisionTokensRangeSet(event: ProvisionTokensRangeSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.minimumProvisionTokens = event.params.min + dataService.maximumProvisionTokens = event.params.max + dataService.save() +} + +export function handleVerifierCutRangeSet(event: VerifierCutRangeSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.minimumVerifierCut = event.params.min + dataService.maximumVerifierCut = event.params.max + dataService.save() +} + +export function handleThawingPeriodRangeSet(event: ThawingPeriodRangeSet): void { + let dataService = createOrLoadDataService(event.address) + dataService.minimumThawingPeriod = event.params.min + dataService.maximumThawingPeriod = event.params.max + dataService.save() +} diff --git a/subgraph.template.yaml b/subgraph.template.yaml index bf95abb2..56a57a34 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -485,6 +485,16 @@ dataSources: handler: handleDelegationRatioSet - event: CurationCutSet(uint256) handler: handleCurationCutSet + - event: MaxPOIStalenessSet(uint256) + handler: handleMaxPOIStalenessSet + - event: StakeToFeesRatioSet(uint256) + handler: handleStakeToFeesRatioSet + - event: ProvisionTokensRangeSet(uint256,uint256) + handler: handleProvisionTokensRangeSet + - event: VerifierCutRangeSet(uint32,uint32) + handler: handleVerifierCutRangeSet + - event: ThawingPeriodRangeSet(uint64,uint64) + handler: handleThawingPeriodRangeSet - kind: ethereum/contract name: GraphPayments network: {{network}} From 73c7da8d58b83f306efb42008751e1c989eb27d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 22 Apr 2025 11:12:27 -0300 Subject: [PATCH 52/79] fix: couple delegation fixes and additions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- schema.graphql | 9 +++++++++ src/mappings/helpers/helpers.ts | 1 + src/mappings/horizonStaking.ts | 31 ++++++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/schema.graphql b/schema.graphql index 4400c9ab..b4b5af8a 100644 --- a/schema.graphql +++ b/schema.graphql @@ -249,6 +249,8 @@ type DataService @entity { totalTokensThawing: BigInt! "Total GRT currently in allocations for this DataService" totalTokensAllocated: BigInt! + "Total GRT currently delegated to this DataService" + totalTokensDelegated: BigInt! "Minimum provision tokens for this DataService" minimumProvisionTokens: BigInt! @@ -999,9 +1001,16 @@ type Provision @entity { rewardsDestination: Bytes } +enum ThawRequestType { + Provision + Delegation +} + type ThawRequest @entity { id: ID! + type: ThawRequestType! + indexer: Indexer! dataService: DataService! diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index f7884a6e..c55665c0 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -271,6 +271,7 @@ export function createOrLoadDataService(verifierAddress: Bytes): DataService { service.maximumVerifierCut = BigInt.fromI32(0) service.minimumThawingPeriod = BigInt.fromI32(0) service.maximumThawingPeriod = BigInt.fromI32(0) + service.totalTokensDelegated = BigInt.fromI32(0) service.save() } diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index b6151aff..47cda7a9 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -262,6 +262,13 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { request.thawingUntil = event.params.thawingUntil request.fulfilled = false request.fulfilledAsValid = false + if (event.params.requestType == 0) { + request.type = "Provision" + } else if (event.params.requestType == 1) { + request.type = "Delegation" + } else { + throw new Error("Invalid thaw request type") + } request.save() } @@ -274,23 +281,29 @@ export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { } export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolAdded): void { - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - let indexer = Indexer.load(event.params.serviceProvider.toHexString())! let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) provision.delegatedTokens = provision.delegatedTokens.plus(event.params.tokens) if (provision.delegatorShares != BigInt.fromI32(0)) { provision = updateDelegationExchangeRateForProvision(provision as Provision) } + provision = updateAdvancedProvisionMetrics(provision as Provision) provision.save() + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) // this only serves as a general tracker, but the real deal is per provision if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer.save() + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens) graphNetwork.save() + + let dataService = createOrLoadDataService(event.params.verifier) + dataService.totalTokensDelegated = dataService.totalTokensDelegated.plus(event.params.tokens) + dataService.save() } // Delegation @@ -299,7 +312,7 @@ export function handleTokensDelegated(event: TokensDelegated): void { let zeroShares = event.params.shares.equals(BigInt.fromI32(0)) let dataService = createOrLoadDataService(event.params.verifier) - // Might want to track some stuff here in the future + dataService.totalTokensDelegated = dataService.totalTokensDelegated.plus(event.params.tokens) dataService.save() let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) @@ -315,6 +328,10 @@ export function handleTokensDelegated(event: TokensDelegated): void { let indexer = createOrLoadIndexer(event.params.serviceProvider, event.block.timestamp) indexer.delegatedTokens = indexer.delegatedTokens.plus(event.params.tokens) indexer.delegatorShares = indexer.delegatorShares.plus(event.params.shares) + if (indexer.delegatorShares != BigInt.fromI32(0)) { + indexer = updateDelegationExchangeRate(indexer as Indexer) + } + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer.save() // update delegator @@ -416,6 +433,10 @@ export function handleTokensUndelegated(event: TokensUndelegated): void { let indexer = Indexer.load(indexerID)! indexer.delegatedTokens = indexer.delegatedTokens.minus(event.params.tokens) indexer.delegatorShares = indexer.delegatorShares.minus(event.params.shares) + if (indexer.delegatorShares != BigInt.fromI32(0)) { + indexer = updateDelegationExchangeRate(indexer as Indexer) + } + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer.save() // update delegated stake @@ -459,6 +480,10 @@ export function handleTokensUndelegated(event: TokensUndelegated): void { graphNetwork.save() delegator.save() + + let dataService = createOrLoadDataService(event.params.verifier) + dataService.totalTokensDelegated = dataService.totalTokensDelegated.minus(event.params.tokens) + dataService.save() } export function handleDelegatedTokensWithdrawn(event: DelegatedTokensWithdrawn): void { From 4c6d370e0b2d58cf7528549ae84912617eedeefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 22 Apr 2025 15:55:44 -0300 Subject: [PATCH 53/79] fix: few things about indexing rewards and pois MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- abis/SubgraphService.json | 6 ++++++ schema.graphql | 18 ++++++++++++++++++ src/mappings/subgraphService.ts | 16 +++++++++++++++- subgraph.template.yaml | 2 +- 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/abis/SubgraphService.json b/abis/SubgraphService.json index 92f1bfba..a99cd7d0 100644 --- a/abis/SubgraphService.json +++ b/abis/SubgraphService.json @@ -803,6 +803,12 @@ "name": "poi", "type": "bytes32" }, + { + "indexed": false, + "internalType": "bytes32", + "name": "publicPoi", + "type": "bytes32" + }, { "indexed": false, "internalType": "uint256", diff --git a/schema.graphql b/schema.graphql index b4b5af8a..f2146737 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1092,8 +1092,12 @@ type Allocation @entity { poi: Bytes "POIs submitted when collecting payments in Horizon" pois: [PoiSubmission!]! @derivedFrom(field: "allocation") + "Public POIs submitted when collecting payments in Horizon" + publicPois: [PublicPoiSubmission!]! @derivedFrom(field: "allocation") "Number of POIs submitted for this allocation. Only available for Horizon allocations" poiCount: BigInt + "Timestamp for the latest POI presentation" + latestPoiPresentedAt: Int "Whether this allocation was created in the legacy protocol. If true, the allocation will not have a provision since it's not a Horizon allocation" isLegacy: Boolean! "Whether this allocation was forced closed. Force closures in Horizon can happen when the latest PoI is stale, compared to the legacy protocol, where force closures can happen when the allocation hasn't been closed within the max amount of epochs" @@ -1125,6 +1129,20 @@ type PoiSubmission @entity { poi: Bytes! submittedAtEpoch: Int! + + presentedAtTimestamp: Int! +} + +type PublicPoiSubmission @entity { + id: ID! + + allocation: Allocation! + + publicPoi: Bytes! + + submittedAtEpoch: Int! + + presentedAtTimestamp: Int! } enum AllocationStatus { diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index f535a70d..1555bc92 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,7 +1,7 @@ import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" import { AllocationClosed, AllocationCreated, AllocationResized, CurationCutSet, DelegationRatioSet, IndexingRewardsCollected, MaxPOIStalenessSet, ProvisionTokensRangeSet, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered, StakeToFeesRatioSet, ThawingPeriodRangeSet, VerifierCutRangeSet } from "../types/SubgraphService/SubgraphService" import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" -import { Allocation, GraphAccount, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" +import { Allocation, PublicPoiSubmission, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" import { tuplePrefixBytes } from "./helpers/decoder" import { createOrLoadIndexer } from "./helpers/helpers" @@ -260,8 +260,22 @@ export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): poiSubmission.allocation = allocation.id poiSubmission.poi = event.params.poi poiSubmission.submittedAtEpoch = event.params.currentEpoch.toI32() + poiSubmission.presentedAtTimestamp = event.block.timestamp.toI32() poiSubmission.save() + // Create public PoI submission + let publicPoiSubmission = new PublicPoiSubmission(joinID([event.transaction.hash.toHexString(), event.logIndex.toString()])) + publicPoiSubmission.allocation = allocation.id + publicPoiSubmission.publicPoi = event.params.publicPoi + publicPoiSubmission.submittedAtEpoch = event.params.currentEpoch.toI32() + publicPoiSubmission.presentedAtTimestamp = event.block.timestamp.toI32() + publicPoiSubmission.save() + + // Update latest POI in allocation + allocation.poi = event.params.poi + allocation.latestPoiPresentedAt = event.block.timestamp.toI32() + allocation.save() + // Update epoch let epoch = createOrLoadEpoch((addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!)) epoch.totalRewards = epoch.totalRewards.plus(event.params.tokensRewards) diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 56a57a34..ff162e26 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -477,7 +477,7 @@ dataSources: handler: handleAllocationResized - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256,bool) handler: handleAllocationClosed - - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,uint256) + - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,bytes32,uint256) handler: handleIndexingRewardsCollected - event: QueryFeesCollected(indexed address,indexed address,indexed address,bytes32,uint256,uint256) handler: handleQueryFeesCollected From 81eab58a033317d315c2b02077611a818cc2ecff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Wed, 23 Apr 2025 09:27:07 -0300 Subject: [PATCH 54/79] fix: load graph network first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/horizonStaking.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 47cda7a9..1dee16e5 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -281,6 +281,10 @@ export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { } export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolAdded): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens) + graphNetwork.save() + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) provision.delegatedTokens = provision.delegatedTokens.plus(event.params.tokens) if (provision.delegatorShares != BigInt.fromI32(0)) { @@ -297,10 +301,6 @@ export function handleTokensToDelegationPoolAdded(event: TokensToDelegationPoolA indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer.save() - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - graphNetwork.totalDelegatedTokens = graphNetwork.totalDelegatedTokens.plus(event.params.tokens) - graphNetwork.save() - let dataService = createOrLoadDataService(event.params.verifier) dataService.totalTokensDelegated = dataService.totalTokensDelegated.plus(event.params.tokens) dataService.save() From f664900160bb26318bf96c538af058557817be41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 15 May 2025 09:49:47 -0300 Subject: [PATCH 55/79] fix: overdelegation dilution div by zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/helpers/helpers.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index c55665c0..ac0966f5 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -984,9 +984,10 @@ export function calculateOverdelegationDilution(indexer: Indexer): BigDecimal { let graphNetwork = GraphNetwork.load('1')! let delegationRatioBD = BigInt.fromI32(graphNetwork.delegationRatio).toBigDecimal() let maxDelegatedStake = stakedTokensBD * delegationRatioBD - return stakedTokensBD == BigDecimal.fromString('0') + let maxDelegatedStakeBD = max(maxDelegatedStake, delegatedTokensBD) + return maxDelegatedStakeBD == BigDecimal.fromString('0') ? BigDecimal.fromString('0') - : BigDecimal.fromString('1') - maxDelegatedStake / max(maxDelegatedStake, delegatedTokensBD) + : BigDecimal.fromString('1') - maxDelegatedStake / maxDelegatedStakeBD } export function updateAdvancedIndexerMetrics(indexer: Indexer): Indexer { From f7342e5444e0593833c82d271d5f2c3f5bd5b186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 15 May 2025 10:58:30 -0300 Subject: [PATCH 56/79] chore: use split address book on localnetwork script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- config/localNetworkAddressScript.ts | 51 +++++++++++++++-------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/config/localNetworkAddressScript.ts b/config/localNetworkAddressScript.ts index f6e67b0a..74f08ce1 100644 --- a/config/localNetworkAddressScript.ts +++ b/config/localNetworkAddressScript.ts @@ -1,37 +1,40 @@ import * as fs from 'fs' import * as mustache from 'mustache' // Replace with proper imports once the packages are published -import * as networkAddresses from '/opt/contracts.json' +import * as horizonAddresses from '/opt/horizon.json' +import * as subgraphServiceAddresses from '/opt/subgraph-service.json' import { Addresses } from './addresses.template' // mustache doesn't like numbered object keys // eslint-disable-next-line @typescript-eslint/no-explicit-any -let renameAddresses: any = networkAddresses -renameAddresses['localnetwork'] = networkAddresses['1337'] +let renameAddresses: any = { + horizon: horizonAddresses['1337'], + subgraphService: subgraphServiceAddresses['1337'], +} export let addresses: Addresses = { - controller: '{{localnetwork.Controller.address}}', - graphToken: '{{localnetwork.L2GraphToken.address}}', - epochManager: '{{localnetwork.EpochManager.address}}', - disputeManager: '{{localnetwork.DisputeManager.address}}', - staking: '{{localnetwork.HorizonStaking.address}}', - stakingExtension: '{{localnetwork.HorizonStaking.address}}', - curation: '{{localnetwork.L2Curation.address}}', - rewardsManager: '{{localnetwork.RewardsManager.address}}', + controller: '{{horizon.Controller.address}}', + graphToken: '{{horizon.L2GraphToken.address}}', + epochManager: '{{horizon.EpochManager.address}}', + disputeManager: '{{subgraphService.DisputeManager.address}}', + staking: '{{horizon.HorizonStaking.address}}', + stakingExtension: '{{horizon.HorizonStaking.address}}', + curation: '{{horizon.L2Curation.address}}', + rewardsManager: '{{horizon.RewardsManager.address}}', serviceRegistry: '0x0000000000000000000000000000000000000000', - gns: '{{localnetwork.L2GNS.address}}', - ens: '{{localnetwork.IENS.address}}', - ensPublicResolver: '{{localnetwork.IPublicResolver.address}}', + gns: '{{horizon.L2GNS.address}}', + ens: '{{horizon.IENS.address}}', + ensPublicResolver: '{{horizon.IPublicResolver.address}}', blockNumber: '', bridgeBlockNumber: '', network: '', tokenLockManager: '', - subgraphNFT: '{{localnetwork.SubgraphNFT.address}}', + subgraphNFT: '{{horizon.SubgraphNFT.address}}', l1GraphTokenGateway: '', - l2GraphTokenGateway: '{{localnetwork.L2GraphTokenGateway.address}}', - ethereumDIDRegistry: '{{localnetwork.EthereumDIDRegistry.address}}', - subgraphService: '{{localnetwork.SubgraphService.address}}', - graphPayments: '{{localnetwork.GraphPayments.address}}', + l2GraphTokenGateway: '{{horizon.L2GraphTokenGateway.address}}', + ethereumDIDRegistry: '{{horizon.EthereumDIDRegistry.address}}', + subgraphService: '{{subgraphService.SubgraphService.address}}', + graphPayments: '{{horizon.GraphPayments.address}}', isL1: false, } @@ -48,12 +51,12 @@ const main = (): void => { if(output.ethereumDIDRegistry == '') { output.ethereumDIDRegistry = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } - // remove once we have proper packages - if(output.subgraphService == '') { - output.subgraphService = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + // TODO: Remove this once subgraph service scripts deploy GNS and SubgraphNFT + if(output.gns == '') { + output.gns = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } - if(output.graphPayments == '') { - output.graphPayments = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + if(output.subgraphNFT == '') { + output.subgraphNFT = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { From ca969949efaeb8ab75f7bed87f0765dc487afe0c Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sat, 26 Apr 2025 18:16:23 -0300 Subject: [PATCH 57/79] feat: added HorizonDisputeManager --- abis/HorizonDisputeManager.json | 1454 ++++++++++++++++++++++++ config/addresses.template.ts | 2 + config/arbitrumSepoliaAddressScript.ts | 8 +- config/localNetworkAddressScript.ts | 4 + config/mainnetArbitrumAddressScript.ts | 4 + config/testAddressesL1.ts | 1 + config/testAddressesL2.ts | 1 + schema.graphql | 6 +- src/mappings/helpers/helpers.ts | 3 +- src/mappings/horizonDisputeManager.ts | 195 ++++ subgraph.template.yaml | 43 + 11 files changed, 1717 insertions(+), 4 deletions(-) create mode 100644 abis/HorizonDisputeManager.json create mode 100644 src/mappings/horizonDisputeManager.ts diff --git a/abis/HorizonDisputeManager.json b/abis/HorizonDisputeManager.json new file mode 100644 index 00000000..614bb097 --- /dev/null +++ b/abis/HorizonDisputeManager.json @@ -0,0 +1,1454 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedLength", + "type": "uint256" + } + ], + "name": "AttestationInvalidBytesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerDisputeAlreadyCreated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerDisputeInConflict", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerDisputeNotInConflict", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum IDisputeManager.DisputeStatus", + "name": "status", + "type": "uint8" + } + ], + "name": "DisputeManagerDisputeNotPending", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerDisputePeriodNotFinished", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerDisputePeriodZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "DisputeManagerIndexerNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerInvalidDispute", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + } + ], + "name": "DisputeManagerInvalidDisputeDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "cut", + "type": "uint32" + } + ], + "name": "DisputeManagerInvalidFishermanReward", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "maxSlashingCut", + "type": "uint32" + } + ], + "name": "DisputeManagerInvalidMaxSlashingCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTokensSlash", + "type": "uint256" + } + ], + "name": "DisputeManagerInvalidTokensSlash", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "relatedDisputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerMustAcceptRelatedDispute", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "requestCID1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "requestCID2", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID2", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId2", + "type": "bytes32" + } + ], + "name": "DisputeManagerNonConflictingAttestations", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "subgraphDeploymentId1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId2", + "type": "bytes32" + } + ], + "name": "DisputeManagerNonMatchingSubgraphDeployment", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerNotArbitrator", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerNotFisherman", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerSubgraphServiceNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerZeroTokens", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "contractName", + "type": "bytes" + } + ], + "name": "GraphDirectoryInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "PPMMathInvalidMulPPM", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "arbitrator", + "type": "address" + } + ], + "name": "ArbitratorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + } + ], + "name": "DisputeDepositSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeDrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId1", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId2", + "type": "bytes32" + } + ], + "name": "DisputeLinked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "disputePeriod", + "type": "uint64" + } + ], + "name": "DisputePeriodSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeRejected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "fishermanRewardCut", + "type": "uint32" + } + ], + "name": "FishermanRewardCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "graphToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphStaking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphPayments", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEscrow", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEpochManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphRewardsManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTokenGateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphProxyAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphCuration", + "type": "address" + } + ], + "name": "GraphDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "poi", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeSnapshot", + "type": "uint256" + } + ], + "name": "IndexingDisputeCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "maxSlashingCut", + "type": "uint32" + } + ], + "name": "MaxSlashingCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "attestation", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeSnapshot", + "type": "uint256" + } + ], + "name": "QueryDisputeCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "subgraphService", + "type": "address" + } + ], + "name": "SubgraphServiceSet", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_FISHERMAN_REWARD_CUT", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DISPUTE_DEPOSIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + } + ], + "name": "acceptDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "acceptDisputeInConflict", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "tokensSlashRelated", + "type": "uint256" + } + ], + "name": "acceptDisputeConflict", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "arbitrator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + } + ], + "internalType": "struct Attestation.State", + "name": "attestation1", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + } + ], + "internalType": "struct Attestation.State", + "name": "attestation2", + "type": "tuple" + } + ], + "name": "areConflictingAttestations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "cancelDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "poi", + "type": "bytes32" + } + ], + "name": "createIndexingDispute", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "name": "createQueryDispute", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "attestationData1", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData2", + "type": "bytes" + } + ], + "name": "createQueryDisputeConflict", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disputeDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disputePeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "relatedDisputeId", + "type": "bytes32" + }, + { + "internalType": "enum IDisputeManager.DisputeType", + "name": "disputeType", + "type": "uint8" + }, + { + "internalType": "enum IDisputeManager.DisputeStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "stakeSnapshot", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "drawDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "internalType": "struct Attestation.Receipt", + "name": "receipt", + "type": "tuple" + } + ], + "name": "encodeReceipt", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fishermanRewardCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + } + ], + "internalType": "struct Attestation.State", + "name": "attestation", + "type": "tuple" + } + ], + "name": "getAttestationIndexer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDisputePeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFishermanRewardCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "getStakeSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "arbitrator", + "type": "address" + }, + { + "internalType": "uint64", + "name": "disputePeriod", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "fishermanRewardCut_", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "maxSlashingCut_", + "type": "uint32" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "isDisputeCreated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxSlashingCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "rejectDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "arbitrator", + "type": "address" + } + ], + "name": "setArbitrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + } + ], + "name": "setDisputeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "disputePeriod", + "type": "uint64" + } + ], + "name": "setDisputePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "fishermanRewardCut_", + "type": "uint32" + } + ], + "name": "setFishermanRewardCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "maxSlashingCut_", + "type": "uint32" + } + ], + "name": "setMaxSlashingCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "subgraphService", + "type": "address" + } + ], + "name": "setSubgraphService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "subgraphService", + "outputs": [ + { + "internalType": "contract ISubgraphService", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] \ No newline at end of file diff --git a/config/addresses.template.ts b/config/addresses.template.ts index 89df6658..667cb979 100644 --- a/config/addresses.template.ts +++ b/config/addresses.template.ts @@ -4,6 +4,7 @@ export class Addresses { graphToken: string epochManager: string disputeManager: string + horizonDisputeManager: string staking: string stakingExtension: string curation: string @@ -31,6 +32,7 @@ export let addresses: Addresses = { graphToken: '{{graphToken}}', epochManager: '{{epochManager}}', disputeManager: '{{disputeManager}}', + horizonDisputeManager: '{{horizonDisputeManager}}', staking: '{{staking}}', stakingExtension: '{{stakingExtension}}', curation: '{{curation}}', diff --git a/config/arbitrumSepoliaAddressScript.ts b/config/arbitrumSepoliaAddressScript.ts index 851f6dd3..52ec9198 100644 --- a/config/arbitrumSepoliaAddressScript.ts +++ b/config/arbitrumSepoliaAddressScript.ts @@ -13,8 +13,9 @@ export let addresses: Addresses = { graphToken: '{{arbsep.L2GraphToken.address}}', epochManager: '{{arbsep.EpochManager.address}}', disputeManager: '{{arbsep.DisputeManager.address}}', - staking: '{{arbsep.HorizonStaking.address}}', - stakingExtension: '{{arbsep.HorizonStaking.address}}', + horizonDisputeManager: '{{arbsep.HorizonDisputeManager.address}}', + staking: '{{arbsep.L2Staking.address}}', + stakingExtension: '{{arbsep.StakingExtension.address}}', curation: '{{arbsep.L2Curation.address}}', rewardsManager: '{{arbsep.RewardsManager.address}}', serviceRegistry: '{{arbsep.ServiceRegistry.address}}', @@ -54,6 +55,9 @@ const main = (): void => { if(output.graphPayments == '') { output.graphPayments = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } + if(output.horizonDisputeManager == '') { + output.horizonDisputeManager = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { console.log(`Error saving artifacts: ${e.message}`) diff --git a/config/localNetworkAddressScript.ts b/config/localNetworkAddressScript.ts index 74f08ce1..169b34bd 100644 --- a/config/localNetworkAddressScript.ts +++ b/config/localNetworkAddressScript.ts @@ -17,6 +17,7 @@ export let addresses: Addresses = { graphToken: '{{horizon.L2GraphToken.address}}', epochManager: '{{horizon.EpochManager.address}}', disputeManager: '{{subgraphService.DisputeManager.address}}', + horizonDisputeManager: '{{subgraphService.HorizonDisputeManager.address}}', staking: '{{horizon.HorizonStaking.address}}', stakingExtension: '{{horizon.HorizonStaking.address}}', curation: '{{horizon.L2Curation.address}}', @@ -58,6 +59,9 @@ const main = (): void => { if(output.subgraphNFT == '') { output.subgraphNFT = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } + if(output.horizonDisputeManager == '') { + output.horizonDisputeManager = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { console.log(`Error saving artifacts: ${e.message}`) diff --git a/config/mainnetArbitrumAddressScript.ts b/config/mainnetArbitrumAddressScript.ts index 97f74e18..7dc590ff 100644 --- a/config/mainnetArbitrumAddressScript.ts +++ b/config/mainnetArbitrumAddressScript.ts @@ -13,6 +13,7 @@ export let addresses: Addresses = { graphToken: '{{arbitrum.L2GraphToken.address}}', epochManager: '{{arbitrum.EpochManager.address}}', disputeManager: '{{arbitrum.DisputeManager.address}}', + horizonDisputeManager: '{{arbitrum.HorizonDisputeManager.address}}', staking: '{{arbitrum.L2Staking.address}}', stakingExtension: '{{arbitrum.StakingExtension.address}}', curation: '{{arbitrum.L2Curation.address}}', @@ -55,6 +56,9 @@ const main = (): void => { if(output.graphPayments == '') { output.graphPayments = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } + if(output.horizonDisputeManager == '') { + output.horizonDisputeManager = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { console.log(`Error saving artifacts: ${e.message}`) diff --git a/config/testAddressesL1.ts b/config/testAddressesL1.ts index b6faebe5..cd8ca23d 100644 --- a/config/testAddressesL1.ts +++ b/config/testAddressesL1.ts @@ -13,6 +13,7 @@ export let addresses: Addresses = { graphToken: '0x0000000000000000000000000000000000000000', epochManager: '0x0000000000000000000000000000000000000000', disputeManager: '0x0000000000000000000000000000000000000000', + horizonDisputeManager: '0x0000000000000000000000000000000000000000', staking: '0x0000000000000000000000000000000000000000', stakingExtension: '0x0000000000000000000000000000000000000000', curation: '0x0000000000000000000000000000000000000000', diff --git a/config/testAddressesL2.ts b/config/testAddressesL2.ts index 4bfc932c..fb3754cd 100644 --- a/config/testAddressesL2.ts +++ b/config/testAddressesL2.ts @@ -13,6 +13,7 @@ export let addresses: Addresses = { graphToken: '0x0000000000000000000000000000000000000000', epochManager: '0x0000000000000000000000000000000000000000', disputeManager: '0x0000000000000000000000000000000000000000', + horizonDisputeManager: '0x0000000000000000000000000000000000000000', staking: '0x0000000000000000000000000000000000000000', stakingExtension: '0x0000000000000000000000000000000000000000', curation: '0x0000000000000000000000000000000000000000', diff --git a/schema.graphql b/schema.graphql index f2146737..79a993e3 100644 --- a/schema.graphql +++ b/schema.graphql @@ -219,8 +219,12 @@ type GraphNetwork @entity { slashingPercentage: Int! "Minimum deposit to create a dispute" minimumDisputeDeposit: BigInt! - "Reward to Fisherman on successful disputes. In parts per million" + "[LEGACY] Reward to Fisherman on successful disputes. In parts per million" fishermanRewardPercentage: Int! + "[HORIZON]Reward to Fisherman on successful disputes. In parts per million" + fishermanRewardCut: Int! + "Maximum Penalty to Indexer on successful disputes for indexing disputes. In parts per million" + maxSlashingCut: Int! # Bridge totals (Only available on L1 networks) "Total amount of GRT deposited to the L1 gateway. Note that the actual amount claimed in L2 might be lower due to tickets not redeemed." diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index ac0966f5..3fddc3b3 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -773,7 +773,8 @@ export function createOrLoadGraphNetwork( graphNetwork.indexingSlashingPercentage = 0 graphNetwork.slashingPercentage = 0 // keeping it for backwards compatibility for now graphNetwork.minimumDisputeDeposit = BigInt.fromI32(0) - graphNetwork.fishermanRewardPercentage = 0 + graphNetwork.fishermanRewardCut = 0 + graphNetwork.maxSlashingCut = 0 graphNetwork.totalGRTDeposited = BigInt.fromI32(0) graphNetwork.totalGRTDepositedConfirmed = BigInt.fromI32(0) diff --git a/src/mappings/horizonDisputeManager.ts b/src/mappings/horizonDisputeManager.ts new file mode 100644 index 00000000..8140d3b0 --- /dev/null +++ b/src/mappings/horizonDisputeManager.ts @@ -0,0 +1,195 @@ +import { Address, BigDecimal, BigInt, ByteArray, log } from '@graphprotocol/graph-ts' +import { Allocation, Dispute, Attestation } from '../types/schema' +import { + QueryDisputeCreated, + IndexingDisputeCreated, + DisputeRejected, + DisputeAccepted, + DisputeDrawn, + DisputeLinked, + ArbitratorSet, + FishermanRewardCutSet, + MaxSlashingCutSet, + DisputeCancelled, +} from '../types/HorizonDisputeManager/HorizonDisputeManager' +import { createOrLoadGraphNetwork } from './helpers/helpers' + +// Define constants locally +const BIGINT_ZERO = BigInt.fromI32(0) +const BIGDECIMAL_ZERO = BigDecimal.fromString('0') +const PPM_DIVISOR = BigDecimal.fromString('1000000') +const ADDRESS_ZERO = Address.fromString('0x0000000000000000000000000000000000000000') + +// Dispute Status constants +const STATUS_UNDECIDED = 'Undecided' +const STATUS_ACCEPTED = 'Accepted' +const STATUS_REJECTED = 'Rejected' +const STATUS_DRAWN = 'Draw' +const STATUS_CANCELLED = 'Cancelled' + +// Dispute Type constants +const TYPE_SINGLE_QUERY = 'SingleQuery' +const TYPE_INDEXING = 'Indexing' +const TYPE_CONFLICTING = 'Conflicting' + +// This handles Single query and Conflicting disputes +export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { + let id = event.params.disputeId.toHexString() + let dispute = new Dispute(id) + dispute.subgraphDeployment = event.params.subgraphDeploymentId.toHexString() + dispute.fisherman = event.params.fisherman.toHexString() + dispute.deposit = event.params.tokens + dispute.createdAt = event.block.timestamp.toI32() + dispute.status = STATUS_UNDECIDED + dispute.tokensSlashed = BIGDECIMAL_ZERO + dispute.tokensRewarded = BIGINT_ZERO + dispute.tokensBurned = BIGDECIMAL_ZERO + dispute.closedAt = 0 + dispute.type = TYPE_SINGLE_QUERY // It starts off as single query, but if it gets linked, it is updated to Conflicting. The events emitted are QueryDisputeCreated 1, QueryDisputeCreated 2, DisputeLinked + + dispute.indexer = event.params.indexer.toHexString() + + let attestationData = event.params.attestation.toHexString() + let request = '0x'.concat(attestationData.slice(2, 66)) + let response = '0x'.concat(attestationData.slice(66, 130)) + let attestation = new Attestation(request.concat('-').concat(response)) + let v = attestationData.slice(194, 196) + let r = attestationData.slice(196, 260) + let s = attestationData.slice(260, 324) + attestation.responseCID = response + attestation.requestCID = request + attestation.subgraphDeployment = dispute.subgraphDeployment + attestation.v = ByteArray.fromHexString(v).toI32() + attestation.r = '0x'.concat(r) + attestation.s = '0x'.concat(s) + attestation.save() + + dispute.attestation = attestation.id + dispute.save() +} + +// Just handles indexing disputes +export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): void { + let allocation = Allocation.load(event.params.allocationId.toHexString())! + let id = event.params.disputeId.toHexString() + let dispute = new Dispute(id) + dispute.subgraphDeployment = allocation.subgraphDeployment + dispute.fisherman = event.params.fisherman.toHexString() + dispute.deposit = event.params.tokens + dispute.createdAt = event.block.timestamp.toI32() + dispute.status = STATUS_UNDECIDED + dispute.tokensSlashed = BigDecimal.fromString('0') + dispute.tokensBurned = BigDecimal.fromString('0') + dispute.tokensRewarded = BigInt.fromI32(0) + dispute.type = TYPE_INDEXING + dispute.indexer = event.params.indexer.toHexString() + dispute.allocation = allocation.id + dispute.closedAt = 0 + dispute.save() +} + +export function handleDisputeAccepted(event: DisputeAccepted): void { + let id = event.params.disputeId.toHexString() + let dispute = Dispute.load(id)! + dispute.status = STATUS_ACCEPTED + dispute.tokensRewarded = event.params.tokens.minus(dispute.deposit) // See event, it adds them + dispute.closedAt = event.block.timestamp.toI32() + + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let fishermanRewardPercentage = graphNetwork.fishermanRewardCut + + // The fisherman reward is a function of the total slashed tokens. Therefore + // if fishermanReward is 10%, slashed reward should be 9x that --> (1,000,000 / 100,000) - 1 = 9 + // It must be done like this since the event only emits limited information + // Note - there is an edge case bug here, where if fishermanReward% = 0, we can't get + // the tokensSlashed. That is okay for now. There should always be a fisherman reward % + let slashedRewardRatio = + fishermanRewardPercentage == 0 + ? BigDecimal.fromString('0') + : BigDecimal.fromString('1000000') + .div(BigDecimal.fromString(fishermanRewardPercentage.toString())) + .minus(BigDecimal.fromString('1')) + dispute.tokensBurned = dispute.tokensRewarded.toBigDecimal().times(slashedRewardRatio) + dispute.tokensSlashed = dispute.tokensRewarded.toBigDecimal().plus(dispute.tokensBurned) + dispute.save() + + if (dispute.linkedDispute != null) { + let rejectedDispute = Dispute.load(dispute.linkedDispute!)! + rejectedDispute.status = STATUS_REJECTED + rejectedDispute.closedAt = event.block.timestamp.toI32() + rejectedDispute.save() + } +} + +// Note - it is impossible to call reject on a conflicting dispute, it is either draw or accept +// This is because if you accept 1 in a conflict, the other is rejected +export function handleDisputeRejected(event: DisputeRejected): void { + let id = event.params.disputeId.toHexString() + let dispute = Dispute.load(id)! + dispute.status = STATUS_REJECTED + dispute.closedAt = event.block.timestamp.toI32() + dispute.save() +} + +export function handleDisputeDrawn(event: DisputeDrawn): void { + let id = event.params.disputeId.toHexString() + let dispute = Dispute.load(id)! + dispute.status = STATUS_DRAWN + dispute.closedAt = event.block.timestamp.toI32() + dispute.save() + + if (dispute.linkedDispute != null) { + let linkedDispute = Dispute.load(dispute.linkedDispute!)! + linkedDispute.status = STATUS_DRAWN + linkedDispute.closedAt = event.block.timestamp.toI32() + linkedDispute.save() + } +} + +export function handleDisputeLinked(event: DisputeLinked): void { + let id1 = event.params.disputeId1.toHexString() + let id2 = event.params.disputeId2.toHexString() + let dispute1 = Dispute.load(id1)! + let dispute2 = Dispute.load(id2)! + + dispute1.linkedDispute = id2 + dispute1.type = TYPE_CONFLICTING + dispute1.save() + + dispute2.linkedDispute = id1 + dispute2.type = TYPE_CONFLICTING + dispute2.save() +} + + +// Handles Horizon DisputeCancelled events +export function handleDisputeCancelled(event: DisputeCancelled): void { + let disputeId = event.params.disputeId.toHexString() + let dispute = Dispute.load(disputeId)! + + dispute.status = STATUS_CANCELLED + dispute.closedAt = event.block.timestamp.toI32() + dispute.save() +} + +// Handles ArbitratorSet events +export function handleArbitratorSet(event: ArbitratorSet): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.arbitrator = event.params.arbitrator + graphNetwork.save() +} + +// Handles FishermanRewardCutSet events +export function handleFishermanRewardCutSet(event: FishermanRewardCutSet): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.fishermanRewardCut = event.params.fishermanRewardCut.toI32() + graphNetwork.save() +} + +// Handles MaxSlashingCutSet events +export function handleMaxSlashingCutSet(event: MaxSlashingCutSet): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.maxSlashingCut = event.params.maxSlashingCut.toI32() + graphNetwork.save() +} + diff --git a/subgraph.template.yaml b/subgraph.template.yaml index ff162e26..028f2d0f 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -519,6 +519,49 @@ dataSources: eventHandlers: - event: GraphPaymentCollected(indexed uint8,indexed address,address,indexed address,uint256,uint256,uint256,uint256,uint256) handler: handleGraphPaymentCollected + - kind: ethereum/contract + name: HorizonDisputeManager + network: {{network}} + source: + address: "{{horizonDisputeManager}}" + abi: HorizonDisputeManager + startBlock: {{blockNumber}} + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + file: ./src/mappings/horizonDisputeManager.ts + entities: + - Dispute + - GraphNetwork + - GraphAccount + - SubgraphDeployment + abis: + - name: HorizonDisputeManager + file: ./abis/HorizonDisputeManager.json + - name: EpochManager + file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json + eventHandlers: + - event: QueryDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,bytes32,bytes,uint256) + handler: handleQueryDisputeCreated + - event: IndexingDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,address,bytes32,uint256) + handler: handleIndexingDisputeCreated + - event: DisputeAccepted(indexed bytes32,indexed address,indexed address,uint256) + handler: handleDisputeAccepted + - event: DisputeRejected(indexed bytes32,indexed address,indexed address,uint256) + handler: handleDisputeRejected + - event: DisputeCancelled(indexed bytes32,indexed address,indexed address,uint256) + handler: handleDisputeCancelled + - event: DisputeDrawn(indexed bytes32,indexed address,indexed address,uint256) + handler: handleDisputeDrawn + - event: DisputeLinked(indexed bytes32,indexed bytes32) + handler: handleDisputeLinked + - event: ArbitratorSet(indexed address) + handler: handleArbitratorSet + - event: FishermanRewardCutSet(uint32) + handler: handleFishermanRewardCutSet + - event: MaxSlashingCutSet(uint32) + handler: handleMaxSlashingCutSet - kind: ethereum/contract name: Curation network: {{network}} From ce0b8f0d4cd5390fb040e89d54a4e12c547973c7 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Sat, 26 Apr 2025 18:21:17 -0300 Subject: [PATCH 58/79] fix: missing initalized field --- src/mappings/helpers/helpers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 3fddc3b3..00f969e5 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -773,6 +773,7 @@ export function createOrLoadGraphNetwork( graphNetwork.indexingSlashingPercentage = 0 graphNetwork.slashingPercentage = 0 // keeping it for backwards compatibility for now graphNetwork.minimumDisputeDeposit = BigInt.fromI32(0) + graphNetwork.fishermanRewardPercentage = 0 graphNetwork.fishermanRewardCut = 0 graphNetwork.maxSlashingCut = 0 From e9e9b62390d4a83cf02b89f52e2f04eaab5ee178 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 14 May 2025 22:40:27 -0300 Subject: [PATCH 59/79] chore: update CLI --- package.json | 4 +- schema.graphql | 72 +- yarn.lock | 2696 +++++++++++++++++++++++++----------------------- 3 files changed, 1473 insertions(+), 1299 deletions(-) diff --git a/package.json b/package.json index 6d6fffa5..55108d42 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "deploy-arbitrum": "yarn && yarn prepare:arbitrum && graph deploy --studio graph-network-arbitrum", "deploy-sepolia": "yarn && yarn prepare:sepolia && graph deploy --studio graph-network-sepolia", "deploy-arbitrum-sepolia": "yarn && yarn prepare:arbitrum-sepolia && graph deploy --studio graph-network-arbitrum-sepolia", + "deploy-arbitrum-sepolia-test": "yarn && yarn prepare:arbitrum-sepolia && graph deploy horizon-testing-arb-sepolia -l test-old", "deploy-studio": "yarn deploy-mainnet && yarn deploy-arbitrum && yarn deploy-sepolia && yarn deploy-arbitrum-sepolia", "prep:addresses:sepolia": "ts-node config/sepoliaAddressScript.ts && mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts", "prepare:sepolia": "yarn prep:addresses:sepolia && mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && graph codegen --output-dir src/types/", @@ -42,7 +43,7 @@ }, "devDependencies": { "@graphprotocol/contracts": "6.2.0", - "@graphprotocol/graph-cli": "0.68.5", + "@graphprotocol/graph-cli": "0.97.0", "@graphprotocol/graph-ts": "0.38.0", "@types/node": "^14.0.13", "@typescript-eslint/eslint-plugin": "^3.3.0", @@ -51,6 +52,7 @@ "matchstick-as": "0.6.0-beta.2", "mustache": "^4.0.1", "prettier": "^2.0.5", + "ts-node": "^10.9.2", "typescript": "^3.9.3" }, "author": "", diff --git a/schema.graphql b/schema.graphql index 79a993e3..ecc10e81 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1,7 +1,7 @@ """ Graph Network global parameters and contract addresses """ -type GraphNetwork @entity { +type GraphNetwork @entity(immutable: false) { "ID is set to 1" id: ID! "Controller address" @@ -243,7 +243,7 @@ type GraphNetwork @entity { currentL1BlockNumber: BigInt } -type DataService @entity { +type DataService @entity(immutable: false) { "Data Service address" id: ID! @@ -291,7 +291,7 @@ type DataService @entity { An account within the graph network. Contains metadata and all relevant data for this accounts delegating, curating, and indexing. """ -type GraphAccount @entity { +type GraphAccount @entity(immutable: false) { "Graph account ID" id: ID! "All names this graph account has claimed from all name systems" @@ -384,7 +384,7 @@ type GraphAccountMeta @entity(immutable:true) { A name chosen by a Graph Account from a Name System such as ENS. This allows Graph Accounts to be recognized by name, rather than just an Ethereum address """ -type GraphAccountName @entity { +type GraphAccountName @entity(immutable: false) { "Name system concatenated with the unique ID of the name system" id: ID! "Name system for this name" @@ -407,7 +407,7 @@ name chosen a unique combination. When a Curator singals on a Subgraph, they rec "Name Signal" resolves into the underlying "Signal" of the SubgraphDeployment. The metadata of the subgraph is stored on IPFS. """ -type Subgraph @entity { +type Subgraph @entity(immutable: false) { "Subgraph ID - which is derived from the Organization/Individual graph accountID" id: ID! "Graph account that owns this subgraph" @@ -524,7 +524,7 @@ type SubgraphMeta @entity(immutable:true) { categories: [String!] } -type CurrentSubgraphDeploymentRelation @entity { +type CurrentSubgraphDeploymentRelation @entity(immutable: false) { "Auxiliary entity used to batch update Subgraph entities when signalling on the deployment changes. ID replicates the deployment ID and adds a counter, to make it easy to reproduce." id: ID! @@ -545,7 +545,7 @@ deployment, while keeping the same endpoint. The metadata and label are stored o is for the developer to provide a semantic version. This is different from the version, which is just a counter than increases each time a new SubgraphVersion is created for a Subgraph. """ -type SubgraphVersion @entity { +type SubgraphVersion @entity(immutable: false) { "Concatenation of subgraph, subgraph deployment, and version ID" id: ID! "Subgraph of this version" @@ -586,7 +586,7 @@ what to index. The entity stores relevant data for the SubgraphDeployment on how staked on and signaled on in the contracts, as well as how it is performing in query fees. It is related to a SubgraphVersion. """ -type SubgraphDeployment @entity { +type SubgraphDeployment @entity(immutable: false) { "Subgraph Deployment ID. The IPFS hash with Qm removed to fit into 32 bytes" id: ID! "IPFS hash of the subgraph manifest" @@ -717,7 +717,7 @@ type SubgraphDeploymentManifest @entity(immutable:true) { """ Meta for the Indexer along with parameters and staking data """ -type Indexer @entity { +type Indexer @entity(immutable: false) { "Eth address of Indexer" id: ID! "Time this indexer was created" @@ -844,7 +844,7 @@ type Indexer @entity { stakingEfficiency: BigDecimal! } -type PaymentSource @entity { +type PaymentSource @entity(immutable: false) { "Address used on the payment" id: ID! @@ -867,7 +867,7 @@ type PaymentSource @entity { graphNetwork: GraphNetwork! # to make a derived list on GraphNetwork } -type IndexerQueryFeePaymentAggregation @entity { +type IndexerQueryFeePaymentAggregation @entity(immutable: false) { "Join ID of indexer address and PaymentSource address" id: ID! @@ -883,7 +883,7 @@ type IndexerQueryFeePaymentAggregation @entity { paymentSource: PaymentSource! } -type HorizonOperator @entity { +type HorizonOperator @entity(immutable: false) { "Joint address of all 3 parties involved (Operator, Indexer, DataService)" id: ID! @@ -907,7 +907,7 @@ type HorizonOperator @entity { Once the Stage 2 subgraph is implemented, the Provision entity will have to be more generic, and particular data service fields will need to be restructured. """ -type Provision @entity { +type Provision @entity(immutable: false) { "Join ID of indexer address (service provider) and DataService address" id: ID! @@ -1010,7 +1010,7 @@ enum ThawRequestType { Delegation } -type ThawRequest @entity { +type ThawRequest @entity(immutable: false) { id: ID! type: ThawRequestType! @@ -1037,7 +1037,7 @@ type ThawRequest @entity { """ A state channel Allocation representing a single Indexer/Provision-SubgraphDeployment stake """ -type Allocation @entity { +type Allocation @entity(immutable: false) { "Channel Address" id: ID! "Indexer of this allocation" @@ -1125,7 +1125,7 @@ type Allocation @entity { annualizedReturn: BigDecimal! } -type PoiSubmission @entity { +type PoiSubmission @entity(immutable: true) { id: ID! allocation: Allocation! @@ -1137,7 +1137,7 @@ type PoiSubmission @entity { presentedAtTimestamp: Int! } -type PublicPoiSubmission @entity { +type PublicPoiSubmission @entity(immutable: true) { id: ID! allocation: Allocation! @@ -1161,7 +1161,7 @@ enum AllocationStatus { [DEPRECATED] Global pool of query fees for closed state channels. Each Epoch has a single pool, hence why they share the same IDs. """ -type Pool @entity { +type Pool @entity(immutable: false) { "Epoch number of the pool" id: ID! "Total effective allocation tokens from all allocations closed in this epoch" @@ -1179,7 +1179,7 @@ type Pool @entity { """ Delegator with all their delegated stakes towards Indexers """ -type Delegator @entity { +type Delegator @entity(immutable: false) { "Delegator address" id: ID! "Graph account of the delegator" @@ -1207,7 +1207,7 @@ type Delegator @entity { """ Delegator stake for a single Indexer """ -type DelegatedStake @entity { +type DelegatedStake @entity(immutable: false) { "Concatenation of Delegator address and Indexer address" id: ID! "Indexer the stake is delegated to" @@ -1257,7 +1257,7 @@ type DelegatedStake @entity { """ Curator with all Signals and metrics """ -type Curator @entity { +type Curator @entity(immutable: false) { "Eth address of the Curator" id: ID! "Time this curator was created" @@ -1323,7 +1323,7 @@ type Curator @entity { """ Curator Signal for a single SubgraphDeployment """ -type Signal @entity { +type Signal @entity(immutable: false) { "Eth address + subgraph deployment ID" id: ID! "Eth address of the curator" @@ -1362,7 +1362,7 @@ type Signal @entity { """ Curator Name Signal for a single Subgraph """ -type NameSignal @entity { +type NameSignal @entity(immutable: false) { "Eth address + subgraph ID" id: ID! "Eth address of the curator" @@ -1427,7 +1427,7 @@ type NameSignal @entity { """ Auxiliary entity to be able to batch update NameSignal entities """ -type NameSignalSubgraphRelation @entity { +type NameSignalSubgraphRelation @entity(immutable: false) { "Subgraph ID + index" id: ID! @@ -1439,7 +1439,7 @@ type NameSignalSubgraphRelation @entity { """ Dispute of a query. Includes single query, conflicting attestation, and indexing disputes """ -type Dispute @entity { +type Dispute @entity(immutable: false) { "Dispute ID" id: ID! "Subgraph deployment being disputed" @@ -1478,7 +1478,7 @@ type Dispute @entity { """ Attestation of a dispute """ -type Attestation @entity { +type Attestation @entity(immutable: false) { "Concatenation of the requestCID and responseCID" id: ID! "Subgraph deployment being disputed" @@ -1515,7 +1515,7 @@ enum DisputeStatus { """ Epoch aggregate data for network statistics on signaling, rewards, and query fees """ -type Epoch @entity { +type Epoch @entity(immutable: false) { "Epoch number" id: ID! "Start block of the epoch" @@ -1564,7 +1564,7 @@ interface Transaction { """ All relevant data for a Name Signal Transaction in The Graph Network """ -type NameSignalTransaction implements Transaction @entity { +type NameSignalTransaction implements Transaction @entity(immutable: false) { id: ID! blockNumber: Int! timestamp: Int! @@ -1583,7 +1583,7 @@ type NameSignalTransaction implements Transaction @entity { """ All relevant data for a Signal Transaction in The Graph Network """ -type SignalTransaction implements Transaction @entity { +type SignalTransaction implements Transaction @entity(immutable: false) { id: ID! blockNumber: Int! timestamp: Int! @@ -1602,7 +1602,7 @@ type SignalTransaction implements Transaction @entity { """ All relevant data for a bridge withdrawal Transaction in The Graph Network """ -type BridgeWithdrawalTransaction implements Transaction @entity { +type BridgeWithdrawalTransaction implements Transaction @entity(immutable: false) { id: ID! blockNumber: Int! timestamp: Int! @@ -1621,7 +1621,7 @@ type BridgeWithdrawalTransaction implements Transaction @entity { """ All relevant data for a bridge deposit Transaction in The Graph Network """ -type BridgeDepositTransaction implements Transaction @entity { +type BridgeDepositTransaction implements Transaction @entity(immutable: false) { id: ID! blockNumber: Int! timestamp: Int! @@ -1642,7 +1642,7 @@ type BridgeDepositTransaction implements Transaction @entity { """ All relevant data for arbitrum retryable tickets """ -type RetryableTicket @entity { +type RetryableTicket @entity(immutable: false) { id: ID! "hash of the retryable ticket creation transaction" txHash: Bytes @@ -1651,7 +1651,7 @@ type RetryableTicket @entity { redeemCount: Int } -type RetryableTicketRedeemAttempt @entity { +type RetryableTicketRedeemAttempt @entity(immutable: false) { id: ID! ticketId: RetryableTicket! txHash: Bytes @@ -1672,7 +1672,7 @@ enum TransactionType { """ The Token manager data """ -type TokenManager @entity { +type TokenManager @entity(immutable: false) { "Token manager address" id: ID! "Master copy address" @@ -1690,7 +1690,7 @@ type TokenManager @entity { """ Authorized functions for the Manager """ -type AuthorizedFunction @entity { +type AuthorizedFunction @entity(immutable: false) { "Function signature (string)" id: ID! "The contract address that is authorized to have this function called on itself" @@ -1703,7 +1703,7 @@ type AuthorizedFunction @entity { """ Token Lock Wallets which hold locked GRT """ -type TokenLockWallet @entity { +type TokenLockWallet @entity(immutable: false) { "The address of the token lock wallet" id: ID! "The Manager address" diff --git a/yarn.lock b/yarn.lock index 6529da99..6c1777c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -51,6 +51,18 @@ resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== +"@chainsafe/is-ip@^2.0.1": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@chainsafe/is-ip/-/is-ip-2.1.0.tgz#ba9ac32acd9027698e0b56b91c7af069d28d7931" + integrity sha512-KIjt+6IfysQ4GCv66xihEitBjvhU/bixbbbFxdJ1sqCp4uJ0wuZiYBPhksZoy4lfaF0k9cwNzY5upEW/VWdw3w== + +"@chainsafe/netmask@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@chainsafe/netmask/-/netmask-2.0.0.tgz#0d4a75f47919f65011da4327a3845c9661f1038a" + integrity sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg== + dependencies: + "@chainsafe/is-ip" "^2.0.1" + "@chainsafe/persistent-merkle-tree@^0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" @@ -84,7 +96,7 @@ "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmmirror.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" @@ -104,21 +116,6 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@ethersproject/abi@5.0.7": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" - integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== - dependencies: - "@ethersproject/address" "^5.0.4" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/hash" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" @@ -158,7 +155,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.0.8", "@ethersproject/address@^5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.8", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -184,7 +181,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.1.1", "@ethersproject/bignumber@^5.7.0": +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.1.1", "@ethersproject/bignumber@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== @@ -193,14 +190,14 @@ "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" -"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.0.8", "@ethersproject/bytes@^5.7.0": +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.0.8", "@ethersproject/bytes@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.7.0": +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== @@ -232,7 +229,7 @@ ethers "^5.7.0" scrypt-js "3.0.1" -"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.7.0": +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== @@ -284,7 +281,7 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.7.0": +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== @@ -292,7 +289,7 @@ "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.7.0": +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== @@ -319,7 +316,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/sha2" "^5.7.0" -"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.7.0": +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== @@ -427,7 +424,7 @@ "@ethersproject/sha2" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.7.0": +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== @@ -519,7 +516,12 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== -"@float-capital/float-subgraph-uncrashable@^0.0.0-alpha.4": +"@fastify/busboy@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-3.1.1.tgz#af3aea7f1e52ec916d8b5c9dcc0f09d4c060a3fc" + integrity sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw== + +"@float-capital/float-subgraph-uncrashable@0.0.0-internal-testing.5": version "0.0.0-internal-testing.5" resolved "https://registry.yarnpkg.com/@float-capital/float-subgraph-uncrashable/-/float-subgraph-uncrashable-0.0.0-internal-testing.5.tgz#060f98440f6e410812766c5b040952d2d02e2b73" integrity sha512-yZ0H5e3EpAYKokX/AbtplzlvSxEJY7ZfpvQyDzyODkks0hakAAlDG6fQu1SlDJMWorY7bbq1j7fCiFeTWci6TA== @@ -572,38 +574,37 @@ "@graphprotocol/sdk" "^0.5.0" console-table-printer "^2.11.1" -"@graphprotocol/graph-cli@0.68.5": - version "0.68.5" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.68.5.tgz#58cf65d15f41f1a30defe1cd50474d7c1205dd6a" - integrity sha512-3GY2pYr5LksO6JY6s5nvePnSKVdtzDEn1CUGezyjCMR1uq9YIXMPXKqcnrzCX/DLugioEabiEi2+yOg9+rnFDQ== - dependencies: - "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" - "@oclif/core" "2.8.6" - "@oclif/plugin-autocomplete" "^2.3.6" - "@oclif/plugin-not-found" "^2.4.0" - "@whatwg-node/fetch" "^0.8.4" +"@graphprotocol/graph-cli@0.97.0": + version "0.97.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.97.0.tgz#9dc4eaf542f7535ee773cc9834bdf3993b9934ca" + integrity sha512-SvijthiWbQEL3HdRDf2ydc4uAUwWJfTKyiXKXkXTtimk/hXNgzf4DuqxZPVQOOq4yx5U18iOCc/TKkTI7xCNjw== + dependencies: + "@float-capital/float-subgraph-uncrashable" "0.0.0-internal-testing.5" + "@oclif/core" "4.2.8" + "@oclif/plugin-autocomplete" "^3.2.11" + "@oclif/plugin-not-found" "^3.2.29" + "@oclif/plugin-warn-if-update-available" "^3.1.24" + "@pinax/graph-networks-registry" "^0.6.5" + "@whatwg-node/fetch" "^0.10.1" assemblyscript "0.19.23" - binary-install-raw "0.0.13" - chalk "3.0.0" - chokidar "3.5.3" - debug "4.3.4" - docker-compose "0.23.19" - dockerode "2.5.8" - fs-extra "9.1.0" - glob "9.3.5" - gluegun "5.1.6" - graphql "15.5.0" - immutable "4.2.1" - ipfs-http-client "55.0.0" - jayson "4.0.0" - js-yaml "3.14.1" - prettier "3.0.3" - semver "7.4.0" - sync-request "6.1.0" + chokidar "4.0.3" + debug "4.4.0" + docker-compose "1.1.1" + fs-extra "11.3.0" + glob "11.0.1" + gluegun "5.2.0" + graphql "16.10.0" + immutable "5.0.3" + jayson "4.1.3" + js-yaml "4.1.0" + kubo-rpc-client "^5.0.2" + open "10.1.0" + prettier "3.5.3" + semver "7.7.1" tmp-promise "3.0.3" - web3-eth-abi "1.7.0" - which "2.0.2" - yaml "1.10.2" + undici "7.4.0" + web3-eth-abi "4.4.1" + yaml "2.7.0" "@graphprotocol/graph-ts@0.32.0": version "0.32.0" @@ -660,47 +661,242 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@ipld/dag-cbor@^7.0.0": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-7.0.3.tgz#aa31b28afb11a807c3d627828a344e5521ac4a1e" - integrity sha512-1VVh2huHsuohdXC1bGJNE8WR72slZ9XE2T3wbBBq31dm7ZBatmKLLxrB+XAqafxfRFjv08RZmj/W/ZqaM13AuA== +"@inquirer/checkbox@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.1.5.tgz#891bb32ca98eb6ee2889f71d79722705e2241161" + integrity sha512-swPczVU+at65xa5uPfNP9u3qx/alNwiaykiI/ExpsmMSQW55trmZcwhYWzw/7fj+n6Q8z1eENvR7vFfq9oPSAQ== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/figures" "^1.0.11" + "@inquirer/type" "^3.0.6" + ansi-escapes "^4.3.2" + yoctocolors-cjs "^2.1.2" + +"@inquirer/confirm@^5.1.9": + version "5.1.9" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.9.tgz#c858b6a3decb458241ec36ca9a9117477338076a" + integrity sha512-NgQCnHqFTjF7Ys2fsqK2WtnA8X1kHyInyG+nMIuHowVTIgIuS10T4AznI/PvbqSpJqjCUqNBlKGh1v3bwLFL4w== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + +"@inquirer/core@^10.1.10": + version "10.1.10" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.10.tgz#222a374e3768536a1eb0adf7516c436d5f4a291d" + integrity sha512-roDaKeY1PYY0aCqhRmXihrHjoSW2A00pV3Ke5fTpMCkzcGF64R8e0lw3dK+eLEHwS4vB5RnW1wuQmvzoRul8Mw== + dependencies: + "@inquirer/figures" "^1.0.11" + "@inquirer/type" "^3.0.6" + ansi-escapes "^4.3.2" + cli-width "^4.1.0" + mute-stream "^2.0.0" + signal-exit "^4.1.0" + wrap-ansi "^6.2.0" + yoctocolors-cjs "^2.1.2" + +"@inquirer/editor@^4.2.10": + version "4.2.10" + resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.2.10.tgz#45e399313ee857857248bd539b8e832aa0fb60b3" + integrity sha512-5GVWJ+qeI6BzR6TIInLP9SXhWCEcvgFQYmcRG6d6RIlhFjM5TyG18paTGBgRYyEouvCmzeco47x9zX9tQEofkw== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + external-editor "^3.1.0" + +"@inquirer/expand@^4.0.12": + version "4.0.12" + resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.12.tgz#1e4554f509a435f966e2b91395a503d77df35c17" + integrity sha512-jV8QoZE1fC0vPe6TnsOfig+qwu7Iza1pkXoUJ3SroRagrt2hxiL+RbM432YAihNR7m7XnU0HWl/WQ35RIGmXHw== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + yoctocolors-cjs "^2.1.2" + +"@inquirer/figures@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.11.tgz#4744e6db95288fea1dead779554859710a959a21" + integrity sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw== + +"@inquirer/input@^4.1.9": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.1.9.tgz#e93888d48c89bdb7f8e10bdd94572b636375749a" + integrity sha512-mshNG24Ij5KqsQtOZMgj5TwEjIf+F2HOESk6bjMwGWgcH5UBe8UoljwzNFHqdMbGYbgAf6v2wU/X9CAdKJzgOA== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + +"@inquirer/number@^3.0.12": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.12.tgz#e027d27425ee2a81a7ccb9fdc750129edd291067" + integrity sha512-7HRFHxbPCA4e4jMxTQglHJwP+v/kpFsCf2szzfBHy98Wlc3L08HL76UDiA87TOdX5fwj2HMOLWqRWv9Pnn+Z5Q== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + +"@inquirer/password@^4.0.12": + version "4.0.12" + resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.12.tgz#f1a663bc5cf88699643cf6c83626a1ae77e580b5" + integrity sha512-FlOB0zvuELPEbnBYiPaOdJIaDzb2PmJ7ghi/SVwIHDDSQ2K4opGBkF+5kXOg6ucrtSUQdLhVVY5tycH0j0l+0g== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + ansi-escapes "^4.3.2" + +"@inquirer/prompts@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.5.0.tgz#e4cdfd1ce0cb63592968b5de92d3a35f9b7c1b6e" + integrity sha512-tk8Bx7l5AX/CR0sVfGj3Xg6v7cYlFBkEahH+EgBB+cZib6Fc83dwerTbzj7f2+qKckjIUGsviWRI1d7lx6nqQA== + dependencies: + "@inquirer/checkbox" "^4.1.5" + "@inquirer/confirm" "^5.1.9" + "@inquirer/editor" "^4.2.10" + "@inquirer/expand" "^4.0.12" + "@inquirer/input" "^4.1.9" + "@inquirer/number" "^3.0.12" + "@inquirer/password" "^4.0.12" + "@inquirer/rawlist" "^4.1.0" + "@inquirer/search" "^3.0.12" + "@inquirer/select" "^4.2.0" + +"@inquirer/rawlist@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.1.0.tgz#bb08a0a50663fda7359777e042e8821b0ac5b18f" + integrity sha512-6ob45Oh9pXmfprKqUiEeMz/tjtVTFQTgDDz1xAMKMrIvyrYjAmRbQZjMJfsictlL4phgjLhdLu27IkHNnNjB7g== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/type" "^3.0.6" + yoctocolors-cjs "^2.1.2" + +"@inquirer/search@^3.0.12": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.0.12.tgz#e86f91ea598ccb39caf9a17762b839a9b950e16d" + integrity sha512-H/kDJA3kNlnNIjB8YsaXoQI0Qccgf0Na14K1h8ExWhNmUg2E941dyFPrZeugihEa9AZNW5NdsD/NcvUME83OPQ== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/figures" "^1.0.11" + "@inquirer/type" "^3.0.6" + yoctocolors-cjs "^2.1.2" + +"@inquirer/select@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.2.0.tgz#42c66977c8992bd025f5d2f4124bee390cb16a98" + integrity sha512-KkXQ4aSySWimpV4V/TUJWdB3tdfENZUU765GjOIZ0uPwdbGIG6jrxD4dDf1w68uP+DVtfNhr1A92B+0mbTZ8FA== + dependencies: + "@inquirer/core" "^10.1.10" + "@inquirer/figures" "^1.0.11" + "@inquirer/type" "^3.0.6" + ansi-escapes "^4.3.2" + yoctocolors-cjs "^2.1.2" + +"@inquirer/type@^3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.6.tgz#2500e435fc2014c5250eec3279f42b70b64089bd" + integrity sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA== + +"@ipld/dag-cbor@^9.0.0": + version "9.2.2" + resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-9.2.2.tgz#e6f5f5bd1e4f290f2285b51fc969ef806484603a" + integrity sha512-uIEOuruCqKTP50OBWwgz4Js2+LhiBQaxc57cnP71f45b1mHEAo1OCR1Zn/TbvSW/mV1x+JqhacIktkKyaYqhCw== dependencies: - cborg "^1.6.0" - multiformats "^9.5.4" + cborg "^4.0.0" + multiformats "^13.1.0" -"@ipld/dag-json@^8.0.1": - version "8.0.11" - resolved "https://registry.yarnpkg.com/@ipld/dag-json/-/dag-json-8.0.11.tgz#8d30cc2dfacb0aef04d327465d3df91e79e8b6ce" - integrity sha512-Pea7JXeYHTWXRTIhBqBlhw7G53PJ7yta3G/sizGEZyzdeEwhZRr0od5IQ0r2ZxOt1Do+2czddjeEPp+YTxDwCA== +"@ipld/dag-json@^10.0.0": + version "10.2.3" + resolved "https://registry.yarnpkg.com/@ipld/dag-json/-/dag-json-10.2.3.tgz#bb9de2e869f1c523104c52adc89e1e8bb0db7253" + integrity sha512-itacv1j1hvYgLox2B42Msn70QLzcr0MEo5yGIENuw2SM/lQzq9bmBiMky+kDsIrsqqblKTXcHBZnnmK7D4a6ZQ== dependencies: - cborg "^1.5.4" - multiformats "^9.5.4" + cborg "^4.0.0" + multiformats "^13.1.0" -"@ipld/dag-pb@^2.1.3": - version "2.1.18" - resolved "https://registry.yarnpkg.com/@ipld/dag-pb/-/dag-pb-2.1.18.tgz#12d63e21580e87c75fd1a2c62e375a78e355c16f" - integrity sha512-ZBnf2fuX9y3KccADURG5vb9FaOeMjFkCrNysB0PtftME/4iCTjxfaLoNq/IAh5fTqUOMXvryN6Jyka4ZGuMLIg== +"@ipld/dag-pb@^4.0.0": + version "4.1.3" + resolved "https://registry.yarnpkg.com/@ipld/dag-pb/-/dag-pb-4.1.3.tgz#b572d7978fa548a3a9219f566a80884189261858" + integrity sha512-ueULCaaSCcD+dQga6nKiRr+RSeVgdiYiEPKVUu5iQMNYDN+9osd0KpR3UDd9uQQ+6RWuv9L34SchfEwj7YIbOA== + dependencies: + multiformats "^13.1.0" + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== dependencies: - multiformats "^9.5.4" + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" "@jridgewell/resolve-uri@^3.0.3": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + version "3.1.2" + resolved "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + version "1.5.0" + resolved "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" + integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== + +"@libp2p/crypto@^5.0.0", "@libp2p/crypto@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@libp2p/crypto/-/crypto-5.1.1.tgz#4f47ef74b335777cb7aacb229ac50fcf70351676" + integrity sha512-feByJ5ypBfl7Dp+jLBmieHDY/249hqCiDn8u6DNSZrpDhefn2l/NE03fS2mW6pLOnY3QIqB372TfLtx3/EPU+w== + dependencies: + "@libp2p/interface" "^2.9.0" + "@noble/curves" "^1.7.0" + "@noble/hashes" "^1.6.1" + multiformats "^13.3.1" + protons-runtime "^5.5.0" + uint8arraylist "^2.4.8" + uint8arrays "^5.1.0" + +"@libp2p/interface@^2.0.0", "@libp2p/interface@^2.9.0": + version "2.9.0" + resolved "https://registry.yarnpkg.com/@libp2p/interface/-/interface-2.9.0.tgz#c1276c6788436451aec7236482bc227817476048" + integrity sha512-L/0Z5H0mjaECA0jkZG+OJmEhB/OIJ07gzZYljU7C19XjL3dSkBvhA9il+G3FpHyHgqAOVGuQU5qkbv2Edj8FIA== + dependencies: + "@multiformats/multiaddr" "^12.3.3" + it-pushable "^3.2.3" + it-stream-types "^2.0.2" + multiformats "^13.3.1" + progress-events "^1.0.1" + uint8arraylist "^2.4.8" + +"@libp2p/logger@^5.0.0": + version "5.1.15" + resolved "https://registry.yarnpkg.com/@libp2p/logger/-/logger-5.1.15.tgz#5311ee93f77cf931e3c568cafb15278457e841d9" + integrity sha512-0+rOHEXXDNZvsb9p04jVAFQB0WcvMxFfqzSe271/tg4yVlPF5H99l5BwOqeb+EYhHV1lTk+zrJdPK9easHr1fQ== + dependencies: + "@libp2p/interface" "^2.9.0" + "@multiformats/multiaddr" "^12.3.3" + interface-datastore "^8.3.1" + multiformats "^13.3.1" + weald "^1.0.4" + +"@libp2p/peer-id@^5.0.0": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@libp2p/peer-id/-/peer-id-5.1.2.tgz#3c48bcd4a493ccd22feb25e0d043eb0e755942f5" + integrity sha512-K4tjLi+OIHJSeMMqw28xnBxDfklfWCsR423Jm6GxZ5avIj2xm7WIq5oUhCntGGDIQWW/8qdf8v3tYK36JxwLOA== + dependencies: + "@libp2p/crypto" "^5.1.1" + "@libp2p/interface" "^2.9.0" + multiformats "^13.3.1" + uint8arrays "^5.1.0" + "@metamask/eth-sig-util@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" @@ -712,11 +908,67 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" +"@multiformats/dns@^1.0.3": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@multiformats/dns/-/dns-1.0.6.tgz#b8c7de11459a02a5f4e609d35d3cdb95cb6ad152" + integrity sha512-nt/5UqjMPtyvkG9BQYdJ4GfLK3nMqGpFZOzf4hAmIa0sJh2LlS9YKXZ4FgwBDsaHvzZqR/rUFIywIc7pkHNNuw== + dependencies: + "@types/dns-packet" "^5.6.5" + buffer "^6.0.3" + dns-packet "^5.6.1" + hashlru "^2.3.0" + p-queue "^8.0.1" + progress-events "^1.0.0" + uint8arrays "^5.0.2" + +"@multiformats/multiaddr-to-uri@^11.0.0": + version "11.0.0" + resolved "https://registry.yarnpkg.com/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-11.0.0.tgz#ec0ee9494f1cfc6ccd5173e61bbb0b6722029e97" + integrity sha512-9RNmlIGwZbBLsHekT50dbt4o4u8Iciw9kGjv+WHiGxQdsJ6xKKjU1+C0Vbas6RilMbaVOAOnEyfNcXbUmTkLxQ== + dependencies: + "@multiformats/multiaddr" "^12.3.0" + +"@multiformats/multiaddr@^12.2.1", "@multiformats/multiaddr@^12.3.0", "@multiformats/multiaddr@^12.3.3": + version "12.4.0" + resolved "https://registry.yarnpkg.com/@multiformats/multiaddr/-/multiaddr-12.4.0.tgz#13fca8d68805fe0d0569bdd7d4dce41497503d31" + integrity sha512-FL7yBTLijJ5JkO044BGb2msf+uJLrwpD6jD6TkXlbjA9N12+18HT40jvd4o5vL4LOJMc86dPX6tGtk/uI9kYKg== + dependencies: + "@chainsafe/is-ip" "^2.0.1" + "@chainsafe/netmask" "^2.0.0" + "@multiformats/dns" "^1.0.3" + multiformats "^13.0.0" + uint8-varint "^2.0.1" + uint8arrays "^5.0.0" + +"@noble/curves@1.4.2", "@noble/curves@~1.4.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.2.tgz#40309198c76ed71bc6dbf7ba24e81ceb4d0d1fe9" + integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== + dependencies: + "@noble/hashes" "1.4.0" + +"@noble/curves@^1.7.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.0.tgz#13e0ca8be4a0ce66c113693a94514e5599f40cfc" + integrity sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg== + dependencies: + "@noble/hashes" "1.8.0" + "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + +"@noble/hashes@1.8.0", "@noble/hashes@^1.6.1": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a" + integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" @@ -955,172 +1207,111 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== -"@oclif/core@2.8.6": - version "2.8.6" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.8.6.tgz#7eb6984108f471ad0d719d3c07cde14c47ab17c5" - integrity sha512-1QlPaHMhOORySCXkQyzjsIsy2GYTilOw3LkjeHkCgsPJQjAT4IclVytJusWktPbYNys9O+O4V23J44yomQvnBQ== +"@oclif/core@4.2.8": + version "4.2.8" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.2.8.tgz#6e71c76b8ea91064ffc8390a3fd2502c5d32a3db" + integrity sha512-OWv4Va6bERxIhrYcnUGzyhGRqktc64lJO6cZ3UwkzJDpfR8ZrbCxRfKRBBah1i8kzUlOAeAXnpbMBMah3skKwA== dependencies: - "@types/cli-progress" "^3.11.0" ansi-escapes "^4.3.2" - ansi-styles "^4.3.0" - cardinal "^2.1.1" - chalk "^4.1.2" + ansis "^3.16.0" clean-stack "^3.0.1" - cli-progress "^3.12.0" - debug "^4.3.4" - ejs "^3.1.8" - fs-extra "^9.1.0" + cli-spinners "^2.9.2" + debug "^4.4.0" + ejs "^3.1.10" get-package-type "^0.1.0" globby "^11.1.0" - hyperlinker "^1.0.0" indent-string "^4.0.0" is-wsl "^2.2.0" - js-yaml "^3.14.1" - natural-orderby "^2.0.3" - object-treeify "^1.1.33" - password-prompt "^1.1.2" - semver "^7.3.7" + lilconfig "^3.1.3" + minimatch "^9.0.5" + semver "^7.6.3" string-width "^4.2.3" - strip-ansi "^6.0.1" - supports-color "^8.1.1" - supports-hyperlinks "^2.2.0" - ts-node "^10.9.1" - tslib "^2.5.0" + supports-color "^8" widest-line "^3.1.0" wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/core@^2.15.0": - version "2.15.0" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a" - integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA== +"@oclif/core@^4": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.3.0.tgz#9a2951f05f81a4c7ae5ffcc00b2d720cca0898e6" + integrity sha512-lIzHY+JMP6evrS5E/sGijNnwrCoNtGy8703jWXcMuPOYKiFhWoAqnIm1BGgoRgmxczkbSfRsHUL/lwsSgh74Lw== dependencies: - "@types/cli-progress" "^3.11.0" ansi-escapes "^4.3.2" - ansi-styles "^4.3.0" - cardinal "^2.1.1" - chalk "^4.1.2" + ansis "^3.17.0" clean-stack "^3.0.1" - cli-progress "^3.12.0" - debug "^4.3.4" - ejs "^3.1.8" + cli-spinners "^2.9.2" + debug "^4.4.0" + ejs "^3.1.10" get-package-type "^0.1.0" globby "^11.1.0" - hyperlinker "^1.0.0" indent-string "^4.0.0" is-wsl "^2.2.0" - js-yaml "^3.14.1" - natural-orderby "^2.0.3" - object-treeify "^1.1.33" - password-prompt "^1.1.2" - slice-ansi "^4.0.0" + lilconfig "^3.1.3" + minimatch "^9.0.5" + semver "^7.6.3" string-width "^4.2.3" - strip-ansi "^6.0.1" - supports-color "^8.1.1" - supports-hyperlinks "^2.2.0" - ts-node "^10.9.1" - tslib "^2.5.0" + supports-color "^8" widest-line "^3.1.0" wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/plugin-autocomplete@^2.3.6": - version "2.3.10" - resolved "https://registry.yarnpkg.com/@oclif/plugin-autocomplete/-/plugin-autocomplete-2.3.10.tgz#787f6208cdfe10ffc68ad89e9e7f1a7ad0e8987f" - integrity sha512-Ow1AR8WtjzlyCtiWWPgzMyT8SbcDJFr47009riLioHa+MHX2BCDtVn2DVnN/E6b9JlPV5ptQpjefoRSNWBesmg== +"@oclif/plugin-autocomplete@^3.2.11": + version "3.2.28" + resolved "https://registry.yarnpkg.com/@oclif/plugin-autocomplete/-/plugin-autocomplete-3.2.28.tgz#d9a4c543bf3462fbc23c9f7802128804d06f5320" + integrity sha512-6CaLO/SHMx1GVn8gAVGOZ3TPoj+hf88BvLTafp86MnNGxdYr5+YrSbh29py1j+ROIuUIj1KIodJB3yNTd0o6ow== dependencies: - "@oclif/core" "^2.15.0" - chalk "^4.1.0" - debug "^4.3.4" + "@oclif/core" "^4" + ansis "^3.16.0" + debug "^4.4.0" + ejs "^3.1.10" -"@oclif/plugin-not-found@^2.4.0": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-2.4.3.tgz#3d24095adb0f3876cb4bcfdfdcb775086cf6d4b5" - integrity sha512-nIyaR4y692frwh7wIHZ3fb+2L6XEecQwRDIb4zbEam0TvaVmBQWZoColQyWA84ljFBPZ8XWiQyTz+ixSwdRkqg== +"@oclif/plugin-not-found@^3.2.29": + version "3.2.51" + resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-3.2.51.tgz#292a553db7e8717b854f1c33df20b05be23aa422" + integrity sha512-hnYH4GS7lYD3Z59LO9RZAIXQPmuW+rNnTjCheSwAzWyoUH1M2Va6dUpamfnMf/GryrFvn1srBDdgKHr5KRf+Qw== dependencies: - "@oclif/core" "^2.15.0" - chalk "^4" + "@inquirer/prompts" "^7.5.0" + "@oclif/core" "^4" + ansis "^3.17.0" fast-levenshtein "^3.0.0" -"@peculiar/asn1-schema@^2.3.6": - version "2.3.6" - resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" - integrity sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA== - dependencies: - asn1js "^3.0.5" - pvtsutils "^1.3.2" - tslib "^2.4.0" - -"@peculiar/json-schema@^1.1.12": - version "1.1.12" - resolved "https://registry.yarnpkg.com/@peculiar/json-schema/-/json-schema-1.1.12.tgz#fe61e85259e3b5ba5ad566cb62ca75b3d3cd5339" - integrity sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w== - dependencies: - tslib "^2.0.0" - -"@peculiar/webcrypto@^1.4.0": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.3.tgz#078b3e8f598e847b78683dc3ba65feb5029b93a7" - integrity sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A== +"@oclif/plugin-warn-if-update-available@^3.1.24": + version "3.1.39" + resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.1.39.tgz#bd0556d09ac9fe3615eeb3cb85f96b4022f54235" + integrity sha512-2KF+pD9iR8keMae6Le2+GHckUhRBRPhgpQeR7RYtlg68AdQyFm9F2rfMqAdV2f6Ipt+TfcEHODeT2jgUiAA5UA== dependencies: - "@peculiar/asn1-schema" "^2.3.6" - "@peculiar/json-schema" "^1.1.12" - pvtsutils "^1.3.2" - tslib "^2.5.0" - webcrypto-core "^1.7.7" - -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" - integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + "@oclif/core" "^4" + ansis "^3.17.0" + debug "^4.4.0" + http-call "^5.2.2" + lodash "^4.17.21" + registry-auth-token "^5.1.0" -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" - integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== +"@pinax/graph-networks-registry@^0.6.5": + version "0.6.7" + resolved "https://registry.yarnpkg.com/@pinax/graph-networks-registry/-/graph-networks-registry-0.6.7.tgz#ceb994f3b31e2943b9c9d9b09dd86eb00d067c0e" + integrity sha512-xogeCEZ50XRMxpBwE3TZjJ8RCO8Guv39gDRrrKtlpDEDEMLm0MzD3A0SQObgj7aF7qTZNRTWzsuvQdxgzw25wQ== -"@protobufjs/fetch@^1.1.0": +"@pnpm/config.env-replace@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" - integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" + resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" + integrity sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w== -"@protobufjs/float@^1.0.2": +"@pnpm/network.ca-file@^1.0.1": version "1.0.2" - resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" - integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" - integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" - integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" - integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz#2ab05e09c1af0cdf2fcf5035bea1484e222f7983" + integrity sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA== + dependencies: + graceful-fs "4.2.10" -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" - integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== +"@pnpm/npm-conf@^2.1.0": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz#bb375a571a0bd63ab0a23bece33033c683e9b6b0" + integrity sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw== + dependencies: + "@pnpm/config.env-replace" "^1.1.0" + "@pnpm/network.ca-file" "^1.0.1" + config-chain "^1.1.11" "@rescript/std@9.0.0": version "9.0.0" @@ -1132,6 +1323,11 @@ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.5.tgz#1d85d17269fe97694b9c592552dd9e5e33552157" integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ== +"@scure/base@~1.1.6": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== + "@scure/bip32@1.1.5": version "1.1.5" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" @@ -1141,6 +1337,15 @@ "@noble/secp256k1" "~1.7.0" "@scure/base" "~1.1.0" +"@scure/bip32@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" + integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== + dependencies: + "@noble/curves" "~1.4.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" + "@scure/bip39@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" @@ -1149,6 +1354,14 @@ "@noble/hashes" "~1.2.0" "@scure/base" "~1.1.0" +"@scure/bip39@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.3.0.tgz#0f258c16823ddd00739461ac31398b4e7d6a18c3" + integrity sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ== + dependencies: + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" + "@sentry/core@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" @@ -1218,23 +1431,23 @@ tslib "^1.9.3" "@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + version "1.0.11" + resolved "https://registry.npmmirror.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== "@tsconfig/node12@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + resolved "https://registry.npmmirror.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + resolved "https://registry.npmmirror.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": version "1.0.4" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + resolved "https://registry.npmmirror.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@types/bn.js@^4.11.3": @@ -1251,20 +1464,6 @@ dependencies: "@types/node" "*" -"@types/cli-progress@^3.11.0": - version "3.11.0" - resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.0.tgz#ec79df99b26757c3d1c7170af8422e0fc95eef7e" - integrity sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg== - dependencies: - "@types/node" "*" - -"@types/concat-stream@^1.6.0": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" - integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== - dependencies: - "@types/node" "*" - "@types/connect@^3.4.33": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -1279,53 +1478,38 @@ dependencies: "@types/ms" "*" +"@types/dns-packet@^5.6.5": + version "5.6.5" + resolved "https://registry.yarnpkg.com/@types/dns-packet/-/dns-packet-5.6.5.tgz#49fc29a40f5d30227ed028fa1ee82601d3745e15" + integrity sha512-qXOC7XLOEe43ehtWJCMnQXvgcIpv6rPmQ1jXT98Ad8A3TB1Ue50jsCbSSSyuazScEuZ/Q026vHbrOTVkmwA+7Q== + dependencies: + "@types/node" "*" + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/form-data@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" - integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== - dependencies: - "@types/node" "*" - "@types/json-schema@^7.0.3": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/long@^4.0.1": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" - integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== - "@types/lru-cache@^5.1.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== -"@types/minimatch@^3.0.4": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" - integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== - "@types/ms@*": version "0.7.34" resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== -"@types/node@*", "@types/node@>=13.7.0": +"@types/node@*": version "20.1.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.7.tgz#ce10c802f7731909d0a44ac9888e8b3a9125eb62" integrity sha512-WCuw/o4GSwDGMoonES8rcvwsig77dGCMbZDrZr2x4ZZiNW4P/gcoZXe/0twgtobcTkmg9TuKflxYL/DuwDyJzg== -"@types/node@^10.0.3": - version "10.17.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" - integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== - "@types/node@^12.12.54": version "12.20.55" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" @@ -1336,11 +1520,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.47.tgz#89a56b05804d136cb99bf2f823bb00814a889aae" integrity sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw== -"@types/node@^8.0.0": - version "8.10.66" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" - integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== - "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -1353,11 +1532,6 @@ dependencies: "@types/node" "*" -"@types/qs@^6.2.31": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - "@types/readable-stream@^2.3.13": version "2.3.15" resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" @@ -1469,40 +1643,38 @@ "@urql/core" ">=2.3.6" wonka "^4.0.14" -"@whatwg-node/events@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.3.tgz#13a65dd4f5893f55280f766e29ae48074927acad" - integrity sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA== - -"@whatwg-node/fetch@^0.8.4": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.8.8.tgz#48c6ad0c6b7951a73e812f09dd22d75e9fa18cae" - integrity sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg== - dependencies: - "@peculiar/webcrypto" "^1.4.0" - "@whatwg-node/node-fetch" "^0.3.6" - busboy "^1.6.0" - urlpattern-polyfill "^8.0.0" - web-streams-polyfill "^3.2.1" - -"@whatwg-node/node-fetch@^0.3.6": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz#e28816955f359916e2d830b68a64493124faa6d0" - integrity sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA== - dependencies: - "@whatwg-node/events" "^0.0.3" - busboy "^1.6.0" - fast-querystring "^1.1.1" - fast-url-parser "^1.1.3" - tslib "^2.3.1" - -JSONStream@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" - integrity sha512-mn0KSip7N4e0UDPZHnqDsHECo5uGQrixQKnAskOM1BIB8hd7QKbd6il8IPRPudPHOeHiECoCFqhyMaRO9+nWyA== +"@whatwg-node/disposablestack@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@whatwg-node/disposablestack/-/disposablestack-0.0.6.tgz#2064a1425ea66194def6df0c7a1851b6939c82bb" + integrity sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw== dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" + "@whatwg-node/promise-helpers" "^1.0.0" + tslib "^2.6.3" + +"@whatwg-node/fetch@^0.10.1": + version "0.10.6" + resolved "https://registry.yarnpkg.com/@whatwg-node/fetch/-/fetch-0.10.6.tgz#ce2fc35e45558874ad2488160fc8102481c935e4" + integrity sha512-6uzhO2aQ757p3bSHcemA8C4pqEXuyBqyGAM7cYpO0c6/igRMV9As9XL0W12h5EPYMclgr7FgjmbVQBoWEdJ/yA== + dependencies: + "@whatwg-node/node-fetch" "^0.7.18" + urlpattern-polyfill "^10.0.0" + +"@whatwg-node/node-fetch@^0.7.18": + version "0.7.18" + resolved "https://registry.yarnpkg.com/@whatwg-node/node-fetch/-/node-fetch-0.7.18.tgz#19e008468734bd89857f7001f29d38037cdc0cc7" + integrity sha512-IxKdVWfZYasGiyxBcsROxq6FmDQu3MNNiOYJ/yqLKhe+Qq27IIWsK7ItbjS2M9L5aM5JxjWkIS7JDh7wnsn+CQ== + dependencies: + "@fastify/busboy" "^3.1.1" + "@whatwg-node/disposablestack" "^0.0.6" + "@whatwg-node/promise-helpers" "^1.3.1" + tslib "^2.6.3" + +"@whatwg-node/promise-helpers@^1.0.0", "@whatwg-node/promise-helpers@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@whatwg-node/promise-helpers/-/promise-helpers-1.3.1.tgz#65f1820fa652ddc1062aa0fe7456726e8676ea43" + integrity sha512-D+OwTEunoQhVHVToD80dPhfz9xgPLqJyEA3F5jCRM14A2u8tBBQVdZekqfqx6ZAfZ+POT4Hb0dn601UKMsvADw== + dependencies: + tslib "^2.6.3" JSONStream@^1.3.5: version "1.3.5" @@ -1512,6 +1684,11 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" +abitype@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.7.1.tgz#16db20abe67de80f6183cf75f3de1ff86453b745" + integrity sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -1546,19 +1723,21 @@ acorn-jsx@^5.3.1: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + version "8.3.4" + resolved "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.4.1: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.11.0, acorn@^8.4.1: + version "8.14.1" + resolved "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz#721d5dc10f7d5b5609a891773d47731796935dfb" + integrity sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== adm-zip@^0.4.16: version "0.4.16" @@ -1615,11 +1794,6 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -1637,6 +1811,11 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-regex@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -1644,30 +1823,27 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.3.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -ansicolors@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" - integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -any-signal@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-2.1.2.tgz#8d48270de0605f8b218cf9abe8e9c6a0e7418102" - integrity sha512-B+rDnWasMi/eWcajPcCWSlYc7muXOrcYrqgyzcdKisl2H/WTlQ0gip1KyQfr0ZlxJdsuWCj/LWwQm7fhyhRfIQ== - dependencies: - abort-controller "^3.0.0" - native-abort-controller "^1.0.3" +ansis@^3.16.0, ansis@^3.17.0: + version "3.17.0" + resolved "https://registry.yarnpkg.com/ansis/-/ansis-3.17.0.tgz#fa8d9c2a93fe7d1177e0c17f9eeb562a58a832d7" + integrity sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg== -any-signal@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-3.0.1.tgz#49cae34368187a3472e31de28fb5cb1430caa9a6" - integrity sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg== +any-signal@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/any-signal/-/any-signal-4.1.1.tgz#928416c355c66899e6b2a91cad4488f0324bae03" + integrity sha512-iADenERppdC+A2YKbOXXB2WUeABLaM6qnpZ70kZbPZ1cZMMJ7eF+3CaYm+/PhBizgkzlvssC7QuHS30oOiQYWA== anymatch@~3.1.2: version "3.1.3" @@ -1691,7 +1867,7 @@ app-module-path@^2.2.0: arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmmirror.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.7: @@ -1716,20 +1892,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -asap@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== - -asn1js@^3.0.1, asn1js@^3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.5.tgz#5ea36820443dbefb51cc7f88a2ebb5b462114f38" - integrity sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ== - dependencies: - pvtsutils "^1.3.2" - pvutils "^1.1.3" - tslib "^2.4.0" - assemblyscript@0.19.10: version "0.19.10" resolved "https://registry.yarnpkg.com/assemblyscript/-/assemblyscript-0.19.10.tgz#7ede6d99c797a219beb4fa4614c3eab9e6343c8e" @@ -1764,22 +1926,19 @@ async@^3.2.3: resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - atomic-sleep@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== -axios@^0.21.1, axios@^0.21.4: +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + +axios@^0.21.4: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== @@ -1830,15 +1989,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -binary-install-raw@0.0.13: - version "0.0.13" - resolved "https://registry.yarnpkg.com/binary-install-raw/-/binary-install-raw-0.0.13.tgz#43a13c6980eb9844e2932eb7a91a56254f55b7dd" - integrity sha512-v7ms6N/H7iciuk6QInon3/n2mu7oRX+6knJ9xFPsJ3rQePgAqcR3CRTwUheFd8SLbiq4LL7Z4G/44L9zscdt9A== - dependencies: - axios "^0.21.1" - rimraf "^3.0.2" - tar "^6.1.0" - binaryen@101.0.0-nightly.20210723: version "101.0.0-nightly.20210723" resolved "https://registry.yarnpkg.com/binaryen/-/binaryen-101.0.0-nightly.20210723.tgz#b6bb7f3501341727681a03866c0856500eec3740" @@ -1854,14 +2004,6 @@ bintrees@1.0.2: resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.2.tgz#49f896d6e858a4a499df85c38fb399b9aff840f8" integrity sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw== -bl@^1.0.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" - integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -1876,17 +2018,12 @@ blakejs@^1.1.0: resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== -blob-to-it@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/blob-to-it/-/blob-to-it-1.0.4.tgz#f6caf7a4e90b7bb9215fa6a318ed6bd8ad9898cb" - integrity sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA== +blob-to-it@^2.0.5: + version "2.0.8" + resolved "https://registry.yarnpkg.com/blob-to-it/-/blob-to-it-2.0.8.tgz#6656f7d11244b8e58cc92e0db2407e652e1336b9" + integrity sha512-1MKnG2ul1DtSgrxFHqhdJgIJODJbNj7alOLSJRD7O9S2iCJ72ZWU6j8+CVpjIdLueqwpWhy4ouvpanYlFLqkRw== dependencies: - browser-readablestream-to-it "^1.0.3" - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== + browser-readablestream-to-it "^2.0.0" bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" @@ -1956,6 +2093,13 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -1971,10 +2115,10 @@ browser-level@^1.0.1: module-error "^1.0.2" run-parallel-limit "^1.1.0" -browser-readablestream-to-it@^1.0.0, browser-readablestream-to-it@^1.0.1, browser-readablestream-to-it@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz#ac3e406c7ee6cdf0a502dd55db33bab97f7fba76" - integrity sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw== +browser-readablestream-to-it@^2.0.0, browser-readablestream-to-it@^2.0.5: + version "2.0.8" + resolved "https://registry.yarnpkg.com/browser-readablestream-to-it/-/browser-readablestream-to-it-2.0.8.tgz#997c0673556de5c6b02f8974211213d45df4ba71" + integrity sha512-+aDq+8QoTxIklc9m21oVg96Bm18EpeVke4/8vWPNu+9Ktd+G4PYavitE4gv/pjIndw1q+vxE/Rcnv1zYHrEQbQ== browser-stdout@1.3.1: version "1.3.1" @@ -2016,24 +2160,6 @@ bs58check@^2.1.2: create-hash "^1.1.0" safe-buffer "^5.1.2" -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -2057,7 +2183,7 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -buffer@^6.0.1, buffer@^6.0.3: +buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -2065,18 +2191,26 @@ buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== +bundle-name@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" + integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== dependencies: - streamsearch "^1.1.0" + run-applescript "^7.0.0" bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -2085,6 +2219,24 @@ call-bind@^1.0.0: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2095,41 +2247,20 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -cardinal@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-2.1.1.tgz#7cc1055d822d212954d07b085dea251cc7bc5505" - integrity sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw== - dependencies: - ansicolors "~0.3.2" - redeyed "~2.1.0" - case@^1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -caseless@^0.12.0, caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - catering@^2.1.0, catering@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== -cborg@^1.5.4, cborg@^1.6.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/cborg/-/cborg-1.10.2.tgz#83cd581b55b3574c816f82696307c7512db759a1" - integrity sha512-b3tFPA9pUr2zCUiCfRd2+wok2/LBSNUMKOuRRok+WlvvAgEt/PlbgPTsZUcwCOs53IJvLgTp0eotwtosE6njug== - -chalk@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" +cborg@^4.0.0: + version "4.2.10" + resolved "https://registry.yarnpkg.com/cborg/-/cborg-4.2.10.tgz#d0272aed02f471c90f1576ee8d078f15de1ca69a" + integrity sha512-ZVA0xrVn8uBfDJYgfKKZzB/93z/Uiz7YtRdBPsZi/gyHNyqFdHMLHURVEk9dejOHepaX0zhcMyNva2/vF972SA== chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" @@ -2140,7 +2271,7 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2168,6 +2299,13 @@ chokidar@3.5.3: optionalDependencies: fsevents "~2.3.2" +chokidar@4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30" + integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== + dependencies: + readdirp "^4.0.1" + chokidar@^3.4.0: version "3.6.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" @@ -2183,16 +2321,6 @@ chokidar@^3.4.0: optionalDependencies: fsevents "~2.3.2" -chownr@^1.0.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -2236,19 +2364,12 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-progress@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-3.12.0.tgz#807ee14b66bcc086258e444ad0f19e7d42577942" - integrity sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A== - dependencies: - string-width "^4.2.3" - cli-spinners@^2.2.0: version "2.9.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== -cli-spinners@^2.5.0: +cli-spinners@^2.5.0, cli-spinners@^2.9.2: version "2.9.2" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== @@ -2268,6 +2389,11 @@ cli-width@^3.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cli-width@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" + integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -2311,13 +2437,6 @@ colors@1.4.0, colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - command-exists@^1.2.8: version "1.2.9" resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" @@ -2338,15 +2457,13 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-stream@^1.6.0, concat-stream@^1.6.2, concat-stream@~1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== +config-chain@^1.1.11: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" + ini "^1.3.4" + proto-list "~1.2.1" console-table-printer@^2.11.1: version "2.11.1" @@ -2362,7 +2479,7 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" -content-type@~1.0.4, content-type@~1.0.5: +content-type@^1.0.4, content-type@~1.0.4, content-type@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== @@ -2382,11 +2499,6 @@ cookie@^0.4.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - cors@2.8.5: version "2.8.5" resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" @@ -2436,7 +2548,7 @@ create-hmac@^1.1.4, create-hmac@^1.1.7: create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmmirror.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-fetch@4.0.0: @@ -2455,16 +2567,22 @@ cross-spawn@7.0.3, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== +cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +dag-jose@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/dag-jose/-/dag-jose-5.1.1.tgz#02708321f14b6f43990e238010c73464916259a7" + integrity sha512-9alfZ8Wh1XOOMel8bMpDqWsDT72ojFQCJPtwZSev9qh4f8GoCV9qrJW8jcOUhcstO8Kfm09FHGo//jqiZq3z9w== + dependencies: + "@ipld/dag-cbor" "^9.0.0" + multiformats "~13.1.3" debug@2.6.9: version "2.6.9" @@ -2473,19 +2591,19 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@^3.2.6: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== +debug@4.4.0, debug@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: - ms "^2.1.1" + ms "^2.1.3" decamelize@^4.0.0: version "4.0.0" @@ -2497,6 +2615,19 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +default-browser-id@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" + integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== + +default-browser@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" + integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== + dependencies: + bundle-name "^4.1.0" + default-browser-id "^5.0.0" + defaults@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" @@ -2504,16 +2635,25 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + delay@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - depd@2.0.0, depd@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -2531,7 +2671,7 @@ diff@5.0.0: diff@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + resolved "https://registry.npmmirror.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== dir-glob@^3.0.1: @@ -2541,40 +2681,19 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dns-over-http-resolver@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz#194d5e140a42153f55bb79ac5a64dd2768c36af9" - integrity sha512-miDiVSI6KSNbi4SVifzO/reD8rMnxgrlnkrlkugOLQpWQTe2qMdHsZp5DmfKjxNE+/T3VAAYLQUZMv9SMr6+AA== - dependencies: - debug "^4.3.1" - native-fetch "^3.0.0" - receptacle "^1.3.2" - -docker-compose@0.23.19: - version "0.23.19" - resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-0.23.19.tgz#9947726e2fe67bdfa9e8efe1ff15aa0de2e10eb8" - integrity sha512-v5vNLIdUqwj4my80wxFDkNH+4S85zsRuH29SO7dCWVWPCMt/ohZBsGN6g6KXWifT0pzQ7uOxqEKCYCDPJ8Vz4g== +dns-packet@^5.6.1: + version "5.6.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f" + integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== dependencies: - yaml "^1.10.2" + "@leichtgewicht/ip-codec" "^2.0.1" -docker-modem@^1.0.8: - version "1.0.9" - resolved "https://registry.yarnpkg.com/docker-modem/-/docker-modem-1.0.9.tgz#a1f13e50e6afb6cf3431b2d5e7aac589db6aaba8" - integrity sha512-lVjqCSCIAUDZPAZIeyM125HXfNvOmYYInciphNrLrylUtKyW66meAjSPXWchKVzoIYZx69TPnAepVSSkeawoIw== +docker-compose@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/docker-compose/-/docker-compose-1.1.1.tgz#c480b5db9d7bd3d0d1259774831ef018ec116743" + integrity sha512-UkIUz0LtzuO17Ijm6SXMGtfZMs7IvbNwvuJBiBuN93PIhr/n9/sbJMqpvYFaCBGfwu1ZM4PPPDgQzeeke4lEoA== dependencies: - JSONStream "1.3.2" - debug "^3.2.6" - readable-stream "~1.0.26-4" - split-ca "^1.0.0" - -dockerode@2.5.8: - version "2.5.8" - resolved "https://registry.yarnpkg.com/dockerode/-/dockerode-2.5.8.tgz#1b661e36e1e4f860e25f56e0deabe9f87f1d0acc" - integrity sha512-+7iOUYBeDTScmOmQqpUYQaE7F4vvIt6+gIZNHWhqAQEI887tiPFB9OvXI/HzQYqfUNvukMK+9myLW63oTJPZpw== - dependencies: - concat-stream "~1.6.2" - docker-modem "^1.0.8" - tar-fs "~1.16.3" + yaml "^2.2.2" doctrine@^3.0.0: version "3.0.0" @@ -2588,6 +2707,15 @@ dottie@^2.0.6: resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.6.tgz#34564ebfc6ec5e5772272d466424ad5b696484d4" integrity sha512-iGCHkfUc5kFekGiqhe8B/mdaurD+lakO9txNnTvKtA6PISrw86LgqHvRzWYPyoE2Ph5aMIrCw9/uko6XHTKCwA== +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexify@^4.1.1, duplexify@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" @@ -2598,6 +2726,11 @@ duplexify@^4.1.1, duplexify@^4.1.2: readable-stream "^3.1.1" stream-shift "^1.0.0" +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -2610,14 +2743,14 @@ ejs@3.1.8: dependencies: jake "^10.8.5" -ejs@^3.1.8: - version "3.1.9" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361" - integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ== +ejs@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== dependencies: jake "^10.8.5" -electron-fetch@^1.7.2: +electron-fetch@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.9.1.tgz#e28bfe78d467de3f2dec884b1d72b8b05322f30f" integrity sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA== @@ -2642,6 +2775,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -2654,7 +2792,7 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -2693,6 +2831,23 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -2805,7 +2960,7 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -esprima@^4.0.0, esprima@~4.0.0: +esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -2844,13 +2999,6 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== -ethereum-bloom-filters@^1.0.6: - version "1.0.10" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" - integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== - dependencies: - js-sha3 "^0.8.0" - ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" @@ -2882,6 +3030,16 @@ ethereum-cryptography@^1.0.3: "@scure/bip32" "1.1.5" "@scure/bip39" "1.1.1" +ethereum-cryptography@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz#58f2810f8e020aecb97de8c8c76147600b0b8ccf" + integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== + dependencies: + "@noble/curves" "1.4.2" + "@noble/hashes" "1.4.0" + "@scure/bip32" "1.4.0" + "@scure/bip39" "1.3.0" + ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" @@ -2903,7 +3061,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.4: +ethereumjs-util@^7.1.4: version "7.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -2986,14 +3144,6 @@ ethers@^5.1.0, ethers@^5.6.0, ethers@^5.7.0, ethers@^5.7.1: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - ethjs-util@0.1.6, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" @@ -3007,6 +3157,11 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -3067,7 +3222,7 @@ express@4.18.2: utils-merge "1.0.1" vary "~1.1.2" -external-editor@^3.0.3: +external-editor@^3.0.3, external-editor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== @@ -3081,11 +3236,6 @@ eyes@^0.1.8: resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== -fast-decode-uri-component@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz#46f8b6c22b30ff7a81357d4f59abfae938202543" - integrity sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg== - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -3107,6 +3257,17 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -3124,25 +3285,11 @@ fast-levenshtein@^3.0.0: dependencies: fastest-levenshtein "^1.0.7" -fast-querystring@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fast-querystring/-/fast-querystring-1.1.1.tgz#f4c56ef56b1a954880cfd8c01b83f9e1a3d3fda2" - integrity sha512-qR2r+e3HvhEFmpdHMv//U8FnFlnYjaC6QKDuaXALDkw2kvHO8WDjxH+f/rHGR4Me4pnk8p9JAkRNTjYHAKRn2Q== - dependencies: - fast-decode-uri-component "^1.0.1" - fast-redact@^3.0.0: version "3.3.0" resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.3.0.tgz#7c83ce3a7be4898241a46560d51de10f653f7634" integrity sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ== -fast-url-parser@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== - dependencies: - punycode "^1.3.2" - fastest-levenshtein@^1.0.7: version "1.0.16" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" @@ -3188,6 +3335,13 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + finalhandler@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" @@ -3244,14 +3398,20 @@ follow-redirects@^1.14.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== -form-data@^2.2.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== +for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== + dependencies: + is-callable "^1.2.7" + +foreground-child@^3.1.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" + cross-spawn "^7.0.6" + signal-exit "^4.0.1" forwarded@0.2.0: version "0.2.0" @@ -3273,17 +3433,11 @@ fresh@0.5.2: resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@9.1.0, fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== +fs-extra@11.3.0: + version "11.3.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.0.tgz#0daced136bbaf65a555a326719af931adc7a314d" + integrity sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew== dependencies: - at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" @@ -3316,13 +3470,6 @@ fs-jetpack@4.3.1: minimatch "^3.0.2" rimraf "^2.6.3" -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3338,6 +3485,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" @@ -3358,6 +3510,22 @@ get-intrinsic@^1.0.2: has-proto "^1.0.1" has-symbols "^1.0.3" +get-intrinsic@^1.2.4, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-iterator@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/get-iterator/-/get-iterator-1.0.2.tgz#cd747c02b4c084461fac14f48f6b45a80ed25c82" @@ -3368,10 +3536,13 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-port@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" - integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== +get-proto@^1.0.0, get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" get-stream@^6.0.0: version "6.0.1" @@ -3385,6 +3556,18 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob@11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.0.1.tgz#1c3aef9a59d680e611b53dcd24bb8639cef064d9" + integrity sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw== + dependencies: + foreground-child "^3.1.0" + jackspeak "^4.0.1" + minimatch "^10.0.0" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + glob@7.2.0, glob@^7.1.3, glob@^7.1.6: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -3408,16 +3591,6 @@ glob@8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@9.3.5: - version "9.3.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21" - integrity sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q== - dependencies: - fs.realpath "^1.0.0" - minimatch "^8.0.2" - minipass "^4.2.4" - path-scurry "^1.6.1" - globals@^13.6.0, globals@^13.9.0: version "13.20.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" @@ -3437,10 +3610,10 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -gluegun@5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/gluegun/-/gluegun-5.1.6.tgz#74ec13193913dc610f5c1a4039972c70c96a7bad" - integrity sha512-9zbi4EQWIVvSOftJWquWzr9gLX2kaDgPkNR5dYWbM53eVvCI3iKuxLlnKoHC0v4uPoq+Kr/+F569tjoFbA4DSA== +gluegun@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/gluegun/-/gluegun-5.2.0.tgz#88ba1f76f20e68a135557a4a4c8ea283291a7491" + integrity sha512-jSUM5xUy2ztYFQANne17OUm/oAd7qSX7EBksS9bQDt9UvLPqcEkeWUebmaposb8Tx7eTTD8uJVWGRe6PYSsYkg== dependencies: apisauce "^2.1.5" app-module-path "^2.2.0" @@ -3473,6 +3646,16 @@ gluegun@5.1.6: which "2.0.2" yargs-parser "^21.0.0" +gopd@^1.0.1, gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +graceful-fs@4.2.10: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -3490,10 +3673,10 @@ graphql-tag@2.12.6: dependencies: tslib "^2.1.0" -graphql@15.5.0: - version "15.5.0" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" - integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== +graphql@16.10.0: + version "16.10.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.10.0.tgz#24c01ae0af6b11ea87bf55694429198aaa8e220c" + integrity sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ== graphql@16.8.0: version "16.8.0" @@ -3581,6 +3764,13 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -3591,6 +3781,18 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -3615,6 +3817,18 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hashlru@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/hashlru/-/hashlru-2.3.0.tgz#5dc15928b3f6961a2056416bb3a4910216fdfb51" + integrity sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A== + +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -3634,15 +3848,17 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -http-basic@^8.1.1: - version "8.1.3" - resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" - integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== +http-call@^5.2.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/http-call/-/http-call-5.3.0.tgz#4ded815b13f423de176eb0942d69c43b25b148db" + integrity sha512-ahwimsC23ICE4kPl9xTBjKB4inbRaeLyZeRunC/1Jy/Z6X8tv22MEAjK+KBOMSVLaqXPTTmd8638waVIKLGx2w== dependencies: - caseless "^0.12.0" - concat-stream "^1.6.2" - http-response-object "^3.0.1" - parse-cache-control "^1.0.1" + content-type "^1.0.4" + debug "^4.1.1" + is-retry-allowed "^1.1.0" + is-stream "^2.0.0" + parse-json "^4.0.0" + tunnel-agent "^0.6.0" http-errors@2.0.0: version "2.0.0" @@ -3655,13 +3871,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-response-object@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" - integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== - dependencies: - "@types/node" "^10.0.3" - https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -3675,11 +3884,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -hyperlinker@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" - integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ== - iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -3709,10 +3913,10 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -immutable@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.2.1.tgz#8a4025691018c560a40c67e43d698f816edc44d4" - integrity sha512-7WYV7Q5BTs0nlQm7tl92rDYYoyELLKHoDMBKhrxEoiV4mrfVdRz8hzPiYOzH7yWjzoVEamxRuAqhxL2PLRwZYQ== +immutable@5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-5.0.3.tgz#aa037e2313ea7b5d400cd9298fa14e404c933db1" + integrity sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw== immutable@^4.0.0-rc.12: version "4.3.5" @@ -3750,11 +3954,16 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@^1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + inquirer@^8.0.0: version "8.2.6" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" @@ -3776,19 +3985,18 @@ inquirer@^8.0.0: through "^2.3.6" wrap-ansi "^6.0.1" -interface-datastore@^6.0.2: - version "6.1.1" - resolved "https://registry.yarnpkg.com/interface-datastore/-/interface-datastore-6.1.1.tgz#5150a00de2e7513eaadba58bcafd059cb50004c1" - integrity sha512-AmCS+9CT34pp2u0QQVXjKztkuq3y5T+BIciuiHDDtDZucZD8VudosnSdUyXJV6IsRkN5jc4RFDhCk1O6Q3Gxjg== +interface-datastore@^8.3.1: + version "8.3.1" + resolved "https://registry.yarnpkg.com/interface-datastore/-/interface-datastore-8.3.1.tgz#c793f990c5cf078a24a8a2ded13f7e2099a2a282" + integrity sha512-3r0ETmHIi6HmvM5sc09QQiCD3gUfwtEM/AAChOyAd/UAKT69uk8LXfTSUBufbUIO/dU65Vj8nb9O6QjwW8vDSQ== dependencies: - interface-store "^2.0.2" - nanoid "^3.0.2" - uint8arrays "^3.0.0" + interface-store "^6.0.0" + uint8arrays "^5.1.0" -interface-store@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/interface-store/-/interface-store-2.0.2.tgz#83175fd2b0c501585ed96db54bb8ba9d55fce34c" - integrity sha512-rScRlhDcz6k199EkHqT8NpM87ebN89ICOzILoBHgaG36/WX50N32BnU/kpZgCGPLhARRAWUUX5/cyaIjt7Kipg== +interface-store@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/interface-store/-/interface-store-6.0.2.tgz#1746a1ee07634f7678b3aa778738b79e3f75c909" + integrity sha512-KSFCXtBlNoG0hzwNa0RmhHtrdhzexp+S+UY2s0rWTBJyfdEIgn6i6Zl9otVqrcFYbYrneBT7hbmHQ8gE0C3umA== io-ts@1.10.4: version "1.10.4" @@ -3797,105 +4005,26 @@ io-ts@1.10.4: dependencies: fp-ts "^1.0.0" -ip-regex@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" - integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -ipfs-core-types@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/ipfs-core-types/-/ipfs-core-types-0.9.0.tgz#cb201ff7a9470651ba14c4e7fae56661a55bf37e" - integrity sha512-VJ8vJSHvI1Zm7/SxsZo03T+zzpsg8pkgiIi5hfwSJlsrJ1E2v68QPlnLshGHUSYw89Oxq0IbETYl2pGTFHTWfg== +ipfs-unixfs@^11.1.4: + version "11.2.1" + resolved "https://registry.yarnpkg.com/ipfs-unixfs/-/ipfs-unixfs-11.2.1.tgz#679adc00cdfd37b55ce5318715efa19051a300b4" + integrity sha512-gUeeX63EFgiaMgcs0cUs2ZUPvlOeEZ38okjK8twdWGZX2jYd2rCk8k/TJ3DSRIDZ2t/aZMv6I23guxHaofZE3w== dependencies: - interface-datastore "^6.0.2" - multiaddr "^10.0.0" - multiformats "^9.4.13" + protons-runtime "^5.5.0" + uint8arraylist "^2.4.8" -ipfs-core-utils@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/ipfs-core-utils/-/ipfs-core-utils-0.13.0.tgz#8f0ec9aaa7c24f6f307e6e76e7bdc1cefd829894" - integrity sha512-HP5EafxU4/dLW3U13CFsgqVO5Ika8N4sRSIb/dTg16NjLOozMH31TXV0Grtu2ZWo1T10ahTzMvrfT5f4mhioXw== - dependencies: - any-signal "^2.1.2" - blob-to-it "^1.0.1" - browser-readablestream-to-it "^1.0.1" - debug "^4.1.1" - err-code "^3.0.1" - ipfs-core-types "^0.9.0" - ipfs-unixfs "^6.0.3" - ipfs-utils "^9.0.2" - it-all "^1.0.4" - it-map "^1.0.4" - it-peekable "^1.0.2" - it-to-stream "^1.0.0" - merge-options "^3.0.4" - multiaddr "^10.0.0" - multiaddr-to-uri "^8.0.0" - multiformats "^9.4.13" - nanoid "^3.1.23" - parse-duration "^1.0.0" - timeout-abort-controller "^2.0.0" - uint8arrays "^3.0.0" - -ipfs-http-client@55.0.0: - version "55.0.0" - resolved "https://registry.yarnpkg.com/ipfs-http-client/-/ipfs-http-client-55.0.0.tgz#8b713c5fa318e873b7d7ad099a4eb14320a5b0ce" - integrity sha512-GpvEs7C7WL9M6fN/kZbjeh4Y8YN7rY8b18tVWZnKxRsVwM25cIFrRI8CwNt3Ugin9yShieI3i9sPyzYGMrLNnQ== - dependencies: - "@ipld/dag-cbor" "^7.0.0" - "@ipld/dag-json" "^8.0.1" - "@ipld/dag-pb" "^2.1.3" - abort-controller "^3.0.0" - any-signal "^2.1.2" - debug "^4.1.1" - err-code "^3.0.1" - ipfs-core-types "^0.9.0" - ipfs-core-utils "^0.13.0" - ipfs-utils "^9.0.2" - it-first "^1.0.6" - it-last "^1.0.4" - merge-options "^3.0.4" - multiaddr "^10.0.0" - multiformats "^9.4.13" - native-abort-controller "^1.0.3" - parse-duration "^1.0.0" - stream-to-it "^0.2.2" - uint8arrays "^3.0.0" - -ipfs-unixfs@^6.0.3: - version "6.0.9" - resolved "https://registry.yarnpkg.com/ipfs-unixfs/-/ipfs-unixfs-6.0.9.tgz#f6613b8e081d83faa43ed96e016a694c615a9374" - integrity sha512-0DQ7p0/9dRB6XCb0mVCTli33GzIzSVx5udpJuVM47tGcD+W+Bl4LsnoLswd3ggNnNEakMv1FdoFITiEnchXDqQ== +is-arguments@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.2.0.tgz#ad58c6aecf563b78ef2bf04df540da8f5d7d8e1b" + integrity sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA== dependencies: - err-code "^3.0.1" - protobufjs "^6.10.2" - -ipfs-utils@^9.0.2: - version "9.0.14" - resolved "https://registry.yarnpkg.com/ipfs-utils/-/ipfs-utils-9.0.14.tgz#24f5fda1f4567685eb32bca2543d518f95fd8704" - integrity sha512-zIaiEGX18QATxgaS0/EOQNoo33W0islREABAcxXE8n7y2MGAlB+hdsxXn4J0hGZge8IqVQhW8sWIb+oJz2yEvg== - dependencies: - any-signal "^3.0.0" - browser-readablestream-to-it "^1.0.0" - buffer "^6.0.1" - electron-fetch "^1.7.2" - err-code "^3.0.1" - is-electron "^2.2.0" - iso-url "^1.1.5" - it-all "^1.0.4" - it-glob "^1.0.1" - it-to-stream "^1.0.0" - merge-options "^3.0.4" - nanoid "^3.1.20" - native-fetch "^3.0.0" - node-fetch "^2.6.8" - react-native-fetch-api "^3.0.0" - stream-to-it "^0.2.2" + call-bound "^1.0.2" + has-tostringtag "^1.0.2" is-arrayish@^0.2.1: version "0.2.1" @@ -3914,11 +4043,21 @@ is-buffer@^2.0.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-docker@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-electron@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/is-electron/-/is-electron-2.2.2.tgz#3778902a2044d76de98036f5dc58089ac4d80bb9" @@ -3934,6 +4073,16 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-generator-function@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.0.tgz#bf3eeda931201394f57b5dba2800f91a238309ca" + integrity sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ== + dependencies: + call-bound "^1.0.3" + get-proto "^1.0.0" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -3946,18 +4095,18 @@ is-hex-prefixed@1.0.0: resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-interactive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -is-ip@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8" - integrity sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q== - dependencies: - ip-regex "^4.0.0" - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -3968,11 +4117,33 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +is-retry-allowed@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-typed-array@^1.1.3: + version "1.1.15" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" @@ -3985,22 +4156,19 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -iso-url@^1.1.5: +iso-url@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng== @@ -4010,38 +4178,51 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== -it-all@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" - integrity sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A== +it-all@^3.0.4: + version "3.0.7" + resolved "https://registry.yarnpkg.com/it-all/-/it-all-3.0.7.tgz#04cf8605d51ca9db19d0e45ff0258abb97665d98" + integrity sha512-PkuYtu6XhJzuPTKXImd6y0qE6H91MUPV/b9xotXMAI6GjmD2v3NoHj2g5L0lS2qZ0EzyGWZU1kp0UxW8POvNBQ== -it-first@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/it-first/-/it-first-1.0.7.tgz#a4bef40da8be21667f7d23e44dae652f5ccd7ab1" - integrity sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g== +it-first@^3.0.4: + version "3.0.7" + resolved "https://registry.yarnpkg.com/it-first/-/it-first-3.0.7.tgz#f91f1036229e3c9889004f98fdeecc8681d5e72c" + integrity sha512-e2dVSlOP+pAxPYPVJBF4fX7au8cvGfvLhIrGCMc5aWDnCvwgOo94xHbi3Da6eXQ2jPL5FGEM8sJMn5uE8Seu+g== -it-glob@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/it-glob/-/it-glob-1.0.2.tgz#bab9b04d6aaac42884502f3a0bfee84c7a29e15e" - integrity sha512-Ch2Dzhw4URfB9L/0ZHyY+uqOnKvBNeS/SMcRiPmJfpHiM0TsUZn+GkpcZxAoF3dJVdPm/PuIk3A4wlV7SUo23Q== +it-glob@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/it-glob/-/it-glob-3.0.2.tgz#32a17aca775eb8eb77716079b3bc16e6f016b141" + integrity sha512-yw6am0buc9W6HThDhlf/0k9LpwK31p9Y3c0hpaoth9Iaha4Kog2oRlVanLGSrPPoh9yGwHJbs+KfBJt020N6/g== dependencies: - "@types/minimatch" "^3.0.4" - minimatch "^3.0.4" + fast-glob "^3.3.3" -it-last@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-last/-/it-last-1.0.6.tgz#4106232e5905ec11e16de15a0e9f7037eaecfc45" - integrity sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q== +it-last@^3.0.4: + version "3.0.7" + resolved "https://registry.yarnpkg.com/it-last/-/it-last-3.0.7.tgz#bdd6864b4915cafe3fc41823de06fe65ff548643" + integrity sha512-qG4BTveE6Wzsz5voqaOtZAfZgXTJT+yiaj45vp5S0Vi8oOdgKlRqUeolfvWoMCJ9vwSc/z9pAaNYIza7gA851w== -it-map@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/it-map/-/it-map-1.0.6.tgz#6aa547e363eedcf8d4f69d8484b450bc13c9882c" - integrity sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ== +it-map@^3.0.5: + version "3.1.2" + resolved "https://registry.yarnpkg.com/it-map/-/it-map-3.1.2.tgz#64d6bd44caade9175f0419c0ae55c30d6cfcf88c" + integrity sha512-G3dzFUjTYHKumJJ8wa9dSDS3yKm8L7qDUnAgzemOD0UMztwm54Qc2v97SuUCiAgbOz/aibkSLImfoFK09RlSFQ== + dependencies: + it-peekable "^3.0.0" -it-peekable@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/it-peekable/-/it-peekable-1.0.3.tgz#8ebe933767d9c5aa0ae4ef8e9cb3a47389bced8c" - integrity sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ== +it-peekable@^3.0.0, it-peekable@^3.0.3: + version "3.0.6" + resolved "https://registry.yarnpkg.com/it-peekable/-/it-peekable-3.0.6.tgz#f84c81f4ee301048fbdf4a500b3a14a5cbb44cec" + integrity sha512-odk9wn8AwFQipy8+tFaZNRCM62riraKZJRysfbmOett9wgJumCwgZFzWUBUwMoiQapEcEVGwjDpMChZIi+zLuQ== + +it-pushable@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/it-pushable/-/it-pushable-3.2.3.tgz#e2b80aed90cfbcd54b620c0a0785e546d4e5f334" + integrity sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg== + dependencies: + p-defer "^4.0.0" + +it-stream-types@^2.0.1, it-stream-types@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/it-stream-types/-/it-stream-types-2.0.2.tgz#60bbace90096796b4e6cc3bfab99cf9f2b86c152" + integrity sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww== it-to-stream@^1.0.0: version "1.0.0" @@ -4055,6 +4236,13 @@ it-to-stream@^1.0.0: p-fifo "^1.0.0" readable-stream "^3.6.0" +jackspeak@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.1.0.tgz#c489c079f2b636dc4cbe9b0312a13ff1282e561b" + integrity sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw== + dependencies: + "@isaacs/cliui" "^8.0.2" + jake@^10.8.5: version "10.8.6" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.6.tgz#227a96786a1e035214e0ba84b482d6223d41ef04" @@ -4065,10 +4253,10 @@ jake@^10.8.5: filelist "^1.0.4" minimatch "^3.1.2" -jayson@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.0.0.tgz#145a0ced46f900934c9b307e1332bcb0c7dbdb17" - integrity sha512-v2RNpDCMu45fnLzSk47vx7I+QUaOsox6f5X0CUlabAFwxoP+8MfAY0NQRFwOEYXIxm8Ih5y6OaEa5KYiQMkyAA== +jayson@4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.3.tgz#db9be2e4287d9fef4fc05b5fe367abe792c2eee8" + integrity sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ== dependencies: "@types/connect" "^3.4.33" "@types/node" "^12.12.54" @@ -4081,14 +4269,14 @@ jayson@4.0.0: isomorphic-ws "^4.0.1" json-stringify-safe "^5.0.1" uuid "^8.3.2" - ws "^7.4.5" + ws "^7.5.10" js-sdsl@^4.1.4: version "4.4.2" resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.2.tgz#2e3c031b1f47d3aca8b775532e3ebb0818e7f847" integrity sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w== -js-sha3@0.8.0, js-sha3@^0.8.0: +js-sha3@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== @@ -4098,7 +4286,14 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.1: +js-yaml@4.1.0, js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -4106,12 +4301,10 @@ js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-parse-even-better-errors@^2.3.0: version "2.3.1" @@ -4191,6 +4384,45 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" +kubo-rpc-client@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kubo-rpc-client/-/kubo-rpc-client-5.1.0.tgz#06f9216b2b8a62487a150261b16fd941a75adb34" + integrity sha512-yTBoyEN1Ymwi0Tzi8+Mfxylg3BRAatzykih8jzwaJjfYCqKUEqCX+43m4X78CdTPRXyIHUbdI9N0DcKRwNwk+A== + dependencies: + "@ipld/dag-cbor" "^9.0.0" + "@ipld/dag-json" "^10.0.0" + "@ipld/dag-pb" "^4.0.0" + "@libp2p/crypto" "^5.0.0" + "@libp2p/interface" "^2.0.0" + "@libp2p/logger" "^5.0.0" + "@libp2p/peer-id" "^5.0.0" + "@multiformats/multiaddr" "^12.2.1" + "@multiformats/multiaddr-to-uri" "^11.0.0" + any-signal "^4.1.1" + blob-to-it "^2.0.5" + browser-readablestream-to-it "^2.0.5" + dag-jose "^5.0.0" + electron-fetch "^1.9.1" + err-code "^3.0.1" + ipfs-unixfs "^11.1.4" + iso-url "^1.2.1" + it-all "^3.0.4" + it-first "^3.0.4" + it-glob "^3.0.1" + it-last "^3.0.4" + it-map "^3.0.5" + it-peekable "^3.0.3" + it-to-stream "^1.0.0" + merge-options "^3.0.4" + multiformats "^13.1.0" + nanoid "^5.0.7" + native-fetch "^4.0.2" + parse-duration "^2.1.2" + react-native-fetch-api "^3.0.0" + stream-to-it "^1.0.1" + uint8arrays "^5.0.3" + wherearewe "^2.0.1" + level-supports@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" @@ -4221,6 +4453,11 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lilconfig@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" + integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== + lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -4361,6 +4598,11 @@ long@^5.2.0: resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== +lru-cache@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.1.0.tgz#afafb060607108132dbc1cf8ae661afb69486117" + integrity sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -4375,11 +4617,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -"lru-cache@^9.1.1 || ^10.0.0": - version "10.0.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" - integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== - lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" @@ -4387,7 +4624,7 @@ lru_map@^0.3.3: make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== matchstick-as@0.6.0-beta.2: @@ -4397,6 +4634,11 @@ matchstick-as@0.6.0-beta.2: dependencies: wabt "1.0.24" +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -4465,12 +4707,20 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -4504,6 +4754,13 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" + integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -4518,59 +4775,17 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^8.0.2: - version "8.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" - integrity sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA== +minimatch@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" -minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minipass@^3.0.0: - version "3.3.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^4.2.4: - version "4.2.8" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" - integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": - version "7.0.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" - integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== - -minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp@^0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== mnemonist@^0.38.0: version "0.38.5" @@ -4643,34 +4858,25 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@2.1.3, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multiaddr-to-uri@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/multiaddr-to-uri/-/multiaddr-to-uri-8.0.0.tgz#65efe4b1f9de5f6b681aa42ff36a7c8db7625e58" - integrity sha512-dq4p/vsOOUdVEd1J1gl+R2GFrXJQH8yjLtz4hodqdVbieg39LvBOdMQRdQnfbg5LSM/q1BYNVf5CBbwZFFqBgA== - dependencies: - multiaddr "^10.0.0" +ms@^3.0.0-canary.1: + version "3.0.0-canary.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-3.0.0-canary.1.tgz#c7b34fbce381492fd0b345d1cf56e14d67b77b80" + integrity sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g== -multiaddr@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/multiaddr/-/multiaddr-10.0.1.tgz#0d15848871370860a4d266bb44d93b3dac5d90ef" - integrity sha512-G5upNcGzEGuTHkzxezPrrD6CaIHR9uo+7MwqhNVcXTs33IInon4y7nMiGxl2CY5hG7chvYQUQhz5V52/Qe3cbg== - dependencies: - dns-over-http-resolver "^1.2.3" - err-code "^3.0.1" - is-ip "^3.1.0" - multiformats "^9.4.5" - uint8arrays "^3.0.0" - varint "^6.0.0" +multiformats@^13.0.0, multiformats@^13.1.0, multiformats@^13.3.1: + version "13.3.2" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-13.3.2.tgz#a77c2a09c490e90c73b3049551604e6e1a4854e0" + integrity sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g== -multiformats@^9.4.13, multiformats@^9.4.2, multiformats@^9.4.5, multiformats@^9.5.4: - version "9.9.0" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" - integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== +multiformats@~13.1.3: + version "13.1.3" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-13.1.3.tgz#36d312401ff424948ef90746fbda9dd798cffa09" + integrity sha512-CZPi9lFZCM/+7oRolWYsvalsyWQGFo+GpdaTmjxXXomC+nP/W1Rnxb9sUgjvmNmRZ5bOPqRAl4nuK+Ydw/4tGw== mustache@^4.0.1: version "4.2.0" @@ -4682,36 +4888,31 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nanoid@^3.0.2, nanoid@^3.1.20, nanoid@^3.1.23: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +mute-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" + integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== + +nanoid@^5.0.7: + version "5.1.5" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-5.1.5.tgz#f7597f9d9054eb4da9548cdd53ca70f1790e87de" + integrity sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw== napi-macros@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== -native-abort-controller@^1.0.3, native-abort-controller@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/native-abort-controller/-/native-abort-controller-1.0.4.tgz#39920155cc0c18209ff93af5bc90be856143f251" - integrity sha512-zp8yev7nxczDJMoP6pDxyD20IU0T22eX8VwN2ztDccKvSZhRaV33yP1BGwKSZfXuqWUzsXopVFjBdau9OOAwMQ== - -native-fetch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-3.0.0.tgz#06ccdd70e79e171c365c75117959cf4fe14a09bb" - integrity sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw== +native-fetch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-4.0.2.tgz#75c8a44c5f3bb021713e5e24f2846750883e49af" + integrity sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg== natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -natural-orderby@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/natural-orderby/-/natural-orderby-2.0.3.tgz#8623bc518ba162f8ff1cdb8941d74deb0fdcc016" - integrity sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q== - negotiator@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -4722,11 +4923,6 @@ ngeohash@0.6.3: resolved "https://registry.yarnpkg.com/ngeohash/-/ngeohash-0.6.3.tgz#10b1e80be5488262ec95c56cf2dbb6c45fbdf245" integrity sha512-kltF0cOxgx1AbmVzKxYZaoB0aj7mOxZeHaerEtQV0YaqnkXNq26WWqMmJ6lTqShYxVRWZ/mwvvTrNeOwdslWiw== -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -4739,13 +4935,6 @@ node-fetch@^2.6.12: dependencies: whatwg-url "^5.0.0" -node-fetch@^2.6.8: - version "2.6.11" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25" - integrity sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w== - dependencies: - whatwg-url "^5.0.0" - node-gyp-build@^4.2.0: version "4.5.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" @@ -4768,14 +4957,6 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - object-assign@^4, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -4786,11 +4967,6 @@ object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== -object-treeify@^1.1.33: - version "1.1.33" - resolved "https://registry.yarnpkg.com/object-treeify/-/object-treeify-1.1.33.tgz#f06fece986830a3cba78ddd32d4c11d1f76cdf40" - integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A== - obliterator@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" @@ -4834,6 +5010,16 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1" + integrity sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw== + dependencies: + default-browser "^5.2.1" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^3.1.0" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -4884,6 +5070,11 @@ p-defer@^3.0.0: resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" integrity sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw== +p-defer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-4.0.1.tgz#d12c6d41420785ed0d162dbd86b71ba490f7f99e" + integrity sha512-Mr5KC5efvAK5VUptYEIopP1bakB85k2IWXaRC0rsh1uwn1L6M0LVml8OIQ4Gudg4oyZakf7FmeRLkMMtZW1i5A== + p-fifo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-fifo/-/p-fifo-1.0.0.tgz#e29d5cf17c239ba87f51dde98c1d26a9cfe20a63" @@ -4927,11 +5118,29 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" +p-queue@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-8.1.0.tgz#d71929249868b10b16f885d8a82beeaf35d32279" + integrity sha512-mxLDbbGIBEXTJL0zEx8JIylaj3xQ7Z/7eEVjcF9fJX4DBiH9oqe+oahYnlKKxm0Ci9TlWTyhSHgygxMxjIB2jw== + dependencies: + eventemitter3 "^5.0.1" + p-timeout "^6.1.2" + +p-timeout@^6.1.2: + version "6.1.4" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.4.tgz#418e1f4dd833fa96a2e3f532547dd2abdb08dbc2" + integrity sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg== + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + packet-reader@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" @@ -4944,15 +5153,18 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-cache-control@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" - integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== +parse-duration@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-2.1.4.tgz#02918736726f657eaf70b52bb8da7910316df51d" + integrity sha512-b98m6MsCh+akxfyoz9w9dt0AlH2dfYLOBss5SdDsr9pkhKNvkWBXU/r8A4ahmIGByBOLV2+4YwfCuFxbDDaGyg== -parse-duration@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.0.3.tgz#b6681f5edcc2689643b34c09ea63f86f58a35814" - integrity sha512-o6NAh12na5VvR6nFejkU0gpQ8jmOY9Y9sTU2ke3L3G/d/3z8jqmbBbeyBGHU73P4JLXfc7tJARygIK3WGIkloA== +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" parse-json@^5.0.0: version "5.2.0" @@ -4969,14 +5181,6 @@ parseurl@~1.3.3: resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== -password-prompt@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/password-prompt/-/password-prompt-1.1.2.tgz#85b2f93896c5bd9e9f2d6ff0627fa5af3dc00923" - integrity sha512-bpuBhROdrhuN3E7G/koAju0WjVw9/uQOG5Co5mokNj0MiOSBVZS1JTwM4zl55hu0WFmIEFvO9cU9sJQiBIYeIA== - dependencies: - ansi-escapes "^3.1.0" - cross-spawn "^6.0.5" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -4992,11 +5196,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -5007,13 +5206,13 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.6.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" - integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== +path-scurry@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.0.tgz#9f052289f23ad8bf9397a2a0425e7b8615c58580" + integrity sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg== dependencies: - lru-cache "^9.1.1 || ^10.0.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + lru-cache "^11.0.0" + minipass "^7.1.2" path-to-regexp@0.1.7: version "0.1.7" @@ -5164,6 +5363,11 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +possible-typed-array-names@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" + integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== + postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" @@ -5191,26 +5395,26 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" - integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== +prettier@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5" + integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw== prettier@^2.0.5: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - process-warning@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== +progress-events@^1.0.0, progress-events@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/progress-events/-/progress-events-1.0.1.tgz#693b6d4153f08c1418ae3cd5fcad8596c91db7e8" + integrity sha512-MOzLIwhpt64KIVN64h1MwdKWiyKFNc/S6BoYKPIVUHFg0/eIEyBulhWCgn678v/4c0ri3FdGuzXymNCv02MUIw== + progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -5223,13 +5427,6 @@ prom-client@14.2.0: dependencies: tdigest "^0.1.1" -promise@^8.0.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.2.0.tgz#a1f6280ab67457fbfc8aad2b198c9497e9e5c806" - integrity sha512-+CMAlLHqwRYwBMXKCP+o8ns7DN+xHDUiI+0nArsiJ9y+kJVPLFxEaSw6Ha9s9H0tftxg2Yzl25wqj9G7m5wLZg== - dependencies: - asap "~2.0.6" - prompt-sync@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/prompt-sync/-/prompt-sync-4.2.0.tgz#0198f73c5b70e3b03e4b9033a50540a7c9a1d7f4" @@ -5237,24 +5434,19 @@ prompt-sync@^4.2.0: dependencies: strip-ansi "^5.0.0" -protobufjs@^6.10.2: - version "6.11.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" - integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== + +protons-runtime@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/protons-runtime/-/protons-runtime-5.5.0.tgz#ea06d9ef843aad77ea5de3e1ebafa81b58c24570" + integrity sha512-EsALjF9QsrEk6gbCx3lmfHxVN0ah7nG3cY7GySD4xf4g8cr7g543zB88Foh897Sr1RQJ9yDCUsoT1i1H/cVUFA== + dependencies: + uint8-varint "^2.0.2" + uint8arraylist "^2.4.3" + uint8arrays "^5.0.1" proxy-addr@~2.0.7: version "2.0.7" @@ -5264,14 +5456,6 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -pump@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" - integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -5289,29 +5473,12 @@ pumpify@^2.0.1: inherits "^2.0.3" pump "^3.0.0" -punycode@^1.3.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== - punycode@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -pvtsutils@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.2.tgz#9f8570d132cdd3c27ab7d51a2799239bf8d8d5de" - integrity sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ== - dependencies: - tslib "^2.4.0" - -pvutils@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" - integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== - -qs@6.11.0, qs@^6.4.0: +qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== @@ -5383,28 +5550,10 @@ react-native-fetch-api@^3.0.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5: - version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@~1.0.26-4: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" +readdirp@^4.0.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.1.2.tgz#eb85801435fbf2a7ee58f19e0921b068fc69948d" + integrity sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg== readdirp@~3.6.0: version "3.6.0" @@ -5418,25 +5567,18 @@ real-require@^0.1.0: resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.1.0.tgz#736ac214caa20632847b7ca8c1056a0767df9381" integrity sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg== -receptacle@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/receptacle/-/receptacle-1.3.2.tgz#a7994c7efafc7a01d0e2041839dab6c4951360d2" - integrity sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A== - dependencies: - ms "^2.1.1" - -redeyed@~2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-2.1.1.tgz#8984b5815d99cb220469c99eeeffe38913e6cc0b" - integrity sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ== - dependencies: - esprima "~4.0.0" - regexpp@^3.0.0, regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +registry-auth-token@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.1.0.tgz#3c659047ecd4caebd25bc1570a3aa979ae490eca" + integrity sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw== + dependencies: + "@pnpm/npm-conf" "^2.1.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -5467,11 +5609,6 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" -retimer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/retimer/-/retimer-3.0.0.tgz#98b751b1feaf1af13eb0228f8ea68b8f9da530df" - integrity sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA== - retry-as-promised@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-7.0.4.tgz#9df73adaeea08cb2948b9d34990549dc13d800a2" @@ -5511,6 +5648,11 @@ rlp@^2.2.3, rlp@^2.2.4: dependencies: bn.js "^5.2.0" +run-applescript@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" + integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A== + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -5542,7 +5684,7 @@ rxjs@^7.5.5: dependencies: tslib "^2.1.0" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -5552,6 +5694,15 @@ safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + safe-stable-stringify@^2.1.0: version "2.4.3" resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" @@ -5583,12 +5734,10 @@ semver@7.3.5, semver@^7.2.1, semver@^7.3.2: dependencies: lru-cache "^6.0.0" -semver@7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.4.0.tgz#8481c92feffc531ab1e012a8ffc15bdd3a0f4318" - integrity sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw== - dependencies: - lru-cache "^6.0.0" +semver@7.7.1, semver@^7.6.3: + version "7.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" + integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== semver@^5.5.0: version "5.7.1" @@ -5600,13 +5749,6 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7: - version "7.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" - integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== - dependencies: - lru-cache "^6.0.0" - semver@^7.5.4: version "7.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" @@ -5677,6 +5819,18 @@ serve-static@1.15.0: parseurl "~1.3.3" send "0.18.0" +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -5695,13 +5849,6 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -5709,11 +5856,6 @@ shebang-command@^2.0.0: dependencies: shebang-regex "^3.0.0" -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" @@ -5733,6 +5875,11 @@ signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.0.1, signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + simple-wcswidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-wcswidth/-/simple-wcswidth-1.0.1.tgz#8ab18ac0ae342f9d9b629604e54d2aa1ecb018b2" @@ -5787,11 +5934,6 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -split-ca@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split-ca/-/split-ca-1.0.1.tgz#6c83aff3692fa61256e0cd197e05e9de157691a6" - integrity sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ== - split2@^3.1.1: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" @@ -5826,17 +5968,21 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== -stream-to-it@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-0.2.4.tgz#d2fd7bfbd4a899b4c0d6a7e6a533723af5749bd0" - integrity sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ== +stream-to-it@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-to-it/-/stream-to-it-1.0.1.tgz#7d5e1b04bab70facd48273279bfa49f0d0165950" + integrity sha512-AqHYAYPHcmvMrcLNgncE/q0Aj/ajP6A4qGhxP6EVn7K3YTNs0bJpJyk57wc2Heb7MUL64jurvmnmui8D9kjZgA== dependencies: - get-iterator "^1.0.2" + it-stream-types "^2.0.1" -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" @@ -5847,6 +5993,15 @@ string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2 is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -5854,17 +6009,12 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - safe-buffer "~5.1.0" + ansi-regex "^5.0.1" strip-ansi@^5.0.0, strip-ansi@^5.2.0: version "5.2.0" @@ -5880,6 +6030,13 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -5897,7 +6054,7 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1, supports-color@^8.1.1: +supports-color@8.1.1, supports-color@^8: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -5911,36 +6068,17 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - -sync-request@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" - integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== - dependencies: - http-response-object "^3.0.1" - sync-rpc "^1.2.1" - then-request "^6.0.0" - -sync-rpc@^1.2.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" - integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== - dependencies: - get-port "^3.1.0" +supports-color@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.4.0.tgz#17bfcf686288f531db3dea3215510621ccb55954" + integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== table@^6.0.9: version "6.8.1" @@ -5953,41 +6091,6 @@ table@^6.0.9: string-width "^4.2.3" strip-ansi "^6.0.1" -tar-fs@~1.16.3: - version "1.16.3" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" - integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== - dependencies: - chownr "^1.0.1" - mkdirp "^0.5.1" - pump "^1.0.0" - tar-stream "^1.1.2" - -tar-stream@^1.1.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tar@^6.1.0: - version "6.1.14" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.14.tgz#e87926bec1cfe7c9e783a77a79f3e81c1cfa3b66" - integrity sha512-piERznXu0U7/pW7cdSn7hjqySIVTYT6F76icmFk7ptU7dDYlXTm5r9A6K04R2vU3olYgoKeo1Cg3eeu5nhftAw== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - tdigest@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/tdigest/-/tdigest-0.1.2.tgz#96c64bac4ff10746b910b0e23b515794e12faced" @@ -6000,23 +6103,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -then-request@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" - integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== - dependencies: - "@types/concat-stream" "^1.6.0" - "@types/form-data" "0.0.33" - "@types/node" "^8.0.0" - "@types/qs" "^6.2.31" - caseless "~0.12.0" - concat-stream "^1.6.0" - form-data "^2.2.0" - http-basic "^8.1.1" - http-response-object "^3.0.1" - promise "^8.0.0" - qs "^6.4.0" - thread-stream@^0.13.0: version "0.13.2" resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.13.2.tgz#de8ea87584baee625c631947ec73494aa86131c8" @@ -6044,15 +6130,6 @@ through2@^3.0.1: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -timeout-abort-controller@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/timeout-abort-controller/-/timeout-abort-controller-2.0.0.tgz#d6a59209132e520413092dd4b4d71eaaf5887feb" - integrity sha512-2FAPXfzTPYEgw27bQGTHc0SzrbmnU2eso4qo172zMLZzaGqeu09PFa5B2FCUHM1tflgRqPgn5KQgp6+Vex4uNA== - dependencies: - abort-controller "^3.0.0" - native-abort-controller "^1.0.4" - retimer "^3.0.0" - tmp-promise@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" @@ -6074,11 +6151,6 @@ tmp@^0.2.0: dependencies: rimraf "^3.0.0" -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -6101,10 +6173,10 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -ts-node@^10.9.1: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.npmmirror.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -6125,16 +6197,21 @@ tslib@^1.8.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - tslib@^2.1.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +tslib@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + +tslib@^2.6.3: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" @@ -6147,6 +6224,13 @@ tsutils@^3.17.1: dependencies: tslib "^1.8.1" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" @@ -6187,28 +6271,43 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - typescript@^3.9.3: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -uint8arrays@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" - integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== +uint8-varint@^2.0.1, uint8-varint@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/uint8-varint/-/uint8-varint-2.0.4.tgz#85be52b3849eb30f2c3640a2df8a14364180affb" + integrity sha512-FwpTa7ZGA/f/EssWAb5/YV6pHgVF1fViKdW8cWaEarjB8t7NyofSWBdOTyFPaGuUG4gx3v1O3PQ8etsiOs3lcw== + dependencies: + uint8arraylist "^2.0.0" + uint8arrays "^5.0.0" + +uint8arraylist@^2.0.0, uint8arraylist@^2.4.3, uint8arraylist@^2.4.8: + version "2.4.8" + resolved "https://registry.yarnpkg.com/uint8arraylist/-/uint8arraylist-2.4.8.tgz#5a4d17f4defd77799cb38e93fd5db0f0dceddc12" + integrity sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ== dependencies: - multiformats "^9.4.2" + uint8arrays "^5.0.1" + +uint8arrays@^5.0.0, uint8arrays@^5.0.1, uint8arrays@^5.0.2, uint8arrays@^5.0.3, uint8arrays@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-5.1.0.tgz#14047c9bdf825d025b7391299436e5e50e7270f1" + integrity sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww== + dependencies: + multiformats "^13.0.0" underscore@^1.13.1: version "1.13.6" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== +undici@7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-7.4.0.tgz#a2606aa5ceeeaac0ddcc00937586c3bc06bfafdc" + integrity sha512-PUQM3/es3noM24oUn10u3kNNap0AbxESOmnssmW+dOi9yGwlUSi5nTNYl3bNbTkWOF8YZDkx2tCmj9OtQ3iGGw== + undici@^5.14.0: version "5.28.3" resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.3.tgz#a731e0eff2c3fcfd41c1169a869062be222d1e5b" @@ -6238,21 +6337,27 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -urlpattern-polyfill@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz#99f096e35eff8bf4b5a2aa7d58a1523d6ebc7ce5" - integrity sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ== - -utf8@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== +urlpattern-polyfill@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz#f0a03a97bfb03cdf33553e5e79a2aadd22cac8ec" + integrity sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -6265,7 +6370,7 @@ uuid@^8.3.2: v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmmirror.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== v8-compile-cache@^2.0.3: @@ -6278,11 +6383,6 @@ validator@^13.9.0: resolved "https://registry.yarnpkg.com/validator/-/validator-13.11.0.tgz#23ab3fd59290c61248364eabf4067f04955fbb1b" integrity sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ== -varint@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" - integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== - vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -6300,42 +6400,58 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -web-streams-polyfill@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== +weald@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/weald/-/weald-1.0.4.tgz#8858cf9186869deba58357ae10cf26eaada80bb0" + integrity sha512-+kYTuHonJBwmFhP1Z4YQK/dGi3jAnJGCYhyODFpHK73rbxnp9lnZQj7a2m+WVgn8fXr5bJaxUpF6l8qZpPeNWQ== + dependencies: + ms "^3.0.0-canary.1" + supports-color "^9.4.0" -web3-eth-abi@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.7.0.tgz#4fac9c7d9e5a62b57f8884b37371f515c766f3f4" - integrity sha512-heqR0bWxgCJwjWIhq2sGyNj9bwun5+Xox/LdZKe+WMyTSy0cXDXEAgv3XKNkXC4JqdDt/ZlbTEx4TWak4TRMSg== +web3-errors@^1.2.0, web3-errors@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.3.1.tgz#163bc4d869f98614760b683d733c3ed1fb415d98" + integrity sha512-w3NMJujH+ZSW4ltIZZKtdbkbyQEvBzyp3JRn59Ckli0Nz4VMsVq8aF1bLWM7A2kuQ+yVEm3ySeNU+7mSRwx7RQ== dependencies: - "@ethersproject/abi" "5.0.7" - web3-utils "1.7.0" + web3-types "^1.10.0" -web3-utils@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.0.tgz#c59f0fd43b2449357296eb54541810b99b1c771c" - integrity sha512-O8Tl4Ky40Sp6pe89Olk2FsaUkgHyb5QAXuaKo38ms3CxZZ4d3rPGfjP9DNKGm5+IUgAZBNpF1VmlSmNCqfDI1w== +web3-eth-abi@4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-4.4.1.tgz#1dca9d80341b3cd7a1ae07dc98080c2073d62a29" + integrity sha512-60ecEkF6kQ9zAfbTY04Nc9q4eEYM0++BySpGi8wZ2PD1tw/c0SDvsKhV6IKURxLJhsDlb08dATc3iD6IbtWJmg== dependencies: - bn.js "^4.11.9" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" + abitype "0.7.1" + web3-errors "^1.3.1" + web3-types "^1.10.0" + web3-utils "^4.3.3" + web3-validator "^2.0.6" + +web3-types@^1.10.0, web3-types@^1.6.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.10.0.tgz#41b0b4d2dd75e919d5b6f37bf139e29f445db04e" + integrity sha512-0IXoaAFtFc8Yin7cCdQfB9ZmjafrbP6BO0f0KT/khMhXKUpoJ6yShrVhiNpyRBo8QQjuOagsWzwSK2H49I7sbw== -webcrypto-core@^1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.7.tgz#06f24b3498463e570fed64d7cab149e5437b162c" - integrity sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g== +web3-utils@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.3.3.tgz#e380a1c03a050d3704f94bd08c1c9f50a1487205" + integrity sha512-kZUeCwaQm+RNc2Bf1V3BYbF29lQQKz28L0y+FA4G0lS8IxtJVGi5SeDTUkpwqqkdHHC7JcapPDnyyzJ1lfWlOw== dependencies: - "@peculiar/asn1-schema" "^2.3.6" - "@peculiar/json-schema" "^1.1.12" - asn1js "^3.0.1" - pvtsutils "^1.3.2" - tslib "^2.4.0" + ethereum-cryptography "^2.0.0" + eventemitter3 "^5.0.1" + web3-errors "^1.3.1" + web3-types "^1.10.0" + web3-validator "^2.0.6" + +web3-validator@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/web3-validator/-/web3-validator-2.0.6.tgz#a0cdaa39e1d1708ece5fae155b034e29d6a19248" + integrity sha512-qn9id0/l1bWmvH4XfnG/JtGKKwut2Vokl6YXP5Kfg424npysmtRLe9DgiNBM9Op7QL/aSiaA0TVXibuIuWcizg== + dependencies: + ethereum-cryptography "^2.0.0" + util "^0.12.5" + web3-errors "^1.2.0" + web3-types "^1.6.0" + zod "^3.21.4" webidl-conversions@^3.0.0: version "3.0.1" @@ -6350,6 +6466,26 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +wherearewe@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wherearewe/-/wherearewe-2.0.1.tgz#37c97a7bf112dca8db34bfefb2f6c997af312bb8" + integrity sha512-XUguZbDxCA2wBn2LoFtcEhXL6AXo+hVjGonwhSTTTU9SzbWG8Xu3onNIpzf9j/mYUcJQ0f+m37SzG77G851uFw== + dependencies: + is-electron "^2.2.0" + +which-typed-array@^1.1.16, which-typed-array@^1.1.2: + version "1.1.19" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.19.tgz#df03842e870b6b88e117524a4b364b6fc689f956" + integrity sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -6357,13 +6493,6 @@ which@2.0.2, which@^2.0.1: dependencies: isexe "^2.0.0" -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - widest-line@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" @@ -6403,7 +6532,16 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -wrap-ansi@^6.0.1: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== @@ -6421,6 +6559,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -6431,11 +6578,16 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== -ws@^7.4.5, ws@^7.4.6: +ws@^7.4.6: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -6456,11 +6608,21 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@1.10.2, yaml@^1.10.0, yaml@^1.10.2: +yaml@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.0.tgz#aef9bb617a64c937a9a748803786ad8d3ffe1e98" + integrity sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA== + +yaml@^1.10.0, yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.2.2: + version "2.7.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.1.tgz#44a247d1b88523855679ac7fa7cda6ed7e135cf6" + integrity sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ== + yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -6501,10 +6663,20 @@ yargs@16.2.0: yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmmirror.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +yoctocolors-cjs@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz#f4b905a840a37506813a7acaa28febe97767a242" + integrity sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA== + +zod@^3.21.4: + version "3.24.4" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.4.tgz#e2e2cca5faaa012d76e527d0d36622e0a90c315f" + integrity sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg== From 95eea54063414cb7ef06525b0991f7a5c636d71c Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 14 May 2025 22:52:57 -0300 Subject: [PATCH 60/79] fix: downgrade graph-ts to fix heap memory issues --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 55108d42..73651b85 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@graphprotocol/contracts": "6.2.0", "@graphprotocol/graph-cli": "0.97.0", - "@graphprotocol/graph-ts": "0.38.0", + "@graphprotocol/graph-ts": "0.36.0", "@types/node": "^14.0.13", "@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/parser": "^3.3.0", diff --git a/yarn.lock b/yarn.lock index 6c1777c5..d438ef19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -606,10 +606,10 @@ web3-eth-abi "4.4.1" yaml "2.7.0" -"@graphprotocol/graph-ts@0.32.0": - version "0.32.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.32.0.tgz#36f8cd8e4ef42c3c32536cceb9995ab990f51d29" - integrity sha512-YfKLT2w+ItXD/VPYQiAKtINQONVsAOkcqVFMHlhUy0fcEBVWuFBT53hJNI0/l5ujQa4TSxtzrKW/7EABAdgI8g== +"@graphprotocol/graph-ts@0.36.0": + version "0.36.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.36.0.tgz#68ed937806bc7b2f8fe0ae2e15447255144f6a41" + integrity sha512-yJNQK5YZWEThuawSboQQ+U4Fb2C78KBjmaoeOK7Nn0CFoChmHc+woRvW3yj+IKVSPc7JNHt4JSUHxVDJfUZbTA== dependencies: assemblyscript "0.19.10" From 70decf1fcfa16c966a974ad804bb071ca4fd5d3d Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Fri, 16 May 2025 12:49:22 -0300 Subject: [PATCH 61/79] fix: tests and disabled hosted service deploy scripts --- .../deploy-goerli-arbitrum-subgraph.yml | 20 ---- .github/workflows/deploy-goerli-subgraph.yml | 20 ---- .../deploy-production-arbitrum-subgraph.yaml | 20 ---- .../workflows/deploy-production-subgraph.yaml | 20 ---- .../deploy-sepolia-arbitrum-subgraph.yml | 20 ---- .github/workflows/deploy-sepolia-subgraph.yml | 20 ---- .../deploy-staging-arbitrum-subgraph.yaml | 20 ---- .../workflows/deploy-staging-subgraph.yaml | 20 ---- .github/workflows/template-deploy.yaml | 92 ------------------- .github/workflows/tests-l1.yaml | 4 +- .github/workflows/tests-l2.yaml | 4 +- 11 files changed, 4 insertions(+), 256 deletions(-) delete mode 100644 .github/workflows/deploy-goerli-arbitrum-subgraph.yml delete mode 100644 .github/workflows/deploy-goerli-subgraph.yml delete mode 100644 .github/workflows/deploy-production-arbitrum-subgraph.yaml delete mode 100644 .github/workflows/deploy-production-subgraph.yaml delete mode 100644 .github/workflows/deploy-sepolia-arbitrum-subgraph.yml delete mode 100644 .github/workflows/deploy-sepolia-subgraph.yml delete mode 100644 .github/workflows/deploy-staging-arbitrum-subgraph.yaml delete mode 100644 .github/workflows/deploy-staging-subgraph.yaml delete mode 100644 .github/workflows/template-deploy.yaml diff --git a/.github/workflows/deploy-goerli-arbitrum-subgraph.yml b/.github/workflows/deploy-goerli-arbitrum-subgraph.yml deleted file mode 100644 index 301159ab..00000000 --- a/.github/workflows/deploy-goerli-arbitrum-subgraph.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Production Subgraph (Arbitrum Goerli) - -on: - push: - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: production-arbitrum-goerli - CONFIG: arbitrumGoerliAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-goerli-subgraph.yml b/.github/workflows/deploy-goerli-subgraph.yml deleted file mode 100644 index 3a4648d6..00000000 --- a/.github/workflows/deploy-goerli-subgraph.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Production Subgraph (Goerli) - -on: - push: - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: production-goerli - CONFIG: goerliAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-production-arbitrum-subgraph.yaml b/.github/workflows/deploy-production-arbitrum-subgraph.yaml deleted file mode 100644 index d1e2ba53..00000000 --- a/.github/workflows/deploy-production-arbitrum-subgraph.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Production Subgraph (Arbitrum) - -on: - push: - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: production-arbitrum - CONFIG: mainnetArbitrumAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-production-subgraph.yaml b/.github/workflows/deploy-production-subgraph.yaml deleted file mode 100644 index f3fc399d..00000000 --- a/.github/workflows/deploy-production-subgraph.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Production Subgraph (Mainnet) - -on: - push: - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: production - CONFIG: mainnetAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-sepolia-arbitrum-subgraph.yml b/.github/workflows/deploy-sepolia-arbitrum-subgraph.yml deleted file mode 100644 index 2d5a2c5c..00000000 --- a/.github/workflows/deploy-sepolia-arbitrum-subgraph.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Production Subgraph (Arbitrum Sepolia) - -on: - push: - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: production-arbitrum-sepolia - CONFIG: arbitrumSepoliaAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-sepolia-subgraph.yml b/.github/workflows/deploy-sepolia-subgraph.yml deleted file mode 100644 index 23b72a29..00000000 --- a/.github/workflows/deploy-sepolia-subgraph.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Production Subgraph (Sepolia) - -on: - push: - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: production-sepolia - CONFIG: sepoliaAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-staging-arbitrum-subgraph.yaml b/.github/workflows/deploy-staging-arbitrum-subgraph.yaml deleted file mode 100644 index 08a39f29..00000000 --- a/.github/workflows/deploy-staging-arbitrum-subgraph.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Staging Subgraph (Arbitrum) - -on: - push: - branches: - - mainnet-staging - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: staging-arbitrum - CONFIG: mainnetArbitrumAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/deploy-staging-subgraph.yaml b/.github/workflows/deploy-staging-subgraph.yaml deleted file mode 100644 index ec35a171..00000000 --- a/.github/workflows/deploy-staging-subgraph.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Staging Subgraph (Mainnet) - -on: - push: - branches: - - mainnet-staging - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - uses: ./.github/workflows/template-deploy.yaml - with: - ENVIRONMENT: staging-mainnet - CONFIG: mainnetAddressScript.ts - secrets: - NODE_AUTH_TOKEN: ${{ secrets.graphprotocol_npm_token }} - ACCESS_TOKEN: ${{ secrets.access_token }} diff --git a/.github/workflows/template-deploy.yaml b/.github/workflows/template-deploy.yaml deleted file mode 100644 index e0a366b2..00000000 --- a/.github/workflows/template-deploy.yaml +++ /dev/null @@ -1,92 +0,0 @@ -name: Production Subgraph (Mainnet) - -on: - workflow_call: - inputs: - ENVIRONMENT: - required: false - type: string - default: 'testnet' - CONFIG: - required: true - type: string - default: mainnetAddressScript.ts - secrets: - NODE_AUTH_TOKEN: - required: true - ACCESS_TOKEN: - required: true - -jobs: - template-deploy: - runs-on: ubuntu-22.04 - - steps: - - name: Set arbitrum staging environment variables - if: ${{ inputs.ENVIRONMENT == 'staging-arbitrum' }} - run: | - echo "ENV_SUFFIX=graph-network-arbitrum-staging" >> $GITHUB_ENV - - - name: Set mainnet staging environment variables - if: ${{ inputs.ENVIRONMENT == 'staging-mainnet' }} - run: | - echo "ENV_SUFFIX=graph-network-mainnet-staging" >> $GITHUB_ENV - - - name: Set mainnet environment variables - if: ${{ inputs.ENVIRONMENT == 'production' }} - run: | - echo "ENV_SUFFIX=graph-network-mainnet" >> $GITHUB_ENV - - - name: Set arbitrum environment variables - if: ${{ inputs.ENVIRONMENT == 'production-arbitrum' }} - run: | - echo "ENV_SUFFIX=graph-network-arbitrum" >> $GITHUB_ENV - - - name: Set goerli production environment variables - if: ${{ inputs.ENVIRONMENT == 'production-goerli' }} - run: | - echo "ENV_SUFFIX=graph-network-goerli" >> $GITHUB_ENV - - - name: Set arbitrum goerli production environment variables - if: ${{ inputs.ENVIRONMENT == 'production-arbitrum-goerli' }} - run: | - echo "ENV_SUFFIX=graph-network-arbitrum-goerli" >> $GITHUB_ENV - echo "IPFS_SUFFIX=" >> $GITHUB_ENV - - - name: Set goerli production environment variables - if: ${{ inputs.ENVIRONMENT == 'production-sepolia' }} - run: | - echo "ENV_SUFFIX=graph-network-sepolia" >> $GITHUB_ENV - echo "IPFS_SUFFIX=" >> $GITHUB_ENV - - - name: Set arbitrum goerli production environment variables - if: ${{ inputs.ENVIRONMENT == 'production-arbitrum-sepolia' }} - run: | - echo "ENV_SUFFIX=graph-network-arbitrum-sepolia" >> $GITHUB_ENV - echo "IPFS_SUFFIX=" >> $GITHUB_ENV - - - name: Checkout - uses: actions/checkout@v3 - - # Install commands - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '20' - registry-url: https://registry.npmjs.org - - name: yarn add ts-node - run: yarn add ts-node - - name: yarn install - run: yarn install - env: - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} - - # Run scripts - - name: Prepare addresses ${{ inputs.ENVIRONMENT }} - run: ./node_modules/.bin/ts-node config/${{ inputs.CONFIG }} && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts - - - name: Prepare ${{ inputs.ENVIRONMENT }} - run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run codegen --output-dir src/types/ - - - name: Deploy to ${{ inputs.ENVIRONMENT }} - run: ./node_modules/@graphprotocol/graph-cli/bin/run deploy graphprotocol/${{ env.ENV_SUFFIX }} --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token ${{ secrets.ACCESS_TOKEN }} diff --git a/.github/workflows/tests-l1.yaml b/.github/workflows/tests-l1.yaml index 46319fcc..a7a8c1f8 100644 --- a/.github/workflows/tests-l1.yaml +++ b/.github/workflows/tests-l1.yaml @@ -27,6 +27,6 @@ jobs: - name: Prep addressess run: ./node_modules/.bin/ts-node config/testAddressesL1.ts && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts - name: Prep test L1 - run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run codegen --output-dir src/types/ + run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run.js codegen --output-dir src/types/ - name: Test - run: ./node_modules/@graphprotocol/graph-cli/bin/run test -v 0.6.0-rc.2 + run: ./node_modules/@graphprotocol/graph-cli/bin/run.js test -v 0.6.0-rc.2 diff --git a/.github/workflows/tests-l2.yaml b/.github/workflows/tests-l2.yaml index 99415487..e3a35d13 100644 --- a/.github/workflows/tests-l2.yaml +++ b/.github/workflows/tests-l2.yaml @@ -27,6 +27,6 @@ jobs: - name: Prep addressess run: ./node_modules/.bin/ts-node config/testAddressesL2.ts && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts - name: Prep test L2 - run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run codegen --output-dir src/types/ + run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run.js codegen --output-dir src/types/ - name: Test - run: ./node_modules/@graphprotocol/graph-cli/bin/run test -v 0.6.0-rc.2 \ No newline at end of file + run: ./node_modules/@graphprotocol/graph-cli/bin/run.js test -v 0.6.0-rc.2 \ No newline at end of file From 5a14c62f88889a4f603fc5c2ada39fc84cac3796 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Fri, 16 May 2025 12:56:04 -0300 Subject: [PATCH 62/79] feat: added isLegacy to Dispute and minor comment on schema --- schema.graphql | 4 +++- src/mappings/disputeManager.ts | 2 ++ src/mappings/horizonDisputeManager.ts | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/schema.graphql b/schema.graphql index ecc10e81..2a4539db 100644 --- a/schema.graphql +++ b/schema.graphql @@ -223,7 +223,7 @@ type GraphNetwork @entity(immutable: false) { fishermanRewardPercentage: Int! "[HORIZON]Reward to Fisherman on successful disputes. In parts per million" fishermanRewardCut: Int! - "Maximum Penalty to Indexer on successful disputes for indexing disputes. In parts per million" + "Maximum Penalty to Indexer on successful disputes for indexing disputes. Percentage of the indexer's stake snapshot (own stake plus delegated). In parts per million" maxSlashingCut: Int! # Bridge totals (Only available on L1 networks) @@ -1448,6 +1448,8 @@ type Dispute @entity(immutable: false) { fisherman: GraphAccount! "Fisherman deposit" deposit: BigInt! + "Whether this dispute was created in the legacy protocol" + isLegacy: Boolean! "Time dispute was created" createdAt: Int! diff --git a/src/mappings/disputeManager.ts b/src/mappings/disputeManager.ts index a8d1f998..624e54cc 100644 --- a/src/mappings/disputeManager.ts +++ b/src/mappings/disputeManager.ts @@ -20,6 +20,7 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { dispute.subgraphDeployment = event.params.subgraphDeploymentID.toHexString() dispute.fisherman = event.params.fisherman.toHexString() dispute.deposit = event.params.tokens + dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() dispute.status = 'Undecided' dispute.tokensSlashed = BigDecimal.fromString('0') @@ -57,6 +58,7 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.subgraphDeployment = allocation.subgraphDeployment dispute.fisherman = event.params.fisherman.toHexString() dispute.deposit = event.params.tokens + dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() dispute.status = 'Undecided' dispute.tokensSlashed = BigDecimal.fromString('0') diff --git a/src/mappings/horizonDisputeManager.ts b/src/mappings/horizonDisputeManager.ts index 8140d3b0..acd6d4de 100644 --- a/src/mappings/horizonDisputeManager.ts +++ b/src/mappings/horizonDisputeManager.ts @@ -39,6 +39,7 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { dispute.subgraphDeployment = event.params.subgraphDeploymentId.toHexString() dispute.fisherman = event.params.fisherman.toHexString() dispute.deposit = event.params.tokens + dispute.isLegacy = false dispute.createdAt = event.block.timestamp.toI32() dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BIGDECIMAL_ZERO @@ -76,6 +77,7 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.subgraphDeployment = allocation.subgraphDeployment dispute.fisherman = event.params.fisherman.toHexString() dispute.deposit = event.params.tokens + dispute.isLegacy = false dispute.createdAt = event.block.timestamp.toI32() dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BigDecimal.fromString('0') From b65a99e038badf8384b330b8ad02e71bac58438e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 8 May 2025 13:45:50 -0300 Subject: [PATCH 63/79] feat: invert cuts to keep meaning consistent with pre-horizon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/helpers/helpers.ts | 29 ++++++++++++++--------------- src/mappings/horizonStaking.ts | 17 ++++++++++++++--- src/mappings/staking.ts | 13 ------------- subgraph.template.yaml | 2 -- 4 files changed, 28 insertions(+), 33 deletions(-) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 00f969e5..314d6041 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -163,13 +163,13 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): indexer.delegatedStakeRatio = BigDecimal.fromString('0') indexer.delegatorShares = BigInt.fromI32(0) indexer.delegationExchangeRate = BigDecimal.fromString('1') - indexer.indexingRewardCut = 0 + indexer.indexingRewardCut = BigInt.fromI32(1000000) indexer.indexingRewardEffectiveCut = BigDecimal.fromString('0') indexer.overDelegationDilution = BigDecimal.fromString('0') indexer.delegatorIndexingRewards = BigInt.fromI32(0) indexer.indexerIndexingRewards = BigInt.fromI32(0) indexer.delegatorQueryFees = BigInt.fromI32(0) - indexer.queryFeeCut = 0 + indexer.queryFeeCut = BigInt.fromI32(1000000) indexer.queryFeeEffectiveCut = BigDecimal.fromString('0') indexer.delegatorParameterCooldown = 0 indexer.lastDelegationParameterUpdate = 0 @@ -226,9 +226,9 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.maxVerifierCutPending = BigInt.fromI32(0) provision.thawingPeriod = BigInt.fromI32(0) provision.thawingPeriodPending = BigInt.fromI32(0) - provision.queryFeeCut = BigInt.fromI32(0) - provision.indexingFeeCut = BigInt.fromI32(0) - provision.indexingRewardsCut = BigInt.fromI32(0) + provision.queryFeeCut = BigInt.fromI32(1000000) + provision.indexingFeeCut = BigInt.fromI32(1000000) + provision.indexingRewardsCut = BigInt.fromI32(1000000) provision.indexingRewardEffectiveCut = BigInt.fromI32(0).toBigDecimal() provision.queryFeeEffectiveCut = BigInt.fromI32(0).toBigDecimal() provision.overDelegationDilution = BigInt.fromI32(0).toBigDecimal() @@ -956,17 +956,14 @@ export function calculateDelegatedStakeRatio(indexer: Indexer): BigDecimal { } export function calculateIndexingRewardEffectiveCut(indexer: Indexer): BigDecimal { - let delegatorCut = - BigInt.fromI32(1000000 - indexer.indexingRewardCut).toBigDecimal() / - BigDecimal.fromString('1000000') + let delegatorCut = indexer.indexingRewardCut.toBigDecimal() / BigDecimal.fromString('1000000') return indexer.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : BigDecimal.fromString('1') - delegatorCut / indexer.delegatedStakeRatio } export function calculateQueryFeeEffectiveCut(indexer: Indexer): BigDecimal { - let delegatorCut = - BigInt.fromI32(1000000 - indexer.queryFeeCut).toBigDecimal() / BigDecimal.fromString('1000000') + let delegatorCut = indexer.queryFeeCut.toBigDecimal() / BigDecimal.fromString('1000000') return indexer.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : BigDecimal.fromString('1') - delegatorCut / indexer.delegatedStakeRatio @@ -974,7 +971,7 @@ export function calculateQueryFeeEffectiveCut(indexer: Indexer): BigDecimal { export function calculateIndexerRewardOwnGenerationRatio(indexer: Indexer): BigDecimal { let rewardCut = - BigInt.fromI32(indexer.indexingRewardCut).toBigDecimal() / BigDecimal.fromString('1000000') + BigInt.fromI32(1000000 -indexer.indexingRewardCut).toBigDecimal() / BigDecimal.fromString('1000000') return indexer.ownStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : rewardCut / indexer.ownStakeRatio @@ -1020,7 +1017,7 @@ export function calculateDelegatedStakeRatioForProvision(provision: Provision): export function calculateIndexingRewardEffectiveCutForProvision(provision: Provision): BigDecimal { let delegatorCut = - provision.indexingRewardsCut.toBigDecimal() / + BigInt.fromI32(1000000 - provision.indexingRewardsCut).toBigDecimal() / BigDecimal.fromString('1000000') return provision.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') @@ -1029,7 +1026,8 @@ export function calculateIndexingRewardEffectiveCutForProvision(provision: Provi export function calculateQueryFeeEffectiveCutForProvision(provision: Provision): BigDecimal { let delegatorCut = - provision.queryFeeCut.toBigDecimal() / BigDecimal.fromString('1000000') + BigInt.fromI32(1000000 - provision.queryFeeCut).toBigDecimal() / + BigDecimal.fromString('1000000') return provision.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : BigDecimal.fromString('1') - delegatorCut / provision.delegatedStakeRatio @@ -1037,7 +1035,8 @@ export function calculateQueryFeeEffectiveCutForProvision(provision: Provision): export function calculateIndexerRewardOwnGenerationRatioForProvision(provision: Provision): BigDecimal { let delegatorCut = - provision.indexingRewardsCut.toBigDecimal() / BigDecimal.fromString('1000000') + BigInt.fromI32(1000000 - provision.indexingRewardsCut).toBigDecimal() / + BigDecimal.fromString('1000000') return provision.ownStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : (BigDecimal.fromString('1') - delegatorCut) / provision.ownStakeRatio @@ -1215,7 +1214,7 @@ export function batchUpdateSubgraphSignalledTokens(deployment: SubgraphDeploymen } } -export function convertBigIntSubgraphIDToBase58(bigIntRepresentation: BigInt): String { +export function convertBigIntSubgraphIDToBase58(bigIntRepresentation: BigInt): string { // Might need to unpad the BigInt since `fromUnsignedBytes` pads one byte with a zero. // Although for the events where the uint256 is provided, we probably don't need to unpad. let hexString = bigIntRepresentation.toHexString() diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 1dee16e5..63fd088f 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -218,10 +218,21 @@ export function handleOperatorSet(event: OperatorSet): void { export function handleDelegationFeeCutSet(event: DelegationFeeCutSet): void { let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) - provision.queryFeeCut = event.params.paymentType == 0 ? event.params.feeCut : provision.queryFeeCut - provision.indexingFeeCut = event.params.paymentType == 1 ? event.params.feeCut : provision.indexingFeeCut - provision.indexingRewardsCut = event.params.paymentType == 2 ? event.params.feeCut : provision.indexingRewardsCut + + // Before horizon the cuts represented how much the indexer took home. After horizon they now represent how much the delegators get + // To avoid confusion and more changes on explorer we invert the meaning here to keep it consistent. + let invertedCut = BigInt.fromI32(1_000_000).minus(event.params.feeCut) + provision.queryFeeCut = event.params.paymentType == 0 ? invertedCut : provision.queryFeeCut + provision.indexingFeeCut = event.params.paymentType == 1 ? invertedCut : provision.indexingFeeCut + provision.indexingRewardsCut = event.params.paymentType == 2 ? invertedCut : provision.indexingRewardsCut + provision = updateAdvancedProvisionMetrics(provision as Provision) provision.save() + + let indexer = Indexer.load(event.params.serviceProvider.toHexString())! + indexer.indexingRewardCut = event.params.paymentType == 2 ? invertedCut : indexer.indexingRewardCut + indexer.queryFeeCut = event.params.paymentType == 0 ? invertedCut : indexer.queryFeeCut + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer.save() } export function handleProvisionSlashed(event: ProvisionSlashed): void { diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index d77fd5d4..cd6d3b4a 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -51,19 +51,6 @@ import { } from './helpers/helpers' import { addresses } from '../../config/addresses' -export function handleDelegationParametersUpdated(event: DelegationParametersUpdated): void { - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) - indexer.indexingRewardCut = event.params.indexingRewardCut.toI32() - indexer.queryFeeCut = event.params.queryFeeCut.toI32() - indexer.delegatorParameterCooldown = event.params.cooldownBlocks.toI32() - indexer.lastDelegationParameterUpdate = ( - addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber! - ).toI32() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) - indexer.save() -} - /** * @dev handleStakeDeposited * - creates an Indexer if it is the first time they have staked diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 028f2d0f..d92aefa1 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -317,8 +317,6 @@ dataSources: - name: EpochManager file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json eventHandlers: - - event: DelegationParametersUpdated(indexed address,uint32,uint32,uint32) - handler: handleDelegationParametersUpdated - event: StakeDeposited(indexed address,uint256) handler: handleStakeDeposited - event: StakeLocked(indexed address,uint256,uint256) From 5e8c9aeeedad187762494331b7e23855415dcd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 9 May 2025 16:25:01 -0300 Subject: [PATCH 64/79] fix: use proper types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/helpers/helpers.ts | 14 +++++++------- src/mappings/horizonStaking.ts | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 314d6041..aeff96a0 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -163,13 +163,13 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): indexer.delegatedStakeRatio = BigDecimal.fromString('0') indexer.delegatorShares = BigInt.fromI32(0) indexer.delegationExchangeRate = BigDecimal.fromString('1') - indexer.indexingRewardCut = BigInt.fromI32(1000000) + indexer.indexingRewardCut = 1000000 indexer.indexingRewardEffectiveCut = BigDecimal.fromString('0') indexer.overDelegationDilution = BigDecimal.fromString('0') indexer.delegatorIndexingRewards = BigInt.fromI32(0) indexer.indexerIndexingRewards = BigInt.fromI32(0) indexer.delegatorQueryFees = BigInt.fromI32(0) - indexer.queryFeeCut = BigInt.fromI32(1000000) + indexer.queryFeeCut = 1000000 indexer.queryFeeEffectiveCut = BigDecimal.fromString('0') indexer.delegatorParameterCooldown = 0 indexer.lastDelegationParameterUpdate = 0 @@ -956,14 +956,14 @@ export function calculateDelegatedStakeRatio(indexer: Indexer): BigDecimal { } export function calculateIndexingRewardEffectiveCut(indexer: Indexer): BigDecimal { - let delegatorCut = indexer.indexingRewardCut.toBigDecimal() / BigDecimal.fromString('1000000') + let delegatorCut = BigInt.fromI32(indexer.indexingRewardCut).toBigDecimal() / BigDecimal.fromString('1000000') return indexer.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : BigDecimal.fromString('1') - delegatorCut / indexer.delegatedStakeRatio } export function calculateQueryFeeEffectiveCut(indexer: Indexer): BigDecimal { - let delegatorCut = indexer.queryFeeCut.toBigDecimal() / BigDecimal.fromString('1000000') + let delegatorCut = BigInt.fromI32(indexer.queryFeeCut).toBigDecimal() / BigDecimal.fromString('1000000') return indexer.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') : BigDecimal.fromString('1') - delegatorCut / indexer.delegatedStakeRatio @@ -1017,7 +1017,7 @@ export function calculateDelegatedStakeRatioForProvision(provision: Provision): export function calculateIndexingRewardEffectiveCutForProvision(provision: Provision): BigDecimal { let delegatorCut = - BigInt.fromI32(1000000 - provision.indexingRewardsCut).toBigDecimal() / + BigInt.fromI32(1000000).minus(provision.indexingRewardsCut).toBigDecimal() / BigDecimal.fromString('1000000') return provision.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') @@ -1026,7 +1026,7 @@ export function calculateIndexingRewardEffectiveCutForProvision(provision: Provi export function calculateQueryFeeEffectiveCutForProvision(provision: Provision): BigDecimal { let delegatorCut = - BigInt.fromI32(1000000 - provision.queryFeeCut).toBigDecimal() / + BigInt.fromI32(1000000).minus(provision.queryFeeCut).toBigDecimal() / BigDecimal.fromString('1000000') return provision.delegatedStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') @@ -1035,7 +1035,7 @@ export function calculateQueryFeeEffectiveCutForProvision(provision: Provision): export function calculateIndexerRewardOwnGenerationRatioForProvision(provision: Provision): BigDecimal { let delegatorCut = - BigInt.fromI32(1000000 - provision.indexingRewardsCut).toBigDecimal() / + BigInt.fromI32(1000000).minus(provision.indexingRewardsCut).toBigDecimal() / BigDecimal.fromString('1000000') return provision.ownStakeRatio == BigDecimal.fromString('0') ? BigDecimal.fromString('0') diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 63fd088f..2c97e792 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -229,8 +229,8 @@ export function handleDelegationFeeCutSet(event: DelegationFeeCutSet): void { provision.save() let indexer = Indexer.load(event.params.serviceProvider.toHexString())! - indexer.indexingRewardCut = event.params.paymentType == 2 ? invertedCut : indexer.indexingRewardCut - indexer.queryFeeCut = event.params.paymentType == 0 ? invertedCut : indexer.queryFeeCut + indexer.indexingRewardCut = event.params.paymentType == 2 ? invertedCut.toI32() : indexer.indexingRewardCut + indexer.queryFeeCut = event.params.paymentType == 0 ? invertedCut.toI32() : indexer.queryFeeCut indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer.save() } From 82fbc5785933ec1680882a53f7cf2c4c4faa6f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Wed, 14 May 2025 16:14:03 -0300 Subject: [PATCH 65/79] wip: some type fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- schema.graphql | 8 ++++++-- src/mappings/staking.ts | 13 +++++++++++++ subgraph.template.yaml | 2 ++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/schema.graphql b/schema.graphql index 2a4539db..06245d04 100644 --- a/schema.graphql +++ b/schema.graphql @@ -813,16 +813,20 @@ type Indexer @entity(immutable: false) { delegatorShares: BigInt! "Exchange rate of of tokens received for each share" delegationExchangeRate: BigDecimal! - "The percent of indexing rewards generated by the total stake that the Indexer keeps for itself. In parts per million" + "[Horizon only] The percent of indexing rewards generated by the total stake that the Indexer keeps for itself. In parts per million" indexingRewardCut: Int! + "The percent of indexing rewards generated by the total stake that the Indexer keeps for itself. In parts per million. This is the indexingRewardCut before Horizon" + legacyIndexingRewardCut: Int! "The percent of indexing rewards generated by the delegated stake that the Indexer keeps for itself" indexingRewardEffectiveCut: BigDecimal! "The percent of reward dilution delegators experience because of overdelegation. Overdelegated stake can't be used to generate rewards but still gets accounted while distributing the generated rewards. This causes dilution of the rewards for the rest of the pool." overDelegationDilution: BigDecimal! "The total amount of query fees given to delegators" delegatorQueryFees: BigInt! - "The percent of query rebate rewards the Indexer keeps for itself. In parts per million" + "[Horizon only] The percent of query rebate rewards generated by the total stake that the Indexer keeps for itself. In parts per million" queryFeeCut: Int! + "The percent of query rebate rewards generated by the total stake that the Indexer keeps for itself. In parts per million. This is the queryFeeCut before Horizon" + legacyQueryFeeCut: Int! "The percent of query rebate rewards generated by the delegated stake that the Indexer keeps for itself" queryFeeEffectiveCut: BigDecimal! "Amount of blocks a delegator chooses for the waiting period for changing their params" diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index cd6d3b4a..d9e2422e 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -51,6 +51,19 @@ import { } from './helpers/helpers' import { addresses } from '../../config/addresses' +export function handleDelegationParametersUpdated(event: DelegationParametersUpdated): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) + indexer.legacyIndexingRewardCut = event.params.indexingRewardCut.toI32() + indexer.legacyQueryFeeCut = event.params.queryFeeCut.toI32() + indexer.delegatorParameterCooldown = event.params.cooldownBlocks.toI32() + indexer.lastDelegationParameterUpdate = ( + addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber! + ).toI32() + indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer.save() +} + /** * @dev handleStakeDeposited * - creates an Indexer if it is the first time they have staked diff --git a/subgraph.template.yaml b/subgraph.template.yaml index d92aefa1..028f2d0f 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -317,6 +317,8 @@ dataSources: - name: EpochManager file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json eventHandlers: + - event: DelegationParametersUpdated(indexed address,uint32,uint32,uint32) + handler: handleDelegationParametersUpdated - event: StakeDeposited(indexed address,uint256) handler: handleStakeDeposited - event: StakeLocked(indexed address,uint256,uint256) From 5f0f84d70289da9da56ec8f1f2da2ccefc9bba14 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 19 May 2025 02:36:10 -0300 Subject: [PATCH 66/79] feat: refactored legacy cuts and related fields --- schema.graphql | 20 ++++++------- src/mappings/helpers/helpers.ts | 43 +++++++++++++++++++++++++--- src/mappings/l1staking.ts | 6 ++-- src/mappings/rewardsManager.ts | 6 ++-- src/mappings/staking.ts | 50 ++++++++++++++++----------------- 5 files changed, 79 insertions(+), 46 deletions(-) diff --git a/schema.graphql b/schema.graphql index 06245d04..57b5596c 100644 --- a/schema.graphql +++ b/schema.graphql @@ -769,8 +769,10 @@ type Indexer @entity(immutable: false) { indexerIndexingRewards: BigInt! "The total amount of indexing rewards given to delegators" delegatorIndexingRewards: BigInt! - "Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake" + "[Horizon only] Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake" indexerRewardsOwnGenerationRatio: BigDecimal! + "Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake. This is the indexerRewardsOwnGenerationRatio before Horizon" + legacyIndexerRewardsOwnGenerationRatio: BigDecimal! "Whether the indexer has been transferred from L1 to L2 partially or fully" transferredToL2: Boolean! "Timestamp for the FIRST L1 -> L2 Transfer" @@ -817,8 +819,10 @@ type Indexer @entity(immutable: false) { indexingRewardCut: Int! "The percent of indexing rewards generated by the total stake that the Indexer keeps for itself. In parts per million. This is the indexingRewardCut before Horizon" legacyIndexingRewardCut: Int! - "The percent of indexing rewards generated by the delegated stake that the Indexer keeps for itself" + "[Horizon only] The percent of indexing rewards generated by the delegated stake that the Indexer keeps for itself" indexingRewardEffectiveCut: BigDecimal! + "The percent of indexing rewards generated by the delegated stake that the Indexer keeps for itself. This is the indexingRewardEffectiveCut before Horizon" + legacyIndexingRewardEffectiveCut: BigDecimal! "The percent of reward dilution delegators experience because of overdelegation. Overdelegated stake can't be used to generate rewards but still gets accounted while distributing the generated rewards. This causes dilution of the rewards for the rest of the pool." overDelegationDilution: BigDecimal! "The total amount of query fees given to delegators" @@ -827,8 +831,10 @@ type Indexer @entity(immutable: false) { queryFeeCut: Int! "The percent of query rebate rewards generated by the total stake that the Indexer keeps for itself. In parts per million. This is the queryFeeCut before Horizon" legacyQueryFeeCut: Int! - "The percent of query rebate rewards generated by the delegated stake that the Indexer keeps for itself" + "[Horizon only] The percent of query rebate rewards generated by the delegated stake that the Indexer keeps for itself" queryFeeEffectiveCut: BigDecimal! + "The percent of query rebate rewards generated by the delegated stake that the Indexer keeps for itself. This is the queryFeeEffectiveCut before Horizon" + legacyQueryFeeEffectiveCut: BigDecimal! "Amount of blocks a delegator chooses for the waiting period for changing their params" delegatorParameterCooldown: Int! "Block number for the last time the delegator updated their parameters" @@ -838,14 +844,6 @@ type Indexer @entity(immutable: false) { # Provisioning provisions: [Provision!]! @derivedFrom(field: "indexer") - - # Metrics - "NOT IMPLEMENTED - Total return this indexer has earned" - totalReturn: BigDecimal! - "NOT IMPLEMENTED - Annualized rate of return for the indexer" - annualizedReturn: BigDecimal! # You must multiple by 100 to get percentage - "NOT IMPLEMENTED - Staking efficiency of the indexer" - stakingEfficiency: BigDecimal! } type PaymentSource @entity(immutable: false) { diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index aeff96a0..64412e9e 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -153,6 +153,7 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): indexer.queryFeeRebates = BigInt.fromI32(0) indexer.rewardsEarned = BigInt.fromI32(0) indexer.indexerRewardsOwnGenerationRatio = BigDecimal.fromString('0') + indexer.legacyIndexerRewardsOwnGenerationRatio = BigDecimal.fromString('0') indexer.delegatedCapacity = BigInt.fromI32(0) indexer.tokenCapacity = BigInt.fromI32(0) @@ -165,22 +166,22 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): indexer.delegationExchangeRate = BigDecimal.fromString('1') indexer.indexingRewardCut = 1000000 indexer.indexingRewardEffectiveCut = BigDecimal.fromString('0') + indexer.legacyIndexingRewardCut = 0 + indexer.legacyIndexingRewardEffectiveCut = BigDecimal.fromString('0') indexer.overDelegationDilution = BigDecimal.fromString('0') indexer.delegatorIndexingRewards = BigInt.fromI32(0) indexer.indexerIndexingRewards = BigInt.fromI32(0) indexer.delegatorQueryFees = BigInt.fromI32(0) indexer.queryFeeCut = 1000000 indexer.queryFeeEffectiveCut = BigDecimal.fromString('0') + indexer.legacyQueryFeeCut = 0 + indexer.legacyQueryFeeEffectiveCut = BigDecimal.fromString('0') indexer.delegatorParameterCooldown = 0 indexer.lastDelegationParameterUpdate = 0 indexer.forcedClosures = 0 indexer.allocationCount = 0 indexer.totalAllocationCount = BigInt.fromI32(0) - indexer.totalReturn = BigDecimal.fromString('0') - indexer.annualizedReturn = BigDecimal.fromString('0') - indexer.stakingEfficiency = BigDecimal.fromString('0') - indexer.url = '' indexer.geoHash = '' indexer.rewardsDestination = Address.fromString('0x0000000000000000000000000000000000000000') @@ -977,6 +978,28 @@ export function calculateIndexerRewardOwnGenerationRatio(indexer: Indexer): BigD : rewardCut / indexer.ownStakeRatio } +export function calculateLegacyIndexingRewardEffectiveCut(indexer: Indexer): BigDecimal { + let delegatorCut = BigInt.fromI32(indexer.legacyIndexingRewardCut).toBigDecimal() / BigDecimal.fromString('1000000') + return indexer.delegatedStakeRatio == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : BigDecimal.fromString('1') - delegatorCut / indexer.delegatedStakeRatio +} + +export function calculateLegacyQueryFeeEffectiveCut(indexer: Indexer): BigDecimal { + let delegatorCut = BigInt.fromI32(indexer.legacyQueryFeeCut).toBigDecimal() / BigDecimal.fromString('1000000') + return indexer.delegatedStakeRatio == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : BigDecimal.fromString('1') - delegatorCut / indexer.delegatedStakeRatio +} + +export function calculateLegacyIndexerRewardOwnGenerationRatio(indexer: Indexer): BigDecimal { + let rewardCut = + BigInt.fromI32(1000000 - indexer.legacyIndexingRewardCut).toBigDecimal() / BigDecimal.fromString('1000000') + return indexer.ownStakeRatio == BigDecimal.fromString('0') + ? BigDecimal.fromString('0') + : rewardCut / indexer.ownStakeRatio +} + export function calculateOverdelegationDilution(indexer: Indexer): BigDecimal { let stakedTokensBD = indexer.stakedTokens.toBigDecimal() let delegatedTokensBD = indexer.delegatedTokens.toBigDecimal() @@ -1001,6 +1024,18 @@ export function updateAdvancedIndexerMetrics(indexer: Indexer): Indexer { return indexer as Indexer } +export function updateLegacyAdvancedIndexerMetrics(indexer: Indexer): Indexer { + indexer.ownStakeRatio = calculateOwnStakeRatio(indexer as Indexer) + indexer.delegatedStakeRatio = calculateDelegatedStakeRatio(indexer as Indexer) + indexer.legacyIndexingRewardEffectiveCut = calculateLegacyIndexingRewardEffectiveCut(indexer as Indexer) + indexer.legacyQueryFeeEffectiveCut = calculateLegacyQueryFeeEffectiveCut(indexer as Indexer) + indexer.legacyIndexerRewardsOwnGenerationRatio = calculateLegacyIndexerRewardOwnGenerationRatio( + indexer as Indexer, + ) + indexer.overDelegationDilution = calculateOverdelegationDilution(indexer as Indexer) + return indexer as Indexer +} + export function calculateOwnStakeRatioForProvision(provision: Provision): BigDecimal { let totalTokens = provision.tokensProvisioned.plus(provision.delegatedTokens) return totalTokens == BigInt.fromI32(0) diff --git a/src/mappings/l1staking.ts b/src/mappings/l1staking.ts index 2a4589fd..00190b23 100644 --- a/src/mappings/l1staking.ts +++ b/src/mappings/l1staking.ts @@ -6,7 +6,7 @@ import { } from '../types/L1Staking/L1Staking' import { Indexer, DelegatedStake, GraphNetwork } from '../types/schema' -import { calculateCapacities, createOrLoadGraphNetwork, joinID, updateAdvancedIndexerMetrics, updateDelegationExchangeRate } from './helpers/helpers' +import { calculateCapacities, createOrLoadGraphNetwork, joinID, updateLegacyAdvancedIndexerMetrics, updateDelegationExchangeRate } from './helpers/helpers' /* /// @dev Emitted when an indexer transfers their stake to L2. @@ -34,7 +34,7 @@ export function handleIndexerStakeTransferredToL2(event: IndexerStakeTransferred indexer.lastTransferredToL2At = event.block.timestamp indexer.lastTransferredToL2AtBlockNumber = event.block.number indexer.lastTransferredToL2AtTx = event.transaction.hash.toHexString() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -84,7 +84,7 @@ export function handleDelegationTransferredToL2(event: DelegationTransferredToL2 if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() diff --git a/src/mappings/rewardsManager.ts b/src/mappings/rewardsManager.ts index 443b127d..2bbff6d5 100644 --- a/src/mappings/rewardsManager.ts +++ b/src/mappings/rewardsManager.ts @@ -9,7 +9,7 @@ import { import { createOrLoadSubgraphDeployment, createOrLoadEpoch, - updateAdvancedIndexerMetrics, + updateLegacyAdvancedIndexerMetrics, updateDelegationExchangeRate, createOrLoadGraphNetwork } from './helpers/helpers' @@ -28,7 +28,7 @@ export function handleRewardsAssigned(event: RewardsAssigned): void { indexer.delegatedTokens == BigInt.fromI32(0) ? event.params.amount : event.params.amount - .times(BigInt.fromI32(indexer.indexingRewardCut)) + .times(BigInt.fromI32(indexer.legacyIndexingRewardCut)) .div(BigInt.fromI32(1000000)) let delegatorIndexingRewards = event.params.amount.minus(indexerIndexingRewards) @@ -40,7 +40,7 @@ export function handleRewardsAssigned(event: RewardsAssigned): void { if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer.save() // update allocation diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index d9e2422e..8e612f7d 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -40,7 +40,7 @@ import { createOrLoadDelegator, createOrLoadDelegatedStake, createOrLoadGraphAccount, - updateAdvancedIndexerMetrics, + updateLegacyAdvancedIndexerMetrics, updateDelegationExchangeRate, calculatePricePerShare, batchUpdateSubgraphSignalledTokens, @@ -60,7 +60,7 @@ export function handleDelegationParametersUpdated(event: DelegationParametersUpd indexer.lastDelegationParameterUpdate = ( addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber! ).toI32() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer.save() } @@ -76,7 +76,7 @@ export function handleStakeDeposited(event: StakeDeposited): void { let indexer = createOrLoadLegacyIndexer(event.params.indexer, event.block.timestamp) let previousStake = indexer.stakedTokens indexer.stakedTokens = indexer.stakedTokens.plus(event.params.tokens) - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -108,7 +108,7 @@ export function handleStakeLocked(event: StakeLocked): void { let indexer = Indexer.load(id)! indexer.lockedTokens = event.params.tokens indexer.tokensLockedUntil = event.params.until.toI32() - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -135,7 +135,7 @@ export function handleStakeWithdrawn(event: StakeWithdrawn): void { indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) indexer.lockedTokens = indexer.lockedTokens.minus(event.params.tokens) indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -164,7 +164,7 @@ export function handleStakeSlashed(event: StakeSlashed): void { let staking = Staking.bind(event.address) let indexerStored = staking.stakes(event.params.indexer) indexer.lockedTokens = indexerStored.tokensLocked - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -184,7 +184,7 @@ export function handleStakeDelegated(event: StakeDelegated): void { if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -253,7 +253,7 @@ export function handleStakeDelegatedLocked(event: StakeDelegatedLocked): void { if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -330,7 +330,7 @@ export function handleAllocationCreated(event: AllocationCreated): void { indexer.allocatedTokens = indexer.allocatedTokens.plus(event.params.tokens) indexer.totalAllocationCount = indexer.totalAllocationCount.plus(BigInt.fromI32(1)) indexer.allocationCount = indexer.allocationCount + 1 - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -370,10 +370,10 @@ export function handleAllocationCreated(event: AllocationCreated): void { allocation.totalReturn = BigDecimal.fromString('0') allocation.annualizedReturn = BigDecimal.fromString('0') allocation.createdAt = event.block.timestamp.toI32() - allocation.indexingRewardCutAtStart = indexer.indexingRewardCut - allocation.indexingRewardEffectiveCutAtStart = indexer.indexingRewardEffectiveCut - allocation.queryFeeCutAtStart = indexer.queryFeeCut - allocation.queryFeeEffectiveCutAtStart = indexer.queryFeeEffectiveCut + allocation.indexingRewardCutAtStart = indexer.legacyIndexingRewardCut + allocation.indexingRewardEffectiveCutAtStart = indexer.legacyIndexingRewardEffectiveCut + allocation.queryFeeCutAtStart = indexer.legacyQueryFeeCut + allocation.queryFeeEffectiveCutAtStart = indexer.legacyQueryFeeEffectiveCut allocation.isLegacy = true allocation.save() } @@ -507,7 +507,7 @@ export function handleAllocationClosed(event: AllocationClosed): void { } indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) indexer.allocationCount = indexer.allocationCount - 1 - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -522,10 +522,10 @@ export function handleAllocationClosed(event: AllocationClosed): void { allocation.status = 'Closed' allocation.closedAt = event.block.timestamp.toI32() allocation.poi = event.params.poi - allocation.indexingRewardCutAtClose = indexer.indexingRewardCut - allocation.indexingRewardEffectiveCutAtClose = indexer.indexingRewardEffectiveCut - allocation.queryFeeCutAtClose = indexer.queryFeeCut - allocation.queryFeeEffectiveCutAtClose = indexer.queryFeeEffectiveCut + allocation.indexingRewardCutAtClose = indexer.legacyIndexingRewardCut + allocation.indexingRewardEffectiveCutAtClose = indexer.legacyIndexingRewardEffectiveCut + allocation.queryFeeCutAtClose = indexer.legacyQueryFeeCut + allocation.queryFeeEffectiveCutAtClose = indexer.legacyQueryFeeEffectiveCut allocation.save() // update epoch - We do it here to have more epochs created, instead of seeing none created @@ -578,7 +578,7 @@ export function handleAllocationClosedCobbDouglas(event: AllocationClosed1): voi } indexer.allocatedTokens = indexer.allocatedTokens.minus(event.params.tokens) indexer.allocationCount = indexer.allocationCount - 1 - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -594,10 +594,10 @@ export function handleAllocationClosedCobbDouglas(event: AllocationClosed1): voi allocation.status = 'Closed' allocation.closedAt = event.block.timestamp.toI32() allocation.poi = event.params.poi - allocation.indexingRewardCutAtClose = indexer.indexingRewardCut - allocation.indexingRewardEffectiveCutAtClose = indexer.indexingRewardEffectiveCut - allocation.queryFeeCutAtClose = indexer.queryFeeCut - allocation.queryFeeEffectiveCutAtClose = indexer.queryFeeEffectiveCut + allocation.indexingRewardCutAtClose = indexer.legacyIndexingRewardCut + allocation.indexingRewardEffectiveCutAtClose = indexer.legacyIndexingRewardEffectiveCut + allocation.queryFeeCutAtClose = indexer.legacyQueryFeeCut + allocation.queryFeeEffectiveCutAtClose = indexer.legacyQueryFeeEffectiveCut allocation.save() // update epoch - We do it here to have more epochs created, instead of seeing none created @@ -656,7 +656,7 @@ export function handleRebateClaimed(event: RebateClaimed): void { if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer.save() // update allocation let allocation = Allocation.load(allocationID)! @@ -721,7 +721,7 @@ export function handleRebateCollected(event: RebateCollected): void { if (indexer.delegatorShares != BigInt.fromI32(0)) { indexer = updateDelegationExchangeRate(indexer as Indexer) } - indexer = updateAdvancedIndexerMetrics(indexer as Indexer) + indexer = updateLegacyAdvancedIndexerMetrics(indexer as Indexer) indexer.save() // Replicate for payment source specific aggregation From c4fd75448da2ba33d0fe7f764041fe80114307a5 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 19 May 2025 02:42:03 -0300 Subject: [PATCH 67/79] fix: broken tests --- tests/helpers.test.ts | 2 +- tests/staking.test.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/helpers.test.ts b/tests/helpers.test.ts index 5e313c0e..4c4ddf28 100644 --- a/tests/helpers.test.ts +++ b/tests/helpers.test.ts @@ -46,5 +46,5 @@ test('createOrLoadGraphAccount creates a new graph account', () => { test('createOrLoadIndexer creates a new indexer', () => { createOrLoadIndexer(Bytes.fromHexString(indexerID), BigInt.fromI32(1)) assert.fieldEquals('Indexer', indexerID, 'stakedTokens', '0') - assert.fieldEquals('Indexer', indexerID, 'indexingRewardCut', '0') + assert.fieldEquals('Indexer', indexerID, 'legacyIndexingRewardCut', '0') }) diff --git a/tests/staking.test.ts b/tests/staking.test.ts index 3f345274..ff3942e6 100644 --- a/tests/staking.test.ts +++ b/tests/staking.test.ts @@ -141,12 +141,12 @@ describe('INDEXER STAKE', () => { cooldownBlocks, ) handleDelegationParametersUpdated(event) - assert.fieldEquals('Indexer', indexerID, 'queryFeeCut', queryFeeCut.toString()) + assert.fieldEquals('Indexer', indexerID, 'legacyQueryFeeCut', queryFeeCut.toString()) }) test('assigns the right values to params', () => { - assert.fieldEquals('Indexer', indexerID, 'indexingRewardCut', indexingRewardCut.toString()) - assert.fieldEquals('Indexer', indexerID, 'queryFeeCut', queryFeeCut.toString()) + assert.fieldEquals('Indexer', indexerID, 'legacyIndexingRewardCut', indexingRewardCut.toString()) + assert.fieldEquals('Indexer', indexerID, 'legacyQueryFeeCut', queryFeeCut.toString()) assert.fieldEquals( 'Indexer', indexerID, @@ -163,8 +163,8 @@ describe('INDEXER STAKE', () => { cooldownBlocks2, ) handleDelegationParametersUpdated(event) - assert.fieldEquals('Indexer', indexerID, 'indexingRewardCut', indexingRewardCut2.toString()) - assert.fieldEquals('Indexer', indexerID, 'queryFeeCut', queryFeeCut2.toString()) + assert.fieldEquals('Indexer', indexerID, 'legacyIndexingRewardCut', indexingRewardCut2.toString()) + assert.fieldEquals('Indexer', indexerID, 'legacyQueryFeeCut', queryFeeCut2.toString()) assert.fieldEquals( 'Indexer', indexerID, From 9ffbedd1e02c5b9a7afe7ab67f3ed450b8b90597 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 19 May 2025 02:52:19 -0300 Subject: [PATCH 68/79] feat: added DisputePeriodSet handler --- schema.graphql | 2 ++ src/mappings/horizonDisputeManager.ts | 8 ++++++++ subgraph.template.yaml | 2 ++ 3 files changed, 12 insertions(+) diff --git a/schema.graphql b/schema.graphql index 2a4539db..891d672b 100644 --- a/schema.graphql +++ b/schema.graphql @@ -225,6 +225,8 @@ type GraphNetwork @entity(immutable: false) { fishermanRewardCut: Int! "Maximum Penalty to Indexer on successful disputes for indexing disputes. Percentage of the indexer's stake snapshot (own stake plus delegated). In parts per million" maxSlashingCut: Int! + "Dispute period in seconds" + disputePeriod: BigInt! # Bridge totals (Only available on L1 networks) "Total amount of GRT deposited to the L1 gateway. Note that the actual amount claimed in L2 might be lower due to tickets not redeemed." diff --git a/src/mappings/horizonDisputeManager.ts b/src/mappings/horizonDisputeManager.ts index acd6d4de..6fdd3b70 100644 --- a/src/mappings/horizonDisputeManager.ts +++ b/src/mappings/horizonDisputeManager.ts @@ -11,6 +11,7 @@ import { FishermanRewardCutSet, MaxSlashingCutSet, DisputeCancelled, + DisputePeriodSet, } from '../types/HorizonDisputeManager/HorizonDisputeManager' import { createOrLoadGraphNetwork } from './helpers/helpers' @@ -195,3 +196,10 @@ export function handleMaxSlashingCutSet(event: MaxSlashingCutSet): void { graphNetwork.save() } +// Handles DisputePeriodSet events +export function handleDisputePeriodSet(event: DisputePeriodSet): void { + let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + graphNetwork.disputePeriod = event.params.disputePeriod + graphNetwork.save() +} + diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 028f2d0f..4c76d02d 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -562,6 +562,8 @@ dataSources: handler: handleFishermanRewardCutSet - event: MaxSlashingCutSet(uint32) handler: handleMaxSlashingCutSet + - event: DisputePeriodSet(uint64) + handler: handleDisputePeriodSet - kind: ethereum/contract name: Curation network: {{network}} From 21739315be5a5acd87bd6d6c50d996ac3320122d Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 19 May 2025 03:00:28 -0300 Subject: [PATCH 69/79] fix: missing init --- src/mappings/helpers/helpers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 00f969e5..d11a7a65 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -776,6 +776,7 @@ export function createOrLoadGraphNetwork( graphNetwork.fishermanRewardPercentage = 0 graphNetwork.fishermanRewardCut = 0 graphNetwork.maxSlashingCut = 0 + graphNetwork.disputePeriod = BigInt.fromI32(0) graphNetwork.totalGRTDeposited = BigInt.fromI32(0) graphNetwork.totalGRTDepositedConfirmed = BigInt.fromI32(0) From 586d0a79d36c9d5ecdb361737935ad90a6710195 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 19 May 2025 03:07:08 -0300 Subject: [PATCH 70/79] feat: added legacy fields for locked tokens and lockedUntil --- schema.graphql | 8 ++++++++ src/mappings/helpers/helpers.ts | 4 ++++ src/mappings/l1staking.ts | 1 + src/mappings/staking.ts | 9 +++++++++ 4 files changed, 22 insertions(+) diff --git a/schema.graphql b/schema.graphql index 2a4539db..16808fb9 100644 --- a/schema.graphql +++ b/schema.graphql @@ -751,6 +751,10 @@ type Indexer @entity(immutable: false) { lockedTokens: BigInt! "The block when the Indexers tokens unlock" tokensLockedUntil: Int! + "[Legacy only] CURRENT tokens locked" + legacyLockedTokens: BigInt! + "[Legacy only] The block when the Indexers tokens unlock" + legacyTokensLockedUntil: Int! "Active allocations of stake for this Indexer" allocations: [Allocation!]! @derivedFrom(field: "activeForIndexer") "All allocations of stake for this Indexer (i.e. closed and active)" @@ -1226,6 +1230,10 @@ type DelegatedStake @entity(immutable: false) { lockedTokens: BigInt! "Epoch the locked tokens get unlocked" lockedUntil: Int! + "[Legacy only] CURRENT tokens locked" + legacyLockedTokens: BigInt! + "[Legacy only] Epoch the locked tokens get unlocked" + legacyLockedUntil: Int! "Shares owned in the delegator pool. Used to calculate total amount delegated" shareAmount: BigInt! "The rate this delegator paid for their shares (calculated using average cost basis). Used for rewards calculations" diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 00f969e5..dcff04aa 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -147,8 +147,10 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): indexer.thawingTokens = BigInt.fromI32(0) indexer.allocatedTokens = BigInt.fromI32(0) indexer.lockedTokens = BigInt.fromI32(0) + indexer.legacyLockedTokens = BigInt.fromI32(0) indexer.unstakedTokens = BigInt.fromI32(0) indexer.tokensLockedUntil = 0 + indexer.legacyTokensLockedUntil = 0 indexer.queryFeesCollected = BigInt.fromI32(0) indexer.queryFeeRebates = BigInt.fromI32(0) indexer.rewardsEarned = BigInt.fromI32(0) @@ -373,6 +375,8 @@ export function createOrLoadDelegatedStake( delegatedStake.unstakedTokens = BigInt.fromI32(0) delegatedStake.lockedTokens = BigInt.fromI32(0) delegatedStake.lockedUntil = 0 + delegatedStake.legacyLockedTokens = BigInt.fromI32(0) + delegatedStake.legacyLockedUntil = 0 delegatedStake.shareAmount = BigInt.fromI32(0) delegatedStake.personalExchangeRate = BigDecimal.fromString('1') delegatedStake.realizedRewards = BigDecimal.fromString('0') diff --git a/src/mappings/l1staking.ts b/src/mappings/l1staking.ts index 2a4589fd..618d6ed7 100644 --- a/src/mappings/l1staking.ts +++ b/src/mappings/l1staking.ts @@ -110,5 +110,6 @@ export function handleStakeDelegatedUnlockedDueToL2Transfer( ]) let delegation = DelegatedStake.load(delegationID)! delegation.lockedUntil = graphNetwork.currentEpoch + delegation.legacyLockedUntil = graphNetwork.currentEpoch delegation.save() } diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index d77fd5d4..5a418ec7 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -108,6 +108,8 @@ export function handleStakeLocked(event: StakeLocked): void { let indexer = Indexer.load(id)! indexer.lockedTokens = event.params.tokens indexer.tokensLockedUntil = event.params.until.toI32() + indexer.legacyLockedTokens = event.params.tokens + indexer.legacyTokensLockedUntil = event.params.until.toI32() indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -135,6 +137,8 @@ export function handleStakeWithdrawn(event: StakeWithdrawn): void { indexer.stakedTokens = indexer.stakedTokens.minus(event.params.tokens) indexer.lockedTokens = indexer.lockedTokens.minus(event.params.tokens) indexer.tokensLockedUntil = 0 // always set to 0 when withdrawn + indexer.legacyLockedTokens = indexer.legacyLockedTokens.minus(event.params.tokens) + indexer.legacyTokensLockedUntil = 0 // always set to 0 when withdrawn indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -164,6 +168,7 @@ export function handleStakeSlashed(event: StakeSlashed): void { let staking = Staking.bind(event.address) let indexerStored = staking.stakes(event.params.indexer) indexer.lockedTokens = indexerStored.tokensLocked + indexer.legacyLockedTokens = indexerStored.tokensLocked indexer = updateAdvancedIndexerMetrics(indexer as Indexer) indexer = calculateCapacities(indexer as Indexer) indexer.save() @@ -268,7 +273,9 @@ export function handleStakeDelegatedLocked(event: StakeDelegatedLocked): void { delegatedStake.unstakedTokens = delegatedStake.unstakedTokens.plus(event.params.tokens) delegatedStake.shareAmount = delegatedStake.shareAmount.minus(event.params.shares) delegatedStake.lockedTokens = delegatedStake.lockedTokens.plus(event.params.tokens) + delegatedStake.legacyLockedTokens = delegatedStake.legacyLockedTokens.plus(event.params.tokens) delegatedStake.lockedUntil = event.params.until.toI32() // until always updates and overwrites the past lockedUntil time + delegatedStake.legacyLockedUntil = event.params.until.toI32() // until always updates and overwrites the past lockedUntil time delegatedStake.lastUndelegatedAt = event.block.timestamp.toI32() let currentBalance = event.params.shares.toBigDecimal().times(beforeUpdateDelegationExchangeRate) @@ -306,7 +313,9 @@ export function handleStakeDelegatedWithdrawn(event: StakeDelegatedWithdrawn): v let id = joinID([delegatorID, indexerID]) let delegatedStake = DelegatedStake.load(id)! delegatedStake.lockedTokens = BigInt.fromI32(0) + delegatedStake.legacyLockedTokens = BigInt.fromI32(0) delegatedStake.lockedUntil = 0 + delegatedStake.legacyLockedUntil = 0 delegatedStake.save() } From 09af3d09056cc03fcba0fbe42f8115eba6e78055 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Mon, 19 May 2025 03:15:34 -0300 Subject: [PATCH 71/79] feat: adding latest value for thawingUntil on Indexer and Provision --- schema.graphql | 4 ++++ src/mappings/helpers/helpers.ts | 2 ++ src/mappings/horizonStaking.ts | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/schema.graphql b/schema.graphql index 2a4539db..3edc0e58 100644 --- a/schema.graphql +++ b/schema.graphql @@ -831,6 +831,8 @@ type Indexer @entity(immutable: false) { lastDelegationParameterUpdate: Int! "Count of how many times this indexer has been forced to close an allocation" forcedClosures: Int! + "[Horizon only] Latest value for thaw request thawingUntil" + thawingUntil: BigInt! # Provisioning provisions: [Provision!]! @derivedFrom(field: "indexer") @@ -996,6 +998,8 @@ type Provision @entity(immutable: false) { delegatedStakeRatio: BigDecimal! "Percentage of indexers' own rewards received in relation to its own stake. 1 (100%) means that the indexer is receiving the exact amount that is generated by his own stake, the value can be over 100% or below depending on the amount of delegation and cuts set" indexerRewardsOwnGenerationRatio: BigDecimal! + "Latest value for thaw request thawingUntil" + thawingUntil: BigInt! "Service registry URL for the indexer" url: String diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index 00f969e5..4715b95b 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -176,6 +176,7 @@ export function createOrLoadIndexer(indexerAddress: Bytes, timestamp: BigInt ): indexer.forcedClosures = 0 indexer.allocationCount = 0 indexer.totalAllocationCount = BigInt.fromI32(0) + indexer.thawingUntil = BigInt.fromI32(0) indexer.totalReturn = BigDecimal.fromString('0') indexer.annualizedReturn = BigDecimal.fromString('0') @@ -241,6 +242,7 @@ export function createOrLoadProvision(indexerAddress: Bytes, verifierAddress: By provision.delegatedTokens = BigInt.fromI32(0) provision.delegatorShares = BigInt.fromI32(0) provision.delegationExchangeRate = BigInt.fromI32(0).toBigDecimal() + provision.thawingUntil = BigInt.fromI32(0) provision.ownStakeRatio = BigInt.fromI32(0).toBigDecimal() provision.delegatedStakeRatio = BigInt.fromI32(0).toBigDecimal() provision.indexerRewardsOwnGenerationRatio = BigInt.fromI32(0).toBigDecimal() diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index 1dee16e5..eb788286 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -270,6 +270,14 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { throw new Error("Invalid thaw request type") } request.save() + + // update latest thawingUntil for provision and indexer + let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) + provision.thawingUntil = event.params.thawingUntil + provision.save() + + indexer.thawingUntil = event.params.thawingUntil + indexer.save() } export function handleThawRequestFulfilled(event: ThawRequestFulfilled): void { From 7c3c215438feb77645f998b4ab579061966b4950 Mon Sep 17 00:00:00 2001 From: Juan Manuel Rodriguez Defago Date: Wed, 21 May 2025 11:12:29 -0300 Subject: [PATCH 72/79] feat: ensure thawingUntil value is actually the max value --- src/mappings/horizonStaking.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mappings/horizonStaking.ts b/src/mappings/horizonStaking.ts index eb788286..cca79653 100644 --- a/src/mappings/horizonStaking.ts +++ b/src/mappings/horizonStaking.ts @@ -273,10 +273,10 @@ export function handleThawRequestCreated(event: ThawRequestCreated): void { // update latest thawingUntil for provision and indexer let provision = createOrLoadProvision(event.params.serviceProvider, event.params.verifier, event.block.timestamp) - provision.thawingUntil = event.params.thawingUntil + provision.thawingUntil = event.params.thawingUntil > provision.thawingUntil ? event.params.thawingUntil : provision.thawingUntil provision.save() - indexer.thawingUntil = event.params.thawingUntil + indexer.thawingUntil = event.params.thawingUntil > indexer.thawingUntil ? event.params.thawingUntil : indexer.thawingUntil indexer.save() } From d7f9a7d2cd156b5e2645985ad8176a43251cf970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 23 May 2025 13:15:07 -0300 Subject: [PATCH 73/79] fix: missing fields in delegated stake init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- src/mappings/helpers/helpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mappings/helpers/helpers.ts b/src/mappings/helpers/helpers.ts index bf4ccd19..d6004dfd 100644 --- a/src/mappings/helpers/helpers.ts +++ b/src/mappings/helpers/helpers.ts @@ -419,6 +419,8 @@ export function createOrLoadDelegatedStakeForProvision( delegatedStake.unstakedTokens = BigInt.fromI32(0) delegatedStake.lockedTokens = BigInt.fromI32(0) delegatedStake.lockedUntil = 0 + delegatedStake.legacyLockedTokens = BigInt.fromI32(0) + delegatedStake.legacyLockedUntil = 0 delegatedStake.shareAmount = BigInt.fromI32(0) delegatedStake.personalExchangeRate = BigDecimal.fromString('1') delegatedStake.realizedRewards = BigDecimal.fromString('0') From ef779af1bc26514b49230fea87777ee7a7b2bf55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 5 Jun 2025 17:08:52 -0300 Subject: [PATCH 74/79] fix: poi metadata handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- abis/SubgraphService.json | 6 ++--- config/localNetworkAddressScript.ts | 15 +++--------- schema.graphql | 20 +++------------ src/mappings/gns.ts | 16 ++++++------ src/mappings/subgraphService.ts | 38 +++++++++++++++++++++-------- subgraph.template.yaml | 2 +- 6 files changed, 47 insertions(+), 50 deletions(-) diff --git a/abis/SubgraphService.json b/abis/SubgraphService.json index a99cd7d0..9c289714 100644 --- a/abis/SubgraphService.json +++ b/abis/SubgraphService.json @@ -805,9 +805,9 @@ }, { "indexed": false, - "internalType": "bytes32", - "name": "publicPoi", - "type": "bytes32" + "internalType": "bytes", + "name": "poiMetadata", + "type": "bytes" }, { "indexed": false, diff --git a/config/localNetworkAddressScript.ts b/config/localNetworkAddressScript.ts index 169b34bd..fd8fc3d3 100644 --- a/config/localNetworkAddressScript.ts +++ b/config/localNetworkAddressScript.ts @@ -16,8 +16,8 @@ export let addresses: Addresses = { controller: '{{horizon.Controller.address}}', graphToken: '{{horizon.L2GraphToken.address}}', epochManager: '{{horizon.EpochManager.address}}', - disputeManager: '{{subgraphService.DisputeManager.address}}', - horizonDisputeManager: '{{subgraphService.HorizonDisputeManager.address}}', + disputeManager: '{{subgraphService.LegacyDisputeManager.address}}', + horizonDisputeManager: '{{subgraphService.DisputeManager.address}}', staking: '{{horizon.HorizonStaking.address}}', stakingExtension: '{{horizon.HorizonStaking.address}}', curation: '{{horizon.L2Curation.address}}', @@ -52,15 +52,8 @@ const main = (): void => { if(output.ethereumDIDRegistry == '') { output.ethereumDIDRegistry = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } - // TODO: Remove this once subgraph service scripts deploy GNS and SubgraphNFT - if(output.gns == '') { - output.gns = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - if(output.subgraphNFT == '') { - output.subgraphNFT = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config - } - if(output.horizonDisputeManager == '') { - output.horizonDisputeManager = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config + if(output.disputeManager == '') { + output.disputeManager = '0x0000000000000000000000000000000000000000' // to avoid crashes due to bad config } fs.writeFileSync(__dirname + '/generatedAddresses.json', JSON.stringify(output, null, 2)) } catch (e) { diff --git a/schema.graphql b/schema.graphql index 494ebfbe..0c5fe369 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1108,8 +1108,6 @@ type Allocation @entity(immutable: false) { poi: Bytes "POIs submitted when collecting payments in Horizon" pois: [PoiSubmission!]! @derivedFrom(field: "allocation") - "Public POIs submitted when collecting payments in Horizon" - publicPois: [PublicPoiSubmission!]! @derivedFrom(field: "allocation") "Number of POIs submitted for this allocation. Only available for Horizon allocations" poiCount: BigInt "Timestamp for the latest POI presentation" @@ -1139,26 +1137,14 @@ type Allocation @entity(immutable: false) { type PoiSubmission @entity(immutable: true) { id: ID! - allocation: Allocation! - poi: Bytes! - - submittedAtEpoch: Int! - - presentedAtTimestamp: Int! -} - -type PublicPoiSubmission @entity(immutable: true) { - id: ID! - - allocation: Allocation! - publicPoi: Bytes! - submittedAtEpoch: Int! - presentedAtTimestamp: Int! + indexingStatus: Int! + blockNumber: Int! + metadataDecoded: Boolean! } enum AllocationStatus { diff --git a/src/mappings/gns.ts b/src/mappings/gns.ts index d79607aa..21c5c757 100644 --- a/src/mappings/gns.ts +++ b/src/mappings/gns.ts @@ -625,14 +625,14 @@ export function handleGRTWithdrawn(event: GRTWithdrawn): void { * call the contract directly to get the updated value */ export function handleParameterUpdated(event: ParameterUpdated): void { - let parameter = event.params.param - let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) - let gns = GNS.bind(event.address) - - if (parameter == 'ownerTaxPercentage') { - graphNetwork.ownerTaxPercentage = gns.ownerTaxPercentage().toI32() - } - graphNetwork.save() + // let parameter = event.params.param + // let graphNetwork = createOrLoadGraphNetwork(event.block.number, event.address) + // let gns = GNS.bind(event.address) + + // if (parameter == 'ownerTaxPercentage') { + // graphNetwork.ownerTaxPercentage = gns.ownerTaxPercentage().toI32() + // } + // graphNetwork.save() } // - event: SubgraphPublished(indexed uint256,indexed bytes32,uint32) diff --git a/src/mappings/subgraphService.ts b/src/mappings/subgraphService.ts index 1555bc92..0702d1f9 100644 --- a/src/mappings/subgraphService.ts +++ b/src/mappings/subgraphService.ts @@ -1,7 +1,7 @@ -import { BigDecimal, BigInt, ethereum, log } from "@graphprotocol/graph-ts" +import { BigDecimal, BigInt, Bytes, ethereum, log } from "@graphprotocol/graph-ts" import { AllocationClosed, AllocationCreated, AllocationResized, CurationCutSet, DelegationRatioSet, IndexingRewardsCollected, MaxPOIStalenessSet, ProvisionTokensRangeSet, QueryFeesCollected, RewardsDestinationSet, ServiceProviderRegistered, StakeToFeesRatioSet, ThawingPeriodRangeSet, VerifierCutRangeSet } from "../types/SubgraphService/SubgraphService" import { batchUpdateSubgraphSignalledTokens, calculatePricePerShare, createOrLoadDataService, createOrLoadEpoch, createOrLoadGraphNetwork, createOrLoadIndexerQueryFeePaymentAggregation, createOrLoadPaymentSource, createOrLoadProvision, createOrLoadSubgraphDeployment, joinID, updateDelegationExchangeRate } from "./helpers/helpers" -import { Allocation, PublicPoiSubmission, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" +import { Allocation, Indexer, PoiSubmission, SubgraphDeployment } from "../types/schema" import { addresses } from "../../config/addresses" import { tuplePrefixBytes } from "./helpers/decoder" import { createOrLoadIndexer } from "./helpers/helpers" @@ -255,22 +255,40 @@ export function handleIndexingRewardsCollected(event: IndexingRewardsCollected): allocation.poiCount = allocation.poiCount!.plus(BigInt.fromI32(1)) allocation.save() + // Decode poi metadata + let poiBlockNumber = 0 + let poiIndexingStatus = 0 // 0 is unknown, 1 is healthy, 2 is unhealthy, 3 is failed + let publicPoi = Bytes.fromHexString('0x') + let poiMetadataDecoded = false + + let poiMetadata = ethereum.decode('(uint256,bytes32,uint8,uint8,uint256)', event.params.poiMetadata) + if (poiMetadata != null && poiMetadata.kind == ethereum.ValueKind.TUPLE) { + poiMetadataDecoded = true + + let tupleData = poiMetadata.toTuple() + poiBlockNumber = tupleData[0].toI32() + publicPoi = tupleData[1].toBytes() + poiIndexingStatus = tupleData[2].toI32() + + // TODO: implement error code handling + // let errorCode = tupleData[3].toBigInt() + // let errorBlockNumber = tupleData[4].toBigInt() + } else { + log.error("IndexingRewardsCollected failed to decode poi metadata: {}", [event.params.poiMetadata.toHexString()]) + } + // Create PoI submission let poiSubmission = new PoiSubmission(joinID([event.transaction.hash.toHexString(), event.logIndex.toString()])) poiSubmission.allocation = allocation.id poiSubmission.poi = event.params.poi + poiSubmission.publicPoi = publicPoi poiSubmission.submittedAtEpoch = event.params.currentEpoch.toI32() poiSubmission.presentedAtTimestamp = event.block.timestamp.toI32() + poiSubmission.indexingStatus = poiIndexingStatus + poiSubmission.blockNumber = poiBlockNumber + poiSubmission.metadataDecoded = poiMetadataDecoded poiSubmission.save() - // Create public PoI submission - let publicPoiSubmission = new PublicPoiSubmission(joinID([event.transaction.hash.toHexString(), event.logIndex.toString()])) - publicPoiSubmission.allocation = allocation.id - publicPoiSubmission.publicPoi = event.params.publicPoi - publicPoiSubmission.submittedAtEpoch = event.params.currentEpoch.toI32() - publicPoiSubmission.presentedAtTimestamp = event.block.timestamp.toI32() - publicPoiSubmission.save() - // Update latest POI in allocation allocation.poi = event.params.poi allocation.latestPoiPresentedAt = event.block.timestamp.toI32() diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 4c76d02d..ed6f1a7c 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -477,7 +477,7 @@ dataSources: handler: handleAllocationResized - event: AllocationClosed(indexed address,indexed address,indexed bytes32,uint256,bool) handler: handleAllocationClosed - - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,bytes32,uint256) + - event: IndexingRewardsCollected(indexed address,indexed address,indexed bytes32,uint256,uint256,uint256,bytes32,bytes,uint256) handler: handleIndexingRewardsCollected - event: QueryFeesCollected(indexed address,indexed address,indexed address,bytes32,uint256,uint256) handler: handleQueryFeesCollected From f29607f004b5bc1018f47b50844052d3c4b7f119 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Fri, 6 Jun 2025 13:30:37 -0300 Subject: [PATCH 75/79] fix: missing parameters in create dispute events --- subgraph.template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subgraph.template.yaml b/subgraph.template.yaml index ed6f1a7c..4774ea1c 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -542,9 +542,9 @@ dataSources: - name: EpochManager file: ./node_modules/@graphprotocol/contracts/dist/abis/EpochManager.json eventHandlers: - - event: QueryDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,bytes32,bytes,uint256) + - event: QueryDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,bytes32,bytes,uint256,uint256) handler: handleQueryDisputeCreated - - event: IndexingDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,address,bytes32,uint256) + - event: IndexingDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,address,bytes32,uint256,uint256) handler: handleIndexingDisputeCreated - event: DisputeAccepted(indexed bytes32,indexed address,indexed address,uint256) handler: handleDisputeAccepted From 17e37729337314156c2776d3af53a144b0f17a8b Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Fri, 6 Jun 2025 13:42:26 -0300 Subject: [PATCH 76/79] fix: HorizonDisputeManager abi --- abis/HorizonDisputeManager.json | 3000 ++++++++++++++++--------------- 1 file changed, 1547 insertions(+), 1453 deletions(-) diff --git a/abis/HorizonDisputeManager.json b/abis/HorizonDisputeManager.json index 614bb097..4b541a90 100644 --- a/abis/HorizonDisputeManager.json +++ b/abis/HorizonDisputeManager.json @@ -1,1454 +1,1548 @@ [ - { - "inputs": [ - { - "internalType": "address", - "name": "controller", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expectedLength", - "type": "uint256" - } - ], - "name": "AttestationInvalidBytesLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "DisputeManagerDisputeAlreadyCreated", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "DisputeManagerDisputeInConflict", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "DisputeManagerDisputeNotInConflict", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "enum IDisputeManager.DisputeStatus", - "name": "status", - "type": "uint8" - } - ], - "name": "DisputeManagerDisputeNotPending", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerDisputePeriodNotFinished", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerDisputePeriodZero", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - } - ], - "name": "DisputeManagerIndexerNotFound", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "DisputeManagerInvalidDispute", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeDeposit", - "type": "uint256" - } - ], - "name": "DisputeManagerInvalidDisputeDeposit", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "cut", - "type": "uint32" - } - ], - "name": "DisputeManagerInvalidFishermanReward", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "maxSlashingCut", - "type": "uint32" - } - ], - "name": "DisputeManagerInvalidMaxSlashingCut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokensSlash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTokensSlash", - "type": "uint256" - } - ], - "name": "DisputeManagerInvalidTokensSlash", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerInvalidZeroAddress", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "relatedDisputeId", - "type": "bytes32" - } - ], - "name": "DisputeManagerMustAcceptRelatedDispute", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "requestCID1", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "responseCID1", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId1", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "requestCID2", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "responseCID2", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId2", - "type": "bytes32" - } - ], - "name": "DisputeManagerNonConflictingAttestations", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "subgraphDeploymentId1", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId2", - "type": "bytes32" - } - ], - "name": "DisputeManagerNonMatchingSubgraphDeployment", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerNotArbitrator", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerNotFisherman", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerSubgraphServiceNotSet", - "type": "error" - }, - { - "inputs": [], - "name": "DisputeManagerZeroTokens", - "type": "error" - }, - { - "inputs": [], - "name": "ECDSAInvalidSignature", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "length", - "type": "uint256" - } - ], - "name": "ECDSAInvalidSignatureLength", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "ECDSAInvalidSignatureS", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "contractName", - "type": "bytes" - } - ], - "name": "GraphDirectoryInvalidZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "a", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "b", - "type": "uint256" - } - ], - "name": "PPMMathInvalidMulPPM", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "arbitrator", - "type": "address" - } - ], - "name": "ArbitratorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DisputeAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DisputeCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "disputeDeposit", - "type": "uint256" - } - ], - "name": "DisputeDepositSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DisputeDrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId1", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId2", - "type": "bytes32" - } - ], - "name": "DisputeLinked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "disputePeriod", - "type": "uint64" - } - ], - "name": "DisputePeriodSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - } - ], - "name": "DisputeRejected", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "fishermanRewardCut", - "type": "uint32" - } - ], - "name": "FishermanRewardCutSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "graphToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "graphStaking", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphPayments", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphEscrow", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "graphController", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphEpochManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphRewardsManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphTokenGateway", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphProxyAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "graphCuration", - "type": "address" - } - ], - "name": "GraphDirectoryInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "poi", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stakeSnapshot", - "type": "uint256" - } - ], - "name": "IndexingDisputeCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "maxSlashingCut", - "type": "uint32" - } - ], - "name": "MaxSlashingCutSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "attestation", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stakeSnapshot", - "type": "uint256" - } - ], - "name": "QueryDisputeCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "subgraphService", - "type": "address" - } - ], - "name": "SubgraphServiceSet", - "type": "event" - }, - { - "inputs": [], - "name": "MAX_FISHERMAN_REWARD_CUT", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_DISPUTE_DEPOSIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "tokensSlash", - "type": "uint256" - } - ], - "name": "acceptDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "tokensSlash", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "acceptDisputeInConflict", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "tokensSlashRelated", - "type": "uint256" - } - ], - "name": "acceptDisputeConflict", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "arbitrator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "requestCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "responseCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - } - ], - "internalType": "struct Attestation.State", - "name": "attestation1", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "requestCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "responseCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - } - ], - "internalType": "struct Attestation.State", - "name": "attestation2", - "type": "tuple" - } - ], - "name": "areConflictingAttestations", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "cancelDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "allocationId", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "poi", - "type": "bytes32" - } - ], - "name": "createIndexingDispute", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "attestationData", - "type": "bytes" - } - ], - "name": "createQueryDispute", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "attestationData1", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "attestationData2", - "type": "bytes" - } - ], - "name": "createQueryDisputeConflict", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disputeDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputePeriod", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "disputes", - "outputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - }, - { - "internalType": "address", - "name": "fisherman", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deposit", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "relatedDisputeId", - "type": "bytes32" - }, - { - "internalType": "enum IDisputeManager.DisputeType", - "name": "disputeType", - "type": "uint8" - }, - { - "internalType": "enum IDisputeManager.DisputeStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "createdAt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "stakeSnapshot", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "drawDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "requestCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "responseCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - } - ], - "internalType": "struct Attestation.Receipt", - "name": "receipt", - "type": "tuple" - } - ], - "name": "encodeReceipt", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "fishermanRewardCut", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "requestCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "responseCID", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "subgraphDeploymentId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - } - ], - "internalType": "struct Attestation.State", - "name": "attestation", - "type": "tuple" - } - ], - "name": "getAttestationIndexer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDisputePeriod", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFishermanRewardCut", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "indexer", - "type": "address" - } - ], - "name": "getStakeSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "arbitrator", - "type": "address" - }, - { - "internalType": "uint64", - "name": "disputePeriod", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "disputeDeposit", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "fishermanRewardCut_", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "maxSlashingCut_", - "type": "uint32" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "isDisputeCreated", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxSlashingCut", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "disputeId", - "type": "bytes32" - } - ], - "name": "rejectDispute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "arbitrator", - "type": "address" - } - ], - "name": "setArbitrator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "disputeDeposit", - "type": "uint256" - } - ], - "name": "setDisputeDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "disputePeriod", - "type": "uint64" - } - ], - "name": "setDisputePeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "fishermanRewardCut_", - "type": "uint32" - } - ], - "name": "setFishermanRewardCut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "maxSlashingCut_", - "type": "uint32" - } - ], - "name": "setMaxSlashingCut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "subgraphService", - "type": "address" - } - ], - "name": "setSubgraphService", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "subgraphService", - "outputs": [ - { - "internalType": "contract ISubgraphService", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] \ No newline at end of file + { + "inputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedLength", + "type": "uint256" + } + ], + "name": "AttestationInvalidBytesLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerDisputeAlreadyCreated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerDisputeInConflict", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerDisputeNotInConflict", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "enum IDisputeManager.DisputeStatus", + "name": "status", + "type": "uint8" + } + ], + "name": "DisputeManagerDisputeNotPending", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerDisputePeriodNotFinished", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerDisputePeriodZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + } + ], + "name": "DisputeManagerIndexerNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerInvalidDispute", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + } + ], + "name": "DisputeManagerInvalidDisputeDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "cut", + "type": "uint32" + } + ], + "name": "DisputeManagerInvalidFishermanReward", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "maxSlashingCut", + "type": "uint32" + } + ], + "name": "DisputeManagerInvalidMaxSlashingCut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTokensSlash", + "type": "uint256" + } + ], + "name": "DisputeManagerInvalidTokensSlash", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "relatedDisputeId", + "type": "bytes32" + } + ], + "name": "DisputeManagerMustAcceptRelatedDispute", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "requestCID1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "requestCID2", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID2", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId2", + "type": "bytes32" + } + ], + "name": "DisputeManagerNonConflictingAttestations", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "subgraphDeploymentId1", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId2", + "type": "bytes32" + } + ], + "name": "DisputeManagerNonMatchingSubgraphDeployment", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerNotArbitrator", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerNotFisherman", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerSubgraphServiceNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DisputeManagerZeroTokens", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "contractName", + "type": "bytes" + } + ], + "name": "GraphDirectoryInvalidZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "a", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "b", + "type": "uint256" + } + ], + "name": "PPMMathInvalidMulPPM", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "arbitrator", + "type": "address" + } + ], + "name": "ArbitratorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + } + ], + "name": "DisputeDepositSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeDrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId1", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId2", + "type": "bytes32" + } + ], + "name": "DisputeLinked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "disputePeriod", + "type": "uint64" + } + ], + "name": "DisputePeriodSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + } + ], + "name": "DisputeRejected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "fishermanRewardCut", + "type": "uint32" + } + ], + "name": "FishermanRewardCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "graphToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphStaking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphPayments", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEscrow", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "graphController", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphEpochManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphRewardsManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphTokenGateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphProxyAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "graphCuration", + "type": "address" + } + ], + "name": "GraphDirectoryInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "poi", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeSnapshot", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "cancellableAt", + "type": "uint256" + } + ], + "name": "IndexingDisputeCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensRewards", + "type": "uint256" + } + ], + "name": "LegacyDisputeCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "maxSlashingCut", + "type": "uint32" + } + ], + "name": "MaxSlashingCutSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "attestation", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "stakeSnapshot", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "cancellableAt", + "type": "uint256" + } + ], + "name": "QueryDisputeCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "subgraphService", + "type": "address" + } + ], + "name": "SubgraphServiceSet", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_FISHERMAN_REWARD_CUT", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DISPUTE_DEPOSIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + } + ], + "name": "acceptDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "acceptDisputeInConflict", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "tokensSlashRelated", + "type": "uint256" + } + ], + "name": "acceptDisputeConflict", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "arbitrator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + } + ], + "internalType": "struct Attestation.State", + "name": "attestation1", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + } + ], + "internalType": "struct Attestation.State", + "name": "attestation2", + "type": "tuple" + } + ], + "name": "areConflictingAttestations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "cancelDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokensSlash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensRewards", + "type": "uint256" + } + ], + "name": "createAndAcceptLegacyDispute", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "allocationId", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "poi", + "type": "bytes32" + } + ], + "name": "createIndexingDispute", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "name": "createQueryDispute", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "attestationData1", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData2", + "type": "bytes" + } + ], + "name": "createQueryDisputeConflict", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disputeDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disputePeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "disputes", + "outputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "address", + "name": "fisherman", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "relatedDisputeId", + "type": "bytes32" + }, + { + "internalType": "enum IDisputeManager.DisputeType", + "name": "disputeType", + "type": "uint8" + }, + { + "internalType": "enum IDisputeManager.DisputeStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cancellableAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "stakeSnapshot", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "drawDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + } + ], + "internalType": "struct Attestation.Receipt", + "name": "receipt", + "type": "tuple" + } + ], + "name": "encodeReceipt", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fishermanRewardCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "requestCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "responseCID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + } + ], + "internalType": "struct Attestation.State", + "name": "attestation", + "type": "tuple" + } + ], + "name": "getAttestationIndexer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDisputePeriod", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFishermanRewardCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + } + ], + "name": "getStakeSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "arbitrator_", + "type": "address" + }, + { + "internalType": "uint64", + "name": "disputePeriod_", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "disputeDeposit_", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "fishermanRewardCut_", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "maxSlashingCut_", + "type": "uint32" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "isDisputeCreated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxSlashingCut", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "disputeId", + "type": "bytes32" + } + ], + "name": "rejectDispute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "arbitrator", + "type": "address" + } + ], + "name": "setArbitrator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "disputeDeposit", + "type": "uint256" + } + ], + "name": "setDisputeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "disputePeriod", + "type": "uint64" + } + ], + "name": "setDisputePeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "fishermanRewardCut_", + "type": "uint32" + } + ], + "name": "setFishermanRewardCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "maxSlashingCut_", + "type": "uint32" + } + ], + "name": "setMaxSlashingCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "subgraphService_", + "type": "address" + } + ], + "name": "setSubgraphService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "subgraphService", + "outputs": [ + { + "internalType": "contract ISubgraphService", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file From dc614ef6a1d429c84d2c37fbd1f5b5ade7ce4353 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Mon, 9 Jun 2025 16:44:10 -0300 Subject: [PATCH 77/79] fix: added cancellableAt and LegacyDispute --- schema.graphql | 2 ++ src/mappings/disputeManager.ts | 2 ++ src/mappings/horizonDisputeManager.ts | 25 +++++++++++++++++++++++++ subgraph.template.yaml | 2 ++ 4 files changed, 31 insertions(+) diff --git a/schema.graphql b/schema.graphql index 0c5fe369..3b2dcd1c 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1457,6 +1457,8 @@ type Dispute @entity(immutable: false) { createdAt: Int! "Time dispute was closed at" closedAt: Int! + "Time dispute becomes cancellable by the fisherman" + cancellableAt: Int! "Status of the dispute. Accepted means the Indexer was slashed" status: DisputeStatus! "Total amount of tokens slashed on the dispute" diff --git a/src/mappings/disputeManager.ts b/src/mappings/disputeManager.ts index 624e54cc..7bce118b 100644 --- a/src/mappings/disputeManager.ts +++ b/src/mappings/disputeManager.ts @@ -22,6 +22,7 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { dispute.deposit = event.params.tokens dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() + dispute.cancellableAt = 0 // Legacy disputes are not cancellable dispute.status = 'Undecided' dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0') @@ -60,6 +61,7 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.deposit = event.params.tokens dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() + dispute.cancellableAt = 0 // Legacy disputes are not cancellable dispute.status = 'Undecided' dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0') diff --git a/src/mappings/horizonDisputeManager.ts b/src/mappings/horizonDisputeManager.ts index 6fdd3b70..d8ce3e3a 100644 --- a/src/mappings/horizonDisputeManager.ts +++ b/src/mappings/horizonDisputeManager.ts @@ -12,6 +12,7 @@ import { MaxSlashingCutSet, DisputeCancelled, DisputePeriodSet, + LegacyDisputeCreated, } from '../types/HorizonDisputeManager/HorizonDisputeManager' import { createOrLoadGraphNetwork } from './helpers/helpers' @@ -32,6 +33,7 @@ const STATUS_CANCELLED = 'Cancelled' const TYPE_SINGLE_QUERY = 'SingleQuery' const TYPE_INDEXING = 'Indexing' const TYPE_CONFLICTING = 'Conflicting' +const TYPE_LEGACY = 'Legacy' // This handles Single query and Conflicting disputes export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { @@ -42,6 +44,7 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { dispute.deposit = event.params.tokens dispute.isLegacy = false dispute.createdAt = event.block.timestamp.toI32() + dispute.cancellableAt = event.params.cancellableAt.toI32() dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BIGDECIMAL_ZERO dispute.tokensRewarded = BIGINT_ZERO @@ -80,6 +83,7 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.deposit = event.params.tokens dispute.isLegacy = false dispute.createdAt = event.block.timestamp.toI32() + dispute.cancellableAt = event.params.cancellableAt.toI32() dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0') @@ -91,6 +95,27 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.save() } +export function handleLegacyDisputeCreated(event: LegacyDisputeCreated): void { + let allocation = Allocation.load(event.params.allocationId.toHexString())! + let id = event.params.disputeId.toHexString() + let dispute = new Dispute(id) + dispute.subgraphDeployment = allocation.subgraphDeployment + dispute.fisherman = event.params.fisherman.toHexString() + dispute.deposit = BigInt.fromString('0') + dispute.isLegacy = true + dispute.createdAt = event.block.timestamp.toI32() + dispute.cancellableAt = 0 // Legacy disputes are not cancellable + dispute.status = STATUS_UNDECIDED + dispute.tokensSlashed = BigDecimal.fromString('0') + dispute.tokensBurned = BigDecimal.fromString('0') + dispute.tokensRewarded = BigInt.fromString('0') + dispute.type = TYPE_LEGACY + dispute.indexer = event.params.indexer.toHexString() + dispute.allocation = allocation.id + dispute.closedAt = 0 + dispute.save() +} + export function handleDisputeAccepted(event: DisputeAccepted): void { let id = event.params.disputeId.toHexString() let dispute = Dispute.load(id)! diff --git a/subgraph.template.yaml b/subgraph.template.yaml index 4774ea1c..24bd6723 100644 --- a/subgraph.template.yaml +++ b/subgraph.template.yaml @@ -546,6 +546,8 @@ dataSources: handler: handleQueryDisputeCreated - event: IndexingDisputeCreated(indexed bytes32,indexed address,indexed address,uint256,address,bytes32,uint256,uint256) handler: handleIndexingDisputeCreated + - event: LegacyDisputeCreated(indexed bytes32,indexed address,indexed address,address,uint256,uint256) + handler: handleLegacyDisputeCreated - event: DisputeAccepted(indexed bytes32,indexed address,indexed address,uint256) handler: handleDisputeAccepted - event: DisputeRejected(indexed bytes32,indexed address,indexed address,uint256) From 6fb138325c638deec4543b40cf8d07b45e64a3b1 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Wed, 11 Jun 2025 13:34:47 -0300 Subject: [PATCH 78/79] fix: query dispute attestation signature parsing --- src/mappings/horizonDisputeManager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mappings/horizonDisputeManager.ts b/src/mappings/horizonDisputeManager.ts index d8ce3e3a..a674f0d7 100644 --- a/src/mappings/horizonDisputeManager.ts +++ b/src/mappings/horizonDisputeManager.ts @@ -58,9 +58,9 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { let request = '0x'.concat(attestationData.slice(2, 66)) let response = '0x'.concat(attestationData.slice(66, 130)) let attestation = new Attestation(request.concat('-').concat(response)) - let v = attestationData.slice(194, 196) - let r = attestationData.slice(196, 260) - let s = attestationData.slice(260, 324) + let r = attestationData.slice(194, 258) + let s = attestationData.slice(258, 322) + let v = attestationData.slice(322, 324) attestation.responseCID = response attestation.requestCID = request attestation.subgraphDeployment = dispute.subgraphDeployment From 47d4fbec20a8ae30805608aa6d3d5c48fe1190d8 Mon Sep 17 00:00:00 2001 From: Miguel de Elias Date: Thu, 12 Jun 2025 17:25:13 -0300 Subject: [PATCH 79/79] fix: changed cancellableAt to BigInt --- schema.graphql | 2 +- src/mappings/disputeManager.ts | 12 +++++++----- src/mappings/horizonDisputeManager.ts | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/schema.graphql b/schema.graphql index 3b2dcd1c..9c82001e 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1458,7 +1458,7 @@ type Dispute @entity(immutable: false) { "Time dispute was closed at" closedAt: Int! "Time dispute becomes cancellable by the fisherman" - cancellableAt: Int! + cancellableAt: BigInt! "Status of the dispute. Accepted means the Indexer was slashed" status: DisputeStatus! "Total amount of tokens slashed on the dispute" diff --git a/src/mappings/disputeManager.ts b/src/mappings/disputeManager.ts index 7bce118b..1221076b 100644 --- a/src/mappings/disputeManager.ts +++ b/src/mappings/disputeManager.ts @@ -13,6 +13,8 @@ import { import { DisputeManagerStitched } from '../types/DisputeManager/DisputeManagerStitched' import { createOrLoadGraphNetwork } from './helpers/helpers' +const BIGINT_ZERO = BigInt.fromI32(0) + // This handles Single query and Conflicting disputes export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { let id = event.params.disputeID.toHexString() @@ -22,7 +24,7 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { dispute.deposit = event.params.tokens dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() - dispute.cancellableAt = 0 // Legacy disputes are not cancellable + dispute.cancellableAt = BIGINT_ZERO // Legacy disputes are not cancellable dispute.status = 'Undecided' dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0') @@ -36,9 +38,9 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { let request = '0x'.concat(attestationData.slice(2, 66)) let response = '0x'.concat(attestationData.slice(66, 130)) let attestation = new Attestation(request.concat('-').concat(response)) - let v = attestationData.slice(194, 196) - let r = attestationData.slice(196, 260) - let s = attestationData.slice(260, 324) + let r = attestationData.slice(194, 258) + let s = attestationData.slice(258, 322) + let v = attestationData.slice(322, 324) attestation.responseCID = response attestation.requestCID = request attestation.subgraphDeployment = dispute.subgraphDeployment @@ -61,7 +63,7 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.deposit = event.params.tokens dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() - dispute.cancellableAt = 0 // Legacy disputes are not cancellable + dispute.cancellableAt = BIGINT_ZERO // Legacy disputes are not cancellable dispute.status = 'Undecided' dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0') diff --git a/src/mappings/horizonDisputeManager.ts b/src/mappings/horizonDisputeManager.ts index a674f0d7..1d4d76df 100644 --- a/src/mappings/horizonDisputeManager.ts +++ b/src/mappings/horizonDisputeManager.ts @@ -44,7 +44,7 @@ export function handleQueryDisputeCreated(event: QueryDisputeCreated): void { dispute.deposit = event.params.tokens dispute.isLegacy = false dispute.createdAt = event.block.timestamp.toI32() - dispute.cancellableAt = event.params.cancellableAt.toI32() + dispute.cancellableAt = event.params.cancellableAt dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BIGDECIMAL_ZERO dispute.tokensRewarded = BIGINT_ZERO @@ -83,7 +83,7 @@ export function handleIndexingDisputeCreated(event: IndexingDisputeCreated): voi dispute.deposit = event.params.tokens dispute.isLegacy = false dispute.createdAt = event.block.timestamp.toI32() - dispute.cancellableAt = event.params.cancellableAt.toI32() + dispute.cancellableAt = event.params.cancellableAt dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0') @@ -104,7 +104,7 @@ export function handleLegacyDisputeCreated(event: LegacyDisputeCreated): void { dispute.deposit = BigInt.fromString('0') dispute.isLegacy = true dispute.createdAt = event.block.timestamp.toI32() - dispute.cancellableAt = 0 // Legacy disputes are not cancellable + dispute.cancellableAt = BIGINT_ZERO // Legacy disputes are not cancellable dispute.status = STATUS_UNDECIDED dispute.tokensSlashed = BigDecimal.fromString('0') dispute.tokensBurned = BigDecimal.fromString('0')