{"compiler":{"version":"0.8.27+commit.40a35a09"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"controller","type":"address"},{"internalType":"uint256","name":"protocolPaymentCut","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[{"internalType":"bytes","name":"contractName","type":"bytes"}],"name":"GraphDirectoryInvalidZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"cut","type":"uint256"}],"name":"GraphPaymentsInvalidCut","type":"error"},{"inputs":[{"internalType":"uint256","name":"protocolPaymentCut","type":"uint256"}],"name":"GraphPaymentsInvalidProtocolPaymentCut","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"PPMMathInvalidMulPPM","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"PPMMathInvalidPPM","type":"error"},{"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":"enum IGraphPayments.PaymentTypes","name":"paymentType","type":"uint8"},{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"dataService","type":"address"},{"indexed":false,"internalType":"uint256","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":"address","name":"receiverDestination","type":"address"}],"name":"GraphPaymentCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"inputs":[],"name":"PROTOCOL_PAYMENT_CUT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum IGraphPayments.PaymentTypes","name":"paymentType","type":"uint8"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"},{"internalType":"address","name":"dataService","type":"address"},{"internalType":"uint256","name":"dataServiceCut","type":"uint256"},{"internalType":"address","name":"receiverDestination","type":"address"}],"name":"collect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","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"}],"devdoc":{"custom:security-contact":"Please email security+contracts@thegraph.com if you find any bugs. We may have an active bug bounty program.","errors":{"AddressEmptyCode(address)":[{"details":"There's no code at `target` (it is not a contract)."}],"FailedCall()":[{"details":"A call to an address target failed. The target may have reverted."}],"GraphDirectoryInvalidZeroAddress(bytes)":[{"params":{"contractName":"The name of the contract that was not found, or the controller"}}],"GraphPaymentsInvalidCut(uint256)":[{"params":{"cut":"The cut"}}],"GraphPaymentsInvalidProtocolPaymentCut(uint256)":[{"params":{"protocolPaymentCut":"The protocol payment cut"}}],"InvalidInitialization()":[{"details":"The contract is already initialized."}],"NotInitializing()":[{"details":"The contract is not initializing."}],"PPMMathInvalidMulPPM(uint256,uint256)":[{"params":{"a":"The first value in the multiplication.","b":"The second value in the multiplication."}}],"PPMMathInvalidPPM(uint256)":[{"params":{"value":"The value that is not in PPM."}}]},"events":{"GraphDirectoryInitialized(address,address,address,address,address,address,address,address,address,address)":{"params":{"graphController":"The Graph Controller contract address","graphCuration":"The Curation contract address","graphEpochManager":"The Epoch Manager contract address","graphEscrow":"The Payments Escrow contract address","graphPayments":"The Graph Payments contract address","graphProxyAdmin":"The Graph Proxy Admin contract address","graphRewardsManager":"The Rewards Manager contract address","graphStaking":"The Horizon Staking contract address","graphToken":"The Graph Token contract address","graphTokenGateway":"The Token Gateway contract address"}},"GraphPaymentCollected(uint8,address,address,address,uint256,uint256,uint256,uint256,uint256,address)":{"params":{"dataService":"The address of the data service","payer":"The address of the payer","paymentType":"The type of payment as defined in {IGraphPayments}","receiver":"The address of the receiver","receiverDestination":"The address where the receiver's payment cut is sent.","tokens":"The total amount of tokens being collected","tokensDataService":"Amount of tokens for the data service","tokensDelegationPool":"Amount of tokens for delegators","tokensProtocol":"Amount of tokens charged as protocol tax","tokensReceiver":"Amount of tokens for the receiver"}},"Initialized(uint64)":{"details":"Triggered when the contract has been initialized or reinitialized."}},"kind":"dev","methods":{"collect(uint8,address,uint256,address,uint256,address)":{"params":{"dataService":"The address of the data service","dataServiceCut":"The data service cut in PPM","paymentType":"The type of payment as defined in {IGraphPayments}","receiver":"The address of the receiver","receiverDestination":"The address where the receiver's payment cut is sent.","tokens":"The amount of tokens being collected."}},"constructor":{"details":"This contract is upgradeable however we still use the constructor to set a few immutable variables.","params":{"controller":"The address of the Graph controller","protocolPaymentCut":"The protocol tax in PPM"}},"multicall(bytes[])":{"custom:oz-upgrades-unsafe-allow-reachable":"delegatecall","details":"Receives and executes a batch of function calls on this contract."}},"title":"GraphPayments contract","version":1},"userdoc":{"errors":{"GraphDirectoryInvalidZeroAddress(bytes)":[{"notice":"Thrown when either the controller is the zero address or a contract address is not found on the controller"}],"GraphPaymentsInvalidCut(uint256)":[{"notice":"Thrown when trying to use a cut that is not expressed in PPM"}],"GraphPaymentsInvalidProtocolPaymentCut(uint256)":[{"notice":"Thrown when the protocol payment cut is invalid"}],"PPMMathInvalidMulPPM(uint256,uint256)":[{"notice":"Thrown when no value in a multiplication is in PPM."}],"PPMMathInvalidPPM(uint256)":[{"notice":"Thrown when a value is expected to be in PPM but is not."}]},"events":{"GraphDirectoryInitialized(address,address,address,address,address,address,address,address,address,address)":{"notice":"Emitted when the GraphDirectory is initialized"},"GraphPaymentCollected(uint8,address,address,address,uint256,uint256,uint256,uint256,uint256,address)":{"notice":"Emitted when a payment is collected"}},"kind":"user","methods":{"PROTOCOL_PAYMENT_CUT()":{"notice":"Protocol payment cut in PPM"},"collect(uint8,address,uint256,address,uint256,address)":{"notice":"Collects funds from a payer. It will pay cuts to all relevant parties and forward the rest to the receiver destination address. If the destination address is zero the funds are automatically staked to the receiver. Note that the receiver destination address can be set to the receiver address to collect funds on the receiver without re-staking. Note that the collected amount can be zero."},"constructor":{"notice":"Constructor for the {GraphPayments} contract"},"initialize()":{"notice":"Initialize the contract"}},"notice":"This contract is part of the Graph Horizon payments protocol. It's designed to pull funds (GRT) from the {PaymentsEscrow} and distribute them according to a set of pre established rules.","version":1}},"settings":{"compilationTarget":{"contracts/payments/GraphPayments.sol":"GraphPayments"},"evmVersion":"paris","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":20},"remappings":[]},"sources":{"@graphprotocol/contracts/contracts/token/IGraphToken.sol":{"keccak256":"0x2ffad6798d641c8d1288730be725c43041c803caceaf6d9985122d000ad5761c","license":"GPL-2.0-or-later","urls":["bzz-raw://5f782a5670037fc9223dc20fd4f99c0277a9bec7d08f7800b0a0733e819a07cb","dweb:/ipfs/QmP3K2QnmukScCh1nzgphYdg7AiAuTaT914jq4txLYNpra"]},"@graphprotocol/contracts/contracts/utils/TokenUtils.sol":{"keccak256":"0x22697a430c0e369ad6f1854e8e79e4892eae7c4270e8050d718107f7124a69ea","license":"GPL-2.0-or-later","urls":["bzz-raw://24b65a9a6bc076475284f8324df39d6ffa2f3288b8833080223ec5b70a2cedfe","dweb:/ipfs/QmXkYZ3DNV8yPzgafqxJBPJWthtSe58sa5776JdkrSr8aX"]},"@graphprotocol/interfaces/contracts/contracts/arbitrum/ITokenGateway.sol":{"keccak256":"0x3cbcc6e4629543a99acacc7ee4ffa6c063b9fb17d3597ccd2f9481008e3633bd","license":"Apache-2.0","urls":["bzz-raw://d6bb0bb830b67d579e57a261e5f5d9e90b32dc006b02badbecf1f6c82c0a5100","dweb:/ipfs/Qmd38iNXZpinwbNRJPEAA8r9bmmtRwjTSK1SkmH47ge4kJ"]},"@graphprotocol/interfaces/contracts/contracts/curation/ICuration.sol":{"keccak256":"0x37e19d8e186765ba3e15b4cb8dd73ba24a9daff76d728020975abb47841a04ca","license":"GPL-2.0-or-later","urls":["bzz-raw://a0df55dd232e424a97f94630cac862ba9380f22bf631cbee15ad7d1215f9f73d","dweb:/ipfs/QmbXcNHNTcBz9eP6Vvos2dMooeVstBffjrYkmd4QTNwK1N"]},"@graphprotocol/interfaces/contracts/contracts/epochs/IEpochManager.sol":{"keccak256":"0x4fab2c937913f47f63de92474075fda14d307139fb9e26f46bb1249fddb7b3e2","license":"GPL-2.0-or-later","urls":["bzz-raw://10273c34b4ee9a7791332dc23463409a79d1de1bc03af67c0e25091435d7ddc5","dweb:/ipfs/Qmeru6gn1uNDpNuEC8zdiiTn9Lo9Ze55Gx57xzwtu5cC47"]},"@graphprotocol/interfaces/contracts/contracts/governance/IController.sol":{"keccak256":"0x04b20d2f9185ce2496bf45d1b3f9f5c79b2271dd201b535f1f215011e90fa33b","license":"GPL-2.0-or-later","urls":["bzz-raw://202f4ff92762323ac6767fd12a0d886217c4826f0a2ac8e4ad7c3155f3bb744e","dweb:/ipfs/QmRBx9LxFrzPAGnUMMuag2jTdvxGiwzymuBhacT3KXkW8j"]},"@graphprotocol/interfaces/contracts/contracts/governance/IGoverned.sol":{"keccak256":"0x096822bdb43cb49cf25bc47938dda8015bfc14ee2c2e4e37f482dc7f312df9c1","license":"GPL-2.0-or-later","urls":["bzz-raw://a7a00b0acd9e378168b7b3895a4e0c78de18e5d0bafd539535aaf91decea1b8a","dweb:/ipfs/QmcagCSjp9hr5SD4Y7nLRnTWTsbTG7dtp2zaySTuXjgN9v"]},"@graphprotocol/interfaces/contracts/contracts/rewards/IRewardsIssuer.sol":{"keccak256":"0x0f83ead1d5f267ec33d0dcf16bb6923c26f8879300ed2386a32aebb1311dbdba","license":"GPL-2.0-or-later","urls":["bzz-raw://2c608bb078388ebbdc2409f02212a657d39284b07211b170fcb35e744ab8b7cb","dweb:/ipfs/QmXgfQo2gYXNxjzh2aiayZRwE1R81JEPjZdzjMJkgunuvL"]},"@graphprotocol/interfaces/contracts/contracts/rewards/IRewardsManager.sol":{"keccak256":"0x3e2dd1d2bdb45f2929858ccc7b7444ee2d0fb075f35781926329ee60dd3b686b","license":"GPL-2.0-or-later","urls":["bzz-raw://176f9334d488c52590704d89e8a1399c3733dc9e3c5aa26f6db2f8d51db31f49","dweb:/ipfs/QmenhGuqx6hNpDLTASMiyzhBDyGGvDbowvs5inzsfFNLTF"]},"@graphprotocol/interfaces/contracts/contracts/upgrades/IGraphProxy.sol":{"keccak256":"0xb008d0c36a115ac0cdd550275c5da1c47e03820211f20b94c68b87d89399d4c4","license":"GPL-2.0-or-later","urls":["bzz-raw://3563406e8f89a47db0e768a0e7653043bf48db14fb42d97d45ef0ebc6d37e00a","dweb:/ipfs/QmX93uADwaGK9J55AFLyCvK4WLYPhDzfwk5gVUjF2qXYJv"]},"@graphprotocol/interfaces/contracts/contracts/upgrades/IGraphProxyAdmin.sol":{"keccak256":"0x05108884fa94d3f038ab9bfceb7ebf01986a5bd4c505293a9f94155275183d40","license":"GPL-2.0-or-later","urls":["bzz-raw://e055f5c69358bff7705fdc3557ba1a6c825ec94fd6b4fec4adba90ab8edcb479","dweb:/ipfs/Qmb83KcnML7aj2wN7MxJgeR3b5xsZiBM5frcgwtYgSfEdB"]},"@graphprotocol/interfaces/contracts/horizon/IGraphPayments.sol":{"keccak256":"0x03b34692e3dadb116c7b4df050ab2b5b02919e302849d19a7bff41ee392ebe03","license":"GPL-3.0-or-later","urls":["bzz-raw://4703714a99703afc390e40248918ae7347856455a98d70642002df08afdf810d","dweb:/ipfs/QmUqoz85Me6vkFev5RVy6bzKYu1PX2vTUmFJYC3oupFzqu"]},"@graphprotocol/interfaces/contracts/horizon/IHorizonStaking.sol":{"keccak256":"0x4b146f30ee66c4224cb5a82bafc8299f8596d8fe302e793757520f67bba8a166","license":"GPL-2.0-or-later","urls":["bzz-raw://30666c737d72a850223c1966d3b5d02b84f3f808f3c8dae8d0748731646b60c5","dweb:/ipfs/QmQschyZQtU8tTnQ9hNiG5nobuXBx6KeiKdfxvZ4zvQ7ty"]},"@graphprotocol/interfaces/contracts/horizon/IPaymentsEscrow.sol":{"keccak256":"0xe2e4d60c780d63c9aa1f457f0387485866bfb254e77eb563182646b148cc16d1","license":"GPL-3.0-or-later","urls":["bzz-raw://53d9ae6bd6414f1cba5f5fcc3be67bbaa89c0ab448418f8f707f76ec2918c94a","dweb:/ipfs/QmXQKQ7ou5fdSpmVhkPadKrGSRB34652GTZRGNhjzsNkXZ"]},"@graphprotocol/interfaces/contracts/horizon/internal/IHorizonStakingBase.sol":{"keccak256":"0xa522a10d185107ba5ed44ab057bb07f474ab3de0b3b571b02d68e71ebd941fb3","license":"GPL-2.0-or-later","urls":["bzz-raw://2196b2c1cd83134c06e249682282be3ac55b9036ed14d3ffd6f9024475b94006","dweb:/ipfs/QmNNJ9WFUrHpyhZUyK2Qz8TbP7qoJVwQHTmr1VcqV33JN7"]},"@graphprotocol/interfaces/contracts/horizon/internal/IHorizonStakingExtension.sol":{"keccak256":"0x3b9aa86325c0616e92419c66d36e97e1282c2cb581b302d588a657bfcca24c4c","license":"GPL-2.0-or-later","urls":["bzz-raw://1b80a2952d406246090e7f1a152e35e7f93da04cb86b598e1ed17f802395f7a8","dweb:/ipfs/QmYXBfRuH6xWqdKZE2EYQEN3iLaZt93LbYeZASAdnjHrFo"]},"@graphprotocol/interfaces/contracts/horizon/internal/IHorizonStakingMain.sol":{"keccak256":"0x4dd1f4f92f4bd9c77f1f11f992b7c22f4f963104665229bc564d4b737e184860","license":"GPL-2.0-or-later","urls":["bzz-raw://011c1db9fdad44973adf5b61cc06e056d66f0bbad6340e376297d682291264ba","dweb:/ipfs/QmcTvEMU5MmXpQxu96uWmGrSmvQJSoZaxjCtLN1eaK8bB5"]},"@graphprotocol/interfaces/contracts/horizon/internal/IHorizonStakingTypes.sol":{"keccak256":"0xaaeb9770f8aaae6b395e87bb1876a10fe7c14384d16d97dd33a671c3ea53aa7b","license":"GPL-2.0-or-later","urls":["bzz-raw://8f5c019fdb2df73bafe464fb6e9da792f7833a0c1858734bcd6a6b8d6ae924c7","dweb:/ipfs/QmcubeYTHCYBqQsRncBFpPFtk7JzRz4nFh27LUW1m4hx2K"]},"@graphprotocol/interfaces/contracts/horizon/internal/ILinkedList.sol":{"keccak256":"0x80f9bf6e44e29472cf2e11aa75e26df65fef47e552acedc4934beeac4f0015e2","license":"GPL-2.0-or-later","urls":["bzz-raw://90eb2339245d44e2978aefe2a04fd4ab33be31e42bf89e729c3d62fa917b1042","dweb:/ipfs/QmRTNo5dzniNqMx6ruxUtN3WXHUJ4PCxP1aw7C4p28yHGF"]},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"keccak256":"0xdb4d24ee2c087c391d587cd17adfe5b3f9d93b3110b1388c2ab6c7c0ad1dcd05","license":"MIT","urls":["bzz-raw://ab7b6d5b9e2b88176312967fe0f0e78f3d9a1422fa5e4b64e2440c35869b5d08","dweb:/ipfs/QmXKYWWyzcLg1B2k7Sb1qkEXgLCYfXecR9wYW5obRzWP1Q"]},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"keccak256":"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397","license":"MIT","urls":["bzz-raw://08e39f23d5b4692f9a40803e53a8156b72b4c1f9902a88cd65ba964db103dab9","dweb:/ipfs/QmPKn6EYDgpga7KtpkA8wV2yJCYGMtc9K4LkJfhKX2RVSV"]},"@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol":{"keccak256":"0xe5775eb1fb17165cd191e8f8b2232dbea8765e7e610eaa3d6e52feead793ec5a","license":"MIT","urls":["bzz-raw://352614aea75c3d913cbcabb528be3d6c3335c3c77da41d59486a3193069dd095","dweb:/ipfs/QmR3Nabxfme6tHrAMJCyK4MWZtpund2c4R7aFKmea3sGZM"]},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2","license":"MIT","urls":["bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303","dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0x6d0ae6e206645341fd122d278c2cb643dea260c190531f2f3f6a0426e77b00c0","license":"MIT","urls":["bzz-raw://032d1201d839435be2c85b72e33206b3ea980c569d6ebf7fa57d811ab580a82f","dweb:/ipfs/QmeqQjAtMvdZT2tG7zm39itcRJkuwu8AEReK6WRnLJ18DD"]},"@openzeppelin/contracts/utils/Errors.sol":{"keccak256":"0x6afa713bfd42cf0f7656efa91201007ac465e42049d7de1d50753a373648c123","license":"MIT","urls":["bzz-raw://ba1d02f4847670a1b83dec9f7d37f0b0418d6043447b69f3a29a5f9efc547fcf","dweb:/ipfs/QmQ7iH2keLNUKgq2xSWcRmuBE5eZ3F5whYAkAGzCNNoEWB"]},"contracts/libraries/PPMMath.sol":{"keccak256":"0xe7fcfd44d2919944b79a11a39da7d4539d49c4bcf510071a59f6b41c37ee8ef2","license":"GPL-3.0-or-later","urls":["bzz-raw://a21b1ff7ca81fa07f153b60aeca136bd1ee57d9d01a2c76635e4a5602e8959fc","dweb:/ipfs/QmQ5C7mUjt4sv1NBt1FH5XVHN3aBsHnvDsdJKWywhLjso8"]},"contracts/payments/GraphPayments.sol":{"keccak256":"0x161d2f2c559edcff5752ab529cf2b101446c46509ac3f8f0998bdd6afba23f7c","license":"GPL-3.0-or-later","urls":["bzz-raw://1494a6c0fbe99ad38ecc714555a2212408db811eb1c804e355e5d58a78a50db2","dweb:/ipfs/QmPtFJDzTeGEDFqV9PQ741QvKDGwNqgkhwuH9P53VwyTrq"]},"contracts/utilities/GraphDirectory.sol":{"keccak256":"0x3daadb953ed60c640f3a0323d7a07ff12c821f8a713a1b5d1fdeeb374dd17e80","license":"GPL-2.0-or-later","urls":["bzz-raw://8e5534ea627910a2700b9418e1d9042bb24913d1b1ebab2b55d4ec20917f358b","dweb:/ipfs/QmcYJuAwGTbyssn7uH9jPKB6wNgSBz2Nmhu8L3t4SJ6VjD"]}},"version":1}