{
  "_format": "hh3-artifact-1",
  "contractName": "IE3RefundManager",
  "sourceName": "contracts/interfaces/IE3RefundManager.sol",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "claimant",
          "type": "address"
        }
      ],
      "name": "AlreadyClaimed",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "E3NotFailed",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "NoRefundAvailable",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "caller",
          "type": "address"
        }
      ],
      "name": "NotHonestNode",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "caller",
          "type": "address"
        }
      ],
      "name": "NotRequester",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "NothingToClaim",
      "type": "error"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "RefundNotCalculated",
      "type": "error"
    },
    {
      "inputs": [],
      "name": "Unauthorized",
      "type": "error"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "enclave",
          "type": "address"
        }
      ],
      "name": "EnclaveSet",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "OrphanedSlashedFundsWithdrawn",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "claimant",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bytes32",
          "name": "claimType",
          "type": "bytes32"
        }
      ],
      "name": "RefundClaimed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "requesterAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "honestNodeAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "protocolAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "totalSlashed",
          "type": "uint256"
        }
      ],
      "name": "RefundDistributionCalculated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "toRequester",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "toHonestNodes",
          "type": "uint256"
        }
      ],
      "name": "SlashedFundsApplied",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "SlashedFundsClaimed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "SlashedFundsCredited",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "toNodes",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "toProtocol",
          "type": "uint256"
        }
      ],
      "name": "SlashedFundsDistributedOnSuccess",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "SlashedFundsEscrowed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "treasury",
          "type": "address"
        }
      ],
      "name": "TreasurySet",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "treasury",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "TreasurySlashedClaimed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "treasury",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "TreasurySlashedCredited",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "components": [
            {
              "internalType": "uint16",
              "name": "committeeFormationBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "dkgBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "decryptionBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "protocolBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "successSlashedNodeBps",
              "type": "uint16"
            }
          ],
          "indexed": false,
          "internalType": "struct IE3RefundManager.WorkValueAllocation",
          "name": "allocation",
          "type": "tuple"
        }
      ],
      "name": "WorkAllocationUpdated",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "originalPayment",
          "type": "uint256"
        },
        {
          "internalType": "address[]",
          "name": "honestNodes",
          "type": "address[]"
        },
        {
          "internalType": "contract IERC20",
          "name": "paymentToken",
          "type": "address"
        }
      ],
      "name": "calculateRefund",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "enum IEnclave.E3Stage",
          "name": "stage",
          "type": "uint8"
        }
      ],
      "name": "calculateWorkValue",
      "outputs": [
        {
          "internalType": "uint16",
          "name": "workCompletedBps",
          "type": "uint16"
        },
        {
          "internalType": "uint16",
          "name": "workRemainingBps",
          "type": "uint16"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "claimHonestNodeReward",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "claimRequesterRefund",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "claimSlashedFundsOnSuccess",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256[]",
          "name": "e3Ids",
          "type": "uint256[]"
        }
      ],
      "name": "claimSlashedFundsOnSuccessBatch",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "address[]",
          "name": "honestNodes",
          "type": "address[]"
        },
        {
          "internalType": "contract IERC20",
          "name": "paymentToken",
          "type": "address"
        }
      ],
      "name": "distributeSlashedFundsOnSuccess",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "escrowSlashedFunds",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        }
      ],
      "name": "getRefundDistribution",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "requesterAmount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "honestNodeAmount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "protocolAmount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "totalSlashed",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "honestNodeCount",
              "type": "uint256"
            },
            {
              "internalType": "bool",
              "name": "calculated",
              "type": "bool"
            },
            {
              "internalType": "contract IERC20",
              "name": "feeToken",
              "type": "address"
            },
            {
              "internalType": "uint256",
              "name": "originalPayment",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "perNodeAmount",
              "type": "uint256"
            }
          ],
          "internalType": "struct IE3RefundManager.RefundDistribution",
          "name": "distribution",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getWorkAllocation",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint16",
              "name": "committeeFormationBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "dkgBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "decryptionBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "protocolBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "successSlashedNodeBps",
              "type": "uint16"
            }
          ],
          "internalType": "struct IE3RefundManager.WorkValueAllocation",
          "name": "allocation",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "claimant",
          "type": "address"
        }
      ],
      "name": "hasClaimed",
      "outputs": [
        {
          "internalType": "bool",
          "name": "claimed",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "e3Id",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "pendingSlashedFundsOnSuccess",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "treasury",
          "type": "address"
        },
        {
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "pendingTreasuryClaim",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "components": [
            {
              "internalType": "uint16",
              "name": "committeeFormationBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "dkgBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "decryptionBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "protocolBps",
              "type": "uint16"
            },
            {
              "internalType": "uint16",
              "name": "successSlashedNodeBps",
              "type": "uint16"
            }
          ],
          "internalType": "struct IE3RefundManager.WorkValueAllocation",
          "name": "allocation",
          "type": "tuple"
        }
      ],
      "name": "setWorkAllocation",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "treasuryClaim",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "linkReferences": {},
  "deployedLinkReferences": {},
  "immutableReferences": {},
  "inputSourceName": "project/contracts/interfaces/IE3RefundManager.sol",
  "buildInfoId": "solc-0_8_28-58b894a0ac77a2d784be77b69288a062b8f6f518"
}