diff --git a/contracts/.env.example b/contracts/.env.example index 411e16b..93d765f 100644 --- a/contracts/.env.example +++ b/contracts/.env.example @@ -1,4 +1,5 @@ PRIVATE_KEY='<0x encoded private key>' +ALCHEMY_API_KEY='' INFURA_API_KEY='' ETHERSCAN_API_KEY='' GNOSISSCAN_API_KEY='' diff --git a/contracts/deploy/foreign/optimism.js b/contracts/deploy/foreign/optimism.js index 6f237a9..07c0d9b 100644 --- a/contracts/deploy/foreign/optimism.js +++ b/contracts/deploy/foreign/optimism.js @@ -8,6 +8,12 @@ const foreignParameters = { foreignBridge: "0x448A37330A60494E666F6DD60aD48d930AEbA381", variant: "Unichain", }, + baseSepolia: { + numberOfJurors: 1, + // https://docs.base.org/base-chain/network-information/base-contracts + foreignBridge: "0xC34855F4De64F1840e5686e64278da901e261f20", + variant: "Base", + }, optimismSepolia: { numberOfJurors: 1, // https://docs.optimism.io/chain/addresses @@ -34,7 +40,7 @@ const foreignParameters = { }, base: { numberOfJurors: 15, - // https://docs.base.org/docs/base-contracts#l1-contract-addresses + // https://docs.base.org/base-chain/network-information/base-contracts foreignBridge: "0x866E82a600A1414e583f7F13623F1aC5d58b0Afa", variant: "Base", }, diff --git a/contracts/deploy/home/optimism.js b/contracts/deploy/home/optimism.js index 8a74f90..db0bc13 100644 --- a/contracts/deploy/home/optimism.js +++ b/contracts/deploy/home/optimism.js @@ -1,6 +1,6 @@ const { realityETHConfig } = require("@reality.eth/contracts"); const { homeChains, generateMetadata } = require("../shared"); -const { unichain, optimism, redstone, unichainSepolia, optimismSepolia, base } = homeChains; +const { unichain, optimism, redstone, unichainSepolia, optimismSepolia, base, baseSepolia } = homeChains; // CrossDomainMessenger precompile is identical for all OP L2s // Redstone Messenger - https://redstone.xyz/docs/contract-addresses @@ -13,6 +13,10 @@ const homeParameters = { realitio: realityETHConfig(unichainSepolia.chainId, "ETH", "3.0").address, variant: "Unichain", }, + [baseSepolia.chainId]: { + realitio: "0x86b653Dc9aa6d7311109276925927087573f91CB", + variant: "Base", + }, [optimismSepolia.chainId]: { realitio: realityETHConfig(optimismSepolia.chainId, "ETH", "3.0").address, variant: "Optimism", diff --git a/contracts/deployments/baseSepolia/.chainId b/contracts/deployments/baseSepolia/.chainId new file mode 100644 index 0000000..667f99d --- /dev/null +++ b/contracts/deployments/baseSepolia/.chainId @@ -0,0 +1 @@ +84532 \ No newline at end of file diff --git a/contracts/deployments/baseSepolia/RealitioHomeProxyBase.json b/contracts/deployments/baseSepolia/RealitioHomeProxyBase.json new file mode 100644 index 0000000..059d074 --- /dev/null +++ b/contracts/deployments/baseSepolia/RealitioHomeProxyBase.json @@ -0,0 +1,715 @@ +{ + "address": "0xd919c6Edfb458C15c12b921Cbc9F6eEf06F0E9c5", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IRealitio", + "name": "_realitio", + "type": "address" + }, + { + "internalType": "string", + "name": "_metadata", + "type": "string" + }, + { + "internalType": "address", + "name": "_foreignProxy", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_foreignChainId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "ArbitrationFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + } + ], + "name": "ArbitrationFinished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_answer", + "type": "bytes32" + } + ], + "name": "ArbitratorAnswered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "RequestAcknowledged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "RequestCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_maxPrevious", + "type": "uint256" + } + ], + "name": "RequestNotified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_maxPrevious", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "_reason", + "type": "string" + } + ], + "name": "RequestRejected", + "type": "event" + }, + { + "inputs": [], + "name": "MIN_GAS_LIMIT", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "foreignChainId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "foreignProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "handleNotifiedRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "handleRejectedRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "messenger", + "outputs": [ + { + "internalType": "contract ICrossDomainMessenger", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "metadata", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "questionIDToRequester", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "realitio", + "outputs": [ + { + "internalType": "contract IRealitio", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_answer", + "type": "bytes32" + } + ], + "name": "receiveArbitrationAnswer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "receiveArbitrationFailure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxPrevious", + "type": "uint256" + } + ], + "name": "receiveArbitrationRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_lastHistoryHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_lastAnswerOrCommitmentID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_lastAnswerer", + "type": "address" + } + ], + "name": "reportArbitrationAnswer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "requests", + "outputs": [ + { + "internalType": "enum RealitioHomeProxyOptimism.Status", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "arbitratorAnswer", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x51f7f9faa53dfe1a553ad1e81dd77cb234e76f989b33bd31cfc0f70b392907db", + "receipt": { + "to": null, + "from": "0xbDFd060ac349aC8b041D89aC491c89A78b4930E4", + "contractAddress": "0xd919c6Edfb458C15c12b921Cbc9F6eEf06F0E9c5", + "transactionIndex": 62, + "gasUsed": "1036666", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe0c6da24fd4bb228cff035a8b92761e43b36e4e16df61283cf9a3d1c9c047092", + "transactionHash": "0x51f7f9faa53dfe1a553ad1e81dd77cb234e76f989b33bd31cfc0f70b392907db", + "logs": [], + "blockNumber": 34622262, + "cumulativeGasUsed": "8822100", + "status": 1, + "byzantium": true + }, + "args": [ + "0x86b653Dc9aa6d7311109276925927087573f91CB", + "{\"tos\":\"ipfs://bafkreigrh43a6mw3avk37pqbmsnuauzepnaf7gvcqqcdouebfakksarpxy\", \"foreignProxy\":true}", + "0x7331A1512DBe2d77bc19e8D2b923fD76214c0F77", + 11155111 + ], + "numDeployments": 2, + "solcInputHash": "0ffeb3d2f5ec036c9dc629d60f0780f6", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IRealitio\",\"name\":\"_realitio\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_metadata\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_foreignProxy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_foreignChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"ArbitrationFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"}],\"name\":\"ArbitrationFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_answer\",\"type\":\"bytes32\"}],\"name\":\"ArbitratorAnswered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"RequestAcknowledged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"RequestCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_maxPrevious\",\"type\":\"uint256\"}],\"name\":\"RequestNotified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_maxPrevious\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_reason\",\"type\":\"string\"}],\"name\":\"RequestRejected\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MIN_GAS_LIMIT\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"foreignChainId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"foreignProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"handleNotifiedRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"handleRejectedRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contract ICrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"metadata\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"questionIDToRequester\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"realitio\",\"outputs\":[{\"internalType\":\"contract IRealitio\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_answer\",\"type\":\"bytes32\"}],\"name\":\"receiveArbitrationAnswer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"receiveArbitrationFailure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxPrevious\",\"type\":\"uint256\"}],\"name\":\"receiveArbitrationRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_lastHistoryHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_lastAnswerOrCommitmentID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_lastAnswerer\",\"type\":\"address\"}],\"name\":\"reportArbitrationAnswer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"requests\",\"outputs\":[{\"internalType\":\"enum RealitioHomeProxyOptimism.Status\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"arbitratorAnswer\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"https://docs.optimism.io/app-developers/bridging/messaging\",\"events\":{\"ArbitrationFailed(bytes32,address)\":{\"details\":\"This will happen if the arbitration fee increases in between the arbitration request and acknowledgement.\",\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"ArbitrationFinished(bytes32)\":{\"params\":{\"_questionID\":\"The ID of the question.\"}},\"ArbitratorAnswered(bytes32,bytes32)\":{\"params\":{\"_answer\":\"The answer from the arbitrator.\",\"_questionID\":\"The ID of the question.\"}},\"RequestAcknowledged(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"RequestCanceled(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"RequestNotified(bytes32,address,uint256)\":{\"params\":{\"_maxPrevious\":\"The maximum value of the previous bond for the question.\",\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"RequestRejected(bytes32,address,uint256,string)\":{\"details\":\"This can happen if the current bond for the question is higher than maxPrevious or if the question is already finalized.\",\"params\":{\"_maxPrevious\":\"The maximum value of the current bond for the question.\",\"_questionID\":\"The ID of the question.\",\"_reason\":\"The reason why the request was rejected.\",\"_requester\":\"The address of the arbitration requester.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_foreignChainId\":\"The ID of foreign chain (Sepolia/Mainnet).\",\"_foreignProxy\":\"Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.\",\"_metadata\":\"Metadata for Realitio.\",\"_realitio\":\"Realitio contract address.\"}},\"handleNotifiedRequest(bytes32,address)\":{\"details\":\"Relays arbitration request back to L1 after it has been notified by Realitio for a given question.\",\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the user that requested arbitration.\"}},\"handleRejectedRequest(bytes32,address)\":{\"details\":\"Relays arbitration request back to L1 after it has been rejected. Reasons why the request might be rejected: - The question does not exist - The question was not answered yet - The question bond value changed while the arbitration was being requested - Another request was already accepted\",\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the user that requested arbitration.\"}},\"receiveArbitrationAnswer(bytes32,bytes32)\":{\"params\":{\"_answer\":\"The answer from the arbitrator.\",\"_questionID\":\"The ID of the question.\"}},\"receiveArbitrationFailure(bytes32,address)\":{\"details\":\"Currently this can happen only if the arbitration cost increased.\",\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the user that requested arbitration.\"}},\"receiveArbitrationRequest(bytes32,address,uint256)\":{\"details\":\"Receives the requested arbitration for a question. TRUSTED.\",\"params\":{\"_maxPrevious\":\"The maximum value of the previous bond for the question.\",\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the user that requested arbitration.\"}},\"reportArbitrationAnswer(bytes32,bytes32,bytes32,address)\":{\"details\":\"The Realitio contract validates the input parameters passed to this method, so making this publicly accessible is safe.\",\"params\":{\"_lastAnswerOrCommitmentID\":\"The last answer given, or its commitment ID if it was a commitment, to the question in the Realitio contract.\",\"_lastAnswerer\":\"The last answerer to the question in the Realitio contract.\",\"_lastHistoryHash\":\"The history hash given with the last answer to the question in the Realitio contract.\",\"_questionID\":\"The ID of the question.\"}}},\"stateVariables\":{\"foreignChainId\":{\"details\":\"ID of the foreign chain, required for Realitio.\"},\"foreignProxy\":{\"details\":\"Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.\"},\"metadata\":{\"details\":\"Metadata for Realitio interface.\"},\"questionIDToRequester\":{\"details\":\"Associates a question ID with the requester who succeeded in requesting arbitration. questionIDToRequester[questionID]\"},\"realitio\":{\"details\":\"The address of the Realitio contract (v3.0 required). TRUSTED.\"},\"requests\":{\"details\":\"Associates an arbitration request with a question ID and a requester address. requests[questionID][requester]\"}},\"title\":\"Arbitration proxy for Realitio on home chain (eg. Optimism, Unichain, Redstone etc).\",\"version\":1},\"userdoc\":{\"events\":{\"ArbitrationFailed(bytes32,address)\":{\"notice\":\"To be emitted when the dispute could not be created on the Foreign Chain.\"},\"ArbitrationFinished(bytes32)\":{\"notice\":\"To be emitted when reporting the arbitrator answer to Realitio.\"},\"ArbitratorAnswered(bytes32,bytes32)\":{\"notice\":\"To be emitted when receiving the answer from the arbitrator.\"},\"RequestAcknowledged(bytes32,address)\":{\"notice\":\"To be emitted when the arbitration request acknowledgement is sent to the Foreign Chain.\"},\"RequestCanceled(bytes32,address)\":{\"notice\":\"To be emitted when the arbitration request is canceled.\"},\"RequestNotified(bytes32,address,uint256)\":{\"notice\":\"To be emitted when the Realitio contract has been notified of an arbitration request.\"},\"RequestRejected(bytes32,address,uint256,string)\":{\"notice\":\"To be emitted when arbitration request is rejected.\"}},\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates an arbitration proxy on the home chain.\"},\"receiveArbitrationAnswer(bytes32,bytes32)\":{\"notice\":\"Receives an answer to a specified question. TRUSTED.\"},\"receiveArbitrationFailure(bytes32,address)\":{\"notice\":\"Receives a failed attempt to request arbitration. TRUSTED.\"},\"reportArbitrationAnswer(bytes32,bytes32,bytes32,address)\":{\"notice\":\"Reports the answer provided by the arbitrator to a specified question.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/0.8/RealitioHomeProxyOptimism.sol\":\"RealitioHomeProxyOptimism\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@kleros/erc-792/contracts/IArbitrable.sol\":{\"content\":\"/**\\n * @authors: [@ferittuncer, @hbarcelos]\\n * @reviewers: [@remedcu*]\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n * SPDX-License-Identifier: MIT\\n */\\npragma solidity >=0.7;\\n\\nimport \\\"./IArbitrator.sol\\\";\\n\\n/**\\n * @title IArbitrable\\n * Arbitrable interface.\\n * When developing arbitrable contracts, we need to:\\n * - Define the action taken when a ruling is received by the contract.\\n * - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\n */\\ninterface IArbitrable {\\n /**\\n * @dev To be raised when a ruling is given.\\n * @param _arbitrator The arbitrator giving the ruling.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling The ruling which was given.\\n */\\n event Ruling(IArbitrator indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /**\\n * @dev Give a ruling for a dispute. Must be called by the arbitrator.\\n * The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n */\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x1803a3433a78c509b20bd9477a2c60a71b2ce1ee7e17eb0ef0601618a8a72526\",\"license\":\"MIT\"},\"@kleros/erc-792/contracts/IArbitrator.sol\":{\"content\":\"/**\\n * @authors: [@ferittuncer, @hbarcelos]\\n * @reviewers: [@remedcu*]\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity >=0.7;\\n\\nimport \\\"./IArbitrable.sol\\\";\\n\\n/**\\n * @title Arbitrator\\n * Arbitrator abstract contract.\\n * When developing arbitrator contracts we need to:\\n * - Define the functions for dispute creation (createDispute) and appeal (appeal). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n * - Define the functions for cost display (arbitrationCost and appealCost).\\n * - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\n */\\ninterface IArbitrator {\\n enum DisputeStatus {Waiting, Appealable, Solved}\\n\\n /**\\n * @dev To be emitted when a dispute is created.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev To be emitted when a dispute can be appealed.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event AppealPossible(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev To be emitted when the current ruling is appealed.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event AppealDecision(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev Create a dispute. Must be called by the arbitrable contract.\\n * Must be paid at least arbitrationCost(_extraData).\\n * @param _choices Amount of choices the arbitrator can make in this dispute.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return disputeID ID of the dispute created.\\n */\\n function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);\\n\\n /**\\n * @dev Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return cost Amount to be paid.\\n */\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /**\\n * @dev Appeal a ruling. Note that it has to be called before the arbitrator contract calls rule.\\n * @param _disputeID ID of the dispute to be appealed.\\n * @param _extraData Can be used to give extra info on the appeal.\\n */\\n function appeal(uint256 _disputeID, bytes calldata _extraData) external payable;\\n\\n /**\\n * @dev Compute the cost of appeal. It is recommended not to increase it often, as it can be higly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n * @param _disputeID ID of the dispute to be appealed.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return cost Amount to be paid.\\n */\\n function appealCost(uint256 _disputeID, bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /**\\n * @dev Compute the start and end of the dispute's current or next appeal period, if possible. If not known or appeal is impossible: should return (0, 0).\\n * @param _disputeID ID of the dispute.\\n * @return start The start of the period.\\n * @return end The end of the period.\\n */\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end);\\n\\n /**\\n * @dev Return the status of a dispute.\\n * @param _disputeID ID of the dispute to rule.\\n * @return status The status of the dispute.\\n */\\n function disputeStatus(uint256 _disputeID) external view returns (DisputeStatus status);\\n\\n /**\\n * @dev Return the current ruling of a dispute. This is useful for parties to know if they should appeal.\\n * @param _disputeID ID of the dispute.\\n * @return ruling The ruling which has been given or the one which will be given if there is no appeal.\\n */\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling);\\n}\\n\",\"keccak256\":\"0x240a4142f9ec379da0333dfc82409b7b058cff9ea118368eb5e8f15447996c1e\",\"license\":\"MIT\"},\"@kleros/erc-792/contracts/erc-1497/IEvidence.sol\":{\"content\":\"/**\\n * @authors: [@ferittuncer, @hbarcelos]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n * SPDX-License-Identifier: MIT\\n */\\npragma solidity >=0.7;\\n\\nimport \\\"../IArbitrator.sol\\\";\\n\\n/** @title IEvidence\\n * ERC-1497: Evidence Standard\\n */\\ninterface IEvidence {\\n /**\\n * @dev To be emitted when meta-evidence is submitted.\\n * @param _metaEvidenceID Unique identifier of meta-evidence.\\n * @param _evidence A link to the meta-evidence JSON.\\n */\\n event MetaEvidence(uint256 indexed _metaEvidenceID, string _evidence);\\n\\n /**\\n * @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n * @param _arbitrator The arbitrator of the contract.\\n * @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.\\n * @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n * @param _evidence A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json.\\n */\\n event Evidence(\\n IArbitrator indexed _arbitrator,\\n uint256 indexed _evidenceGroupID,\\n address indexed _party,\\n string _evidence\\n );\\n\\n /**\\n * @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n * @param _arbitrator The arbitrator of the contract.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _metaEvidenceID Unique identifier of meta-evidence.\\n * @param _evidenceGroupID Unique identifier of the evidence group that is linked to this dispute.\\n */\\n event Dispute(\\n IArbitrator indexed _arbitrator,\\n uint256 indexed _disputeID,\\n uint256 _metaEvidenceID,\\n uint256 _evidenceGroupID\\n );\\n}\\n\",\"keccak256\":\"0x1ccedf5213730632540c748486637d7b1977ee73375818bf498a8276ca49dd13\",\"license\":\"MIT\"},\"src/0.8/RealitioHomeProxyOptimism.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\n\\r\\n/**\\r\\n * @authors: [@anmol-dhiman, @unknownunknown1]\\r\\n * @reviewers: [@jaybuidl, @kokialgo]\\r\\n * @auditors: []\\r\\n * @bounties: []\\r\\n * @deployments: []\\r\\n */\\r\\npragma solidity 0.8.25;\\r\\n\\r\\nimport \\\"./interfaces/IRealitio.sol\\\";\\r\\nimport {IForeignArbitrationProxy, IHomeArbitrationProxy} from \\\"./interfaces/IArbitrationProxies.sol\\\";\\r\\nimport {ICrossDomainMessenger} from \\\"./interfaces/optimism/ICrossDomainMessenger.sol\\\";\\r\\n\\r\\n/**\\r\\n * @title Arbitration proxy for Realitio on home chain (eg. Optimism, Unichain, Redstone etc).\\r\\n * @dev https://docs.optimism.io/app-developers/bridging/messaging\\r\\n */\\r\\ncontract RealitioHomeProxyOptimism is IHomeArbitrationProxy {\\r\\n ICrossDomainMessenger public constant messenger = ICrossDomainMessenger(0x4200000000000000000000000000000000000007); // Precompile for L2 -> L1 communication, identical for all OP L2s\\r\\n uint32 public constant MIN_GAS_LIMIT = 1500000; // Gas limit of the transaction call.\\r\\n\\r\\n /// @dev The address of the Realitio contract (v3.0 required). TRUSTED.\\r\\n IRealitio public immutable realitio;\\r\\n /// @dev Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.\\r\\n address public immutable foreignProxy;\\r\\n\\r\\n /// @dev ID of the foreign chain, required for Realitio.\\r\\n bytes32 public immutable foreignChainId;\\r\\n\\r\\n /// @dev Metadata for Realitio interface.\\r\\n string public override metadata;\\r\\n\\r\\n enum Status {\\r\\n None,\\r\\n Rejected,\\r\\n Notified,\\r\\n AwaitingRuling,\\r\\n Ruled,\\r\\n Finished\\r\\n }\\r\\n\\r\\n struct Request {\\r\\n Status status;\\r\\n bytes32 arbitratorAnswer;\\r\\n }\\r\\n\\r\\n /// @dev Associates an arbitration request with a question ID and a requester address. requests[questionID][requester]\\r\\n mapping(bytes32 => mapping(address => Request)) public requests;\\r\\n\\r\\n /// @dev Associates a question ID with the requester who succeeded in requesting arbitration. questionIDToRequester[questionID]\\r\\n mapping(bytes32 => address) public questionIDToRequester;\\r\\n\\r\\n modifier onlyForeignProxy() virtual {\\r\\n require(msg.sender == address(messenger), \\\"NOT_MESSENGER\\\");\\r\\n require(messenger.xDomainMessageSender() == foreignProxy, \\\"Can only be called by Foreign Proxy\\\");\\r\\n _;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Creates an arbitration proxy on the home chain.\\r\\n * @param _realitio Realitio contract address.\\r\\n * @param _metadata Metadata for Realitio.\\r\\n * @param _foreignProxy Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.\\r\\n * @param _foreignChainId The ID of foreign chain (Sepolia/Mainnet).\\r\\n */\\r\\n constructor(IRealitio _realitio, string memory _metadata, address _foreignProxy, uint256 _foreignChainId) {\\r\\n realitio = _realitio;\\r\\n metadata = _metadata;\\r\\n foreignProxy = _foreignProxy;\\r\\n foreignChainId = bytes32(_foreignChainId);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Receives the requested arbitration for a question. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the user that requested arbitration.\\r\\n * @param _maxPrevious The maximum value of the previous bond for the question.\\r\\n */\\r\\n function receiveArbitrationRequest(\\r\\n bytes32 _questionID,\\r\\n address _requester,\\r\\n uint256 _maxPrevious\\r\\n ) external override onlyForeignProxy {\\r\\n Request storage request = requests[_questionID][_requester];\\r\\n require(request.status == Status.None, \\\"Request already exists\\\");\\r\\n\\r\\n try realitio.notifyOfArbitrationRequest(_questionID, _requester, _maxPrevious) {\\r\\n request.status = Status.Notified;\\r\\n questionIDToRequester[_questionID] = _requester;\\r\\n\\r\\n emit RequestNotified(_questionID, _requester, _maxPrevious);\\r\\n } catch Error(string memory reason) {\\r\\n /*\\r\\n * Will fail if:\\r\\n * - The question does not exist.\\r\\n * - The question was not answered yet.\\r\\n * - Another request was already accepted.\\r\\n * - Someone increased the bond on the question to a value > _maxPrevious\\r\\n */\\r\\n request.status = Status.Rejected;\\r\\n\\r\\n emit RequestRejected(_questionID, _requester, _maxPrevious, reason);\\r\\n } catch {\\r\\n // In case `reject` did not have a reason string or some other error happened\\r\\n request.status = Status.Rejected;\\r\\n\\r\\n emit RequestRejected(_questionID, _requester, _maxPrevious, \\\"\\\");\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Relays arbitration request back to L1 after it has been notified by Realitio for a given question.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the user that requested arbitration.\\r\\n */\\r\\n function handleNotifiedRequest(bytes32 _questionID, address _requester) external override {\\r\\n Request storage request = requests[_questionID][_requester];\\r\\n require(request.status == Status.Notified || request.status == Status.AwaitingRuling, \\\"Invalid request status\\\");\\r\\n\\r\\n request.status = Status.AwaitingRuling;\\r\\n\\r\\n bytes4 selector = IForeignArbitrationProxy.receiveArbitrationAcknowledgement.selector;\\r\\n bytes memory data = abi.encodeWithSelector(selector, _questionID, _requester);\\r\\n sendToL1(data);\\r\\n emit RequestAcknowledged(_questionID, _requester);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @dev Relays arbitration request back to L1 after it has been rejected.\\r\\n * Reasons why the request might be rejected:\\r\\n * - The question does not exist\\r\\n * - The question was not answered yet\\r\\n * - The question bond value changed while the arbitration was being requested\\r\\n * - Another request was already accepted\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the user that requested arbitration.\\r\\n */\\r\\n function handleRejectedRequest(bytes32 _questionID, address _requester) external override {\\r\\n Request storage request = requests[_questionID][_requester];\\r\\n require(request.status == Status.Rejected, \\\"Invalid request status\\\");\\r\\n\\r\\n // At this point, only the request.status is set, simply resetting the status to Status.None is enough.\\r\\n request.status = Status.None;\\r\\n\\r\\n bytes4 selector = IForeignArbitrationProxy.receiveArbitrationCancelation.selector;\\r\\n bytes memory data = abi.encodeWithSelector(selector, _questionID, _requester);\\r\\n sendToL1(data);\\r\\n emit RequestCanceled(_questionID, _requester);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Receives a failed attempt to request arbitration. TRUSTED.\\r\\n * @dev Currently this can happen only if the arbitration cost increased.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the user that requested arbitration.\\r\\n */\\r\\n function receiveArbitrationFailure(bytes32 _questionID, address _requester) external override onlyForeignProxy {\\r\\n Request storage request = requests[_questionID][_requester];\\r\\n require(request.status == Status.AwaitingRuling, \\\"Invalid request status\\\");\\r\\n\\r\\n // At this point, only the request.status is set, simply resetting the status to Status.None is enough.\\r\\n request.status = Status.None;\\r\\n\\r\\n realitio.cancelArbitration(_questionID);\\r\\n\\r\\n emit ArbitrationFailed(_questionID, _requester);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Receives an answer to a specified question. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _answer The answer from the arbitrator.\\r\\n */\\r\\n function receiveArbitrationAnswer(bytes32 _questionID, bytes32 _answer) external override onlyForeignProxy {\\r\\n address requester = questionIDToRequester[_questionID];\\r\\n Request storage request = requests[_questionID][requester];\\r\\n require(request.status == Status.AwaitingRuling, \\\"Invalid request status\\\");\\r\\n\\r\\n request.status = Status.Ruled;\\r\\n request.arbitratorAnswer = _answer;\\r\\n\\r\\n emit ArbitratorAnswered(_questionID, _answer);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Reports the answer provided by the arbitrator to a specified question.\\r\\n * @dev The Realitio contract validates the input parameters passed to this method,\\r\\n * so making this publicly accessible is safe.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _lastHistoryHash The history hash given with the last answer to the question in the Realitio contract.\\r\\n * @param _lastAnswerOrCommitmentID The last answer given, or its commitment ID if it was a commitment,\\r\\n * to the question in the Realitio contract.\\r\\n * @param _lastAnswerer The last answerer to the question in the Realitio contract.\\r\\n */\\r\\n function reportArbitrationAnswer(\\r\\n bytes32 _questionID,\\r\\n bytes32 _lastHistoryHash,\\r\\n bytes32 _lastAnswerOrCommitmentID,\\r\\n address _lastAnswerer\\r\\n ) external {\\r\\n address requester = questionIDToRequester[_questionID];\\r\\n Request storage request = requests[_questionID][requester];\\r\\n require(request.status == Status.Ruled, \\\"Arbitrator has not ruled yet\\\");\\r\\n\\r\\n request.status = Status.Finished;\\r\\n\\r\\n realitio.assignWinnerAndSubmitAnswerByArbitrator(\\r\\n _questionID,\\r\\n request.arbitratorAnswer,\\r\\n requester,\\r\\n _lastHistoryHash,\\r\\n _lastAnswerOrCommitmentID,\\r\\n _lastAnswerer\\r\\n );\\r\\n\\r\\n emit ArbitrationFinished(_questionID);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Sends a message to L1.\\r\\n * @param _data The data sent.\\r\\n */\\r\\n function sendToL1(bytes memory _data) internal virtual {\\r\\n messenger.sendMessage(foreignProxy, _data, MIN_GAS_LIMIT);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x81c416015f840ae8f313eacf8cc70bad4bae74788315006fc1a67ff16f9fbc1e\",\"license\":\"MIT\"},\"src/0.8/interfaces/IArbitrationProxies.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\npragma solidity 0.8.25;\\r\\n\\r\\nimport {IArbitrable} from \\\"@kleros/erc-792/contracts/IArbitrable.sol\\\";\\r\\nimport {IEvidence} from \\\"@kleros/erc-792/contracts/erc-1497/IEvidence.sol\\\";\\r\\nimport {IRealitio} from \\\"./IRealitio.sol\\\";\\r\\n\\r\\ninterface IHomeArbitrationProxy {\\r\\n /**\\r\\n * @notice To be emitted when the Realitio contract has been notified of an arbitration request.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the previous bond for the question.\\r\\n */\\r\\n event RequestNotified(bytes32 indexed _questionID, address indexed _requester, uint256 _maxPrevious);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when arbitration request is rejected.\\r\\n * @dev This can happen if the current bond for the question is higher than maxPrevious\\r\\n * or if the question is already finalized.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question.\\r\\n * @param _reason The reason why the request was rejected.\\r\\n */\\r\\n event RequestRejected(\\r\\n bytes32 indexed _questionID,\\r\\n address indexed _requester,\\r\\n uint256 _maxPrevious,\\r\\n string _reason\\r\\n );\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when the arbitration request acknowledgement is sent to the Foreign Chain.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event RequestAcknowledged(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when the arbitration request is canceled.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event RequestCanceled(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when the dispute could not be created on the Foreign Chain.\\r\\n * @dev This will happen if the arbitration fee increases in between the arbitration request and acknowledgement.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event ArbitrationFailed(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when receiving the answer from the arbitrator.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _answer The answer from the arbitrator.\\r\\n */\\r\\n event ArbitratorAnswered(bytes32 indexed _questionID, bytes32 _answer);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when reporting the arbitrator answer to Realitio.\\r\\n * @param _questionID The ID of the question.\\r\\n */\\r\\n event ArbitrationFinished(bytes32 indexed _questionID);\\r\\n\\r\\n /**\\r\\n * @dev Receives the requested arbitration for a question. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n function receiveArbitrationRequest(bytes32 _questionID, address _requester, uint256 _maxPrevious) external;\\r\\n\\r\\n /**\\r\\n * @notice Handles arbitration request after it has been notified to Realitio for a given question.\\r\\n * @dev This method exists because `receiveArbitrationRequest` is called by\\r\\n * the bridge and cannot send messages back to it.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleNotifiedRequest(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Handles arbitration request after it has been rejected.\\r\\n * @dev This method exists because `receiveArbitrationRequest` is called by\\r\\n * the bridge and cannot send messages back to it.\\r\\n * Reasons why the request might be rejected:\\r\\n * - The question does not exist\\r\\n * - The question was not answered yet\\r\\n * - The quesiton bond value changed while the arbitration was being requested\\r\\n * - Another request was already accepted\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleRejectedRequest(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Receives a failed attempt to request arbitration. TRUSTED.\\r\\n * @dev Currently this can happen only if the arbitration cost increased.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function receiveArbitrationFailure(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Receives the answer to a specified question. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _answer The answer from the arbitrator.\\r\\n */\\r\\n function receiveArbitrationAnswer(bytes32 _questionID, bytes32 _answer) external;\\r\\n\\r\\n /** @notice Provides a string of json-encoded metadata with the following properties:\\r\\n - tos: A URI representing the location of a terms-of-service document for the arbitrator.\\r\\n - template_hashes: An array of hashes of templates supported by the arbitrator. If you have a numerical ID for a template registered with Reality.eth, you can look up this hash by calling the Reality.eth template_hashes() function.\\r\\n * @dev Template_hashes won't be used by this home proxy. \\r\\n */\\r\\n function metadata() external view returns (string calldata);\\r\\n\\r\\n /**\\r\\n * @notice Returns the address of Reality instance.\\r\\n * @return Realitio address.\\r\\n */\\r\\n function realitio() external view returns (IRealitio);\\r\\n}\\r\\n\\r\\ninterface IForeignArbitrationProxy {\\r\\n /**\\r\\n * @notice Should be emitted when the arbitration is requested.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n event ArbitrationRequested(bytes32 indexed _questionID, address indexed _requester, uint256 _maxPrevious);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the dispute is created.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _disputeID The ID of the dispute.\\r\\n */\\r\\n event ArbitrationCreated(bytes32 indexed _questionID, address indexed _requester, uint256 indexed _disputeID);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the arbitration is canceled by the Home Chain.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event ArbitrationCanceled(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the dispute could not be created.\\r\\n * @dev This will happen if there is an increase in the arbitration fees\\r\\n * between the time the arbitration is made and the time it is acknowledged.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event ArbitrationFailed(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the ruling is relayed to home proxy manually. Some implementations may not emit this event.\\r\\n * @param _questionID The ID of the question with the ruling to relay.\\r\\n * @param _ruling Ruling converted into Realitio format.\\r\\n */\\r\\n event RulingRelayed(bytes32 _questionID, bytes32 _ruling);\\r\\n\\r\\n /**\\r\\n * @notice Requests arbitration for the given question and contested answer.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n function requestArbitration(bytes32 _questionID, uint256 _maxPrevious) external payable;\\r\\n\\r\\n /**\\r\\n * @notice Receives the acknowledgement of the arbitration request for the given question and requester. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function receiveArbitrationAcknowledgement(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Receives the cancelation of the arbitration request for the given question and requester. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function receiveArbitrationCancelation(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Cancels the arbitration in case the dispute could not be created.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleFailedDisputeCreation(bytes32 _questionID, address _requester) external payable;\\r\\n\\r\\n /**\\r\\n * @notice Gets the fee to create a dispute.\\r\\n * @param _questionID the ID of the question.\\r\\n * @return The fee to create a dispute.\\r\\n */\\r\\n function getDisputeFee(bytes32 _questionID) external view returns (uint256);\\r\\n\\r\\n /**\\r\\n * @notice Returns the address of the home proxy.\\r\\n * @return Home proxy address.\\r\\n */\\r\\n function homeProxy() external view returns (address);\\r\\n\\r\\n /**\\r\\n * @notice Returns the creation block of the dispute.\\r\\n * @param _disputeID the ID of the dispute.\\r\\n * @return Block number of dispute creation.\\r\\n */\\r\\n function arbitrationCreatedBlock(uint256 _disputeID) external view returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0x3e7cd7b21cfcb8f2c6167e9d95f9a911a8ec402f953840a4bc301099b233c0b8\",\"license\":\"MIT\"},\"src/0.8/interfaces/IRealitio.sol\":{\"content\":\"/* solhint-disable var-name-mixedcase */\\r\\n// SPDX-License-Identifier: MIT\\r\\n\\r\\n/**\\r\\n * Interface of https://github.com/RealityETH/reality-eth-monorepo/blob/main/packages/contracts/flat/RealityETH-3.0.sol.\\r\\n * @reviewers: [@hbarcelos, @fnanni-0, @nix1g, @unknownunknown1, @ferittuncer, @jaybuidl]\\r\\n * @auditors: []\\r\\n * @bounties: []\\r\\n * @deployments: []\\r\\n */\\r\\n\\r\\npragma solidity 0.8.25;\\r\\n\\r\\ninterface IRealitio {\\r\\n event LogNewAnswer(\\r\\n bytes32 answer,\\r\\n bytes32 indexed question_id,\\r\\n bytes32 history_hash,\\r\\n address indexed user,\\r\\n uint256 bond,\\r\\n uint256 ts,\\r\\n bool is_commitment\\r\\n );\\r\\n\\r\\n event LogNewTemplate(uint256 indexed template_id, address indexed user, string question_text);\\r\\n\\r\\n event LogNewQuestion(\\r\\n bytes32 indexed question_id,\\r\\n address indexed user,\\r\\n uint256 template_id,\\r\\n string question,\\r\\n bytes32 indexed content_hash,\\r\\n address arbitrator,\\r\\n uint32 timeout,\\r\\n uint32 opening_ts,\\r\\n uint256 nonce,\\r\\n uint256 created\\r\\n );\\r\\n\\r\\n /**\\r\\n * @dev The arbitrator contract is trusted to only call this if they've been paid, and tell us who paid them.\\r\\n * @notice Notify the contract that the arbitrator has been paid for a question, freezing it pending their decision.\\r\\n * @param question_id The ID of the question.\\r\\n * @param requester The account that requested arbitration.\\r\\n * @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.\\r\\n */\\r\\n function notifyOfArbitrationRequest(bytes32 question_id, address requester, uint256 max_previous) external;\\r\\n\\r\\n /**\\r\\n * @notice Cancel a previously-requested arbitration and extend the timeout\\r\\n * @dev Useful when doing arbitration across chains that can't be requested atomically\\r\\n * @param question_id The ID of the question\\r\\n */\\r\\n function cancelArbitration(bytes32 question_id) external;\\r\\n\\r\\n /**\\r\\n * @notice Submit the answer for a question, for use by the arbitrator, working out the appropriate winner based on the last answer details.\\r\\n * @dev Doesn't require (or allow) a bond.\\r\\n * @param question_id The ID of the question\\r\\n * @param answer The answer, encoded into bytes32\\r\\n * @param payee_if_wrong The account to be credited as winner if the last answer given is wrong, usually the account that paid the arbitrator\\r\\n * @param last_history_hash The history hash before the final one\\r\\n * @param last_answer_or_commitment_id The last answer given, or the commitment ID if it was a commitment.\\r\\n * @param last_answerer The address that supplied the last answer\\r\\n */\\r\\n function assignWinnerAndSubmitAnswerByArbitrator(\\r\\n bytes32 question_id,\\r\\n bytes32 answer,\\r\\n address payee_if_wrong,\\r\\n bytes32 last_history_hash,\\r\\n bytes32 last_answer_or_commitment_id,\\r\\n address last_answerer\\r\\n ) external;\\r\\n}\\r\\n\",\"keccak256\":\"0x91211c4cd47ce3d5773c6e3763d421fb8514522a157436f354c03a4b22a1c9dd\",\"license\":\"MIT\"},\"src/0.8/interfaces/optimism/ICrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\n\\r\\npragma solidity 0.8.25;\\r\\n// @dev https://github.com/ethereum-optimism/optimism/blob/v1.7.7/packages/contracts-bedrock/src/universal/CrossDomainMessenger.sol\\r\\ninterface ICrossDomainMessenger {\\r\\n function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external;\\r\\n\\r\\n function xDomainMessageSender() external view returns (address);\\r\\n}\\r\\n\",\"keccak256\":\"0x0199f0a66b12320b8b05bf2f98eac49c61c13a5f4ddfe643a3135f9b613c754c\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e06040523461026357611234803803806100198161027c565b928339810190608081830312610263578051916001600160a01b03918284168403610263576020818101516001600160401b03929083811161026357810193601f9181838701121561026357855185811161024d57601f19966100818286018916870161027c565b9382855286838301011161026357859060005b8381106102685750506000918401015260408101519687168703610263576060015196608052805193841161024d57600054926001938481811c91168015610243575b8282101461022d578381116101e7575b5080928511600114610182575083945090839291600094610177575b50501b916000199060031b1c1916176000555b60a05260c052604051610f9290816102a282396080518181816102cf015281816107330152818161081b0152610b71015260a05181818161012101528181610277015281816106c7015281816109940152610edd015260c051816108610152f35b015192503880610103565b9294849081166000805284600020946000905b888383106101cd57505050106101b4575b505050811b01600055610116565b015160001960f88460031b161c191690553880806101a6565b858701518855909601959485019487935090810190610195565b60008052816000208480880160051c820192848910610224575b0160051c019085905b8281106102185750506100e7565b6000815501859061020a565b92508192610201565b634e487b7160e01b600052602260045260246000fd5b90607f16906100d7565b634e487b7160e01b600052604160045260246000fd5b600080fd5b818101830151868201840152879201610094565b6040519190601f01601f191682016001600160401b0381118382101761024d5760405256fe60806040908082526004918236101561001757600080fd5b600091823560e01c9081631865fed114610c7d57508063241a9f8214610aff578063392f37e9146109e45780633cb747bf146109c35780636e190f17146109805780637ce1ffeb1461096357806391602fd71461088457806395e088fc1461084a578063bc8802a214610807578063bf6569e014610662578063c510faf7146105f0578063c77cccc914610502578063ccd6e8d2146102085763d75a86e0146100bf57600080fd5b346102045780600319360112610204578235906007602160991b0190602435906100ea338414610d9a565b80518093636e296e4560e01b8252818860209687935afa9081156101fa5786916101cd575b506001600160a01b03906101489082167f0000000000000000000000000000000000000000000000000000000000000000831614610df5565b8486526002845281862054166001845281862090600052835280600020805460ff811660068110156101ba57917f1813d15d8cef51cff8bbd419a8e13e0655c1babea320dea4174d5e7bc40c42949697986001926101a96003889614610d55565b60ff1916178155015551908152a280f35b634e487b7160e01b885260218952602488fd5b6101ed9150843d86116101f3575b6101e58183610cf3565b810190610dd6565b3861010f565b503d6101db565b82513d88823e3d90fd5b5080fd5b5082346104fe5760603660031901126104fe57803590610226610cae565b926007602160991b01906044359061023f338414610d9a565b8051938493636e296e4560e01b8552848260209687935afa9485156104f45788956104d5575b506001600160a01b039461029e9086167f0000000000000000000000000000000000000000000000000000000000000000871614610df5565b8588526001845284828920971696876000528452816000209460ff86541660068110156104c25761048757908892917f000000000000000000000000000000000000000000000000000000000000000016803b156104835783808a60648b838851968794859363f6a94ecb60e01b85528a85015260248401528b60448401525af1918261046f575b505061041657600190839060033d11610406575b506308c379a01461039e575b610355575b5050505050505080f35b806060947ff677e762f2ddc710deec335dd0cfa8a65cc9c9c351b268243be8629f2e8d1b5f96600160ff198254161790558151948552840152820152a38180808080858161034b565b6103a6610e4d565b806103b2575b50610346565b905087877ff677e762f2ddc710deec335dd0cfa8a65cc9c9c351b268243be8629f2e8d1b5f6103fd8694600160ff198c5416178b5586519182918a8352888c84015288830190610d15565b0390a3896103ac565b905083803e825160e01c8a61033a565b5090507ff56e18fc84dbd66db78337b5bd0973943fa70c9b52243a540bdac79274f6682d93600260ff1982541617905584875260028352808720866bffffffffffffffffffffffff60a01b82541617905551908152a380f35b61047890610cc9565b61048357838b610326565b8380fd5b5083606492519162461bcd60e51b835282015260166024820152755265717565737420616c72656164792065786973747360501b6044820152fd5b634e487b7160e01b8a526021835260248afd5b6104ed919550843d86116101f3576101e58183610cf3565b9388610265565b82513d8a823e3d90fd5b8280fd5b508290346104fe57806003193601126104fe57813590610520610cae565b9082855260016020528085209360018060a01b0383169485600052602052816000209081549060ff82169060068210156105dd5750926105b1926105b6959261056e60016105a39714610d55565b60ff19169055516317c4df9160e31b6020820152602481018690526001600160a01b0390911660448201529182906064820190565b03601f198101835282610cf3565b610ebf565b7ff313a768599b60b7f8aedb7757d867d09463365b79b55b86ed3c961e6da5a2498380a380f35b634e487b7160e01b895260219052602488fd5b5091903461065f578260031936011261065f5761060b610cae565b8235825260016020528382209060018060a01b031660005260205282600020600160ff82541691015491845193600683101561064c57505082526020820152f35b634e487b7160e01b825260219052602490fd5b80fd5b503461020457806003193601126102045782358361067e610cae565b9260206007602160991b01610694338214610d9a565b8251636e296e4560e01b815297889182905afa9586156107fd5785966107dc575b506001600160a01b03956106ee9087167f0000000000000000000000000000000000000000000000000000000000000000881614610df5565b82855260016020528581862094169384600052602052806000209586549660ff88169760068910156107c95761072b6003899a9997989914610d55565b60ff191690557f00000000000000000000000000000000000000000000000000000000000000001691823b156104835784602485928385519687948593630ebbdd2b60e41b85528401525af19081156107c057506107ac575b50807f9beda0c81abc1c65da7685f113195974dfddb781dfde6263e5a1b13a5356ffad91a380f35b6107b590610cc9565b6104fe578238610784565b513d84823e3d90fd5b634e487b7160e01b885260218552602488fd5b6107f691965060203d6020116101f3576101e58183610cf3565b94386106b5565b81513d87823e3d90fd5b5034610204578160031936011261020457517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610204578160031936011261020457602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b508290346104fe57806003193601126104fe578135906108a2610cae565b9082855260016020528085209360018060a01b0383169485600052602052816000209081549060ff82169060068210156105dd5750926105b192600361093296936108fc8760026105a39914908115610959575b50610d55565b60ff19161790555163e742e2ed60e01b6020820152602481018690526001600160a01b0390911660448201529182906064820190565b7fff09615c531ab8799ea1c67a0952ddbef1c864ef91d390995d0dc07656f4210f8380a380f35b849150148d6108f6565b5034610204578160031936011261020457602090516216e3608152f35b5034610204578160031936011261020457517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610204578160031936011261020457516007602160991b018152602090f35b50903461065f578060031936011261065f578151918182549260018460011c9160018616958615610af5575b6020968785108114610ae2578899509688969785829a529182600014610abb575050600114610a60575b505050610a5c9291610a4d910385610cf3565b51928284938452830190610d15565b0390f35b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610aa35750505082010181610a4d610a5c610a3a565b8054848a018601528895508794909301928101610a8a565b60ff19168782015293151560051b86019093019350849250610a4d9150610a5c9050610a3a565b634e487b7160e01b835260228a52602483fd5b92607f1692610a10565b509134610204576080366003190112610204578035926064356001600160a01b038181169391849003610c7957858552600260205280838620541693600160205283862085875260205283862091825460ff81166006811015610c66578503610c235790600560019260ff19161784557f00000000000000000000000000000000000000000000000000000000000000001692015494823b15610c1f579286889360c49382968851998a9788966335138a4f60e21b8852870152602486015260448501526024356064850152604435608485015260a48401525af19081156107c05750610c10575b50907f2abf2fd86256e4607561adae782a4853682b6c0b976995a9a45c5fc3a17573868280a280f35b610c1990610cc9565b38610be7565b8680fd5b855162461bcd60e51b8152602081870152601c60248201527f41726269747261746f7220686173206e6f742072756c656420796574000000006044820152606490fd5b634e487b7160e01b895260218652602489fd5b8480fd5b9291905034610204576020366003190112610204579235815260026020908152929020546001600160a01b03168152f35b602435906001600160a01b0382168203610cc457565b600080fd5b67ffffffffffffffff8111610cdd57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610cdd57604052565b919082519283825260005b848110610d41575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610d20565b15610d5c57565b60405162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b6044820152606490fd5b15610da157565b60405162461bcd60e51b815260206004820152600d60248201526c2727aa2fa6a2a9a9a2a723a2a960991b6044820152606490fd5b90816020910312610cc457516001600160a01b0381168103610cc45790565b15610dfc57565b60405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c792062652063616c6c656420627920466f726569676e2050726044820152626f787960e81b6064820152608490fd5b600060443d10610eab57604051600319913d83016004833e815167ffffffffffffffff918282113d602484011117610eae57818401948551938411610eb6573d85010160208487010111610eae5750610eab92910160200190610cf3565b90565b949350505050565b50949350505050565b6007602160991b01803b15610cc457604051633dbb202b60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600482015260606024820152916000918391829084908290610f2b906064830190610d15565b6216e360604483015203925af18015610f5057610f455750565b610f4e90610cc9565b565b6040513d6000823e3d90fdfea2646970667358221220ee37c9f4c8520c873da2e9cebfffdbc6c8dc79f5776e96b834a6697257fb460264736f6c63430008190033", + "deployedBytecode": "0x60806040908082526004918236101561001757600080fd5b600091823560e01c9081631865fed114610c7d57508063241a9f8214610aff578063392f37e9146109e45780633cb747bf146109c35780636e190f17146109805780637ce1ffeb1461096357806391602fd71461088457806395e088fc1461084a578063bc8802a214610807578063bf6569e014610662578063c510faf7146105f0578063c77cccc914610502578063ccd6e8d2146102085763d75a86e0146100bf57600080fd5b346102045780600319360112610204578235906007602160991b0190602435906100ea338414610d9a565b80518093636e296e4560e01b8252818860209687935afa9081156101fa5786916101cd575b506001600160a01b03906101489082167f0000000000000000000000000000000000000000000000000000000000000000831614610df5565b8486526002845281862054166001845281862090600052835280600020805460ff811660068110156101ba57917f1813d15d8cef51cff8bbd419a8e13e0655c1babea320dea4174d5e7bc40c42949697986001926101a96003889614610d55565b60ff1916178155015551908152a280f35b634e487b7160e01b885260218952602488fd5b6101ed9150843d86116101f3575b6101e58183610cf3565b810190610dd6565b3861010f565b503d6101db565b82513d88823e3d90fd5b5080fd5b5082346104fe5760603660031901126104fe57803590610226610cae565b926007602160991b01906044359061023f338414610d9a565b8051938493636e296e4560e01b8552848260209687935afa9485156104f45788956104d5575b506001600160a01b039461029e9086167f0000000000000000000000000000000000000000000000000000000000000000871614610df5565b8588526001845284828920971696876000528452816000209460ff86541660068110156104c25761048757908892917f000000000000000000000000000000000000000000000000000000000000000016803b156104835783808a60648b838851968794859363f6a94ecb60e01b85528a85015260248401528b60448401525af1918261046f575b505061041657600190839060033d11610406575b506308c379a01461039e575b610355575b5050505050505080f35b806060947ff677e762f2ddc710deec335dd0cfa8a65cc9c9c351b268243be8629f2e8d1b5f96600160ff198254161790558151948552840152820152a38180808080858161034b565b6103a6610e4d565b806103b2575b50610346565b905087877ff677e762f2ddc710deec335dd0cfa8a65cc9c9c351b268243be8629f2e8d1b5f6103fd8694600160ff198c5416178b5586519182918a8352888c84015288830190610d15565b0390a3896103ac565b905083803e825160e01c8a61033a565b5090507ff56e18fc84dbd66db78337b5bd0973943fa70c9b52243a540bdac79274f6682d93600260ff1982541617905584875260028352808720866bffffffffffffffffffffffff60a01b82541617905551908152a380f35b61047890610cc9565b61048357838b610326565b8380fd5b5083606492519162461bcd60e51b835282015260166024820152755265717565737420616c72656164792065786973747360501b6044820152fd5b634e487b7160e01b8a526021835260248afd5b6104ed919550843d86116101f3576101e58183610cf3565b9388610265565b82513d8a823e3d90fd5b8280fd5b508290346104fe57806003193601126104fe57813590610520610cae565b9082855260016020528085209360018060a01b0383169485600052602052816000209081549060ff82169060068210156105dd5750926105b1926105b6959261056e60016105a39714610d55565b60ff19169055516317c4df9160e31b6020820152602481018690526001600160a01b0390911660448201529182906064820190565b03601f198101835282610cf3565b610ebf565b7ff313a768599b60b7f8aedb7757d867d09463365b79b55b86ed3c961e6da5a2498380a380f35b634e487b7160e01b895260219052602488fd5b5091903461065f578260031936011261065f5761060b610cae565b8235825260016020528382209060018060a01b031660005260205282600020600160ff82541691015491845193600683101561064c57505082526020820152f35b634e487b7160e01b825260219052602490fd5b80fd5b503461020457806003193601126102045782358361067e610cae565b9260206007602160991b01610694338214610d9a565b8251636e296e4560e01b815297889182905afa9586156107fd5785966107dc575b506001600160a01b03956106ee9087167f0000000000000000000000000000000000000000000000000000000000000000881614610df5565b82855260016020528581862094169384600052602052806000209586549660ff88169760068910156107c95761072b6003899a9997989914610d55565b60ff191690557f00000000000000000000000000000000000000000000000000000000000000001691823b156104835784602485928385519687948593630ebbdd2b60e41b85528401525af19081156107c057506107ac575b50807f9beda0c81abc1c65da7685f113195974dfddb781dfde6263e5a1b13a5356ffad91a380f35b6107b590610cc9565b6104fe578238610784565b513d84823e3d90fd5b634e487b7160e01b885260218552602488fd5b6107f691965060203d6020116101f3576101e58183610cf3565b94386106b5565b81513d87823e3d90fd5b5034610204578160031936011261020457517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610204578160031936011261020457602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b508290346104fe57806003193601126104fe578135906108a2610cae565b9082855260016020528085209360018060a01b0383169485600052602052816000209081549060ff82169060068210156105dd5750926105b192600361093296936108fc8760026105a39914908115610959575b50610d55565b60ff19161790555163e742e2ed60e01b6020820152602481018690526001600160a01b0390911660448201529182906064820190565b7fff09615c531ab8799ea1c67a0952ddbef1c864ef91d390995d0dc07656f4210f8380a380f35b849150148d6108f6565b5034610204578160031936011261020457602090516216e3608152f35b5034610204578160031936011261020457517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610204578160031936011261020457516007602160991b018152602090f35b50903461065f578060031936011261065f578151918182549260018460011c9160018616958615610af5575b6020968785108114610ae2578899509688969785829a529182600014610abb575050600114610a60575b505050610a5c9291610a4d910385610cf3565b51928284938452830190610d15565b0390f35b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410610aa35750505082010181610a4d610a5c610a3a565b8054848a018601528895508794909301928101610a8a565b60ff19168782015293151560051b86019093019350849250610a4d9150610a5c9050610a3a565b634e487b7160e01b835260228a52602483fd5b92607f1692610a10565b509134610204576080366003190112610204578035926064356001600160a01b038181169391849003610c7957858552600260205280838620541693600160205283862085875260205283862091825460ff81166006811015610c66578503610c235790600560019260ff19161784557f00000000000000000000000000000000000000000000000000000000000000001692015494823b15610c1f579286889360c49382968851998a9788966335138a4f60e21b8852870152602486015260448501526024356064850152604435608485015260a48401525af19081156107c05750610c10575b50907f2abf2fd86256e4607561adae782a4853682b6c0b976995a9a45c5fc3a17573868280a280f35b610c1990610cc9565b38610be7565b8680fd5b855162461bcd60e51b8152602081870152601c60248201527f41726269747261746f7220686173206e6f742072756c656420796574000000006044820152606490fd5b634e487b7160e01b895260218652602489fd5b8480fd5b9291905034610204576020366003190112610204579235815260026020908152929020546001600160a01b03168152f35b602435906001600160a01b0382168203610cc457565b600080fd5b67ffffffffffffffff8111610cdd57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff821117610cdd57604052565b919082519283825260005b848110610d41575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201610d20565b15610d5c57565b60405162461bcd60e51b8152602060048201526016602482015275496e76616c696420726571756573742073746174757360501b6044820152606490fd5b15610da157565b60405162461bcd60e51b815260206004820152600d60248201526c2727aa2fa6a2a9a9a2a723a2a960991b6044820152606490fd5b90816020910312610cc457516001600160a01b0381168103610cc45790565b15610dfc57565b60405162461bcd60e51b815260206004820152602360248201527f43616e206f6e6c792062652063616c6c656420627920466f726569676e2050726044820152626f787960e81b6064820152608490fd5b600060443d10610eab57604051600319913d83016004833e815167ffffffffffffffff918282113d602484011117610eae57818401948551938411610eb6573d85010160208487010111610eae5750610eab92910160200190610cf3565b90565b949350505050565b50949350505050565b6007602160991b01803b15610cc457604051633dbb202b60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316600482015260606024820152916000918391829084908290610f2b906064830190610d15565b6216e360604483015203925af18015610f5057610f455750565b610f4e90610cc9565b565b6040513d6000823e3d90fdfea2646970667358221220ee37c9f4c8520c873da2e9cebfffdbc6c8dc79f5776e96b834a6697257fb460264736f6c63430008190033", + "devdoc": { + "details": "https://docs.optimism.io/app-developers/bridging/messaging", + "events": { + "ArbitrationFailed(bytes32,address)": { + "details": "This will happen if the arbitration fee increases in between the arbitration request and acknowledgement.", + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "ArbitrationFinished(bytes32)": { + "params": { + "_questionID": "The ID of the question." + } + }, + "ArbitratorAnswered(bytes32,bytes32)": { + "params": { + "_answer": "The answer from the arbitrator.", + "_questionID": "The ID of the question." + } + }, + "RequestAcknowledged(bytes32,address)": { + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "RequestCanceled(bytes32,address)": { + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "RequestNotified(bytes32,address,uint256)": { + "params": { + "_maxPrevious": "The maximum value of the previous bond for the question.", + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "RequestRejected(bytes32,address,uint256,string)": { + "details": "This can happen if the current bond for the question is higher than maxPrevious or if the question is already finalized.", + "params": { + "_maxPrevious": "The maximum value of the current bond for the question.", + "_questionID": "The ID of the question.", + "_reason": "The reason why the request was rejected.", + "_requester": "The address of the arbitration requester." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_foreignChainId": "The ID of foreign chain (Sepolia/Mainnet).", + "_foreignProxy": "Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.", + "_metadata": "Metadata for Realitio.", + "_realitio": "Realitio contract address." + } + }, + "handleNotifiedRequest(bytes32,address)": { + "details": "Relays arbitration request back to L1 after it has been notified by Realitio for a given question.", + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the user that requested arbitration." + } + }, + "handleRejectedRequest(bytes32,address)": { + "details": "Relays arbitration request back to L1 after it has been rejected. Reasons why the request might be rejected: - The question does not exist - The question was not answered yet - The question bond value changed while the arbitration was being requested - Another request was already accepted", + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the user that requested arbitration." + } + }, + "receiveArbitrationAnswer(bytes32,bytes32)": { + "params": { + "_answer": "The answer from the arbitrator.", + "_questionID": "The ID of the question." + } + }, + "receiveArbitrationFailure(bytes32,address)": { + "details": "Currently this can happen only if the arbitration cost increased.", + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the user that requested arbitration." + } + }, + "receiveArbitrationRequest(bytes32,address,uint256)": { + "details": "Receives the requested arbitration for a question. TRUSTED.", + "params": { + "_maxPrevious": "The maximum value of the previous bond for the question.", + "_questionID": "The ID of the question.", + "_requester": "The address of the user that requested arbitration." + } + }, + "reportArbitrationAnswer(bytes32,bytes32,bytes32,address)": { + "details": "The Realitio contract validates the input parameters passed to this method, so making this publicly accessible is safe.", + "params": { + "_lastAnswerOrCommitmentID": "The last answer given, or its commitment ID if it was a commitment, to the question in the Realitio contract.", + "_lastAnswerer": "The last answerer to the question in the Realitio contract.", + "_lastHistoryHash": "The history hash given with the last answer to the question in the Realitio contract.", + "_questionID": "The ID of the question." + } + } + }, + "stateVariables": { + "foreignChainId": { + "details": "ID of the foreign chain, required for Realitio." + }, + "foreignProxy": { + "details": "Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce." + }, + "metadata": { + "details": "Metadata for Realitio interface." + }, + "questionIDToRequester": { + "details": "Associates a question ID with the requester who succeeded in requesting arbitration. questionIDToRequester[questionID]" + }, + "realitio": { + "details": "The address of the Realitio contract (v3.0 required). TRUSTED." + }, + "requests": { + "details": "Associates an arbitration request with a question ID and a requester address. requests[questionID][requester]" + } + }, + "title": "Arbitration proxy for Realitio on home chain (eg. Optimism, Unichain, Redstone etc).", + "version": 1 + }, + "userdoc": { + "events": { + "ArbitrationFailed(bytes32,address)": { + "notice": "To be emitted when the dispute could not be created on the Foreign Chain." + }, + "ArbitrationFinished(bytes32)": { + "notice": "To be emitted when reporting the arbitrator answer to Realitio." + }, + "ArbitratorAnswered(bytes32,bytes32)": { + "notice": "To be emitted when receiving the answer from the arbitrator." + }, + "RequestAcknowledged(bytes32,address)": { + "notice": "To be emitted when the arbitration request acknowledgement is sent to the Foreign Chain." + }, + "RequestCanceled(bytes32,address)": { + "notice": "To be emitted when the arbitration request is canceled." + }, + "RequestNotified(bytes32,address,uint256)": { + "notice": "To be emitted when the Realitio contract has been notified of an arbitration request." + }, + "RequestRejected(bytes32,address,uint256,string)": { + "notice": "To be emitted when arbitration request is rejected." + } + }, + "kind": "user", + "methods": { + "constructor": { + "notice": "Creates an arbitration proxy on the home chain." + }, + "receiveArbitrationAnswer(bytes32,bytes32)": { + "notice": "Receives an answer to a specified question. TRUSTED." + }, + "receiveArbitrationFailure(bytes32,address)": { + "notice": "Receives a failed attempt to request arbitration. TRUSTED." + }, + "reportArbitrationAnswer(bytes32,bytes32,bytes32,address)": { + "notice": "Reports the answer provided by the arbitrator to a specified question." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 21776, + "contract": "src/0.8/RealitioHomeProxyOptimism.sol:RealitioHomeProxyOptimism", + "label": "metadata", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 21797, + "contract": "src/0.8/RealitioHomeProxyOptimism.sol:RealitioHomeProxyOptimism", + "label": "requests", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_mapping(t_address,t_struct(Request)21789_storage))" + }, + { + "astId": 21802, + "contract": "src/0.8/RealitioHomeProxyOptimism.sol:RealitioHomeProxyOptimism", + "label": "questionIDToRequester", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_bytes32,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Status)21783": { + "encoding": "inplace", + "label": "enum RealitioHomeProxyOptimism.Status", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Request)21789_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct RealitioHomeProxyOptimism.Request)", + "numberOfBytes": "32", + "value": "t_struct(Request)21789_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_mapping(t_address,t_struct(Request)21789_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(address => struct RealitioHomeProxyOptimism.Request))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_struct(Request)21789_storage)" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Request)21789_storage": { + "encoding": "inplace", + "label": "struct RealitioHomeProxyOptimism.Request", + "members": [ + { + "astId": 21786, + "contract": "src/0.8/RealitioHomeProxyOptimism.sol:RealitioHomeProxyOptimism", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(Status)21783" + }, + { + "astId": 21788, + "contract": "src/0.8/RealitioHomeProxyOptimism.sol:RealitioHomeProxyOptimism", + "label": "arbitratorAnswer", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + } + } + } +} \ No newline at end of file diff --git a/contracts/deployments/sepolia/RealitioForeignProxyBase.json b/contracts/deployments/sepolia/RealitioForeignProxyBase.json new file mode 100644 index 0000000..e1ff4a2 --- /dev/null +++ b/contracts/deployments/sepolia/RealitioForeignProxyBase.json @@ -0,0 +1,1921 @@ +{ + "address": "0x7331A1512DBe2d77bc19e8D2b923fD76214c0F77", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_wNative", + "type": "address" + }, + { + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_arbitratorExtraData", + "type": "bytes" + }, + { + "internalType": "string", + "name": "_metaEvidence", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_winnerMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_loserMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_loserAppealPeriodMultiplier", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_homeProxy", + "type": "address" + }, + { + "internalType": "address", + "name": "_messenger", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "ArbitrationCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + } + ], + "name": "ArbitrationCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "ArbitrationFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_maxPrevious", + "type": "uint256" + } + ], + "name": "ArbitrationRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_localDisputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ruling", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_contributor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Contribution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_metaEvidenceID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_evidenceGroupID", + "type": "uint256" + } + ], + "name": "Dispute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_evidenceGroupID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_party", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "_evidence", + "type": "string" + } + ], + "name": "Evidence", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_metaEvidenceID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "_evidence", + "type": "string" + } + ], + "name": "MetaEvidence", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IArbitrator", + "name": "_arbitrator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "Ruling", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_localDisputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "RulingFunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ruling", + "type": "bytes32" + } + ], + "name": "RulingRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_localDisputeID", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_contributor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_reward", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "META_EVIDENCE_ID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_GAS_LIMIT", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MULTIPLIER_DIVISOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NUMBER_OF_CHOICES_FOR_ARBITRATOR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REFUSE_TO_ARBITRATE_REALITIO", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "arbitrationCreatedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "arbitrationIDToDisputeExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "arbitrationIDToRequester", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "arbitrationRequests", + "outputs": [ + { + "internalType": "enum RealitioForeignProxyOptimism.Status", + "name": "status", + "type": "uint8" + }, + { + "internalType": "uint248", + "name": "deposit", + "type": "uint248" + }, + { + "internalType": "uint256", + "name": "disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "answer", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbitrator", + "outputs": [ + { + "internalType": "contract IArbitrator", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbitratorExtraData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "disputeIDToDisputeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "arbitrationID", + "type": "uint256" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_externalDisputeID", + "type": "uint256" + } + ], + "name": "externalIDtoLocalID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_answer", + "type": "uint256" + } + ], + "name": "fundAppeal", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_contributor", + "type": "address" + } + ], + "name": "getContributionsToSuccessfulFundings", + "outputs": [ + { + "internalType": "uint256[]", + "name": "fundedAnswers", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "contributions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "getDisputeFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_answer", + "type": "uint256" + } + ], + "name": "getFundingStatus", + "outputs": [ + { + "internalType": "uint256", + "name": "raised", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "fullyFunded", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMultipliers", + "outputs": [ + { + "internalType": "uint256", + "name": "winner", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "loser", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "loserAppealPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "divisor", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + } + ], + "name": "getNumberOfRounds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + } + ], + "name": "getRoundInfo", + "outputs": [ + { + "internalType": "uint256[]", + "name": "paidFees", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "feeRewards", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "fundedAnswers", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_contributedTo", + "type": "uint256" + } + ], + "name": "getTotalWithdrawableAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "sum", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "handleFailedDisputeCreation", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_gasLimit", + "type": "uint32" + } + ], + "name": "handleFailedDisputeCreationCustomParameters", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "homeProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "loserAppealPeriodMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "loserMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messenger", + "outputs": [ + { + "internalType": "contract ICrossDomainMessenger", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "numberOfRulingOptions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + } + ], + "name": "questionIDToArbitrationID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "receiveArbitrationAcknowledgement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "receiveArbitrationCancelation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + } + ], + "name": "relayRule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_requester", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_gasLimit", + "type": "uint32" + } + ], + "name": "relayRuleCustomParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_maxPrevious", + "type": "uint256" + } + ], + "name": "requestArbitration", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_questionID", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_maxPrevious", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_gasLimit", + "type": "uint32" + } + ], + "name": "requestArbitrationCustomParameters", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_disputeID", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_ruling", + "type": "uint256" + } + ], + "name": "rule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_evidenceURI", + "type": "string" + } + ], + "name": "submitEvidence", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wNative", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "winnerMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_answer", + "type": "uint256" + } + ], + "name": "withdrawFeesAndRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_arbitrationID", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_beneficiary", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_contributedTo", + "type": "uint256" + } + ], + "name": "withdrawFeesAndRewardsForAllRounds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xa3e33d5a6762ec91d015533e72c1bd7971ef23ce007aba12ae8fc6831b7536e2", + "receipt": { + "to": null, + "from": "0xbDFd060ac349aC8b041D89aC491c89A78b4930E4", + "contractAddress": "0x7331A1512DBe2d77bc19e8D2b923fD76214c0F77", + "transactionIndex": 38, + "gasUsed": "2870627", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000002000000020000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000040000000000000000000000000040000000000000000", + "blockHash": "0x5b98d7769d6802ec5477bd274fca11ece72bde730bcbfab1343ff2bc4a1320dd", + "transactionHash": "0xa3e33d5a6762ec91d015533e72c1bd7971ef23ce007aba12ae8fc6831b7536e2", + "logs": [ + { + "transactionIndex": 38, + "blockNumber": 9780539, + "transactionHash": "0xa3e33d5a6762ec91d015533e72c1bd7971ef23ce007aba12ae8fc6831b7536e2", + "address": "0x7331A1512DBe2d77bc19e8D2b923fD76214c0F77", + "topics": [ + "0x61606860eb6c87306811e2695215385101daab53bd6ab4e9f9049aead9363c7d", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000342f697066732f516d656f747a713365426451356e6b59673154464b5854327932463563483436476f77686a44334c547a486e787a000000000000000000000000", + "logIndex": 158, + "blockHash": "0x5b98d7769d6802ec5477bd274fca11ece72bde730bcbfab1343ff2bc4a1320dd" + } + ], + "blockNumber": 9780539, + "cumulativeGasUsed": "9460544", + "status": 1, + "byzantium": true + }, + "args": [ + "0x7b79995e5f793a07bc00c21412e50ecae098e7f9", + "0x90992fb4E15ce0C59aEFfb376460Fda4Ee19C879", + "0x00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001", + "/ipfs/Qmeotzq3eBdQ5nkYg1TFKXT2y2F5cH46GowhjD3LTzHnxz", + 3000, + 7000, + 5000, + "0xd919c6Edfb458C15c12b921Cbc9F6eEf06F0E9c5", + "0xC34855F4De64F1840e5686e64278da901e261f20" + ], + "numDeployments": 2, + "solcInputHash": "0ffeb3d2f5ec036c9dc629d60f0780f6", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wNative\",\"type\":\"address\"},{\"internalType\":\"contract IArbitrator\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_metaEvidence\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_winnerMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_loserMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_loserAppealPeriodMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_homeProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"ArbitrationCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"}],\"name\":\"ArbitrationCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"ArbitrationFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_maxPrevious\",\"type\":\"uint256\"}],\"name\":\"ArbitrationRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ruling\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Contribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrator\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_metaEvidenceID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_evidenceGroupID\",\"type\":\"uint256\"}],\"name\":\"Dispute\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrator\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_evidenceGroupID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"Evidence\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_metaEvidenceID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_evidence\",\"type\":\"string\"}],\"name\":\"MetaEvidence\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitrator\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"Ruling\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"RulingFunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ruling\",\"type\":\"bytes32\"}],\"name\":\"RulingRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_localDisputeID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_reward\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"META_EVIDENCE_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_GAS_LIMIT\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MULTIPLIER_DIVISOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NUMBER_OF_CHOICES_FOR_ARBITRATOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REFUSE_TO_ARBITRATE_REALITIO\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitrationCreatedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitrationIDToDisputeExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"arbitrationIDToRequester\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"arbitrationRequests\",\"outputs\":[{\"internalType\":\"enum RealitioForeignProxyOptimism.Status\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"uint248\",\"name\":\"deposit\",\"type\":\"uint248\"},{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"answer\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitrator\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitratorExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeIDToDisputeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"}],\"name\":\"externalIDtoLocalID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_answer\",\"type\":\"uint256\"}],\"name\":\"fundAppeal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"}],\"name\":\"getContributionsToSuccessfulFundings\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"fundedAnswers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"contributions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"getDisputeFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_answer\",\"type\":\"uint256\"}],\"name\":\"getFundingStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"raised\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"fullyFunded\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMultipliers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"winner\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"loser\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"loserAppealPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"divisor\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"}],\"name\":\"getNumberOfRounds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"}],\"name\":\"getRoundInfo\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"paidFees\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"feeRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"fundedAnswers\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_contributedTo\",\"type\":\"uint256\"}],\"name\":\"getTotalWithdrawableAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sum\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"handleFailedDisputeCreation\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_gasLimit\",\"type\":\"uint32\"}],\"name\":\"handleFailedDisputeCreationCustomParameters\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"homeProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"loserAppealPeriodMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"loserMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"contract ICrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"numberOfRulingOptions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"}],\"name\":\"questionIDToArbitrationID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"receiveArbitrationAcknowledgement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"receiveArbitrationCancelation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"}],\"name\":\"relayRule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_requester\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_gasLimit\",\"type\":\"uint32\"}],\"name\":\"relayRuleCustomParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxPrevious\",\"type\":\"uint256\"}],\"name\":\"requestArbitration\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_questionID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxPrevious\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"_gasLimit\",\"type\":\"uint32\"}],\"name\":\"requestArbitrationCustomParameters\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_evidenceURI\",\"type\":\"string\"}],\"name\":\"submitEvidence\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wNative\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"winnerMultiplier\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_round\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_answer\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_arbitrationID\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_contributedTo\",\"type\":\"uint256\"}],\"name\":\"withdrawFeesAndRewardsForAllRounds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"https://docs.optimism.io/app-developers/bridging/messaging\",\"events\":{\"ArbitrationCanceled(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question with the request for arbitration.\",\"_requester\":\"The address of the arbitration requester.\"}},\"ArbitrationCreated(bytes32,address,uint256)\":{\"params\":{\"_disputeID\":\"The ID of the dispute.\",\"_questionID\":\"The ID of the question with the request for arbitration.\",\"_requester\":\"The address of the arbitration requester.\"}},\"ArbitrationFailed(bytes32,address)\":{\"details\":\"This will happen if there is an increase in the arbitration fees between the time the arbitration is made and the time it is acknowledged.\",\"params\":{\"_questionID\":\"The ID of the question with the request for arbitration.\",\"_requester\":\"The address of the arbitration requester.\"}},\"ArbitrationRequested(bytes32,address,uint256)\":{\"params\":{\"_maxPrevious\":\"The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\",\"_questionID\":\"The ID of the question with the request for arbitration.\",\"_requester\":\"The address of the arbitration requester.\"}},\"Contribution(uint256,uint256,uint256,address,uint256)\":{\"details\":\"Raised when a contribution is made, inside fundAppeal function.\",\"params\":{\"_amount\":\"Contribution amount.\",\"_contributor\":\"Caller of fundAppeal function.\",\"_localDisputeID\":\"Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\",\"_round\":\"The round number the contribution was made to.\",\"ruling\":\"Indicates the ruling option which got the contribution.\"}},\"Dispute(address,uint256,uint256,uint256)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_disputeID\":\"ID of the dispute in the Arbitrator contract.\",\"_evidenceGroupID\":\"Unique identifier of the evidence group that is linked to this dispute.\",\"_metaEvidenceID\":\"Unique identifier of meta-evidence.\"}},\"Evidence(address,uint256,address,string)\":{\"details\":\"To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_evidence\":\"A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json.\",\"_evidenceGroupID\":\"Unique identifier of the evidence group the evidence belongs to.\",\"_party\":\"The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\"}},\"MetaEvidence(uint256,string)\":{\"details\":\"To be emitted when meta-evidence is submitted.\",\"params\":{\"_evidence\":\"A link to the meta-evidence JSON.\",\"_metaEvidenceID\":\"Unique identifier of meta-evidence.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"ID of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"RulingFunded(uint256,uint256,uint256)\":{\"details\":\"To be raised when a ruling option is fully funded for appeal.\",\"params\":{\"_localDisputeID\":\"Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\",\"_round\":\"Number of the round this ruling option was fully funded in.\",\"_ruling\":\"The ruling option which just got fully funded.\"}},\"RulingRelayed(bytes32,bytes32)\":{\"params\":{\"_questionID\":\"The ID of the question with the ruling to relay.\",\"_ruling\":\"Ruling converted into Realitio format.\"}},\"Withdrawal(uint256,uint256,uint256,address,uint256)\":{\"details\":\"Raised when a contributor withdraws non-zero value.\",\"params\":{\"_contributor\":\"The beneficiary of withdrawal.\",\"_localDisputeID\":\"Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\",\"_reward\":\"Total amount of withdrawal, consists of reimbursed deposits plus rewards.\",\"_round\":\"The round number the withdrawal was made from.\",\"_ruling\":\"Indicates the ruling option which contributor gets rewards from.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_arbitrator\":\"Arbitrator contract address.\",\"_arbitratorExtraData\":\"The extra data used to raise a dispute in the arbitrator.\",\"_homeProxy\":\"Proxy on L2.\",\"_loserAppealPeriodMultiplier\":\"Multiplier for calculating the appeal period for the losing answer.\",\"_loserMultiplier\":\"Multiplier for calculating the appeal cost of the losing answer.\",\"_messenger\":\"contract for L1 -> L2 tx\",\"_metaEvidence\":\"The URI of the meta evidence file.\",\"_wNative\":\"The address of the wrapped version of the native currency.\",\"_winnerMultiplier\":\"Multiplier for calculating the appeal cost of the winning answer.\"}},\"externalIDtoLocalID(uint256)\":{\"params\":{\"_externalDisputeID\":\"Dispute id as in arbitrator side.\"},\"returns\":{\"_0\":\"localDisputeID Dispute id as in arbitrable contract.\"}},\"fundAppeal(uint256,uint256)\":{\"params\":{\"_answer\":\"One of the possible rulings the arbitrator can give that the funder considers to be the correct answer to the question. Note that the answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format. Also note that '0' answer can be funded.\",\"_arbitrationID\":\"The ID of the arbitration, which is questionID cast into uint256.\"},\"returns\":{\"_0\":\"Whether the answer was fully funded or not.\"}},\"getContributionsToSuccessfulFundings(uint256,uint256,address)\":{\"params\":{\"_arbitrationID\":\"The ID of the arbitration.\",\"_contributor\":\"The address whose contributions to query.\",\"_round\":\"The round to query.\"},\"returns\":{\"contributions\":\"The amount contributed to each funded answer by the contributor.\",\"fundedAnswers\":\"IDs of the answers that are fully funded. Note that the `fundedAnswers` have Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\"}},\"getDisputeFee(bytes32)\":{\"returns\":{\"_0\":\"The fee to create a dispute.\"}},\"getFundingStatus(uint256,uint256,uint256)\":{\"params\":{\"_answer\":\"The answer choice to get funding status for. Note that the `_answer` has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\",\"_arbitrationID\":\"The ID of the arbitration.\",\"_round\":\"The round to query.\"},\"returns\":{\"fullyFunded\":\"Whether the answer is fully funded or not.\",\"raised\":\"The amount paid for this answer.\"}},\"getMultipliers()\":{\"returns\":{\"divisor\":\"Multiplier divisor.\",\"loser\":\"Losers stake multiplier.\",\"loserAppealPeriod\":\"Multiplier for calculating an appeal period duration for the losing side.\",\"winner\":\"Winners stake multiplier.\"}},\"getNumberOfRounds(uint256)\":{\"params\":{\"_arbitrationID\":\"The ID of the arbitration related to the question.\"},\"returns\":{\"_0\":\"The number of rounds.\"}},\"getRoundInfo(uint256,uint256)\":{\"params\":{\"_arbitrationID\":\"The ID of the arbitration.\",\"_round\":\"The round to query.\"},\"returns\":{\"feeRewards\":\"The amount of fees that will be used as rewards.\",\"fundedAnswers\":\"IDs of fully funded answers. Note that the `fundedAnswers` have Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\",\"paidFees\":\"The amount of fees paid for each fully funded answer.\"}},\"getTotalWithdrawableAmount(uint256,address,uint256)\":{\"details\":\"This function is O(n) where n is the total number of rounds.This could exceed the gas limit, therefore this function should be used only as a utility and not be relied upon by other contracts.\",\"params\":{\"_arbitrationID\":\"The ID of the arbitration.\",\"_beneficiary\":\"The contributor for which to query.\",\"_contributedTo\":\"Answer that received contributions from contributor. Note that the `_contributedTo` answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\"},\"returns\":{\"sum\":\"The total amount available to withdraw.\"}},\"handleFailedDisputeCreation(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"handleFailedDisputeCreationCustomParameters(bytes32,address,uint32)\":{\"params\":{\"_gasLimit\":\"Gas limit for the L2 transaction.\",\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"numberOfRulingOptions(uint256)\":{\"returns\":{\"_0\":\"count The number of ruling options.\"}},\"questionIDToArbitrationID(bytes32)\":{\"params\":{\"_questionID\":\"The ID of the question.\"},\"returns\":{\"_0\":\"The ID of the arbitration.\"}},\"receiveArbitrationAcknowledgement(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The requester.\"}},\"receiveArbitrationCancelation(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The requester.\"}},\"relayRule(bytes32,address)\":{\"params\":{\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"relayRuleCustomParameters(bytes32,address,uint32)\":{\"params\":{\"_gasLimit\":\"Gas limit for the L2 transaction.\",\"_questionID\":\"The ID of the question.\",\"_requester\":\"The address of the arbitration requester.\"}},\"requestArbitration(bytes32,uint256)\":{\"params\":{\"_maxPrevious\":\"The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\",\"_questionID\":\"The ID of the question.\"}},\"requestArbitrationCustomParameters(bytes32,uint256,uint32)\":{\"params\":{\"_gasLimit\":\"Gas limit for the L2 transaction.\",\"_maxPrevious\":\"The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\",\"_questionID\":\"The ID of the question.\"}},\"rule(uint256,uint256)\":{\"details\":\"Accounts for the situation where the winner loses a case due to paying less appeal fees than expected.\",\"params\":{\"_disputeID\":\"The ID of the dispute in the ERC792 arbitrator.\",\"_ruling\":\"The ruling given by the arbitrator.\"}},\"submitEvidence(uint256,string)\":{\"params\":{\"_arbitrationID\":\"The ID of the arbitration related to the question.\",\"_evidenceURI\":\"Link to evidence.\"}},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"params\":{\"_answer\":\"The answer to query the reward from. Note that the `_answer` has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\",\"_arbitrationID\":\"The ID of the arbitration.\",\"_beneficiary\":\"The address to send reward to.\",\"_round\":\"The round from which to withdraw.\"},\"returns\":{\"reward\":\"The withdrawn amount.\"}},\"withdrawFeesAndRewardsForAllRounds(uint256,address,uint256)\":{\"details\":\"This function is O(n) where n is the total number of rounds. Arbitration cost of subsequent rounds is `A(n) = 2A(n-1) + 1`. So because of this exponential growth of costs, you can assume n is less than 10 at all times.\",\"params\":{\"_arbitrationID\":\"The ID of the arbitration.\",\"_beneficiary\":\"The address that made contributions.\",\"_contributedTo\":\"Answer that received contributions from contributor. Note that the `_contributedTo` answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\"}}},\"stateVariables\":{\"arbitrationCreatedBlock\":{\"params\":{\"_disputeID\":\"the ID of the dispute.\"},\"return\":\"Block number of dispute creation.\",\"returns\":{\"_0\":\"Block number of dispute creation.\"}},\"homeProxy\":{\"return\":\"Home proxy address.\",\"returns\":{\"_0\":\"Home proxy address.\"}}},\"title\":\"Arbitration proxy for Realitio on foreign chain (eg. mainnet).\",\"version\":1},\"userdoc\":{\"events\":{\"ArbitrationCanceled(bytes32,address)\":{\"notice\":\"Should be emitted when the arbitration is canceled by the Home Chain.\"},\"ArbitrationCreated(bytes32,address,uint256)\":{\"notice\":\"Should be emitted when the dispute is created.\"},\"ArbitrationFailed(bytes32,address)\":{\"notice\":\"Should be emitted when the dispute could not be created.\"},\"ArbitrationRequested(bytes32,address,uint256)\":{\"notice\":\"Should be emitted when the arbitration is requested.\"},\"RulingRelayed(bytes32,bytes32)\":{\"notice\":\"Should be emitted when the ruling is relayed to home proxy manually. Some implementations may not emit this event.\"}},\"kind\":\"user\",\"methods\":{\"arbitrationCreatedBlock(uint256)\":{\"notice\":\"Returns the creation block of the dispute.\"},\"constructor\":{\"notice\":\"Creates an arbitration proxy on the foreign chain (L1).\"},\"externalIDtoLocalID(uint256)\":{\"notice\":\"Maps external (arbitrator side) dispute id to local (arbitrable) dispute id.\"},\"fundAppeal(uint256,uint256)\":{\"notice\":\"Takes up to the total amount required to fund an answer. Reimburses the rest. Creates an appeal if at least two answers are funded.\"},\"getContributionsToSuccessfulFundings(uint256,uint256,address)\":{\"notice\":\"Gets contributions to the answers that are fully funded.\"},\"getDisputeFee(bytes32)\":{\"notice\":\"Gets the fee to create a dispute.\"},\"getFundingStatus(uint256,uint256,uint256)\":{\"notice\":\"Gets the information of a round of a question for a specific answer choice.\"},\"getMultipliers()\":{\"notice\":\"Returns stake multipliers.\"},\"getNumberOfRounds(uint256)\":{\"notice\":\"Gets the number of rounds of the specific question.\"},\"getRoundInfo(uint256,uint256)\":{\"notice\":\"Gets the information of a round of a question.\"},\"getTotalWithdrawableAmount(uint256,address,uint256)\":{\"notice\":\"Returns the sum of withdrawable amount.\"},\"handleFailedDisputeCreation(bytes32,address)\":{\"notice\":\"Cancels the arbitration in case the dispute could not be created. This version of the function uses recommended bridging parameters.\"},\"handleFailedDisputeCreationCustomParameters(bytes32,address,uint32)\":{\"notice\":\"Cancels the arbitration in case the dispute could not be created. This function is to be used if the bridging with default parameters fail.\"},\"homeProxy()\":{\"notice\":\"Returns the address of the home proxy.\"},\"numberOfRulingOptions(uint256)\":{\"notice\":\"Returns number of possible ruling options. Valid rulings are [0, return value].\"},\"questionIDToArbitrationID(bytes32)\":{\"notice\":\"Casts question ID into uint256 thus returning the related arbitration ID.\"},\"receiveArbitrationAcknowledgement(bytes32,address)\":{\"notice\":\"Receives the acknowledgement of the arbitration request for the given question and requester. TRUSTED.\"},\"receiveArbitrationCancelation(bytes32,address)\":{\"notice\":\"Receives the cancelation of the arbitration request for the given question and requester. TRUSTED.\"},\"relayRule(bytes32,address)\":{\"notice\":\"Relays the ruling to home proxy. This version of the function uses recommended bridging parameters.\"},\"relayRuleCustomParameters(bytes32,address,uint32)\":{\"notice\":\"Relays the ruling to home proxy. This function is to be used if the bridging with default parameters fail.\"},\"requestArbitration(bytes32,uint256)\":{\"notice\":\"Requests arbitration for the given question and contested answer. This version of the function uses recommended bridging parameters. Note that the signature of this function can't be changed as it's required by Reality UI.\"},\"requestArbitrationCustomParameters(bytes32,uint256,uint32)\":{\"notice\":\"Requests arbitration for the given question and contested answer. This function is to be used if the bridging with default parameters fail.\"},\"rule(uint256,uint256)\":{\"notice\":\"Rules a specified dispute. Can only be called by the arbitrator.\"},\"submitEvidence(uint256,string)\":{\"notice\":\"Allows to submit evidence for a particular question.\"},\"withdrawFeesAndRewards(uint256,address,uint256,uint256)\":{\"notice\":\"Sends the fee stake rewards and reimbursements proportional to the contributions made to the winner of a dispute. Reimburses contributions if there is no winner.\"},\"withdrawFeesAndRewardsForAllRounds(uint256,address,uint256)\":{\"notice\":\"Allows to withdraw any rewards or reimbursable fees for all rounds at once.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/0.8/RealitioForeignProxyOptimism.sol\":\"RealitioForeignProxyOptimism\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@kleros/dispute-resolver-interface-contract-0.8/contracts/IDisputeResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@ferittuncer]\\n * @reviewers: [@mtsalenc*, @hbarcelos*, @unknownunknown1, @MerlinEgalite, @fnanni-0*, @shalzz]\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@kleros/erc-792/contracts/IArbitrable.sol\\\";\\nimport \\\"@kleros/erc-792/contracts/erc-1497/IEvidence.sol\\\";\\nimport \\\"@kleros/erc-792/contracts/IArbitrator.sol\\\";\\n\\n/**\\n * @title This serves as a standard interface for crowdfunded appeals and evidence submission, which aren't a part of the arbitration (erc-792 and erc-1497) standard yet.\\n This interface is used in Dispute Resolver (resolve.kleros.io).\\n */\\nabstract contract IDisputeResolver is IArbitrable, IEvidence {\\n string public constant VERSION = \\\"2.0.0\\\"; // Can be used to distinguish between multiple deployed versions, if necessary.\\n\\n /** @dev Raised when a contribution is made, inside fundAppeal function.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _round The round number the contribution was made to.\\n * @param ruling Indicates the ruling option which got the contribution.\\n * @param _contributor Caller of fundAppeal function.\\n * @param _amount Contribution amount.\\n */\\n event Contribution(uint256 indexed _localDisputeID, uint256 indexed _round, uint256 ruling, address indexed _contributor, uint256 _amount);\\n\\n /** @dev Raised when a contributor withdraws non-zero value.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _round The round number the withdrawal was made from.\\n * @param _ruling Indicates the ruling option which contributor gets rewards from.\\n * @param _contributor The beneficiary of withdrawal.\\n * @param _reward Total amount of withdrawal, consists of reimbursed deposits plus rewards.\\n */\\n event Withdrawal(uint256 indexed _localDisputeID, uint256 indexed _round, uint256 _ruling, address indexed _contributor, uint256 _reward);\\n\\n /** @dev To be raised when a ruling option is fully funded for appeal.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _round Number of the round this ruling option was fully funded in.\\n * @param _ruling The ruling option which just got fully funded.\\n */\\n event RulingFunded(uint256 indexed _localDisputeID, uint256 indexed _round, uint256 indexed _ruling);\\n\\n /** @dev Maps external (arbitrator side) dispute id to local (arbitrable) dispute id.\\n * @param _externalDisputeID Dispute id as in arbitrator contract.\\n * @return localDisputeID Dispute id as in arbitrable contract.\\n */\\n function externalIDtoLocalID(uint256 _externalDisputeID) external virtual returns (uint256 localDisputeID);\\n\\n /** @dev Returns number of possible ruling options. Valid rulings are [0, return value].\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @return count The number of ruling options.\\n */\\n function numberOfRulingOptions(uint256 _localDisputeID) external view virtual returns (uint256 count);\\n\\n /** @dev Allows to submit evidence for a given dispute.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _evidenceURI IPFS path to evidence, example: '/ipfs/Qmarwkf7C9RuzDEJNnarT3WZ7kem5bk8DZAzx78acJjMFH/evidence.json'\\n */\\n function submitEvidence(uint256 _localDisputeID, string calldata _evidenceURI) external virtual;\\n\\n /** @dev Manages contributions and calls appeal function of the specified arbitrator to appeal a dispute. This function lets appeals be crowdfunded.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _ruling The ruling option to which the caller wants to contribute.\\n * @return fullyFunded True if the ruling option got fully funded as a result of this contribution.\\n */\\n function fundAppeal(uint256 _localDisputeID, uint256 _ruling) external payable virtual returns (bool fullyFunded);\\n\\n /** @dev Returns appeal multipliers.\\n * @return winnerStakeMultiplier Winners stake multiplier.\\n * @return loserStakeMultiplier Losers stake multiplier.\\n * @return loserAppealPeriodMultiplier Losers appeal period multiplier. The loser is given less time to fund its appeal to defend against last minute appeal funding attacks.\\n * @return denominator Multiplier denominator in basis points.\\n */\\n function getMultipliers()\\n external\\n view\\n virtual\\n returns (\\n uint256 winnerStakeMultiplier,\\n uint256 loserStakeMultiplier,\\n uint256 loserAppealPeriodMultiplier,\\n uint256 denominator\\n );\\n\\n /** @dev Allows to withdraw any reimbursable fees or rewards after the dispute gets resolved.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _contributor Beneficiary of withdraw operation.\\n * @param _round Number of the round that caller wants to execute withdraw on.\\n * @param _ruling A ruling option that caller wants to execute withdraw on.\\n * @return sum The amount that is going to be transferred to contributor as a result of this function call.\\n */\\n function withdrawFeesAndRewards(\\n uint256 _localDisputeID,\\n address payable _contributor,\\n uint256 _round,\\n uint256 _ruling\\n ) external virtual returns (uint256 sum);\\n\\n /** @dev Allows to withdraw any rewards or reimbursable fees after the dispute gets resolved for all rounds at once.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _contributor Beneficiary of withdraw operation.\\n * @param _ruling Ruling option that caller wants to execute withdraw on.\\n */\\n function withdrawFeesAndRewardsForAllRounds(\\n uint256 _localDisputeID,\\n address payable _contributor,\\n uint256 _ruling\\n ) external virtual;\\n\\n /** @dev Returns the sum of withdrawable amount.\\n * @param _localDisputeID Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.\\n * @param _contributor Beneficiary of withdraw operation.\\n * @param _ruling Ruling option that caller wants to get withdrawable amount from.\\n * @return sum The total amount available to withdraw.\\n */\\n function getTotalWithdrawableAmount(\\n uint256 _localDisputeID,\\n address payable _contributor,\\n uint256 _ruling\\n ) external view virtual returns (uint256 sum);\\n}\\n\",\"keccak256\":\"0x9174a37ba69e682381a3ae6e14582a17d69f29be879ff27433fce2b971f871ae\",\"license\":\"MIT\"},\"@kleros/erc-792/contracts/IArbitrable.sol\":{\"content\":\"/**\\n * @authors: [@ferittuncer, @hbarcelos]\\n * @reviewers: [@remedcu*]\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n * SPDX-License-Identifier: MIT\\n */\\npragma solidity >=0.7;\\n\\nimport \\\"./IArbitrator.sol\\\";\\n\\n/**\\n * @title IArbitrable\\n * Arbitrable interface.\\n * When developing arbitrable contracts, we need to:\\n * - Define the action taken when a ruling is received by the contract.\\n * - Allow dispute creation. For this a function must call arbitrator.createDispute{value: _fee}(_choices,_extraData);\\n */\\ninterface IArbitrable {\\n /**\\n * @dev To be raised when a ruling is given.\\n * @param _arbitrator The arbitrator giving the ruling.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling The ruling which was given.\\n */\\n event Ruling(IArbitrator indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /**\\n * @dev Give a ruling for a dispute. Must be called by the arbitrator.\\n * The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _ruling Ruling given by the arbitrator. Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n */\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x1803a3433a78c509b20bd9477a2c60a71b2ce1ee7e17eb0ef0601618a8a72526\",\"license\":\"MIT\"},\"@kleros/erc-792/contracts/IArbitrator.sol\":{\"content\":\"/**\\n * @authors: [@ferittuncer, @hbarcelos]\\n * @reviewers: [@remedcu*]\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n * SPDX-License-Identifier: MIT\\n */\\n\\npragma solidity >=0.7;\\n\\nimport \\\"./IArbitrable.sol\\\";\\n\\n/**\\n * @title Arbitrator\\n * Arbitrator abstract contract.\\n * When developing arbitrator contracts we need to:\\n * - Define the functions for dispute creation (createDispute) and appeal (appeal). Don't forget to store the arbitrated contract and the disputeID (which should be unique, may nbDisputes).\\n * - Define the functions for cost display (arbitrationCost and appealCost).\\n * - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\n */\\ninterface IArbitrator {\\n enum DisputeStatus {Waiting, Appealable, Solved}\\n\\n /**\\n * @dev To be emitted when a dispute is created.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev To be emitted when a dispute can be appealed.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event AppealPossible(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev To be emitted when the current ruling is appealed.\\n * @param _disputeID ID of the dispute.\\n * @param _arbitrable The contract which created the dispute.\\n */\\n event AppealDecision(uint256 indexed _disputeID, IArbitrable indexed _arbitrable);\\n\\n /**\\n * @dev Create a dispute. Must be called by the arbitrable contract.\\n * Must be paid at least arbitrationCost(_extraData).\\n * @param _choices Amount of choices the arbitrator can make in this dispute.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return disputeID ID of the dispute created.\\n */\\n function createDispute(uint256 _choices, bytes calldata _extraData) external payable returns (uint256 disputeID);\\n\\n /**\\n * @dev Compute the cost of arbitration. It is recommended not to increase it often, as it can be highly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return cost Amount to be paid.\\n */\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /**\\n * @dev Appeal a ruling. Note that it has to be called before the arbitrator contract calls rule.\\n * @param _disputeID ID of the dispute to be appealed.\\n * @param _extraData Can be used to give extra info on the appeal.\\n */\\n function appeal(uint256 _disputeID, bytes calldata _extraData) external payable;\\n\\n /**\\n * @dev Compute the cost of appeal. It is recommended not to increase it often, as it can be higly time and gas consuming for the arbitrated contracts to cope with fee augmentation.\\n * @param _disputeID ID of the dispute to be appealed.\\n * @param _extraData Can be used to give additional info on the dispute to be created.\\n * @return cost Amount to be paid.\\n */\\n function appealCost(uint256 _disputeID, bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /**\\n * @dev Compute the start and end of the dispute's current or next appeal period, if possible. If not known or appeal is impossible: should return (0, 0).\\n * @param _disputeID ID of the dispute.\\n * @return start The start of the period.\\n * @return end The end of the period.\\n */\\n function appealPeriod(uint256 _disputeID) external view returns (uint256 start, uint256 end);\\n\\n /**\\n * @dev Return the status of a dispute.\\n * @param _disputeID ID of the dispute to rule.\\n * @return status The status of the dispute.\\n */\\n function disputeStatus(uint256 _disputeID) external view returns (DisputeStatus status);\\n\\n /**\\n * @dev Return the current ruling of a dispute. This is useful for parties to know if they should appeal.\\n * @param _disputeID ID of the dispute.\\n * @return ruling The ruling which has been given or the one which will be given if there is no appeal.\\n */\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling);\\n}\\n\",\"keccak256\":\"0x240a4142f9ec379da0333dfc82409b7b058cff9ea118368eb5e8f15447996c1e\",\"license\":\"MIT\"},\"@kleros/erc-792/contracts/erc-1497/IEvidence.sol\":{\"content\":\"/**\\n * @authors: [@ferittuncer, @hbarcelos]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n * SPDX-License-Identifier: MIT\\n */\\npragma solidity >=0.7;\\n\\nimport \\\"../IArbitrator.sol\\\";\\n\\n/** @title IEvidence\\n * ERC-1497: Evidence Standard\\n */\\ninterface IEvidence {\\n /**\\n * @dev To be emitted when meta-evidence is submitted.\\n * @param _metaEvidenceID Unique identifier of meta-evidence.\\n * @param _evidence A link to the meta-evidence JSON.\\n */\\n event MetaEvidence(uint256 indexed _metaEvidenceID, string _evidence);\\n\\n /**\\n * @dev To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).\\n * @param _arbitrator The arbitrator of the contract.\\n * @param _evidenceGroupID Unique identifier of the evidence group the evidence belongs to.\\n * @param _party The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party.\\n * @param _evidence A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json.\\n */\\n event Evidence(\\n IArbitrator indexed _arbitrator,\\n uint256 indexed _evidenceGroupID,\\n address indexed _party,\\n string _evidence\\n );\\n\\n /**\\n * @dev To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\\n * @param _arbitrator The arbitrator of the contract.\\n * @param _disputeID ID of the dispute in the Arbitrator contract.\\n * @param _metaEvidenceID Unique identifier of meta-evidence.\\n * @param _evidenceGroupID Unique identifier of the evidence group that is linked to this dispute.\\n */\\n event Dispute(\\n IArbitrator indexed _arbitrator,\\n uint256 indexed _disputeID,\\n uint256 _metaEvidenceID,\\n uint256 _evidenceGroupID\\n );\\n}\\n\",\"keccak256\":\"0x1ccedf5213730632540c748486637d7b1977ee73375818bf498a8276ca49dd13\",\"license\":\"MIT\"},\"src/0.8/RealitioForeignProxyOptimism.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\n\\r\\n/**\\r\\n * @authors: [@anmol-dhiman, @unknownunknown1]\\r\\n * @reviewers: [@jaybuidl, @kokialgo]\\r\\n * @auditors: []\\r\\n * @bounties: []\\r\\n * @deployments: []\\r\\n */\\r\\n\\r\\npragma solidity 0.8.25;\\r\\n\\r\\nimport {IDisputeResolver, IArbitrator} from \\\"@kleros/dispute-resolver-interface-contract-0.8/contracts/IDisputeResolver.sol\\\";\\r\\nimport {IForeignArbitrationProxy, IHomeArbitrationProxy} from \\\"./interfaces/IArbitrationProxies.sol\\\";\\r\\nimport {ICrossDomainMessenger} from \\\"./interfaces/optimism/ICrossDomainMessenger.sol\\\";\\r\\nimport {SafeSend} from \\\"./libraries/SafeSend.sol\\\";\\r\\n\\r\\n/**\\r\\n * @title Arbitration proxy for Realitio on foreign chain (eg. mainnet).\\r\\n * @dev https://docs.optimism.io/app-developers/bridging/messaging\\r\\n */\\r\\ncontract RealitioForeignProxyOptimism is IForeignArbitrationProxy, IDisputeResolver {\\r\\n using SafeSend for address payable;\\r\\n\\r\\n /* Constants */\\r\\n\\r\\n // Gas limit of the transaction call on L2. Note that setting value too high results in high gas estimation fee (tested on Sepolia).\\r\\n // Also note that chosen value is high enough to cover gas spendings.\\r\\n uint32 public constant MIN_GAS_LIMIT = 200000;\\r\\n\\r\\n uint256 public constant NUMBER_OF_CHOICES_FOR_ARBITRATOR = type(uint256).max; // The number of choices for the arbitrator.\\r\\n uint256 public constant REFUSE_TO_ARBITRATE_REALITIO = type(uint256).max; // Constant that represents \\\"Refuse to rule\\\" in realitio format.\\r\\n uint256 public constant MULTIPLIER_DIVISOR = 10000; // Divisor parameter for multipliers.\\r\\n uint256 public constant META_EVIDENCE_ID = 0; // The ID of the MetaEvidence for disputes.\\r\\n\\r\\n /* Storage */\\r\\n\\r\\n enum Status {\\r\\n None,\\r\\n Requested,\\r\\n Created,\\r\\n Ruled,\\r\\n Relayed,\\r\\n Failed\\r\\n }\\r\\n\\r\\n struct ArbitrationRequest {\\r\\n Status status; // Status of the arbitration.\\r\\n uint248 deposit; // The deposit paid by the requester at the time of the arbitration.\\r\\n uint256 disputeID; // The ID of the dispute in arbitrator contract.\\r\\n uint256 answer; // The answer given by the arbitrator.\\r\\n Round[] rounds; // Tracks each appeal round of a dispute.\\r\\n }\\r\\n\\r\\n struct DisputeDetails {\\r\\n uint256 arbitrationID; // The ID of the arbitration.\\r\\n address requester; // The address of the requester who managed to go through with the arbitration request.\\r\\n }\\r\\n\\r\\n // Round struct stores the contributions made to particular answers.\\r\\n struct Round {\\r\\n mapping(uint256 => uint256) paidFees; // Tracks the fees paid in this round in the form paidFees[answer].\\r\\n mapping(uint256 => bool) hasPaid; // True if the fees for this particular answer have been fully paid in the form hasPaid[answer].\\r\\n mapping(address => mapping(uint256 => uint256)) contributions; // Maps contributors to their contributions for each answer in the form contributions[address][answer].\\r\\n uint256 feeRewards; // Sum of reimbursable appeal fees available to the parties that made contributions to the answer that ultimately wins a dispute.\\r\\n uint256[] fundedAnswers; // Stores the answer choices that are fully funded.\\r\\n }\\r\\n\\r\\n address public immutable wNative; // Address of wrapped version of the chain's native currency. WETH-like.\\r\\n\\r\\n // contract for L1 -> L2 communication\\r\\n ICrossDomainMessenger public immutable messenger;\\r\\n address public immutable homeProxy; // Proxy on L2.\\r\\n\\r\\n IArbitrator public immutable arbitrator; // The address of the arbitrator. TRUSTED.\\r\\n bytes public arbitratorExtraData; // The extra data used to raise a dispute in the arbitrator.\\r\\n\\r\\n // Multipliers are in basis points.\\r\\n uint256 public immutable winnerMultiplier; // Multiplier for calculating the appeal fee that must be paid for the answer that was chosen by the arbitrator in the previous round.\\r\\n uint256 public immutable loserMultiplier; // Multiplier for calculating the appeal fee that must be paid for the answer that the arbitrator didn't rule for in the previous round.\\r\\n uint256 public immutable loserAppealPeriodMultiplier; // Multiplier for calculating the duration of the appeal period for the loser, in basis points.\\r\\n\\r\\n mapping(uint256 => mapping(address => ArbitrationRequest)) public arbitrationRequests; // Maps arbitration ID to its data. arbitrationRequests[uint(questionID)][requester].\\r\\n mapping(uint256 => DisputeDetails) public disputeIDToDisputeDetails; // Maps external dispute ids to local arbitration ID and requester who was able to complete the arbitration request.\\r\\n mapping(uint256 => bool) public arbitrationIDToDisputeExists; // Whether a dispute has already been created for the given arbitration ID or not.\\r\\n\\r\\n mapping(uint256 => address) public arbitrationIDToRequester; // Maps arbitration ID to the requester who was able to complete the arbitration request.\\r\\n mapping(uint256 => uint256) public arbitrationCreatedBlock; // Block of dispute creation.\\r\\n\\r\\n modifier onlyHomeProxy() {\\r\\n require(msg.sender == address(messenger), \\\"NOT_MESSENGER\\\");\\r\\n require(messenger.xDomainMessageSender() == homeProxy, \\\"Can only be called by Home proxy\\\");\\r\\n _;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Creates an arbitration proxy on the foreign chain (L1).\\r\\n * @param _wNative The address of the wrapped version of the native currency.\\r\\n * @param _arbitrator Arbitrator contract address.\\r\\n * @param _arbitratorExtraData The extra data used to raise a dispute in the arbitrator.\\r\\n * @param _metaEvidence The URI of the meta evidence file.\\r\\n * @param _winnerMultiplier Multiplier for calculating the appeal cost of the winning answer.\\r\\n * @param _loserMultiplier Multiplier for calculating the appeal cost of the losing answer.\\r\\n * @param _loserAppealPeriodMultiplier Multiplier for calculating the appeal period for the losing answer.\\r\\n * @param _homeProxy Proxy on L2.\\r\\n * @param _messenger contract for L1 -> L2 tx\\r\\n */\\r\\n constructor(\\r\\n address _wNative,\\r\\n IArbitrator _arbitrator,\\r\\n bytes memory _arbitratorExtraData,\\r\\n string memory _metaEvidence,\\r\\n uint256 _winnerMultiplier,\\r\\n uint256 _loserMultiplier,\\r\\n uint256 _loserAppealPeriodMultiplier,\\r\\n address _homeProxy,\\r\\n address _messenger\\r\\n ) {\\r\\n wNative = _wNative;\\r\\n arbitrator = _arbitrator;\\r\\n arbitratorExtraData = _arbitratorExtraData;\\r\\n winnerMultiplier = _winnerMultiplier;\\r\\n loserMultiplier = _loserMultiplier;\\r\\n loserAppealPeriodMultiplier = _loserAppealPeriodMultiplier;\\r\\n homeProxy = _homeProxy;\\r\\n messenger = ICrossDomainMessenger(_messenger);\\r\\n\\r\\n emit MetaEvidence(META_EVIDENCE_ID, _metaEvidence);\\r\\n }\\r\\n\\r\\n /*//////////////////////////////////////////////////////////////\\r\\n REALITIO LOGIC\\r\\n //////////////////////////////////////////////////////////////*/\\r\\n\\r\\n /**\\r\\n * @notice Requests arbitration for the given question and contested answer.\\r\\n * This version of the function uses recommended bridging parameters.\\r\\n * Note that the signature of this function can't be changed as it's required by Reality UI.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n function requestArbitration(bytes32 _questionID, uint256 _maxPrevious) external payable override {\\r\\n _requestArbitration(_questionID, _maxPrevious, MIN_GAS_LIMIT);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Requests arbitration for the given question and contested answer.\\r\\n * This function is to be used if the bridging with default parameters fail.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n * @param _gasLimit Gas limit for the L2 transaction.\\r\\n */\\r\\n function requestArbitrationCustomParameters(\\r\\n bytes32 _questionID,\\r\\n uint256 _maxPrevious,\\r\\n uint32 _gasLimit\\r\\n ) external payable {\\r\\n _requestArbitration(_questionID, _maxPrevious, _gasLimit);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Receives the acknowledgement of the arbitration request for the given question and requester. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The requester.\\r\\n */\\r\\n function receiveArbitrationAcknowledgement(\\r\\n bytes32 _questionID,\\r\\n address _requester\\r\\n ) external override onlyHomeProxy {\\r\\n uint256 arbitrationID = uint256(_questionID);\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[arbitrationID][_requester];\\r\\n require(arbitration.status == Status.Requested, \\\"Invalid arbitration status\\\");\\r\\n\\r\\n // Arbitration cost can possibly change between when the request has been made and received, so evaluate once more.\\r\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\r\\n if (arbitration.deposit >= arbitrationCost) {\\r\\n try\\r\\n arbitrator.createDispute{value: arbitrationCost}(NUMBER_OF_CHOICES_FOR_ARBITRATOR, arbitratorExtraData)\\r\\n returns (uint256 disputeID) {\\r\\n DisputeDetails storage disputeDetails = disputeIDToDisputeDetails[disputeID];\\r\\n disputeDetails.arbitrationID = arbitrationID;\\r\\n disputeDetails.requester = _requester;\\r\\n\\r\\n arbitrationIDToDisputeExists[arbitrationID] = true;\\r\\n arbitrationIDToRequester[arbitrationID] = _requester;\\r\\n arbitrationCreatedBlock[disputeID] = block.number;\\r\\n\\r\\n // At this point, arbitration.deposit is guaranteed to be greater than or equal to the arbitration cost.\\r\\n uint256 remainder = arbitration.deposit - arbitrationCost;\\r\\n\\r\\n arbitration.status = Status.Created;\\r\\n arbitration.deposit = 0;\\r\\n arbitration.disputeID = disputeID;\\r\\n arbitration.rounds.push();\\r\\n\\r\\n if (remainder > 0) {\\r\\n payable(_requester).safeSend(remainder, wNative);\\r\\n }\\r\\n\\r\\n emit ArbitrationCreated(_questionID, _requester, disputeID);\\r\\n emit Dispute(arbitrator, disputeID, META_EVIDENCE_ID, arbitrationID);\\r\\n } catch {\\r\\n arbitration.status = Status.Failed;\\r\\n emit ArbitrationFailed(_questionID, _requester);\\r\\n }\\r\\n } else {\\r\\n arbitration.status = Status.Failed;\\r\\n emit ArbitrationFailed(_questionID, _requester);\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Receives the cancelation of the arbitration request for the given question and requester. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The requester.\\r\\n */\\r\\n function receiveArbitrationCancelation(bytes32 _questionID, address _requester) external override onlyHomeProxy {\\r\\n uint256 arbitrationID = uint256(_questionID);\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[arbitrationID][_requester];\\r\\n require(arbitration.status == Status.Requested, \\\"Invalid arbitration status\\\");\\r\\n uint256 deposit = arbitration.deposit;\\r\\n\\r\\n delete arbitrationRequests[arbitrationID][_requester];\\r\\n payable(_requester).safeSend(deposit, wNative);\\r\\n\\r\\n emit ArbitrationCanceled(_questionID, _requester);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Cancels the arbitration in case the dispute could not be created.\\r\\n * This version of the function uses recommended bridging parameters.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleFailedDisputeCreation(bytes32 _questionID, address _requester) external payable override {\\r\\n _handleFailedDisputeCreation(_questionID, _requester, MIN_GAS_LIMIT);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Cancels the arbitration in case the dispute could not be created.\\r\\n * This function is to be used if the bridging with default parameters fail.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _gasLimit Gas limit for the L2 transaction.\\r\\n */\\r\\n function handleFailedDisputeCreationCustomParameters(\\r\\n bytes32 _questionID,\\r\\n address _requester,\\r\\n uint32 _gasLimit\\r\\n ) external payable {\\r\\n _handleFailedDisputeCreation(_questionID, _requester, _gasLimit);\\r\\n }\\r\\n\\r\\n // ********************************* //\\r\\n // * Appeals and arbitration * //\\r\\n // ********************************* //\\r\\n\\r\\n /**\\r\\n * @notice Takes up to the total amount required to fund an answer. Reimburses the rest. Creates an appeal if at least two answers are funded.\\r\\n * @param _arbitrationID The ID of the arbitration, which is questionID cast into uint256.\\r\\n * @param _answer One of the possible rulings the arbitrator can give that the funder considers to be the correct answer to the question.\\r\\n * Note that the answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n * Also note that '0' answer can be funded.\\r\\n * @return Whether the answer was fully funded or not.\\r\\n */\\r\\n function fundAppeal(uint256 _arbitrationID, uint256 _answer) external payable override returns (bool) {\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][\\r\\n arbitrationIDToRequester[_arbitrationID]\\r\\n ];\\r\\n require(arbitration.status == Status.Created, \\\"No dispute to appeal.\\\");\\r\\n\\r\\n uint256 disputeID = arbitration.disputeID;\\r\\n (uint256 appealPeriodStart, uint256 appealPeriodEnd) = arbitrator.appealPeriod(disputeID);\\r\\n require(block.timestamp >= appealPeriodStart && block.timestamp < appealPeriodEnd, \\\"Appeal period is over.\\\");\\r\\n\\r\\n uint256 multiplier;\\r\\n {\\r\\n uint256 winner = arbitrator.currentRuling(disputeID);\\r\\n if (winner == _answer) {\\r\\n multiplier = winnerMultiplier;\\r\\n } else {\\r\\n require(\\r\\n block.timestamp - appealPeriodStart <\\r\\n ((appealPeriodEnd - appealPeriodStart) * (loserAppealPeriodMultiplier)) / MULTIPLIER_DIVISOR,\\r\\n \\\"Appeal period is over for loser\\\"\\r\\n );\\r\\n multiplier = loserMultiplier;\\r\\n }\\r\\n }\\r\\n\\r\\n uint256 lastRoundID = arbitration.rounds.length - 1;\\r\\n Round storage round = arbitration.rounds[lastRoundID];\\r\\n require(!round.hasPaid[_answer], \\\"Appeal fee is already paid.\\\");\\r\\n uint256 appealCost = arbitrator.appealCost(disputeID, arbitratorExtraData);\\r\\n uint256 totalCost = appealCost + ((appealCost * multiplier) / MULTIPLIER_DIVISOR);\\r\\n\\r\\n // Take up to the amount necessary to fund the current round at the current costs.\\r\\n uint256 contribution;\\r\\n if (totalCost <= round.paidFees[_answer]) {\\r\\n contribution = 0;\\r\\n } else {\\r\\n contribution = totalCost - (round.paidFees[_answer]) > msg.value\\r\\n ? msg.value\\r\\n : totalCost - (round.paidFees[_answer]);\\r\\n emit Contribution(_arbitrationID, lastRoundID, _answer, msg.sender, contribution);\\r\\n }\\r\\n\\r\\n round.contributions[msg.sender][_answer] += contribution;\\r\\n round.paidFees[_answer] += contribution;\\r\\n if (round.paidFees[_answer] >= totalCost) {\\r\\n round.feeRewards += round.paidFees[_answer];\\r\\n round.fundedAnswers.push(_answer);\\r\\n round.hasPaid[_answer] = true;\\r\\n emit RulingFunded(_arbitrationID, lastRoundID, _answer);\\r\\n }\\r\\n\\r\\n if (round.fundedAnswers.length > 1) {\\r\\n // At least two sides are fully funded.\\r\\n arbitration.rounds.push();\\r\\n\\r\\n round.feeRewards = round.feeRewards - appealCost;\\r\\n arbitrator.appeal{value: appealCost}(disputeID, arbitratorExtraData);\\r\\n }\\r\\n\\r\\n if (msg.value - contribution > 0) payable(msg.sender).safeSend(msg.value - contribution, wNative); // Sending extra value back to contributor.\\r\\n return round.hasPaid[_answer];\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Sends the fee stake rewards and reimbursements proportional to the contributions made to the winner of a dispute. Reimburses contributions if there is no winner.\\r\\n * @param _arbitrationID The ID of the arbitration.\\r\\n * @param _beneficiary The address to send reward to.\\r\\n * @param _round The round from which to withdraw.\\r\\n * @param _answer The answer to query the reward from.\\r\\n * Note that the `_answer` has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n * @return reward The withdrawn amount.\\r\\n */\\r\\n function withdrawFeesAndRewards(\\r\\n uint256 _arbitrationID,\\r\\n address payable _beneficiary,\\r\\n uint256 _round,\\r\\n uint256 _answer\\r\\n ) public override returns (uint256 reward) {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n Round storage round = arbitration.rounds[_round];\\r\\n require(arbitration.status == Status.Ruled || arbitration.status == Status.Relayed, \\\"Dispute not resolved\\\");\\r\\n // Allow to reimburse if funding of the round was unsuccessful.\\r\\n if (!round.hasPaid[_answer]) {\\r\\n reward = round.contributions[_beneficiary][_answer];\\r\\n } else if (!round.hasPaid[arbitration.answer]) {\\r\\n // Reimburse unspent fees proportionally if the ultimate winner didn't pay appeal fees fully.\\r\\n // Note that if only one side is funded it will become a winner and this part of the condition won't be reached.\\r\\n reward = round.fundedAnswers.length > 1\\r\\n ? (round.contributions[_beneficiary][_answer] * round.feeRewards) /\\r\\n (round.paidFees[round.fundedAnswers[0]] + round.paidFees[round.fundedAnswers[1]])\\r\\n : 0;\\r\\n } else if (arbitration.answer == _answer) {\\r\\n uint256 paidFees = round.paidFees[_answer];\\r\\n // Reward the winner.\\r\\n reward = paidFees > 0 ? (round.contributions[_beneficiary][_answer] * round.feeRewards) / paidFees : 0;\\r\\n }\\r\\n\\r\\n if (reward != 0) {\\r\\n round.contributions[_beneficiary][_answer] = 0;\\r\\n _beneficiary.safeSend(reward, wNative);\\r\\n emit Withdrawal(_arbitrationID, _round, _answer, _beneficiary, reward);\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Allows to withdraw any rewards or reimbursable fees for all rounds at once.\\r\\n * @dev This function is O(n) where n is the total number of rounds. Arbitration cost of subsequent rounds is `A(n) = 2A(n-1) + 1`.\\r\\n * So because of this exponential growth of costs, you can assume n is less than 10 at all times.\\r\\n * @param _arbitrationID The ID of the arbitration.\\r\\n * @param _beneficiary The address that made contributions.\\r\\n * @param _contributedTo Answer that received contributions from contributor.\\r\\n * Note that the `_contributedTo` answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n */\\r\\n function withdrawFeesAndRewardsForAllRounds(\\r\\n uint256 _arbitrationID,\\r\\n address payable _beneficiary,\\r\\n uint256 _contributedTo\\r\\n ) external override {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n\\r\\n uint256 numberOfRounds = arbitration.rounds.length;\\r\\n for (uint256 roundNumber = 0; roundNumber < numberOfRounds; roundNumber++) {\\r\\n withdrawFeesAndRewards(_arbitrationID, _beneficiary, roundNumber, _contributedTo);\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Allows to submit evidence for a particular question.\\r\\n * @param _arbitrationID The ID of the arbitration related to the question.\\r\\n * @param _evidenceURI Link to evidence.\\r\\n */\\r\\n function submitEvidence(uint256 _arbitrationID, string calldata _evidenceURI) external override {\\r\\n emit Evidence(arbitrator, _arbitrationID, msg.sender, _evidenceURI);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Rules a specified dispute. Can only be called by the arbitrator.\\r\\n * @dev Accounts for the situation where the winner loses a case due to paying less appeal fees than expected.\\r\\n * @param _disputeID The ID of the dispute in the ERC792 arbitrator.\\r\\n * @param _ruling The ruling given by the arbitrator.\\r\\n */\\r\\n function rule(uint256 _disputeID, uint256 _ruling) external override {\\r\\n DisputeDetails storage disputeDetails = disputeIDToDisputeDetails[_disputeID];\\r\\n uint256 arbitrationID = disputeDetails.arbitrationID;\\r\\n address requester = disputeDetails.requester;\\r\\n\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[arbitrationID][requester];\\r\\n require(msg.sender == address(arbitrator), \\\"Only arbitrator allowed\\\");\\r\\n require(arbitration.status == Status.Created, \\\"Invalid arbitration status\\\");\\r\\n uint256 finalRuling = _ruling;\\r\\n\\r\\n // If one side paid its fees, the ruling is in its favor. Note that if the other side had also paid, an appeal would have been created.\\r\\n Round storage round = arbitration.rounds[arbitration.rounds.length - 1];\\r\\n if (round.fundedAnswers.length == 1) finalRuling = round.fundedAnswers[0];\\r\\n\\r\\n arbitration.answer = finalRuling;\\r\\n arbitration.status = Status.Ruled;\\r\\n\\r\\n emit Ruling(arbitrator, _disputeID, finalRuling);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Relays the ruling to home proxy.\\r\\n * This version of the function uses recommended bridging parameters.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function relayRule(bytes32 _questionID, address _requester) external {\\r\\n _relayRule(_questionID, _requester, MIN_GAS_LIMIT);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Relays the ruling to home proxy.\\r\\n * This function is to be used if the bridging with default parameters fail.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _gasLimit Gas limit for the L2 transaction.\\r\\n */\\r\\n function relayRuleCustomParameters(bytes32 _questionID, address _requester, uint32 _gasLimit) external {\\r\\n _relayRule(_questionID, _requester, _gasLimit);\\r\\n }\\r\\n\\r\\n // ********************************* //\\r\\n // * External View Functions * //\\r\\n // ********************************* //\\r\\n\\r\\n /**\\r\\n * @notice Returns stake multipliers.\\r\\n * @return winner Winners stake multiplier.\\r\\n * @return loser Losers stake multiplier.\\r\\n * @return loserAppealPeriod Multiplier for calculating an appeal period duration for the losing side.\\r\\n * @return divisor Multiplier divisor.\\r\\n */\\r\\n function getMultipliers()\\r\\n external\\r\\n view\\r\\n override\\r\\n returns (uint256 winner, uint256 loser, uint256 loserAppealPeriod, uint256 divisor)\\r\\n {\\r\\n return (winnerMultiplier, loserMultiplier, loserAppealPeriodMultiplier, MULTIPLIER_DIVISOR);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Returns number of possible ruling options. Valid rulings are [0, return value].\\r\\n * @return count The number of ruling options.\\r\\n */\\r\\n function numberOfRulingOptions(uint256 /* _arbitrationID */) external pure override returns (uint256) {\\r\\n return NUMBER_OF_CHOICES_FOR_ARBITRATOR;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Gets the fee to create a dispute.\\r\\n * @return The fee to create a dispute.\\r\\n */\\r\\n function getDisputeFee(bytes32 /* _questionID */) external view override returns (uint256) {\\r\\n return arbitrator.arbitrationCost(arbitratorExtraData);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Gets the number of rounds of the specific question.\\r\\n * @param _arbitrationID The ID of the arbitration related to the question.\\r\\n * @return The number of rounds.\\r\\n */\\r\\n function getNumberOfRounds(uint256 _arbitrationID) external view returns (uint256) {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n return arbitration.rounds.length;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Gets the information of a round of a question.\\r\\n * @param _arbitrationID The ID of the arbitration.\\r\\n * @param _round The round to query.\\r\\n * @return paidFees The amount of fees paid for each fully funded answer.\\r\\n * @return feeRewards The amount of fees that will be used as rewards.\\r\\n * @return fundedAnswers IDs of fully funded answers.\\r\\n * Note that the `fundedAnswers` have Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n */\\r\\n function getRoundInfo(\\r\\n uint256 _arbitrationID,\\r\\n uint256 _round\\r\\n ) external view returns (uint256[] memory paidFees, uint256 feeRewards, uint256[] memory fundedAnswers) {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n Round storage round = arbitration.rounds[_round];\\r\\n fundedAnswers = round.fundedAnswers;\\r\\n\\r\\n paidFees = new uint256[](round.fundedAnswers.length);\\r\\n\\r\\n for (uint256 i = 0; i < round.fundedAnswers.length; i++) {\\r\\n paidFees[i] = round.paidFees[round.fundedAnswers[i]];\\r\\n }\\r\\n\\r\\n feeRewards = round.feeRewards;\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Gets the information of a round of a question for a specific answer choice.\\r\\n * @param _arbitrationID The ID of the arbitration.\\r\\n * @param _round The round to query.\\r\\n * @param _answer The answer choice to get funding status for.\\r\\n * Note that the `_answer` has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n * @return raised The amount paid for this answer.\\r\\n * @return fullyFunded Whether the answer is fully funded or not.\\r\\n */\\r\\n function getFundingStatus(\\r\\n uint256 _arbitrationID,\\r\\n uint256 _round,\\r\\n uint256 _answer\\r\\n ) external view returns (uint256 raised, bool fullyFunded) {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n Round storage round = arbitration.rounds[_round];\\r\\n\\r\\n raised = round.paidFees[_answer];\\r\\n fullyFunded = round.hasPaid[_answer];\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Gets contributions to the answers that are fully funded.\\r\\n * @param _arbitrationID The ID of the arbitration.\\r\\n * @param _round The round to query.\\r\\n * @param _contributor The address whose contributions to query.\\r\\n * @return fundedAnswers IDs of the answers that are fully funded.\\r\\n * Note that the `fundedAnswers` have Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n * @return contributions The amount contributed to each funded answer by the contributor.\\r\\n */\\r\\n function getContributionsToSuccessfulFundings(\\r\\n uint256 _arbitrationID,\\r\\n uint256 _round,\\r\\n address _contributor\\r\\n ) external view returns (uint256[] memory fundedAnswers, uint256[] memory contributions) {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n Round storage round = arbitration.rounds[_round];\\r\\n\\r\\n fundedAnswers = round.fundedAnswers;\\r\\n contributions = new uint256[](round.fundedAnswers.length);\\r\\n\\r\\n for (uint256 i = 0; i < contributions.length; i++) {\\r\\n contributions[i] = round.contributions[_contributor][fundedAnswers[i]];\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Returns the sum of withdrawable amount.\\r\\n * @dev This function is O(n) where n is the total number of rounds.\\r\\n * @dev This could exceed the gas limit, therefore this function should be used only as a utility and not be relied upon by other contracts.\\r\\n * @param _arbitrationID The ID of the arbitration.\\r\\n * @param _beneficiary The contributor for which to query.\\r\\n * @param _contributedTo Answer that received contributions from contributor.\\r\\n * Note that the `_contributedTo` answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.\\r\\n * @return sum The total amount available to withdraw.\\r\\n */\\r\\n function getTotalWithdrawableAmount(\\r\\n uint256 _arbitrationID,\\r\\n address payable _beneficiary,\\r\\n uint256 _contributedTo\\r\\n ) external view override returns (uint256 sum) {\\r\\n address requester = arbitrationIDToRequester[_arbitrationID];\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[_arbitrationID][requester];\\r\\n if (!(arbitration.status == Status.Ruled || arbitration.status == Status.Relayed)) return sum;\\r\\n\\r\\n uint256 finalAnswer = arbitration.answer;\\r\\n uint256 noOfRounds = arbitration.rounds.length;\\r\\n for (uint256 roundNumber = 0; roundNumber < noOfRounds; roundNumber++) {\\r\\n Round storage round = arbitration.rounds[roundNumber];\\r\\n\\r\\n if (!round.hasPaid[_contributedTo]) {\\r\\n // Allow to reimburse if funding was unsuccessful for this answer option.\\r\\n sum += round.contributions[_beneficiary][_contributedTo];\\r\\n } else if (!round.hasPaid[finalAnswer]) {\\r\\n // Reimburse unspent fees proportionally if the ultimate winner didn't pay appeal fees fully.\\r\\n // Note that if only one side is funded it will become a winner and this part of the condition won't be reached.\\r\\n sum += round.fundedAnswers.length > 1\\r\\n ? (round.contributions[_beneficiary][_contributedTo] * round.feeRewards) /\\r\\n (round.paidFees[round.fundedAnswers[0]] + round.paidFees[round.fundedAnswers[1]])\\r\\n : 0;\\r\\n } else if (finalAnswer == _contributedTo) {\\r\\n uint256 paidFees = round.paidFees[_contributedTo];\\r\\n // Reward the winner.\\r\\n sum += paidFees > 0\\r\\n ? (round.contributions[_beneficiary][_contributedTo] * round.feeRewards) / paidFees\\r\\n : 0;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Casts question ID into uint256 thus returning the related arbitration ID.\\r\\n * @param _questionID The ID of the question.\\r\\n * @return The ID of the arbitration.\\r\\n */\\r\\n function questionIDToArbitrationID(bytes32 _questionID) external pure returns (uint256) {\\r\\n return uint256(_questionID);\\r\\n }\\r\\n\\r\\n /**\\r\\n * @notice Maps external (arbitrator side) dispute id to local (arbitrable) dispute id.\\r\\n * @param _externalDisputeID Dispute id as in arbitrator side.\\r\\n * @return localDisputeID Dispute id as in arbitrable contract.\\r\\n */\\r\\n function externalIDtoLocalID(uint256 _externalDisputeID) external view override returns (uint256) {\\r\\n return disputeIDToDisputeDetails[_externalDisputeID].arbitrationID;\\r\\n }\\r\\n\\r\\n // **************************** //\\r\\n // * Internal * //\\r\\n // **************************** //\\r\\n\\r\\n function _requestArbitration(bytes32 _questionID, uint256 _maxPrevious, uint32 _gasLimit) internal {\\r\\n require(!arbitrationIDToDisputeExists[uint256(_questionID)], \\\"Dispute already created\\\");\\r\\n\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[uint256(_questionID)][msg.sender];\\r\\n require(arbitration.status == Status.None, \\\"Arbitration already requested\\\");\\r\\n\\r\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\r\\n\\r\\n require(msg.value >= arbitrationCost, \\\"Deposit value too low\\\");\\r\\n\\r\\n arbitration.status = Status.Requested;\\r\\n arbitration.deposit = uint248(msg.value);\\r\\n\\r\\n bytes4 methodSelector = IHomeArbitrationProxy.receiveArbitrationRequest.selector;\\r\\n bytes memory data = abi.encodeWithSelector(methodSelector, _questionID, msg.sender, _maxPrevious);\\r\\n\\r\\n messenger.sendMessage(homeProxy, data, _gasLimit);\\r\\n emit ArbitrationRequested(_questionID, msg.sender, _maxPrevious);\\r\\n }\\r\\n\\r\\n function _handleFailedDisputeCreation(bytes32 _questionID, address _requester, uint32 _gasLimit) internal {\\r\\n uint256 arbitrationID = uint256(_questionID);\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[arbitrationID][_requester];\\r\\n require(arbitration.status == Status.Failed, \\\"Invalid arbitration status\\\");\\r\\n\\r\\n uint256 deposit = arbitration.deposit;\\r\\n\\r\\n // Note that we don't nullify the status to allow the function to be called\\r\\n // multiple times to avoid intentional blocking.\\r\\n // Also note that since the status is not nullified the requester must use a different address\\r\\n // to make a new request for the same question.\\r\\n arbitration.deposit = 0;\\r\\n payable(_requester).safeSend(deposit, wNative);\\r\\n\\r\\n bytes4 methodSelector = IHomeArbitrationProxy.receiveArbitrationFailure.selector;\\r\\n bytes memory data = abi.encodeWithSelector(methodSelector, _questionID, _requester);\\r\\n\\r\\n messenger.sendMessage(homeProxy, data, _gasLimit);\\r\\n emit ArbitrationCanceled(_questionID, _requester);\\r\\n }\\r\\n\\r\\n function _relayRule(bytes32 _questionID, address _requester, uint32 _gasLimit) internal {\\r\\n uint256 arbitrationID = uint256(_questionID);\\r\\n ArbitrationRequest storage arbitration = arbitrationRequests[arbitrationID][_requester];\\r\\n // Note that we allow to relay multiple times to prevent intentional blocking.\\r\\n require(arbitration.status == Status.Ruled || arbitration.status == Status.Relayed, \\\"Dispute not resolved\\\");\\r\\n\\r\\n arbitration.status = Status.Relayed;\\r\\n\\r\\n // Realitio ruling is shifted by 1 compared to Kleros.\\r\\n uint256 realitioRuling = arbitration.answer != 0 ? arbitration.answer - 1 : REFUSE_TO_ARBITRATE_REALITIO;\\r\\n\\r\\n bytes4 methodSelector = IHomeArbitrationProxy.receiveArbitrationAnswer.selector;\\r\\n bytes memory data = abi.encodeWithSelector(methodSelector, _questionID, bytes32(realitioRuling));\\r\\n\\r\\n messenger.sendMessage(homeProxy, data, _gasLimit);\\r\\n emit RulingRelayed(_questionID, bytes32(realitioRuling));\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x0afb0ef8721f5c1459cec186c74a07d250db706ebec04469b58c0c8a7a6284a8\",\"license\":\"MIT\"},\"src/0.8/interfaces/IArbitrationProxies.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\npragma solidity 0.8.25;\\r\\n\\r\\nimport {IArbitrable} from \\\"@kleros/erc-792/contracts/IArbitrable.sol\\\";\\r\\nimport {IEvidence} from \\\"@kleros/erc-792/contracts/erc-1497/IEvidence.sol\\\";\\r\\nimport {IRealitio} from \\\"./IRealitio.sol\\\";\\r\\n\\r\\ninterface IHomeArbitrationProxy {\\r\\n /**\\r\\n * @notice To be emitted when the Realitio contract has been notified of an arbitration request.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the previous bond for the question.\\r\\n */\\r\\n event RequestNotified(bytes32 indexed _questionID, address indexed _requester, uint256 _maxPrevious);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when arbitration request is rejected.\\r\\n * @dev This can happen if the current bond for the question is higher than maxPrevious\\r\\n * or if the question is already finalized.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question.\\r\\n * @param _reason The reason why the request was rejected.\\r\\n */\\r\\n event RequestRejected(\\r\\n bytes32 indexed _questionID,\\r\\n address indexed _requester,\\r\\n uint256 _maxPrevious,\\r\\n string _reason\\r\\n );\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when the arbitration request acknowledgement is sent to the Foreign Chain.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event RequestAcknowledged(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when the arbitration request is canceled.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event RequestCanceled(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when the dispute could not be created on the Foreign Chain.\\r\\n * @dev This will happen if the arbitration fee increases in between the arbitration request and acknowledgement.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event ArbitrationFailed(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when receiving the answer from the arbitrator.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _answer The answer from the arbitrator.\\r\\n */\\r\\n event ArbitratorAnswered(bytes32 indexed _questionID, bytes32 _answer);\\r\\n\\r\\n /**\\r\\n * @notice To be emitted when reporting the arbitrator answer to Realitio.\\r\\n * @param _questionID The ID of the question.\\r\\n */\\r\\n event ArbitrationFinished(bytes32 indexed _questionID);\\r\\n\\r\\n /**\\r\\n * @dev Receives the requested arbitration for a question. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n function receiveArbitrationRequest(bytes32 _questionID, address _requester, uint256 _maxPrevious) external;\\r\\n\\r\\n /**\\r\\n * @notice Handles arbitration request after it has been notified to Realitio for a given question.\\r\\n * @dev This method exists because `receiveArbitrationRequest` is called by\\r\\n * the bridge and cannot send messages back to it.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleNotifiedRequest(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Handles arbitration request after it has been rejected.\\r\\n * @dev This method exists because `receiveArbitrationRequest` is called by\\r\\n * the bridge and cannot send messages back to it.\\r\\n * Reasons why the request might be rejected:\\r\\n * - The question does not exist\\r\\n * - The question was not answered yet\\r\\n * - The quesiton bond value changed while the arbitration was being requested\\r\\n * - Another request was already accepted\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleRejectedRequest(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Receives a failed attempt to request arbitration. TRUSTED.\\r\\n * @dev Currently this can happen only if the arbitration cost increased.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function receiveArbitrationFailure(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Receives the answer to a specified question. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _answer The answer from the arbitrator.\\r\\n */\\r\\n function receiveArbitrationAnswer(bytes32 _questionID, bytes32 _answer) external;\\r\\n\\r\\n /** @notice Provides a string of json-encoded metadata with the following properties:\\r\\n - tos: A URI representing the location of a terms-of-service document for the arbitrator.\\r\\n - template_hashes: An array of hashes of templates supported by the arbitrator. If you have a numerical ID for a template registered with Reality.eth, you can look up this hash by calling the Reality.eth template_hashes() function.\\r\\n * @dev Template_hashes won't be used by this home proxy. \\r\\n */\\r\\n function metadata() external view returns (string calldata);\\r\\n\\r\\n /**\\r\\n * @notice Returns the address of Reality instance.\\r\\n * @return Realitio address.\\r\\n */\\r\\n function realitio() external view returns (IRealitio);\\r\\n}\\r\\n\\r\\ninterface IForeignArbitrationProxy {\\r\\n /**\\r\\n * @notice Should be emitted when the arbitration is requested.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n event ArbitrationRequested(bytes32 indexed _questionID, address indexed _requester, uint256 _maxPrevious);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the dispute is created.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n * @param _disputeID The ID of the dispute.\\r\\n */\\r\\n event ArbitrationCreated(bytes32 indexed _questionID, address indexed _requester, uint256 indexed _disputeID);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the arbitration is canceled by the Home Chain.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event ArbitrationCanceled(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the dispute could not be created.\\r\\n * @dev This will happen if there is an increase in the arbitration fees\\r\\n * between the time the arbitration is made and the time it is acknowledged.\\r\\n * @param _questionID The ID of the question with the request for arbitration.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n event ArbitrationFailed(bytes32 indexed _questionID, address indexed _requester);\\r\\n\\r\\n /**\\r\\n * @notice Should be emitted when the ruling is relayed to home proxy manually. Some implementations may not emit this event.\\r\\n * @param _questionID The ID of the question with the ruling to relay.\\r\\n * @param _ruling Ruling converted into Realitio format.\\r\\n */\\r\\n event RulingRelayed(bytes32 _questionID, bytes32 _ruling);\\r\\n\\r\\n /**\\r\\n * @notice Requests arbitration for the given question and contested answer.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _maxPrevious The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.\\r\\n */\\r\\n function requestArbitration(bytes32 _questionID, uint256 _maxPrevious) external payable;\\r\\n\\r\\n /**\\r\\n * @notice Receives the acknowledgement of the arbitration request for the given question and requester. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function receiveArbitrationAcknowledgement(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Receives the cancelation of the arbitration request for the given question and requester. TRUSTED.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function receiveArbitrationCancelation(bytes32 _questionID, address _requester) external;\\r\\n\\r\\n /**\\r\\n * @notice Cancels the arbitration in case the dispute could not be created.\\r\\n * @param _questionID The ID of the question.\\r\\n * @param _requester The address of the arbitration requester.\\r\\n */\\r\\n function handleFailedDisputeCreation(bytes32 _questionID, address _requester) external payable;\\r\\n\\r\\n /**\\r\\n * @notice Gets the fee to create a dispute.\\r\\n * @param _questionID the ID of the question.\\r\\n * @return The fee to create a dispute.\\r\\n */\\r\\n function getDisputeFee(bytes32 _questionID) external view returns (uint256);\\r\\n\\r\\n /**\\r\\n * @notice Returns the address of the home proxy.\\r\\n * @return Home proxy address.\\r\\n */\\r\\n function homeProxy() external view returns (address);\\r\\n\\r\\n /**\\r\\n * @notice Returns the creation block of the dispute.\\r\\n * @param _disputeID the ID of the dispute.\\r\\n * @return Block number of dispute creation.\\r\\n */\\r\\n function arbitrationCreatedBlock(uint256 _disputeID) external view returns (uint256);\\r\\n}\\r\\n\",\"keccak256\":\"0x3e7cd7b21cfcb8f2c6167e9d95f9a911a8ec402f953840a4bc301099b233c0b8\",\"license\":\"MIT\"},\"src/0.8/interfaces/IRealitio.sol\":{\"content\":\"/* solhint-disable var-name-mixedcase */\\r\\n// SPDX-License-Identifier: MIT\\r\\n\\r\\n/**\\r\\n * Interface of https://github.com/RealityETH/reality-eth-monorepo/blob/main/packages/contracts/flat/RealityETH-3.0.sol.\\r\\n * @reviewers: [@hbarcelos, @fnanni-0, @nix1g, @unknownunknown1, @ferittuncer, @jaybuidl]\\r\\n * @auditors: []\\r\\n * @bounties: []\\r\\n * @deployments: []\\r\\n */\\r\\n\\r\\npragma solidity 0.8.25;\\r\\n\\r\\ninterface IRealitio {\\r\\n event LogNewAnswer(\\r\\n bytes32 answer,\\r\\n bytes32 indexed question_id,\\r\\n bytes32 history_hash,\\r\\n address indexed user,\\r\\n uint256 bond,\\r\\n uint256 ts,\\r\\n bool is_commitment\\r\\n );\\r\\n\\r\\n event LogNewTemplate(uint256 indexed template_id, address indexed user, string question_text);\\r\\n\\r\\n event LogNewQuestion(\\r\\n bytes32 indexed question_id,\\r\\n address indexed user,\\r\\n uint256 template_id,\\r\\n string question,\\r\\n bytes32 indexed content_hash,\\r\\n address arbitrator,\\r\\n uint32 timeout,\\r\\n uint32 opening_ts,\\r\\n uint256 nonce,\\r\\n uint256 created\\r\\n );\\r\\n\\r\\n /**\\r\\n * @dev The arbitrator contract is trusted to only call this if they've been paid, and tell us who paid them.\\r\\n * @notice Notify the contract that the arbitrator has been paid for a question, freezing it pending their decision.\\r\\n * @param question_id The ID of the question.\\r\\n * @param requester The account that requested arbitration.\\r\\n * @param max_previous If specified, reverts if a bond higher than this was submitted after you sent your transaction.\\r\\n */\\r\\n function notifyOfArbitrationRequest(bytes32 question_id, address requester, uint256 max_previous) external;\\r\\n\\r\\n /**\\r\\n * @notice Cancel a previously-requested arbitration and extend the timeout\\r\\n * @dev Useful when doing arbitration across chains that can't be requested atomically\\r\\n * @param question_id The ID of the question\\r\\n */\\r\\n function cancelArbitration(bytes32 question_id) external;\\r\\n\\r\\n /**\\r\\n * @notice Submit the answer for a question, for use by the arbitrator, working out the appropriate winner based on the last answer details.\\r\\n * @dev Doesn't require (or allow) a bond.\\r\\n * @param question_id The ID of the question\\r\\n * @param answer The answer, encoded into bytes32\\r\\n * @param payee_if_wrong The account to be credited as winner if the last answer given is wrong, usually the account that paid the arbitrator\\r\\n * @param last_history_hash The history hash before the final one\\r\\n * @param last_answer_or_commitment_id The last answer given, or the commitment ID if it was a commitment.\\r\\n * @param last_answerer The address that supplied the last answer\\r\\n */\\r\\n function assignWinnerAndSubmitAnswerByArbitrator(\\r\\n bytes32 question_id,\\r\\n bytes32 answer,\\r\\n address payee_if_wrong,\\r\\n bytes32 last_history_hash,\\r\\n bytes32 last_answer_or_commitment_id,\\r\\n address last_answerer\\r\\n ) external;\\r\\n}\\r\\n\",\"keccak256\":\"0x91211c4cd47ce3d5773c6e3763d421fb8514522a157436f354c03a4b22a1c9dd\",\"license\":\"MIT\"},\"src/0.8/interfaces/optimism/ICrossDomainMessenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\r\\n\\r\\npragma solidity 0.8.25;\\r\\n// @dev https://github.com/ethereum-optimism/optimism/blob/v1.7.7/packages/contracts-bedrock/src/universal/CrossDomainMessenger.sol\\r\\ninterface ICrossDomainMessenger {\\r\\n function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external;\\r\\n\\r\\n function xDomainMessageSender() external view returns (address);\\r\\n}\\r\\n\",\"keccak256\":\"0x0199f0a66b12320b8b05bf2f98eac49c61c13a5f4ddfe643a3135f9b613c754c\",\"license\":\"MIT\"},\"src/0.8/libraries/SafeSend.sol\":{\"content\":\"/**\\r\\n * @authors: [@andreimvp]\\r\\n * @reviewers: [@divyangchauhan, @wadader, @fcanela, @unknownunknown1]\\r\\n * @auditors: []\\r\\n * @bounties: []\\r\\n * SPDX-License-Identifier: MIT\\r\\n */\\r\\n\\r\\npragma solidity 0.8.25;\\r\\n\\r\\ninterface WethLike {\\r\\n function deposit() external payable;\\r\\n\\r\\n function transfer(address dst, uint256 wad) external;\\r\\n}\\r\\n\\r\\nlibrary SafeSend {\\r\\n function safeSend(address payable _to, uint256 _value, address _wethLike) internal {\\r\\n if (_to.send(_value)) return;\\r\\n\\r\\n WethLike(_wethLike).deposit{value: _value}();\\r\\n WethLike(_wethLike).transfer(_to, _value);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0xa7c7b1b392e32ff57a71394d18ab2fe5d6c4ece41a55222bc2fbbc906b735195\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523461040b576136748038038061001a81610410565b92833981016101208282031261040b5761003382610435565b6020830151926001600160a01b038416840361040b5760408101516001600160401b03939084811161040b57820181601f8201121561040b578181602061007c9351910161046c565b90606083015185811161040b5783019080601f8301121561040b5781516100a59260200161046c565b9360808301519060a08401519260c0850151976100d16101006100ca60e08901610435565b9701610435565b9660805260e05280519182116103f557600054600181811c911680156103eb575b60208210146103d557601f8111610387575b50602090601f83116001146102fe5791806000989694926000805160206136348339815191529896948a926102f3575b50508160011b9189199060031b1c19161787555b610100526101205261014095865260c05260018060a01b031660a052604080518092602082526101878151809281602086015260208686019101610449565b601f01601f19168101030190a260405161318691826104ae833960805182818161081f01528181610e650152818161173e01528181611cf6015281816121e1015281816125370152612a8f015260a051828181610372015281816105a101528181610b5d01528181610d690152818161114f015281816117930152818161198a015281816122370152612356015260c0518281816103b7015281816105fd01528181610ba201528181610dc401528181611196015281816117d8015281816119cf015281816122780152612311015260e05182818161065d01528181610ae8015281816110d80152818161137f0152818161141b0152818161185b01528181611ac801528181611b2601528181611bef01528181611d4901528181611d9d01526123fc0152610100518281816114ac0152818161163a0152611b640152610120518281816114e70152818161165d015261200601525181818161168301528181611fd8015261265f0152f35b015190503880610134565b60008080526000805160206136548339815191529291905b601f198516811061036f57509260009896949260019260008051602061363483398151915299979583601f19811610610357575b505050811b018755610148565b01518a1960f88460031b161c1916905538808061034a565b91926020600181928685015181550194019201610316565b60008052600080516020613654833981519152601f840160051c8101602085106103ce575b601f830160051c820181106103c2575050610104565b600081556001016103ac565b50806103ac565b634e487b7160e01b600052602260045260246000fd5b90607f16906100f2565b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176103f557604052565b51906001600160a01b038216820361040b57565b60005b83811061045c5750506000910152565b818101518382015260200161044c565b919291906001600160401b0381116103f557610491601f8201601f1916602001610410565b938185528183011161040b576104ab916020850190610449565b56fe608080604052600436101561001357600080fd5b600090813560e01c9081630c139eb414612648575080630c7ac7b6146125665780630fa8c7ce1461161d5780632d68efc914612521578063311a6c56146123b4578063362c3479146123855780633cb747bf1461234057806348f37857146122fb5780634aa6a1e41461217f5780634b2f0ea014611a5b5780635082a799146118d557806354dba90f146118b957806368cb30f51461188a5780636cc6cde11461184557806374d82d18146116e4578063756804c0146116b157806379873f8a146116225780637a7104911461161d5780637ce1ffeb146115ff5780638a9bb02a146115285780638d8b2d7e1461150a578063965394ab146114cf5780639b3ac99814611494578063a22352e2146113e0578063a6a7f0eb1461130d578063a829c3d11461104d578063aba980eb14611023578063bb16378214611005578063bb2fe65f14610f93578063bde80ca714610f57578063be26fc8814610d41578063c21ae06114610d17578063c5633e9214610a4c578063c599c66f14610952578063d661dd3114610935578063e742e2ed14610579578063ec85635b14610557578063edabc474146104ce578063fc6f8f1614610483578063fe211361146102cb578063fe2dddeb146102645763ffa1ad74146101ef57600080fd5b34610261578060031936011261026157604051604081019080821067ffffffffffffffff83111761024b576102479160405260058152640322e302e360dc1b602082015260405191829160208352602083019061272e565b0390f35b634e487b7160e01b600052604160045260246000fd5b80fd5b50346102615761027336612822565b828493929352600460205260018060a01b03604085205416926001936001602052604086209060005260205260036040600020015492855b8481106102b6578680f35b806102c485889386866129a2565b50016102ab565b5034610261576102da366127b7565b91806000526001602052604060002060018060a01b03809316600052602052604060002080549060ff8216600681101561046d5760029261032982600360049414908115610463575b5061291f565b60ff19161781550154801561045957600019810190811161044357915b604051906306bad43760e51b602083015282602483015283604483015260448252610370826126d4565b7f00000000000000000000000000000000000000000000000000000000000000001693843b1561043e576103df9460009283604051809881958294633dbb202b60e01b84527f0000000000000000000000000000000000000000000000000000000000000000600485016130fe565b03925af1918215610432577fba07eb273dd4b62b682a13480e2838bfbd6afab07919d6bcad9156af107f8c4193604093610423575b5082519182526020820152a180f35b61042c906126c0565b38610414565b6040513d6000823e3d90fd5b600080fd5b634e487b7160e01b600052601160045260246000fd5b5060001991610346565b8491501438610323565b634e487b7160e01b600052602160045260246000fd5b50346102615760203660031901126102615760043581526004602052604060018060a01b03818320541691600160205220906000526020526020600360406000200154604051908152f35b5034610261576040366003190112610261576104e86127a1565b60043582526001602052604082209060018060a01b03166000526020526040600020805460ff81169160026001820154910154916040519360068110156105435760809550845260081c602084015260408301526060820152f35b634e487b7160e01b86526021600452602486fd5b503461026157602061057161056b36612822565b91612e1f565b604051908152f35b5034610261576040366003190112610261576004356105966127a1565b906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116906105ce338314612d79565b6040518092636e296e4560e01b825281600460209586935afa801561092a576106249187916108fd575b5082167f0000000000000000000000000000000000000000000000000000000000000000831614612dd4565b82855260018252806040862094169384600052825260406000209182549160ff831660068110156108e957600161065b911461284c565b7f000000000000000000000000000000000000000000000000000000000000000016906040519263f7434ea960e01b84528160048501528184806106a160248201612bf3565b0381865afa9384156108de5788946108af575b50600881901c841161087a57506040519263c13517e160e01b84526000196004850152604060248501528184806106ed60448201612bf3565b038184875af188948161084b575b506107365750505050600560ff198254161790557f9beda0c81abc1c65da7685f113195974dfddb781dfde6263e5a1b13a5356ffad8380a380f35b907f74baab670a4015ab2f1b467c5252a96141a2573f2908e58a92081e80d3cfde3d946107dd60036107cc879a9699956040988d52600286528c888a60018184208b815501926bffffffffffffffffffffffff60a01b9383858254161790558a8152868a52818120600160ff1982541617905560048a5220918254161790558b8d52600586528c8943912055845460081c612898565b92600281558a600182015501612ca7565b505080610819575b5086845193837fcf9bcbc2efae51060af73ef64119281007f63eada739f19c41c181d8350fa8148b80a4878352820152a380f35b610845907f0000000000000000000000000000000000000000000000000000000000000000908561303f565b386107e5565b9094508281813d8311610873575b610863818361270c565b8101031261043e575193386106fb565b503d610859565b9150506005915060ff19161790557f9beda0c81abc1c65da7685f113195974dfddb781dfde6263e5a1b13a5356ffad8380a380f35b9093508181813d83116108d7575b6108c7818361270c565b8101031261043e575192386106b4565b503d6108bd565b6040513d8a823e3d90fd5b634e487b7160e01b88526021600452602488fd5b61091d9150843d8611610923575b610915818361270c565b810190612db5565b386105f8565b503d61090b565b6040513d88823e3d90fd5b503461026157806003193601126102615760206040516127108152f35b5034610261576060366003190112610261576001600160a01b036044358181169081900361043e579160043581526020916004835260408220541660019060018452604083209060005283526109b160243560036040600020016128a5565b50918160048401956109cc6109c588612cc8565b9754612d33565b946002849101925b610a03575b6109f68861024789896040519485946040865260408601906127ee565b91848303908501526127ee565b8551811015610a4757908480949392826000528389526040600020610a28828c612d65565b51865289526040852054610a3c828a612d65565b5201909192936109d4565b6109d9565b506060366003190112610261576004356024908135916044359063ffffffff8216820361043e57826000526020906003825260ff60406000205416610cda5783600052600182526040600020336000528252604060002080549060ff82166006811015610cc557610c815760405163f7434ea960e01b8152600481018590526001600160a01b039290858180610ae3888201612bf3565b0381877f0000000000000000000000000000000000000000000000000000000000000000165afa90811561043257600091610c54575b503410610c1857503460081b60ff19166001179055846040519263666b746960e11b8585015283015233604483015285606483015260648252610b5b826126f0565b7f00000000000000000000000000000000000000000000000000000000000000001692833b1561043e57610bca9360009283604051809781958294633dbb202b60e01b84527f0000000000000000000000000000000000000000000000000000000000000000600485016130fe565b03925af1918215610432577f2067d1b3170fe803dd001b95b04f9d372eb9c3e5a48ed131a62962a7300bdb2092610c09575b506040519384523393a380f35b610c12906126c0565b38610bfc565b60405162461bcd60e51b815260048101869052601581860152744465706f7369742076616c756520746f6f206c6f7760581b6044820152606490fd5b90508581813d8311610c7a575b610c6b818361270c565b8101031261043e575138610b19565b503d610c61565b60405162461bcd60e51b815260048101859052601d818501527f4172626974726174696f6e20616c7265616479207265717565737465640000006044820152606490fd5b83634e487b7160e01b60005260216004526000fd5b9060176064926040519262461bcd60e51b8452600484015282015276111a5cdc1d5d1948185b1c9958591e4818dc99585d1959604a1b6044820152fd5b50346102615760203660031901126102615760406020916004358152600283522054604051908152f35b503461026157604036600319011261026157600435610d5e6127a1565b906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116610d95338214612d79565b6040518091636e296e4560e01b825281600460209485935afa801561092a57610deb918791610f3a575b5083167f0000000000000000000000000000000000000000000000000000000000000000841614612dd4565b82855260019160018252604086209416938460005281526040600020549160ff83166006811015610f26576001610e22911461284c565b8386526001825260408620856000528252604060002090868255600060018301556000600283015560038092019283549288855583610ea3575b888888610e8e897f00000000000000000000000000000000000000000000000000000000000000009060081c8461303f565b6000805160206131318339815191528380a380f35b60059484600502946005860403610f12578952818920938401935b848110610ecb5750610e5c565b8060008388930155600481018054908c815581610eeb575b505001610ebe565b8c5285858d20918201915b828110610f035750610ee3565b60008155899450879101610ef6565b634e487b7160e01b8a52601160045260248afd5b634e487b7160e01b87526021600452602487fd5b610f519150833d851161092357610915818361270c565b38610dbf565b5034610261576020366003190112610261576040809160043581526002602052208054906001808060a01b039101541682519182526020820152f35b503461026157606036600319011261026157604090600435815260206004815260018060a01b0383832054166001825283832090600052815260ff83610fe1602435600383600020016128a5565b50936044358152848452600182822054950184522054168351928352151590820152f35b50346102615760203660031901126102615760206040516004358152f35b50346102615760203660031901126102615760406020916004358152600583522054604051908152f35b506040366003190112610261576004356024908135918160005260206003815260ff604060002054166112d1578260005260018152604060002033600052815260406000209182549260ff841660068110156112bc576112785760405163f7434ea960e01b8152600481018490526001600160a01b0394908481806110d3878201612bf3565b0381897f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104325760009161124b575b50341061120f57503460081b60ff191660011790556040519263666b746960e11b8385015284828501523360448501528560648501526064845261114c846126f0565b807f000000000000000000000000000000000000000000000000000000000000000016803b1561043e57600092836060936111c860405198899687958694633dbb202b60e01b86527f0000000000000000000000000000000000000000000000000000000000000000166004860152840152606483019061272e565b62030d40604483015203925af1918215610432577f2067d1b3170fe803dd001b95b04f9d372eb9c3e5a48ed131a62962a7300bdb2092610c0957506040519384523393a380f35b60405162461bcd60e51b815260048101859052601581850152744465706f7369742076616c756520746f6f206c6f7760581b6044820152606490fd5b90508481813d8311611271575b611262818361270c565b8101031261043e575138611109565b503d611258565b60405162461bcd60e51b815260048101849052601d818401527f4172626974726174696f6e20616c7265616479207265717565737465640000006044820152606490fd5b82634e487b7160e01b60005260216004526000fd5b60176064926040519262461bcd60e51b8452600484015282015276111a5cdc1d5d1948185b1c9958591e4818dc99585d1959604a1b6044820152fd5b50346102615760403660031901126102615767ffffffffffffffff6024358181116113dc57366023820112156113dc5780600401359182116113dc5736602483830101116113dc57816024604051926020845282602085015201604083013780820160409081018490523392600435927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316927fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c92601f01601f191682018290030190a480f35b8280fd5b503461026157602090816003193601126102615760405163f7434ea960e01b81526004810183905282818061141760248201612bf3565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa918215611488579161145b575b50604051908152f35b90508181813d8311611481575b611472818361270c565b8101031261043e575138611452565b503d611468565b604051903d90823e3d90fd5b503461026157806003193601126102615760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461026157806003193601126102615760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b50346102615760203660031901126102615760206040516000198152f35b5034610261576115373661278b565b91908152602091600460205260018060a01b036040832054166001906001602052604084209060005260205261157660039260036040600020016128a5565b5091600483019361158685612cc8565b9585549261159384612d33565b96835b8581106115d2576115bf896102478c60038c0154906040519485946060865260608601906127ee565b91602085015283820360408501526127ee565b806115de889284612907565b905490851b1c865288855260408620546115f8828c612d65565b5201611596565b5034610261578060031936011261026157602060405162030d408152f35b61276e565b503461026157806003193601126102615760806040517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201527f000000000000000000000000000000000000000000000000000000000000000060408201526127106060820152f35b503461026157602036600319011261026157602090600435815260048252604060018060a01b0391205416604051908152f35b506116ee366127b7565b60008381526001602090815260408083206001600160a01b03958616808552925282208054919594929392919060ff82169060068210156105435790611767929161173b6005831461284c565b557f00000000000000000000000000000000000000000000000000000000000000009060081c8761303f565b604051906305fb2b4f60e51b602083015284602483015285604483015260448252611791826126d4565b7f00000000000000000000000000000000000000000000000000000000000000001690813b15611841579183916118009383604051809681958294633dbb202b60e01b84527f0000000000000000000000000000000000000000000000000000000000000000600485016130fe565b03925af1801561183657906000805160206131318339815191529291611827575b5080a380f35b611830906126c0565b38611821565b6040513d84823e3d90fd5b8380fd5b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102615760203660031901126102615760ff60406020926004358152600384522054166040519015158152f35b5034610261578060031936011261026157602090604051908152f35b5034610261576040366003190112610261576004356118f26127a1565b90806000526001602052604060002060018060a01b03809316600052602052604060002080549060ff8216600681101561046d5760029261194082600360049414908115610463575061291f565b60ff191617815501548015611a5157600019810190811161044357905b604051926306bad43760e51b602085015281602485015282604485015260448452611987846126d4565b807f00000000000000000000000000000000000000000000000000000000000000001693843b1561043e57611a059460009283604051809881958294633dbb202b60e01b84527f000000000000000000000000000000000000000000000000000000000000000016600484015260606024840152606483019061272e565b62030d40604483015203925af1918215610432577fba07eb273dd4b62b682a13480e2838bfbd6afab07919d6bcad9156af107f8c4193604093610423575082519182526020820152a180f35b506000199061195d565b50611a653661278b565b919080825260016020526040822092600460205260018060a01b0393846040852054168452602052604083209360ff855416600681101561216b5760020361212e57600185015460405163afe15cfb60e01b8152816004820152604081602481867f0000000000000000000000000000000000000000000000000000000000000000165afa90811561092a57869087926120f0575b5080421015806120e7575b156120a957604051631c3db16d60e01b8152600481018490526020816024817f000000000000000000000000000000000000000000000000000000000000000089165afa9081156108de579086918991612070575b5003611fbc5750507f0000000000000000000000000000000000000000000000000000000000000000915b60038701549687600019810111611fa857611ba76000198901600383016128a5565b50958588526001870160205260ff604089205416611f63576040519463791f8b7360e11b86528460048701526040602487015260208680611bea60448201612bf3565b0381877f0000000000000000000000000000000000000000000000000000000000000000165afa958615611f58578996611f1e575b50612710611c30611c379288612962565b0486612995565b98868952876020526040892054808b1115600014611eb0575088995b338a526002890160205260408a20888b5260205260408a20611c768c8254612995565b9055878a528860205260408a20611c8e8c8254612995565b9055878a528860205260408a205490811015611e02575b5050506001600487015411611d22575b5050505091600160409260ff9486611ccf60209834612898565b611ce7575b5083520184522054166040519015158152f35b611cf4611d1c9134612898565b7f0000000000000000000000000000000000000000000000000000000000000000903361303f565b38611cd4565b90611d336003889998949301612ca7565b505060038601611d44858254612898565b9055807f0000000000000000000000000000000000000000000000000000000000000000163b156113dc576040518094819363093225f160e31b835260048301526040602483015281611d9960448201612bf3565b03927f0000000000000000000000000000000000000000000000000000000000000000165af18015611df7579260ff949260209692604095611de5575b81949750839650829550611cb5565b92611df16001946126c0565b92611dd6565b6040513d87823e3d90fd5b611e1160038a01918254612995565b90556004880154600160401b811015611e9c5790611e3d8260018a95940160048c015560048b01612907565b81549060031b9085821b91600019901b1916179055828a526001890160205260408a20600160ff1982541617905560001901907f39493c1b78d9a13bcc9e1d532fc7faed3889248d93affa811416ce3c6bcb1a688a80a4388080611ca5565b634e487b7160e01b8a52604160045260248afd5b611eba908b612898565b341015611f035734995b8a6040519089825260208201523390847fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c06040600019870193a4611c53565b86895287602052611f1860408a20548b612898565b99611ec4565b9095506020813d602011611f50575b81611f3a6020938361270c565b81010312611f4c575194612710611c1f565b8880fd5b3d9150611f2d565b6040513d8b823e3d90fd5b60405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606490fd5b634e487b7160e01b87526011600452602487fd5b611ffd611fd682611fd06127109442612898565b94612898565b7f000000000000000000000000000000000000000000000000000000000000000090612962565b04111561202b577f000000000000000000000000000000000000000000000000000000000000000091611b85565b60405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606490fd5b9150506020813d6020116120a1575b8161208c6020938361270c565b8101031261209d5785905138611b5a565b8780fd5b3d915061207f565b60405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606490fd5b50814210611b05565b9150506040813d604011612126575b8161210c6040938361270c565b8101031261212257602081519101519038611afa565b8580fd5b3d91506120ff565b60405162461bcd60e51b81526020600482015260156024820152742737903234b9b83aba32903a379030b83832b0b61760591b6044820152606490fd5b634e487b7160e01b85526021600452602485fd5b506040366003190112610261576004356121976127a1565b90828184526001602052604084209260018060a01b03809116938486526020526040852080549060ff82169060068210156108e9579061220a92916121de6005831461284c565b557f00000000000000000000000000000000000000000000000000000000000000009060081c8661303f565b846040516305fb2b4f60e51b602082015284602482015285604482015260448152612234816126d4565b827f000000000000000000000000000000000000000000000000000000000000000016803b156113dc576122ae9383604051809681958294633dbb202b60e01b84527f000000000000000000000000000000000000000000000000000000000000000016600484015260606024840152606483019061272e565b62030d40604483015203925af18015611df7576122dc575b508060008051602061313183398151915291a380f35b6122e691506126c0565b826000805160206131318339815191526122c6565b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102615760803660031901126102615760206105716123a46127a1565b60643590604435906004356129a2565b50346102615760016123c53661278b565b818493929352600260205260408420805490838060a01b0393849101541690855260016020526040852090855260205260408420917f000000000000000000000000000000000000000000000000000000000000000016918233036124dc5780549160ff83166006811015610f26576002612440911461284c565b916003820180549060001982019182116124c857916004612486602095937f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e7562227697956128a5565b500160018154146124ad575b506002820183905560ff19166003179055604051908152a380f35b60039193506124bb906128d7565b905490821b1c9290612492565b634e487b7160e01b88526011600452602488fd5b60405162461bcd60e51b815260206004820152601760248201527f4f6e6c792061726269747261746f7220616c6c6f7765640000000000000000006044820152606490fd5b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461026157806003193601126102615760405190808282549161258983612686565b92838352602094600191866001821691826000146126265750506001146125cd575b50506125b99250038361270c565b61024760405192828493845283019061272e565b908592508180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b85831061260e5750506125b9935082010138806125ab565b805483890185015287945086939092019181016125f6565b92509350506125b994915060ff191682840152151560051b82010138806125ab565b9050346126825781600319360112612682576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b5080fd5b90600182811c921680156126b6575b60208310146126a057565b634e487b7160e01b600052602260045260246000fd5b91607f1691612695565b67ffffffffffffffff811161024b57604052565b6080810190811067ffffffffffffffff82111761024b57604052565b60a0810190811067ffffffffffffffff82111761024b57604052565b90601f8019910116810190811067ffffffffffffffff82111761024b57604052565b919082519283825260005b84811061275a575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201612739565b3461043e57600036600319011261043e5760206040516000198152f35b604090600319011261043e576004359060243590565b602435906001600160a01b038216820361043e57565b606090600319011261043e57600435906024356001600160a01b038116810361043e579060443563ffffffff8116810361043e5790565b90815180825260208080930193019160005b82811061280e575050505090565b835185529381019392810192600101612800565b606090600319011261043e57600435906024356001600160a01b038116810361043e579060443590565b1561285357565b60405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206172626974726174696f6e207374617475730000000000006044820152606490fd5b9190820391821161044357565b80548210156128c1576000526005602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b8054156128c157600052602060002090600090565b8054600110156128c157600052600160206000200190600090565b80548210156128c15760005260206000200190600090565b1561292657565b60405162461bcd60e51b8152602060048201526014602482015273111a5cdc1d5d19481b9bdd081c995cdbdb1d995960621b6044820152606490fd5b8181029291811591840414171561044357565b811561297f570490565b634e487b7160e01b600052601260045260246000fd5b9190820180921161044357565b600081815260046020908152604080832054600183528184206001600160a01b039182168552835281842090989790969591929091906003856129e789838c016128a5565b509960ff8154166006811015612bdf578084612a0b9214908115612bd4575061291f565b85885260018b0184528688205460ff16612acc575050508982168552600288018152838520838652815283852054998a925b83612a4f575b50505050505050505050565b7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae966002612ab49383169b8c8352018452868120868252845286812055837f00000000000000000000000000000000000000000000000000000000000000009161303f565b8351928352820152a438808080808087818080612a43565b600201548088528688205460ff16612b6957505060048901906001825411600014612b6157612b53612b59928d8616895260028c018552878920878a528552612b1d8c848a8c205491015490612962565b92612b27826128d7565b905490821b1c8a528c8652612b3f898b2054926128ec565b9054911b1c89528b85528789205490612995565b90612975565b998a92612a3d565b505084612b59565b909b929391908514612b80575b50908a9291612a3d565b84875289845285872054929b509092918015612bcc57612bbe612bc3928d8616895260028c018552878920878a52855287892054908c015490612962565b612975565b99909138612b76565b505084612bc3565b600491501438610323565b634e487b7160e01b89526021600452602489fd5b9060009160005490612c0482612686565b80825291602090600190818116908115612c825750600114612c27575b50505050565b92939450600080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563926000935b858510612c6f575050506020925001019038808080612c21565b8054858501840152938201938101612c55565b92505050602093945060ff929192191683830152151560051b01019038808080612c21565b8054600160401b81101561024b57612cc4916001820181556128a5565b9091565b90604051918281549182825260209260208301916000526020600020936000905b828210612d0157505050612cff9250038361270c565b565b855484526001958601958895509381019390910190612ce9565b67ffffffffffffffff811161024b5760051b60200190565b90612d3d82612d1b565b612d4a604051918261270c565b8281528092612d5b601f1991612d1b565b0190602036910137565b80518210156128c15760209160051b010190565b15612d8057565b60405162461bcd60e51b815260206004820152600d60248201526c2727aa2fa6a2a9a9a2a723a2a960991b6044820152606490fd5b9081602091031261043e57516001600160a01b038116810361043e5790565b15612ddb57565b606460405162461bcd60e51b815260206004820152602060248201527f43616e206f6e6c792062652063616c6c656420627920486f6d652070726f78796044820152fd5b929190600093600052600460205260018060a01b0360406000205416600160205260406000209060005260205260406000209160ff835416600681101561046d5760038114908115613034575b501561302b57906002830154916003840154926000945b848610612e9257505050505050565b909192939496612ea588600384016128a5565b50846000526001810160205260ff6040600020541615600014612eff576001916002612ef292848060a01b0389166000520160205260406000208660005260205260406000205490612995565b975b019493929190612e83565b8360005260ff6040600020541615600014612fba57600191816004612faa93019084825411600014612fb057612b53612fa492868060a01b038b166000526002830160205260406000208a600052602052612f64604060002054600385015490612962565b92612f6e826128d7565b90549060031b1c60005280602052612f8b604060002054926128ec565b90549060031b1c60005260205260406000205490612995565b90612995565b97612ef4565b5050600090612995565b848499929914612fce575b50600190612ef4565b60019198613024918660005280602052604060002054801515600014612fb057612bbe612fa492868060a01b038b166000526002810160205260406000208a600052602052600360406000205491015490612962565b9790612fc5565b50600093505050565b600491501438612e6c565b6000926001600160a01b039182169291908483858282156130f5575b839283928392f16130ee571691823b1561184157604051630d0e30db60e41b8152848160048186885af18015611df7576130db575b50823b1561184157906044849283604051958694859363a9059cbb60e01b8552600485015260248401525af18015611836576130ca575050565b6130d482916126c0565b6102615750565b6130e7909491946126c0565b9238613090565b5050505050565b506108fc61305b565b9161312963ffffffff9160409396959660018060a01b0316855260606020860152606085019061272e565b941691015256fee7700735be0b02f71ef1d623678daf36cd936af4c349a22ad9d5a8b217df0dd9a26469706673582212201d08bbe1bf8e1d90b9c0ba3c210448be92c789bec7c21dbb83141d824f6b972064736f6c6343000819003361606860eb6c87306811e2695215385101daab53bd6ab4e9f9049aead9363c7d290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563", + "deployedBytecode": "0x608080604052600436101561001357600080fd5b600090813560e01c9081630c139eb414612648575080630c7ac7b6146125665780630fa8c7ce1461161d5780632d68efc914612521578063311a6c56146123b4578063362c3479146123855780633cb747bf1461234057806348f37857146122fb5780634aa6a1e41461217f5780634b2f0ea014611a5b5780635082a799146118d557806354dba90f146118b957806368cb30f51461188a5780636cc6cde11461184557806374d82d18146116e4578063756804c0146116b157806379873f8a146116225780637a7104911461161d5780637ce1ffeb146115ff5780638a9bb02a146115285780638d8b2d7e1461150a578063965394ab146114cf5780639b3ac99814611494578063a22352e2146113e0578063a6a7f0eb1461130d578063a829c3d11461104d578063aba980eb14611023578063bb16378214611005578063bb2fe65f14610f93578063bde80ca714610f57578063be26fc8814610d41578063c21ae06114610d17578063c5633e9214610a4c578063c599c66f14610952578063d661dd3114610935578063e742e2ed14610579578063ec85635b14610557578063edabc474146104ce578063fc6f8f1614610483578063fe211361146102cb578063fe2dddeb146102645763ffa1ad74146101ef57600080fd5b34610261578060031936011261026157604051604081019080821067ffffffffffffffff83111761024b576102479160405260058152640322e302e360dc1b602082015260405191829160208352602083019061272e565b0390f35b634e487b7160e01b600052604160045260246000fd5b80fd5b50346102615761027336612822565b828493929352600460205260018060a01b03604085205416926001936001602052604086209060005260205260036040600020015492855b8481106102b6578680f35b806102c485889386866129a2565b50016102ab565b5034610261576102da366127b7565b91806000526001602052604060002060018060a01b03809316600052602052604060002080549060ff8216600681101561046d5760029261032982600360049414908115610463575b5061291f565b60ff19161781550154801561045957600019810190811161044357915b604051906306bad43760e51b602083015282602483015283604483015260448252610370826126d4565b7f00000000000000000000000000000000000000000000000000000000000000001693843b1561043e576103df9460009283604051809881958294633dbb202b60e01b84527f0000000000000000000000000000000000000000000000000000000000000000600485016130fe565b03925af1918215610432577fba07eb273dd4b62b682a13480e2838bfbd6afab07919d6bcad9156af107f8c4193604093610423575b5082519182526020820152a180f35b61042c906126c0565b38610414565b6040513d6000823e3d90fd5b600080fd5b634e487b7160e01b600052601160045260246000fd5b5060001991610346565b8491501438610323565b634e487b7160e01b600052602160045260246000fd5b50346102615760203660031901126102615760043581526004602052604060018060a01b03818320541691600160205220906000526020526020600360406000200154604051908152f35b5034610261576040366003190112610261576104e86127a1565b60043582526001602052604082209060018060a01b03166000526020526040600020805460ff81169160026001820154910154916040519360068110156105435760809550845260081c602084015260408301526060820152f35b634e487b7160e01b86526021600452602486fd5b503461026157602061057161056b36612822565b91612e1f565b604051908152f35b5034610261576040366003190112610261576004356105966127a1565b906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116906105ce338314612d79565b6040518092636e296e4560e01b825281600460209586935afa801561092a576106249187916108fd575b5082167f0000000000000000000000000000000000000000000000000000000000000000831614612dd4565b82855260018252806040862094169384600052825260406000209182549160ff831660068110156108e957600161065b911461284c565b7f000000000000000000000000000000000000000000000000000000000000000016906040519263f7434ea960e01b84528160048501528184806106a160248201612bf3565b0381865afa9384156108de5788946108af575b50600881901c841161087a57506040519263c13517e160e01b84526000196004850152604060248501528184806106ed60448201612bf3565b038184875af188948161084b575b506107365750505050600560ff198254161790557f9beda0c81abc1c65da7685f113195974dfddb781dfde6263e5a1b13a5356ffad8380a380f35b907f74baab670a4015ab2f1b467c5252a96141a2573f2908e58a92081e80d3cfde3d946107dd60036107cc879a9699956040988d52600286528c888a60018184208b815501926bffffffffffffffffffffffff60a01b9383858254161790558a8152868a52818120600160ff1982541617905560048a5220918254161790558b8d52600586528c8943912055845460081c612898565b92600281558a600182015501612ca7565b505080610819575b5086845193837fcf9bcbc2efae51060af73ef64119281007f63eada739f19c41c181d8350fa8148b80a4878352820152a380f35b610845907f0000000000000000000000000000000000000000000000000000000000000000908561303f565b386107e5565b9094508281813d8311610873575b610863818361270c565b8101031261043e575193386106fb565b503d610859565b9150506005915060ff19161790557f9beda0c81abc1c65da7685f113195974dfddb781dfde6263e5a1b13a5356ffad8380a380f35b9093508181813d83116108d7575b6108c7818361270c565b8101031261043e575192386106b4565b503d6108bd565b6040513d8a823e3d90fd5b634e487b7160e01b88526021600452602488fd5b61091d9150843d8611610923575b610915818361270c565b810190612db5565b386105f8565b503d61090b565b6040513d88823e3d90fd5b503461026157806003193601126102615760206040516127108152f35b5034610261576060366003190112610261576001600160a01b036044358181169081900361043e579160043581526020916004835260408220541660019060018452604083209060005283526109b160243560036040600020016128a5565b50918160048401956109cc6109c588612cc8565b9754612d33565b946002849101925b610a03575b6109f68861024789896040519485946040865260408601906127ee565b91848303908501526127ee565b8551811015610a4757908480949392826000528389526040600020610a28828c612d65565b51865289526040852054610a3c828a612d65565b5201909192936109d4565b6109d9565b506060366003190112610261576004356024908135916044359063ffffffff8216820361043e57826000526020906003825260ff60406000205416610cda5783600052600182526040600020336000528252604060002080549060ff82166006811015610cc557610c815760405163f7434ea960e01b8152600481018590526001600160a01b039290858180610ae3888201612bf3565b0381877f0000000000000000000000000000000000000000000000000000000000000000165afa90811561043257600091610c54575b503410610c1857503460081b60ff19166001179055846040519263666b746960e11b8585015283015233604483015285606483015260648252610b5b826126f0565b7f00000000000000000000000000000000000000000000000000000000000000001692833b1561043e57610bca9360009283604051809781958294633dbb202b60e01b84527f0000000000000000000000000000000000000000000000000000000000000000600485016130fe565b03925af1918215610432577f2067d1b3170fe803dd001b95b04f9d372eb9c3e5a48ed131a62962a7300bdb2092610c09575b506040519384523393a380f35b610c12906126c0565b38610bfc565b60405162461bcd60e51b815260048101869052601581860152744465706f7369742076616c756520746f6f206c6f7760581b6044820152606490fd5b90508581813d8311610c7a575b610c6b818361270c565b8101031261043e575138610b19565b503d610c61565b60405162461bcd60e51b815260048101859052601d818501527f4172626974726174696f6e20616c7265616479207265717565737465640000006044820152606490fd5b83634e487b7160e01b60005260216004526000fd5b9060176064926040519262461bcd60e51b8452600484015282015276111a5cdc1d5d1948185b1c9958591e4818dc99585d1959604a1b6044820152fd5b50346102615760203660031901126102615760406020916004358152600283522054604051908152f35b503461026157604036600319011261026157600435610d5e6127a1565b906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116610d95338214612d79565b6040518091636e296e4560e01b825281600460209485935afa801561092a57610deb918791610f3a575b5083167f0000000000000000000000000000000000000000000000000000000000000000841614612dd4565b82855260019160018252604086209416938460005281526040600020549160ff83166006811015610f26576001610e22911461284c565b8386526001825260408620856000528252604060002090868255600060018301556000600283015560038092019283549288855583610ea3575b888888610e8e897f00000000000000000000000000000000000000000000000000000000000000009060081c8461303f565b6000805160206131318339815191528380a380f35b60059484600502946005860403610f12578952818920938401935b848110610ecb5750610e5c565b8060008388930155600481018054908c815581610eeb575b505001610ebe565b8c5285858d20918201915b828110610f035750610ee3565b60008155899450879101610ef6565b634e487b7160e01b8a52601160045260248afd5b634e487b7160e01b87526021600452602487fd5b610f519150833d851161092357610915818361270c565b38610dbf565b5034610261576020366003190112610261576040809160043581526002602052208054906001808060a01b039101541682519182526020820152f35b503461026157606036600319011261026157604090600435815260206004815260018060a01b0383832054166001825283832090600052815260ff83610fe1602435600383600020016128a5565b50936044358152848452600182822054950184522054168351928352151590820152f35b50346102615760203660031901126102615760206040516004358152f35b50346102615760203660031901126102615760406020916004358152600583522054604051908152f35b506040366003190112610261576004356024908135918160005260206003815260ff604060002054166112d1578260005260018152604060002033600052815260406000209182549260ff841660068110156112bc576112785760405163f7434ea960e01b8152600481018490526001600160a01b0394908481806110d3878201612bf3565b0381897f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104325760009161124b575b50341061120f57503460081b60ff191660011790556040519263666b746960e11b8385015284828501523360448501528560648501526064845261114c846126f0565b807f000000000000000000000000000000000000000000000000000000000000000016803b1561043e57600092836060936111c860405198899687958694633dbb202b60e01b86527f0000000000000000000000000000000000000000000000000000000000000000166004860152840152606483019061272e565b62030d40604483015203925af1918215610432577f2067d1b3170fe803dd001b95b04f9d372eb9c3e5a48ed131a62962a7300bdb2092610c0957506040519384523393a380f35b60405162461bcd60e51b815260048101859052601581850152744465706f7369742076616c756520746f6f206c6f7760581b6044820152606490fd5b90508481813d8311611271575b611262818361270c565b8101031261043e575138611109565b503d611258565b60405162461bcd60e51b815260048101849052601d818401527f4172626974726174696f6e20616c7265616479207265717565737465640000006044820152606490fd5b82634e487b7160e01b60005260216004526000fd5b60176064926040519262461bcd60e51b8452600484015282015276111a5cdc1d5d1948185b1c9958591e4818dc99585d1959604a1b6044820152fd5b50346102615760403660031901126102615767ffffffffffffffff6024358181116113dc57366023820112156113dc5780600401359182116113dc5736602483830101116113dc57816024604051926020845282602085015201604083013780820160409081018490523392600435927f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316927fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c92601f01601f191682018290030190a480f35b8280fd5b503461026157602090816003193601126102615760405163f7434ea960e01b81526004810183905282818061141760248201612bf3565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa918215611488579161145b575b50604051908152f35b90508181813d8311611481575b611472818361270c565b8101031261043e575138611452565b503d611468565b604051903d90823e3d90fd5b503461026157806003193601126102615760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461026157806003193601126102615760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b50346102615760203660031901126102615760206040516000198152f35b5034610261576115373661278b565b91908152602091600460205260018060a01b036040832054166001906001602052604084209060005260205261157660039260036040600020016128a5565b5091600483019361158685612cc8565b9585549261159384612d33565b96835b8581106115d2576115bf896102478c60038c0154906040519485946060865260608601906127ee565b91602085015283820360408501526127ee565b806115de889284612907565b905490851b1c865288855260408620546115f8828c612d65565b5201611596565b5034610261578060031936011261026157602060405162030d408152f35b61276e565b503461026157806003193601126102615760806040517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201527f000000000000000000000000000000000000000000000000000000000000000060408201526127106060820152f35b503461026157602036600319011261026157602090600435815260048252604060018060a01b0391205416604051908152f35b506116ee366127b7565b60008381526001602090815260408083206001600160a01b03958616808552925282208054919594929392919060ff82169060068210156105435790611767929161173b6005831461284c565b557f00000000000000000000000000000000000000000000000000000000000000009060081c8761303f565b604051906305fb2b4f60e51b602083015284602483015285604483015260448252611791826126d4565b7f00000000000000000000000000000000000000000000000000000000000000001690813b15611841579183916118009383604051809681958294633dbb202b60e01b84527f0000000000000000000000000000000000000000000000000000000000000000600485016130fe565b03925af1801561183657906000805160206131318339815191529291611827575b5080a380f35b611830906126c0565b38611821565b6040513d84823e3d90fd5b8380fd5b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102615760203660031901126102615760ff60406020926004358152600384522054166040519015158152f35b5034610261578060031936011261026157602090604051908152f35b5034610261576040366003190112610261576004356118f26127a1565b90806000526001602052604060002060018060a01b03809316600052602052604060002080549060ff8216600681101561046d5760029261194082600360049414908115610463575061291f565b60ff191617815501548015611a5157600019810190811161044357905b604051926306bad43760e51b602085015281602485015282604485015260448452611987846126d4565b807f00000000000000000000000000000000000000000000000000000000000000001693843b1561043e57611a059460009283604051809881958294633dbb202b60e01b84527f000000000000000000000000000000000000000000000000000000000000000016600484015260606024840152606483019061272e565b62030d40604483015203925af1918215610432577fba07eb273dd4b62b682a13480e2838bfbd6afab07919d6bcad9156af107f8c4193604093610423575082519182526020820152a180f35b506000199061195d565b50611a653661278b565b919080825260016020526040822092600460205260018060a01b0393846040852054168452602052604083209360ff855416600681101561216b5760020361212e57600185015460405163afe15cfb60e01b8152816004820152604081602481867f0000000000000000000000000000000000000000000000000000000000000000165afa90811561092a57869087926120f0575b5080421015806120e7575b156120a957604051631c3db16d60e01b8152600481018490526020816024817f000000000000000000000000000000000000000000000000000000000000000089165afa9081156108de579086918991612070575b5003611fbc5750507f0000000000000000000000000000000000000000000000000000000000000000915b60038701549687600019810111611fa857611ba76000198901600383016128a5565b50958588526001870160205260ff604089205416611f63576040519463791f8b7360e11b86528460048701526040602487015260208680611bea60448201612bf3565b0381877f0000000000000000000000000000000000000000000000000000000000000000165afa958615611f58578996611f1e575b50612710611c30611c379288612962565b0486612995565b98868952876020526040892054808b1115600014611eb0575088995b338a526002890160205260408a20888b5260205260408a20611c768c8254612995565b9055878a528860205260408a20611c8e8c8254612995565b9055878a528860205260408a205490811015611e02575b5050506001600487015411611d22575b5050505091600160409260ff9486611ccf60209834612898565b611ce7575b5083520184522054166040519015158152f35b611cf4611d1c9134612898565b7f0000000000000000000000000000000000000000000000000000000000000000903361303f565b38611cd4565b90611d336003889998949301612ca7565b505060038601611d44858254612898565b9055807f0000000000000000000000000000000000000000000000000000000000000000163b156113dc576040518094819363093225f160e31b835260048301526040602483015281611d9960448201612bf3565b03927f0000000000000000000000000000000000000000000000000000000000000000165af18015611df7579260ff949260209692604095611de5575b81949750839650829550611cb5565b92611df16001946126c0565b92611dd6565b6040513d87823e3d90fd5b611e1160038a01918254612995565b90556004880154600160401b811015611e9c5790611e3d8260018a95940160048c015560048b01612907565b81549060031b9085821b91600019901b1916179055828a526001890160205260408a20600160ff1982541617905560001901907f39493c1b78d9a13bcc9e1d532fc7faed3889248d93affa811416ce3c6bcb1a688a80a4388080611ca5565b634e487b7160e01b8a52604160045260248afd5b611eba908b612898565b341015611f035734995b8a6040519089825260208201523390847fcae597f39a3ad75c2e10d46b031f023c5c2babcd58ca0491b122acda3968d4c06040600019870193a4611c53565b86895287602052611f1860408a20548b612898565b99611ec4565b9095506020813d602011611f50575b81611f3a6020938361270c565b81010312611f4c575194612710611c1f565b8880fd5b3d9150611f2d565b6040513d8b823e3d90fd5b60405162461bcd60e51b815260206004820152601b60248201527f41707065616c2066656520697320616c726561647920706169642e00000000006044820152606490fd5b634e487b7160e01b87526011600452602487fd5b611ffd611fd682611fd06127109442612898565b94612898565b7f000000000000000000000000000000000000000000000000000000000000000090612962565b04111561202b577f000000000000000000000000000000000000000000000000000000000000000091611b85565b60405162461bcd60e51b815260206004820152601f60248201527f41707065616c20706572696f64206973206f76657220666f72206c6f736572006044820152606490fd5b9150506020813d6020116120a1575b8161208c6020938361270c565b8101031261209d5785905138611b5a565b8780fd5b3d915061207f565b60405162461bcd60e51b815260206004820152601660248201527520b83832b0b6103832b934b7b21034b99037bb32b91760511b6044820152606490fd5b50814210611b05565b9150506040813d604011612126575b8161210c6040938361270c565b8101031261212257602081519101519038611afa565b8580fd5b3d91506120ff565b60405162461bcd60e51b81526020600482015260156024820152742737903234b9b83aba32903a379030b83832b0b61760591b6044820152606490fd5b634e487b7160e01b85526021600452602485fd5b506040366003190112610261576004356121976127a1565b90828184526001602052604084209260018060a01b03809116938486526020526040852080549060ff82169060068210156108e9579061220a92916121de6005831461284c565b557f00000000000000000000000000000000000000000000000000000000000000009060081c8661303f565b846040516305fb2b4f60e51b602082015284602482015285604482015260448152612234816126d4565b827f000000000000000000000000000000000000000000000000000000000000000016803b156113dc576122ae9383604051809681958294633dbb202b60e01b84527f000000000000000000000000000000000000000000000000000000000000000016600484015260606024840152606483019061272e565b62030d40604483015203925af18015611df7576122dc575b508060008051602061313183398151915291a380f35b6122e691506126c0565b826000805160206131318339815191526122c6565b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346102615760803660031901126102615760206105716123a46127a1565b60643590604435906004356129a2565b50346102615760016123c53661278b565b818493929352600260205260408420805490838060a01b0393849101541690855260016020526040852090855260205260408420917f000000000000000000000000000000000000000000000000000000000000000016918233036124dc5780549160ff83166006811015610f26576002612440911461284c565b916003820180549060001982019182116124c857916004612486602095937f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e7562227697956128a5565b500160018154146124ad575b506002820183905560ff19166003179055604051908152a380f35b60039193506124bb906128d7565b905490821b1c9290612492565b634e487b7160e01b88526011600452602488fd5b60405162461bcd60e51b815260206004820152601760248201527f4f6e6c792061726269747261746f7220616c6c6f7765640000000000000000006044820152606490fd5b50346102615780600319360112610261576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461026157806003193601126102615760405190808282549161258983612686565b92838352602094600191866001821691826000146126265750506001146125cd575b50506125b99250038361270c565b61024760405192828493845283019061272e565b908592508180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b85831061260e5750506125b9935082010138806125ab565b805483890185015287945086939092019181016125f6565b92509350506125b994915060ff191682840152151560051b82010138806125ab565b9050346126825781600319360112612682576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b5080fd5b90600182811c921680156126b6575b60208310146126a057565b634e487b7160e01b600052602260045260246000fd5b91607f1691612695565b67ffffffffffffffff811161024b57604052565b6080810190811067ffffffffffffffff82111761024b57604052565b60a0810190811067ffffffffffffffff82111761024b57604052565b90601f8019910116810190811067ffffffffffffffff82111761024b57604052565b919082519283825260005b84811061275a575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201612739565b3461043e57600036600319011261043e5760206040516000198152f35b604090600319011261043e576004359060243590565b602435906001600160a01b038216820361043e57565b606090600319011261043e57600435906024356001600160a01b038116810361043e579060443563ffffffff8116810361043e5790565b90815180825260208080930193019160005b82811061280e575050505090565b835185529381019392810192600101612800565b606090600319011261043e57600435906024356001600160a01b038116810361043e579060443590565b1561285357565b60405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206172626974726174696f6e207374617475730000000000006044820152606490fd5b9190820391821161044357565b80548210156128c1576000526005602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b8054156128c157600052602060002090600090565b8054600110156128c157600052600160206000200190600090565b80548210156128c15760005260206000200190600090565b1561292657565b60405162461bcd60e51b8152602060048201526014602482015273111a5cdc1d5d19481b9bdd081c995cdbdb1d995960621b6044820152606490fd5b8181029291811591840414171561044357565b811561297f570490565b634e487b7160e01b600052601260045260246000fd5b9190820180921161044357565b600081815260046020908152604080832054600183528184206001600160a01b039182168552835281842090989790969591929091906003856129e789838c016128a5565b509960ff8154166006811015612bdf578084612a0b9214908115612bd4575061291f565b85885260018b0184528688205460ff16612acc575050508982168552600288018152838520838652815283852054998a925b83612a4f575b50505050505050505050565b7f54b3cab3cb5c4aca3209db1151caff092e878011202e43a36782d4ebe0b963ae966002612ab49383169b8c8352018452868120868252845286812055837f00000000000000000000000000000000000000000000000000000000000000009161303f565b8351928352820152a438808080808087818080612a43565b600201548088528688205460ff16612b6957505060048901906001825411600014612b6157612b53612b59928d8616895260028c018552878920878a528552612b1d8c848a8c205491015490612962565b92612b27826128d7565b905490821b1c8a528c8652612b3f898b2054926128ec565b9054911b1c89528b85528789205490612995565b90612975565b998a92612a3d565b505084612b59565b909b929391908514612b80575b50908a9291612a3d565b84875289845285872054929b509092918015612bcc57612bbe612bc3928d8616895260028c018552878920878a52855287892054908c015490612962565b612975565b99909138612b76565b505084612bc3565b600491501438610323565b634e487b7160e01b89526021600452602489fd5b9060009160005490612c0482612686565b80825291602090600190818116908115612c825750600114612c27575b50505050565b92939450600080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563926000935b858510612c6f575050506020925001019038808080612c21565b8054858501840152938201938101612c55565b92505050602093945060ff929192191683830152151560051b01019038808080612c21565b8054600160401b81101561024b57612cc4916001820181556128a5565b9091565b90604051918281549182825260209260208301916000526020600020936000905b828210612d0157505050612cff9250038361270c565b565b855484526001958601958895509381019390910190612ce9565b67ffffffffffffffff811161024b5760051b60200190565b90612d3d82612d1b565b612d4a604051918261270c565b8281528092612d5b601f1991612d1b565b0190602036910137565b80518210156128c15760209160051b010190565b15612d8057565b60405162461bcd60e51b815260206004820152600d60248201526c2727aa2fa6a2a9a9a2a723a2a960991b6044820152606490fd5b9081602091031261043e57516001600160a01b038116810361043e5790565b15612ddb57565b606460405162461bcd60e51b815260206004820152602060248201527f43616e206f6e6c792062652063616c6c656420627920486f6d652070726f78796044820152fd5b929190600093600052600460205260018060a01b0360406000205416600160205260406000209060005260205260406000209160ff835416600681101561046d5760038114908115613034575b501561302b57906002830154916003840154926000945b848610612e9257505050505050565b909192939496612ea588600384016128a5565b50846000526001810160205260ff6040600020541615600014612eff576001916002612ef292848060a01b0389166000520160205260406000208660005260205260406000205490612995565b975b019493929190612e83565b8360005260ff6040600020541615600014612fba57600191816004612faa93019084825411600014612fb057612b53612fa492868060a01b038b166000526002830160205260406000208a600052602052612f64604060002054600385015490612962565b92612f6e826128d7565b90549060031b1c60005280602052612f8b604060002054926128ec565b90549060031b1c60005260205260406000205490612995565b90612995565b97612ef4565b5050600090612995565b848499929914612fce575b50600190612ef4565b60019198613024918660005280602052604060002054801515600014612fb057612bbe612fa492868060a01b038b166000526002810160205260406000208a600052602052600360406000205491015490612962565b9790612fc5565b50600093505050565b600491501438612e6c565b6000926001600160a01b039182169291908483858282156130f5575b839283928392f16130ee571691823b1561184157604051630d0e30db60e41b8152848160048186885af18015611df7576130db575b50823b1561184157906044849283604051958694859363a9059cbb60e01b8552600485015260248401525af18015611836576130ca575050565b6130d482916126c0565b6102615750565b6130e7909491946126c0565b9238613090565b5050505050565b506108fc61305b565b9161312963ffffffff9160409396959660018060a01b0316855260606020860152606085019061272e565b941691015256fee7700735be0b02f71ef1d623678daf36cd936af4c349a22ad9d5a8b217df0dd9a26469706673582212201d08bbe1bf8e1d90b9c0ba3c210448be92c789bec7c21dbb83141d824f6b972064736f6c63430008190033", + "devdoc": { + "details": "https://docs.optimism.io/app-developers/bridging/messaging", + "events": { + "ArbitrationCanceled(bytes32,address)": { + "params": { + "_questionID": "The ID of the question with the request for arbitration.", + "_requester": "The address of the arbitration requester." + } + }, + "ArbitrationCreated(bytes32,address,uint256)": { + "params": { + "_disputeID": "The ID of the dispute.", + "_questionID": "The ID of the question with the request for arbitration.", + "_requester": "The address of the arbitration requester." + } + }, + "ArbitrationFailed(bytes32,address)": { + "details": "This will happen if there is an increase in the arbitration fees between the time the arbitration is made and the time it is acknowledged.", + "params": { + "_questionID": "The ID of the question with the request for arbitration.", + "_requester": "The address of the arbitration requester." + } + }, + "ArbitrationRequested(bytes32,address,uint256)": { + "params": { + "_maxPrevious": "The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.", + "_questionID": "The ID of the question with the request for arbitration.", + "_requester": "The address of the arbitration requester." + } + }, + "Contribution(uint256,uint256,uint256,address,uint256)": { + "details": "Raised when a contribution is made, inside fundAppeal function.", + "params": { + "_amount": "Contribution amount.", + "_contributor": "Caller of fundAppeal function.", + "_localDisputeID": "Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.", + "_round": "The round number the contribution was made to.", + "ruling": "Indicates the ruling option which got the contribution." + } + }, + "Dispute(address,uint256,uint256,uint256)": { + "details": "To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.", + "params": { + "_arbitrator": "The arbitrator of the contract.", + "_disputeID": "ID of the dispute in the Arbitrator contract.", + "_evidenceGroupID": "Unique identifier of the evidence group that is linked to this dispute.", + "_metaEvidenceID": "Unique identifier of meta-evidence." + } + }, + "Evidence(address,uint256,address,string)": { + "details": "To be raised when evidence is submitted. Should point to the resource (evidences are not to be stored on chain due to gas considerations).", + "params": { + "_arbitrator": "The arbitrator of the contract.", + "_evidence": "A URI to the evidence JSON file whose name should be its keccak256 hash followed by .json.", + "_evidenceGroupID": "Unique identifier of the evidence group the evidence belongs to.", + "_party": "The address of the party submiting the evidence. Note that 0x0 refers to evidence not submitted by any party." + } + }, + "MetaEvidence(uint256,string)": { + "details": "To be emitted when meta-evidence is submitted.", + "params": { + "_evidence": "A link to the meta-evidence JSON.", + "_metaEvidenceID": "Unique identifier of meta-evidence." + } + }, + "Ruling(address,uint256,uint256)": { + "details": "To be raised when a ruling is given.", + "params": { + "_arbitrator": "The arbitrator giving the ruling.", + "_disputeID": "ID of the dispute in the Arbitrator contract.", + "_ruling": "The ruling which was given." + } + }, + "RulingFunded(uint256,uint256,uint256)": { + "details": "To be raised when a ruling option is fully funded for appeal.", + "params": { + "_localDisputeID": "Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.", + "_round": "Number of the round this ruling option was fully funded in.", + "_ruling": "The ruling option which just got fully funded." + } + }, + "RulingRelayed(bytes32,bytes32)": { + "params": { + "_questionID": "The ID of the question with the ruling to relay.", + "_ruling": "Ruling converted into Realitio format." + } + }, + "Withdrawal(uint256,uint256,uint256,address,uint256)": { + "details": "Raised when a contributor withdraws non-zero value.", + "params": { + "_contributor": "The beneficiary of withdrawal.", + "_localDisputeID": "Identifier of a dispute in scope of arbitrable contract. Arbitrator ids can be translated to local ids via externalIDtoLocalID.", + "_reward": "Total amount of withdrawal, consists of reimbursed deposits plus rewards.", + "_round": "The round number the withdrawal was made from.", + "_ruling": "Indicates the ruling option which contributor gets rewards from." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_arbitrator": "Arbitrator contract address.", + "_arbitratorExtraData": "The extra data used to raise a dispute in the arbitrator.", + "_homeProxy": "Proxy on L2.", + "_loserAppealPeriodMultiplier": "Multiplier for calculating the appeal period for the losing answer.", + "_loserMultiplier": "Multiplier for calculating the appeal cost of the losing answer.", + "_messenger": "contract for L1 -> L2 tx", + "_metaEvidence": "The URI of the meta evidence file.", + "_wNative": "The address of the wrapped version of the native currency.", + "_winnerMultiplier": "Multiplier for calculating the appeal cost of the winning answer." + } + }, + "externalIDtoLocalID(uint256)": { + "params": { + "_externalDisputeID": "Dispute id as in arbitrator side." + }, + "returns": { + "_0": "localDisputeID Dispute id as in arbitrable contract." + } + }, + "fundAppeal(uint256,uint256)": { + "params": { + "_answer": "One of the possible rulings the arbitrator can give that the funder considers to be the correct answer to the question. Note that the answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format. Also note that '0' answer can be funded.", + "_arbitrationID": "The ID of the arbitration, which is questionID cast into uint256." + }, + "returns": { + "_0": "Whether the answer was fully funded or not." + } + }, + "getContributionsToSuccessfulFundings(uint256,uint256,address)": { + "params": { + "_arbitrationID": "The ID of the arbitration.", + "_contributor": "The address whose contributions to query.", + "_round": "The round to query." + }, + "returns": { + "contributions": "The amount contributed to each funded answer by the contributor.", + "fundedAnswers": "IDs of the answers that are fully funded. Note that the `fundedAnswers` have Kleros denomination, meaning that it has '+1' offset compared to Realitio format." + } + }, + "getDisputeFee(bytes32)": { + "returns": { + "_0": "The fee to create a dispute." + } + }, + "getFundingStatus(uint256,uint256,uint256)": { + "params": { + "_answer": "The answer choice to get funding status for. Note that the `_answer` has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.", + "_arbitrationID": "The ID of the arbitration.", + "_round": "The round to query." + }, + "returns": { + "fullyFunded": "Whether the answer is fully funded or not.", + "raised": "The amount paid for this answer." + } + }, + "getMultipliers()": { + "returns": { + "divisor": "Multiplier divisor.", + "loser": "Losers stake multiplier.", + "loserAppealPeriod": "Multiplier for calculating an appeal period duration for the losing side.", + "winner": "Winners stake multiplier." + } + }, + "getNumberOfRounds(uint256)": { + "params": { + "_arbitrationID": "The ID of the arbitration related to the question." + }, + "returns": { + "_0": "The number of rounds." + } + }, + "getRoundInfo(uint256,uint256)": { + "params": { + "_arbitrationID": "The ID of the arbitration.", + "_round": "The round to query." + }, + "returns": { + "feeRewards": "The amount of fees that will be used as rewards.", + "fundedAnswers": "IDs of fully funded answers. Note that the `fundedAnswers` have Kleros denomination, meaning that it has '+1' offset compared to Realitio format.", + "paidFees": "The amount of fees paid for each fully funded answer." + } + }, + "getTotalWithdrawableAmount(uint256,address,uint256)": { + "details": "This function is O(n) where n is the total number of rounds.This could exceed the gas limit, therefore this function should be used only as a utility and not be relied upon by other contracts.", + "params": { + "_arbitrationID": "The ID of the arbitration.", + "_beneficiary": "The contributor for which to query.", + "_contributedTo": "Answer that received contributions from contributor. Note that the `_contributedTo` answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format." + }, + "returns": { + "sum": "The total amount available to withdraw." + } + }, + "handleFailedDisputeCreation(bytes32,address)": { + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "handleFailedDisputeCreationCustomParameters(bytes32,address,uint32)": { + "params": { + "_gasLimit": "Gas limit for the L2 transaction.", + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "numberOfRulingOptions(uint256)": { + "returns": { + "_0": "count The number of ruling options." + } + }, + "questionIDToArbitrationID(bytes32)": { + "params": { + "_questionID": "The ID of the question." + }, + "returns": { + "_0": "The ID of the arbitration." + } + }, + "receiveArbitrationAcknowledgement(bytes32,address)": { + "params": { + "_questionID": "The ID of the question.", + "_requester": "The requester." + } + }, + "receiveArbitrationCancelation(bytes32,address)": { + "params": { + "_questionID": "The ID of the question.", + "_requester": "The requester." + } + }, + "relayRule(bytes32,address)": { + "params": { + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "relayRuleCustomParameters(bytes32,address,uint32)": { + "params": { + "_gasLimit": "Gas limit for the L2 transaction.", + "_questionID": "The ID of the question.", + "_requester": "The address of the arbitration requester." + } + }, + "requestArbitration(bytes32,uint256)": { + "params": { + "_maxPrevious": "The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.", + "_questionID": "The ID of the question." + } + }, + "requestArbitrationCustomParameters(bytes32,uint256,uint32)": { + "params": { + "_gasLimit": "Gas limit for the L2 transaction.", + "_maxPrevious": "The maximum value of the current bond for the question. The arbitration request will get rejected if the current bond is greater than _maxPrevious. If set to 0, _maxPrevious is ignored.", + "_questionID": "The ID of the question." + } + }, + "rule(uint256,uint256)": { + "details": "Accounts for the situation where the winner loses a case due to paying less appeal fees than expected.", + "params": { + "_disputeID": "The ID of the dispute in the ERC792 arbitrator.", + "_ruling": "The ruling given by the arbitrator." + } + }, + "submitEvidence(uint256,string)": { + "params": { + "_arbitrationID": "The ID of the arbitration related to the question.", + "_evidenceURI": "Link to evidence." + } + }, + "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { + "params": { + "_answer": "The answer to query the reward from. Note that the `_answer` has Kleros denomination, meaning that it has '+1' offset compared to Realitio format.", + "_arbitrationID": "The ID of the arbitration.", + "_beneficiary": "The address to send reward to.", + "_round": "The round from which to withdraw." + }, + "returns": { + "reward": "The withdrawn amount." + } + }, + "withdrawFeesAndRewardsForAllRounds(uint256,address,uint256)": { + "details": "This function is O(n) where n is the total number of rounds. Arbitration cost of subsequent rounds is `A(n) = 2A(n-1) + 1`. So because of this exponential growth of costs, you can assume n is less than 10 at all times.", + "params": { + "_arbitrationID": "The ID of the arbitration.", + "_beneficiary": "The address that made contributions.", + "_contributedTo": "Answer that received contributions from contributor. Note that the `_contributedTo` answer has Kleros denomination, meaning that it has '+1' offset compared to Realitio format." + } + } + }, + "stateVariables": { + "arbitrationCreatedBlock": { + "params": { + "_disputeID": "the ID of the dispute." + }, + "return": "Block number of dispute creation.", + "returns": { + "_0": "Block number of dispute creation." + } + }, + "homeProxy": { + "return": "Home proxy address.", + "returns": { + "_0": "Home proxy address." + } + } + }, + "title": "Arbitration proxy for Realitio on foreign chain (eg. mainnet).", + "version": 1 + }, + "userdoc": { + "events": { + "ArbitrationCanceled(bytes32,address)": { + "notice": "Should be emitted when the arbitration is canceled by the Home Chain." + }, + "ArbitrationCreated(bytes32,address,uint256)": { + "notice": "Should be emitted when the dispute is created." + }, + "ArbitrationFailed(bytes32,address)": { + "notice": "Should be emitted when the dispute could not be created." + }, + "ArbitrationRequested(bytes32,address,uint256)": { + "notice": "Should be emitted when the arbitration is requested." + }, + "RulingRelayed(bytes32,bytes32)": { + "notice": "Should be emitted when the ruling is relayed to home proxy manually. Some implementations may not emit this event." + } + }, + "kind": "user", + "methods": { + "arbitrationCreatedBlock(uint256)": { + "notice": "Returns the creation block of the dispute." + }, + "constructor": { + "notice": "Creates an arbitration proxy on the foreign chain (L1)." + }, + "externalIDtoLocalID(uint256)": { + "notice": "Maps external (arbitrator side) dispute id to local (arbitrable) dispute id." + }, + "fundAppeal(uint256,uint256)": { + "notice": "Takes up to the total amount required to fund an answer. Reimburses the rest. Creates an appeal if at least two answers are funded." + }, + "getContributionsToSuccessfulFundings(uint256,uint256,address)": { + "notice": "Gets contributions to the answers that are fully funded." + }, + "getDisputeFee(bytes32)": { + "notice": "Gets the fee to create a dispute." + }, + "getFundingStatus(uint256,uint256,uint256)": { + "notice": "Gets the information of a round of a question for a specific answer choice." + }, + "getMultipliers()": { + "notice": "Returns stake multipliers." + }, + "getNumberOfRounds(uint256)": { + "notice": "Gets the number of rounds of the specific question." + }, + "getRoundInfo(uint256,uint256)": { + "notice": "Gets the information of a round of a question." + }, + "getTotalWithdrawableAmount(uint256,address,uint256)": { + "notice": "Returns the sum of withdrawable amount." + }, + "handleFailedDisputeCreation(bytes32,address)": { + "notice": "Cancels the arbitration in case the dispute could not be created. This version of the function uses recommended bridging parameters." + }, + "handleFailedDisputeCreationCustomParameters(bytes32,address,uint32)": { + "notice": "Cancels the arbitration in case the dispute could not be created. This function is to be used if the bridging with default parameters fail." + }, + "homeProxy()": { + "notice": "Returns the address of the home proxy." + }, + "numberOfRulingOptions(uint256)": { + "notice": "Returns number of possible ruling options. Valid rulings are [0, return value]." + }, + "questionIDToArbitrationID(bytes32)": { + "notice": "Casts question ID into uint256 thus returning the related arbitration ID." + }, + "receiveArbitrationAcknowledgement(bytes32,address)": { + "notice": "Receives the acknowledgement of the arbitration request for the given question and requester. TRUSTED." + }, + "receiveArbitrationCancelation(bytes32,address)": { + "notice": "Receives the cancelation of the arbitration request for the given question and requester. TRUSTED." + }, + "relayRule(bytes32,address)": { + "notice": "Relays the ruling to home proxy. This version of the function uses recommended bridging parameters." + }, + "relayRuleCustomParameters(bytes32,address,uint32)": { + "notice": "Relays the ruling to home proxy. This function is to be used if the bridging with default parameters fail." + }, + "requestArbitration(bytes32,uint256)": { + "notice": "Requests arbitration for the given question and contested answer. This version of the function uses recommended bridging parameters. Note that the signature of this function can't be changed as it's required by Reality UI." + }, + "requestArbitrationCustomParameters(bytes32,uint256,uint32)": { + "notice": "Requests arbitration for the given question and contested answer. This function is to be used if the bridging with default parameters fail." + }, + "rule(uint256,uint256)": { + "notice": "Rules a specified dispute. Can only be called by the arbitrator." + }, + "submitEvidence(uint256,string)": { + "notice": "Allows to submit evidence for a particular question." + }, + "withdrawFeesAndRewards(uint256,address,uint256,uint256)": { + "notice": "Sends the fee stake rewards and reimbursements proportional to the contributions made to the winner of a dispute. Reimburses contributions if there is no winner." + }, + "withdrawFeesAndRewardsForAllRounds(uint256,address,uint256)": { + "notice": "Allows to withdraw any rewards or reimbursable fees for all rounds at once." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 14552, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "arbitratorExtraData", + "offset": 0, + "slot": "0", + "type": "t_bytes_storage" + }, + { + "astId": 14565, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "arbitrationRequests", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(ArbitrationRequest)14515_storage))" + }, + { + "astId": 14570, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "disputeIDToDisputeDetails", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(DisputeDetails)14520_storage)" + }, + { + "astId": 14574, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "arbitrationIDToDisputeExists", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_bool)" + }, + { + "astId": 14578, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "arbitrationIDToRequester", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 14582, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "arbitrationCreatedBlock", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Round)14540_storage)dyn_storage": { + "base": "t_struct(Round)14540_storage", + "encoding": "dynamic_array", + "label": "struct RealitioForeignProxyOptimism.Round[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_enum(Status)14501": { + "encoding": "inplace", + "label": "enum RealitioForeignProxyOptimism.Status", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_uint256)" + }, + "t_mapping(t_address,t_struct(ArbitrationRequest)14515_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct RealitioForeignProxyOptimism.ArbitrationRequest)", + "numberOfBytes": "32", + "value": "t_struct(ArbitrationRequest)14515_storage" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_bool)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(ArbitrationRequest)14515_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => struct RealitioForeignProxyOptimism.ArbitrationRequest))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_struct(ArbitrationRequest)14515_storage)" + }, + "t_mapping(t_uint256,t_struct(DisputeDetails)14520_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct RealitioForeignProxyOptimism.DisputeDetails)", + "numberOfBytes": "32", + "value": "t_struct(DisputeDetails)14520_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(ArbitrationRequest)14515_storage": { + "encoding": "inplace", + "label": "struct RealitioForeignProxyOptimism.ArbitrationRequest", + "members": [ + { + "astId": 14504, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "status", + "offset": 0, + "slot": "0", + "type": "t_enum(Status)14501" + }, + { + "astId": 14506, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "deposit", + "offset": 1, + "slot": "0", + "type": "t_uint248" + }, + { + "astId": 14508, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "disputeID", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 14510, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "answer", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 14514, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "rounds", + "offset": 0, + "slot": "3", + "type": "t_array(t_struct(Round)14540_storage)dyn_storage" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DisputeDetails)14520_storage": { + "encoding": "inplace", + "label": "struct RealitioForeignProxyOptimism.DisputeDetails", + "members": [ + { + "astId": 14517, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "arbitrationID", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 14519, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "requester", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Round)14540_storage": { + "encoding": "inplace", + "label": "struct RealitioForeignProxyOptimism.Round", + "members": [ + { + "astId": 14524, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "paidFees", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 14528, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "hasPaid", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_bool)" + }, + { + "astId": 14534, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "contributions", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" + }, + { + "astId": 14536, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "feeRewards", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 14539, + "contract": "src/0.8/RealitioForeignProxyOptimism.sol:RealitioForeignProxyOptimism", + "label": "fundedAnswers", + "offset": 0, + "slot": "4", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "numberOfBytes": "160" + }, + "t_uint248": { + "encoding": "inplace", + "label": "uint248", + "numberOfBytes": "31" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/contracts/docs/Bridging.md b/contracts/docs/Bridging.md new file mode 100644 index 0000000..164e50b --- /dev/null +++ b/contracts/docs/Bridging.md @@ -0,0 +1,97 @@ +# Manual Actions for L2 → L1 Bridging +For Reality Cross-chain proxies L1 → L2 bridging is automatic for every bridge. +However, L2 → L1 bridging requires manual steps, which differ by chain. +Use this guide until bots are configured to handle everything automatically. + + +## Gnosis +After sending a transaction from L2 (e.g., `handleNotifiedRequest`), refer to this page: +https://docs.gnosischain.com/bridges/using-amb + +It's recommended to use **Blockscout** instead of GnosisScan due to possible encoding issues. + +Before using `getSignatures` on the `AMBHelper` contract, wait until the message is processed +(usually within an hour). After that, `getSignatures` will return a result you can pass into +`executeSignatures`. + + +## Polygon +After sending the L2 transaction you'll need to manually call `receiveMessage` +on `foreignProxy` contract. + +The argument for the function can be obtained from this template URL (usually generated in **1–3 hours**): + +``` +https://proof-generator.polygon.technology/api/v1/matic/exit-payload/?eventSignature=0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036 +``` + +This URL contains: +- Your L2 tx hash that you need to manually insert +- The event signature required by Polygon API (same for every tx, belongs to `messageSent` event) + +More details: +https://github.com/0xPolygon/fx-portal?tab=readme-ov-file#proof-generation + + +## zkSync +After sending the tx to L1, check its status on zkSync Etherscan. +When the status becomes **"Executed"** (usually in 2-4 hours), use the script: + +https://github.com/kleros/cross-chain-realitio-proxy/blob/master/contracts/scripts/execute_proof.js + +Steps: +1. Insert your `txHash` into the script. +2. Run `yarn zksync:proof:production` from `contracts` folder. + +This script retrieves the proof and executes the tx on L1 automatically. + +Requirements: +- `yarn install` +- `.env` file setup (`PRIVATE_KEY`, `INFURA_API_KEY`) + +zkSync docs: +https://code.zksync.io/tutorials/how-to-send-l2-l1-message + +If the status is "Executed" but proof is `null`, wait longer. +Once executed successfully, a dispute will be created on KlerosCourt with `ForeignProxy` as arbitrable. + + +## Arbitrum +Execution occurs only after the **one-week challenge period** has passed, thus a week after sending a tx to L1, navigate to `contracts` folder and run: + +``` +yarn relay:production --txhash +``` + +Requirements: +- `yarn install` +- `.env` file setup (`PRIVATE_KEY`, `INFURA_API_KEY`) + +Note: this task currently works only with **ethers v5** + +Official docs page: +https://docs.arbitrum.io/build-decentralized-apps/cross-chain-messaging +https://github.com/OffchainLabs/arbitrum-tutorials/blob/master/packages/outbox-execute/scripts/exec.js + + +## Optimism (Base, Redstone, Unichain, etc.) +After sending the L2 tx run the command corresponding to the chosen chain, e.g.: + +``` +yarn relay-op:base --txhash +``` + +You must run this command **twice**: +1. Shortly after sending the tx (usually within an hour), to prove the message. Console should show `Proven` if successful +2. One week later, to finalize it + +Requirements: +- `yarn install` +- `.env` file setup (`PRIVATE_KEY`, `INFURA_API_KEY`, `ALCHEMY_API_KEY`) + +Extra notes: +- Optimism stack requires `eth_getProof`, unsupported by Infura therefore **Alchemy** is used for L2 RPC. +- L1 RPC can still use Infura. + +Official docs page: +https://docs.optimism.io/app-developers/tutorials/bridging/cross-dom-solidity#interact-with-the-l2-greeter diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 7ba2a4a..50b68a3 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -4,6 +4,7 @@ import "hardhat-deploy"; import "hardhat-deploy-ethers"; import "./tasks/generate-metaevidence"; import "./tasks/relay-arbitrum"; +import "./tasks/relay-op"; import "./tasks/find-dispute-id"; import "./tasks/update-deployments"; @@ -42,6 +43,7 @@ const config: HardhatUserConfig = { homeUnichain: "unichainSepolia", homeOptimism: "optimismSepolia", homeArbitrum: "arbitrumSepolia", + homeBase: "baseSepolia", homePolygon: "amoy", }, verify: { @@ -84,7 +86,7 @@ const config: HardhatUserConfig = { }, optimismSepolia: { chainId: 11155420, - url: `https://optimism-sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, + url: `https://opt-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`, // url: `http://127.0.0.1:8547`, // fork with `anvil --fork-url https://optimism-sepolia.infura.io/v3/${process.env.INFURA_API_KEY} --port 8547` accounts: [process.env.PRIVATE_KEY as string], tags: ["home"], @@ -98,6 +100,16 @@ const config: HardhatUserConfig = { }, }, }, + baseSepolia: { + chainId: 84532, + url: `https://base-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`, + // url: `http://127.0.0.1:8547`, // fork with `anvil --fork-url https://optimism-sepolia.infura.io/v3/${process.env.INFURA_API_KEY} --port 8547` + accounts: [process.env.PRIVATE_KEY as string], + tags: ["home"], + companionNetworks: { + foreign: "sepolia", + }, + }, arbitrumSepolia: { chainId: 421614, url: `https://arbitrum-sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, @@ -149,7 +161,7 @@ const config: HardhatUserConfig = { }, verify: { etherscan: { - apiUrl: "https://api.etherscan.io/api", + apiUrl: "https://api.etherscan.io/v2/api?chainid=1", apiKey: process.env.ETHERSCAN_API_KEY, }, }, @@ -186,7 +198,7 @@ const config: HardhatUserConfig = { }, optimism: { chainId: 10, - url: `https://optimism-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, + url: `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`, accounts: [process.env.PRIVATE_KEY as string], tags: ["home"], companionNetworks: { @@ -216,7 +228,7 @@ const config: HardhatUserConfig = { }, base: { chainId: 8453, - url: `https://base-mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, + url: `https://base-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`, accounts: [process.env.PRIVATE_KEY as string], tags: ["home"], companionNetworks: { @@ -254,12 +266,57 @@ const config: HardhatUserConfig = { }, verify: { etherscan: { - apiUrl: "https://api.polygonscan.com/api", + apiUrl: "https://api.etherscan.io/v2/api?chainid=137", apiKey: process.env.POLYGONSCAN_API_KEY, }, }, }, }, + etherscan: { + apiKey: { + // These are separate from Ethereum's etherscan API key + optimisticEthereum: process.env.OPTIMISM_API_KEY!, + mainnet: process.env.ETHERSCAN_API_KEY!, + polygon: process.env.ETHERSCAN_API_KEY!, + base: process.env.ETHERSCAN_API_KEY!, + baseSepolia: process.env.ETHERSCAN_API_KEY!, + sepolia: process.env.ETHERSCAN_API_KEY! + }, + customChains: [ + { + network: "base", + chainId: 8453, + urls: { + apiURL: "https://api.etherscan.io/v2/api?chainid=8453", + browserURL: "https://basescan.org/" + } + }, + { + network: "baseSepolia", + chainId: 84532, + urls: { + apiURL: "https://api.etherscan.io/v2/api?chainid=84532", + browserURL: "https://sepolia.basescan.org/" + } + }, + { + network: "sepolia", + chainId: 11155111, + urls: { + apiURL: "https://api.etherscan.io/v2/api?chainid=11155111", + browserURL: "https://sepolia.etherscan.io/" + } + }, + { + network: "polygon", + chainId: 137, + urls: { + apiURL: "https://api.etherscan.io/v2/api?chainid=137", + browserURL: "https://polygonscan.com/" + } + }, + ] + }, namedAccounts: { deployer: { default: 0, diff --git a/contracts/hardhat.config.zksync.ts b/contracts/hardhat.config.zksync.ts index fac48e6..3c72cc4 100644 --- a/contracts/hardhat.config.zksync.ts +++ b/contracts/hardhat.config.zksync.ts @@ -5,7 +5,6 @@ import "@matterlabs/hardhat-zksync-solc"; import "@matterlabs/hardhat-zksync-verify"; import "hardhat-deploy"; import "./tasks/update-deployments"; -// import "./tasks/generate-metaevidence"; import type { HardhatUserConfig } from "hardhat/config"; diff --git a/contracts/metaevidence-cids.json b/contracts/metaevidence-cids.json index 835c7df..8606c00 100644 --- a/contracts/metaevidence-cids.json +++ b/contracts/metaevidence-cids.json @@ -13,5 +13,6 @@ "metaevidence-unichain-butter.json": "QmV59acSczefsXSujaSrWq8NbJX6od4wgtQ1zzUvxCJTBu", "metaevidence-unichain-default.json": "QmeQx8RybUuz9YAVm8DfQpcyQVmJgFpZmr3cUSuTiPpVW7", "metaevidence-unichainSepolia-butter.json": "QmeQxb7Uab9J2y5ucYxmkaRK28nxDU7XhSh1gKv6JzULRF", + "metaevidence-baseSepolia-default.json": "Qmeotzq3eBdQ5nkYg1TFKXT2y2F5cH46GowhjD3LTzHnxz", "metaevidence-unichainSepolia-default.json": "QmUKNmxsn7cNro5G1nLdc6cyCgfwqmXnDqPhtc9Gr45mjU" } \ No newline at end of file diff --git a/contracts/package.json b/contracts/package.json index d0a2794..af2a5ba 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -14,6 +14,15 @@ "hardhat-zksync": "hardhat --config hardhat.config.zksync.ts", "zksync:proof:staging": "yarn hardhat-zksync run ./scripts/execute_proof.js --network zkSyncSepolia", "zksync:proof:production": "yarn hardhat-zksync run ./scripts/execute_proof.js --network zkSyncMainnet", + "relay:staging": "hardhat relay-arbitrum --network arbitrumSepolia", + "relay:production": "hardhat relay-arbitrum --network arbitrum", + "relay-op:optimism": "hardhat relay-op --network optimism", + "relay-op:redstone": "hardhat relay-op --network redstone", + "relay-op:base": "hardhat relay-op --network base", + "relay-op:unichain": "hardhat relay-op --network unichain", + "relay-op:opSepolia": "hardhat relay-op --network optimismSepolia", + "relay-op:uniSepolia": "hardhat relay-op --network unichainSepolia", + "relay-op:baseSepolia": "hardhat relay-op --network baseSepolia", "etherscan-verify": "hardhat etherscan-verify", "format:js": "biome format --write scripts deploy tasks", "check:js": "biome check --write scripts deploy tasks", @@ -22,6 +31,7 @@ "fix:sol": "prettier --write 'src/**/*.sol'", "metaevidence:chiado": "hardhat generate-metaevidence --deployment chiado", "metaevidence:unichainSepolia": "hardhat generate-metaevidence --deployment unichainSepolia", + "metaevidence:baseSepolia": "hardhat generate-metaevidence --deployment baseSepolia", "metaevidence:optimismSepolia": "hardhat generate-metaevidence --deployment optimismSepolia", "metaevidence:arbitrumSepolia": "hardhat generate-metaevidence --deployment arbitrumSepolia", "metaevidence:amoy": "hardhat generate-metaevidence --deployment amoy", @@ -38,6 +48,9 @@ "deploy:unichainSepolia:home": "hardhat deploy --network unichainSepolia --tags HomeChain", "deploy:unichainSepolia:foreign": "HOME_NETWORK=unichainSepolia hardhat deploy --network sepolia --tags ForeignChain", "deploy:unichainSepolia": "yarn deploy:unichainSepolia:home && yarn deploy:unichainSepolia:foreign", + "deploy:baseSepolia:home": "hardhat deploy --network baseSepolia --tags HomeChain", + "deploy:baseSepolia:foreign": "HOME_NETWORK=baseSepolia hardhat deploy --network sepolia --tags ForeignChain", + "deploy:baseSepolia": "yarn deploy:baseSepolia:home && yarn deploy:baseSepolia:foreign", "deploy:optimismSepolia:home": "hardhat deploy --network optimismSepolia --tags HomeChain", "deploy:optimismSepolia:foreign": "HOME_NETWORK=optimismSepolia hardhat deploy --network sepolia --tags ForeignChain", "deploy:optimismSepolia": "yarn deploy:optimismSepolia:home && yarn deploy:optimismSepolia:foreign", @@ -90,6 +103,7 @@ "@types/node": "^22.14.0", "chai": "^4.5.0", "ethers": "^6.13.5", + "ethers5": "npm:ethers@5.7.2", "hardhat": "^2.22.18", "hardhat-deploy": "^0.14.0", "hardhat-deploy-ethers": "^0.4.2", @@ -106,11 +120,12 @@ }, "dependencies": { "@arbitrum/nitro-contracts": "^1.3.0", - "@arbitrum/sdk": "^v3.1.9", + "@arbitrum/sdk": "^4.0.4", "@kleros/dispute-resolver-interface-contract-0.7": "npm:@kleros/dispute-resolver-interface-contract@^2.0.0", "@kleros/dispute-resolver-interface-contract-0.8": "npm:@kleros/dispute-resolver-interface-contract@^8.0.0", "@kleros/ethereum-libraries": "^7.0.0", "@matterlabs/zksync-contracts": "^0.6.1", - "dotenv": "^16.4.7" + "dotenv": "^16.4.7", + "viem": "^2.38.3" } } diff --git a/contracts/scripts/chains.env b/contracts/scripts/chains.env index 2bc87be..4b6f3d7 100644 --- a/contracts/scripts/chains.env +++ b/contracts/scripts/chains.env @@ -11,7 +11,7 @@ declare -A HOME_MAINNET_EXPLORERS=( ["zksyncMainnet"]="https://explorer.zksync.io/address/" ) -TESTNET_NETWORKS=("chiado" "unichainSepolia" "optimismSepolia" "arbitrumSepolia" "amoy" "zksyncSepolia") +TESTNET_NETWORKS=("chiado" "unichainSepolia" "optimismSepolia" "arbitrumSepolia" "amoy" "zksyncSepolia" "baseSepolia") declare -A HOME_TESTNETS_EXPLORERS=( ["chiado"]="https://gnosis-chiado.blockscout.com/address/" ["unichainSepolia"]="https://sepolia.uniscan.xyz/address/" @@ -19,6 +19,7 @@ declare -A HOME_TESTNETS_EXPLORERS=( ["arbitrumSepolia"]="https://sepolia.arbiscan.io/address/" ["amoy"]="https://amoy.polygonscan.com/address/" ["zksyncSepolia"]="https://sepolia.explorer.zksync.io/address/" + ["baseSepolia"]="https://sepolia.basescan.org/address/" ) declare -A FOREIGN_NETWORK_EXPLORERS=( diff --git a/contracts/scripts/execute_proof.js b/contracts/scripts/execute_proof.js index 6eea5b5..55e716e 100644 --- a/contracts/scripts/execute_proof.js +++ b/contracts/scripts/execute_proof.js @@ -1,25 +1,24 @@ const hre = require("hardhat"); -const { Provider, utils } = require("zksync-web3"); +const ethers = require("ethers"); +const { Provider, utils } = require("zksync-ethers"); const { getL1MessageSentEvent, getCalldata } = require("./get_event_properties"); -const RealitioForeignArbitrationProxy = require("@kleros/cross-chain-realitio-contracts/artifacts-zk/src/zkRealitioForeignProxy.sol/zkRealitioForeignProxy.json"); -const RealitioHomeArbitrationProxy = require("@kleros/cross-chain-realitio-contracts/artifacts-zk/src/zkRealitioHomeProxy.sol/zkRealitioHomeProxy.json"); +const RealitioForeignArbitrationProxy = require("@kleros/cross-chain-realitio-contracts/artifacts-zk/src/0.8/RealitioForeignProxyZkSync.sol/RealitioForeignProxyZkSync.json"); +const RealitioHomeArbitrationProxy = require("@kleros/cross-chain-realitio-contracts/artifacts-zk/src/0.8/RealitioHomeProxyZkSync.sol/RealitioHomeProxyZkSync.json"); async function executeProof() { - // https://era.zksync.io/docs/dev/how-to/send-message-l2-l1.html + // https://code.zksync.io/tutorials/how-to-send-l2-l1-message const txHash = ""; - const { providers } = ethers; const foreignNetworks = { 324: hre.config.networks.mainnet, 300: hre.config.networks.sepolia, }; const chainId = hre.network.config.chainId; - const url = foreignNetworks[chainId]; - const l1Provider = new Provider(hre.network.config.url); - const l2Provider = new providers.JsonRpcProvider(url); + const l1Provider = new ethers.JsonRpcProvider(foreignNetworks[chainId]?.url); + const l2Provider = new Provider(hre.network.config.url); - const l1MessageSentEvent = await getL1MessageSentEvent(txHash, utils.L1_MESSENGER, l1Provider); + const l1MessageSentEvent = await getL1MessageSentEvent(txHash, utils.L1_MESSENGER, l2Provider); if (!l1MessageSentEvent) { throw new Error("No L1MessageSent event found in the transaction."); @@ -28,13 +27,13 @@ async function executeProof() { const blockNumber = l1MessageSentEvent.blockNumber; const homeProxy = `0x${BigInt(l1MessageSentEvent.address).toString(16)}`; const msgHash = l1MessageSentEvent.msgHash; - const eventData = await getCalldata(txHash, l1Provider); - const homeProxyContract = new ethers.Contract(homeProxy, RealitioHomeArbitrationProxy.abi, l1Provider); + const eventData = await getCalldata(txHash, l2Provider); + const homeProxyContract = new ethers.Contract(homeProxy, RealitioHomeArbitrationProxy.abi, l2Provider); console.log(await homeProxyContract.foreignProxy()); const foreignProxyContract = new ethers.Contract( await homeProxyContract.foreignProxy(), RealitioForeignArbitrationProxy.abi, - l2Provider + l1Provider ); console.log(`Event: ${l1MessageSentEvent.name}`); @@ -43,14 +42,18 @@ async function executeProof() { console.log("Hash:", msgHash); console.log("Message:", eventData); - const proof = await getL1MessageProof(blockNumber, l1Provider, homeProxy, msgHash); - console.log("Proof is: ", proof); - const { l1BatchNumber, l1BatchTxIndex } = await l1Provider.getTransactionReceipt(txHash); - + const l2Receipt = await l2Provider.getTransactionReceipt(txHash); + console.log(l2Receipt); + const logIndex = l2Receipt.l2ToL1Logs[0].logIndex; + console.log(`L2 transaction included in block ${l2Receipt.blockNumber} with log index ${logIndex}`); + const { l1BatchNumber, l1BatchTxIndex } = l2Receipt; console.log("L1 Index for Tx in block :>> ", l1BatchTxIndex); console.log("L1 Batch for block :>> ", l1BatchNumber); - const result = await proveL1MessageInclusion( + const proof = await getLogProof(txHash, logIndex, l2Provider); + console.log("Proof is: ", proof); + + const result = await proveL2MessageInclusion( l1BatchNumber, proof, l1BatchTxIndex, @@ -63,7 +66,7 @@ async function executeProof() { console.log("Result is :>> ", result); if (result) { - const signer = new ethers.Wallet(process.env.PRIVATE_KEY, l2Provider); + const signer = new ethers.Wallet(process.env.PRIVATE_KEY, l1Provider); try { await foreignProxyContract .connect(signer) @@ -78,17 +81,16 @@ async function executeProof() { process.exit(); } -async function getL1MessageProof(blockNumber, l1Provider, homeProxy, msgHash) { - console.log(`Getting L1 message proof for block ${blockNumber}`); - return await l1Provider.getMessageProof(blockNumber, homeProxy, msgHash); +async function getLogProof(txHash, l2TxIndex, l2Provider) { + return await l2Provider.getLogProof(txHash, l2TxIndex); } -async function proveL1MessageInclusion(l1BatchNumber, proof, trxIndex, l1Provider, l2Provider, homeProxy, message) { - const zkAddress = await l1Provider.getMainContractAddress(); +async function proveL2MessageInclusion(l1BatchNumber, proof, trxIndex, l1Provider, l2Provider, homeProxy, message) { + const zkAddress = await l2Provider.getMainContractAddress(); - const mailboxL1Contract = new ethers.Contract(zkAddress, utils.ZKSYNC_MAIN_ABI, l2Provider); + const mailboxL1Contract = new ethers.Contract(zkAddress, utils.ZKSYNC_MAIN_ABI, l1Provider); const messageInfo = { - txNumberInBlock: trxIndex, + txNumberInBatch: trxIndex, sender: homeProxy, data: message, }; diff --git a/contracts/scripts/get_event_properties.js b/contracts/scripts/get_event_properties.js index e78ed9d..e78f3f3 100644 --- a/contracts/scripts/get_event_properties.js +++ b/contracts/scripts/get_event_properties.js @@ -26,7 +26,7 @@ async function getL1MessageSentEvent(transactionHash, contractInterface, provide } function getFunctionSelector(functionSignature) { - const hash = ethers.utils.id(functionSignature); + const hash = ethers.id(functionSignature); const selector = hash.slice(0, 10); // 0x + first 4 bytes return selector; @@ -40,7 +40,7 @@ function encodeWithSelector(selector, ...params) { } // Otherwise, encode using defaultAbiCoder - return ethers.utils.defaultAbiCoder.encode([param.type], [param.value]).slice(2); + return ethers.AbiCoder.defaultAbiCoder().encode([param.type], [param.value]).slice(2); }); const encodedData = selector + encodedParams.join(""); diff --git a/contracts/tasks/relay-arbitrum.js b/contracts/tasks/relay-arbitrum.js index 08c7716..5f801b7 100644 --- a/contracts/tasks/relay-arbitrum.js +++ b/contracts/tasks/relay-arbitrum.js @@ -1,5 +1,5 @@ -const { providers, Wallet } = require("ethers"); -const { L2TransactionReceipt, L2ToL1MessageStatus } = require("@arbitrum/sdk"); +const { providers, Wallet } = require("ethers5"); +const { ChildTransactionReceipt, ChildToParentMessageStatus } = require('@arbitrum/sdk'); const { task } = require("hardhat/config"); /** @@ -8,7 +8,10 @@ const { task } = require("hardhat/config"); const walletPrivateKey = process.env.PRIVATE_KEY; -task("exec", "Execute msg on L1") +// https://docs.arbitrum.io/build-decentralized-apps/cross-chain-messaging +// https://github.com/OffchainLabs/arbitrum-tutorials/blob/master/packages/outbox-execute/scripts/exec.js + +task("relay-arbitrum", "Execute msg on L1") .addParam("txhash", "Hash of txn that triggered and L2 to L1 message") .setAction(async (taskArgs, hre) => { const { txhash } = taskArgs; @@ -38,19 +41,19 @@ task("exec", "Execute msg on L1") * First, let's find the Arbitrum txn from the txn hash provided */ const receipt = await l2Provider.getTransactionReceipt(txhash); - const l2Receipt = new L2TransactionReceipt(receipt); + const l2Receipt = new ChildTransactionReceipt(receipt); /** * Note that in principle, a single transaction could trigger any number of outgoing messages; the common case will be there's only one. * For the sake of this script, we assume there's only one / just grad the first one. */ - const messages = await l2Receipt.getL2ToL1Messages(l1Wallet); + const messages = await l2Receipt.getChildToParentMessages(l1Wallet); const l2ToL1Msg = messages[0]; /** * Check if already executed */ - if ((await l2ToL1Msg.status(l2Provider)) === L2ToL1MessageStatus.EXECUTED) { + if ((await l2ToL1Msg.status(l2Provider)) === ChildToParentMessageStatus.EXECUTED) { console.log("Message already executed! Nothing else to do here"); process.exit(1); } diff --git a/contracts/tasks/relay-op.js b/contracts/tasks/relay-op.js new file mode 100644 index 0000000..f01d585 --- /dev/null +++ b/contracts/tasks/relay-op.js @@ -0,0 +1,124 @@ +const { task } = require("hardhat/config"); + +const { + createPublicClient, + createWalletClient, + http, +} = require("viem"); + +const { privateKeyToAccount } = require("viem/accounts"); + +const { + publicActionsL1, + publicActionsL2, + walletActionsL1, + walletActionsL2, +} = require("viem/op-stack"); +const { mainnet, sepolia, base, optimism, optimismSepolia, unichain, unichainSepolia, redstone, baseSepolia } = require("viem/chains"); + +// https://docs.optimism.io/app-developers/tutorials/bridging/cross-dom-solidity#interact-with-the-l2-greeter + +task("relay-op", "Relays a withdrawal on OP Stack") + .addParam("txhash", "The withdrawal tx hash from L2") + .setAction(async ({ txhash }, hre) => { + console.log(`Relaying OP-stack withdrawal: ${txhash}`); + + const rawPk = process.env.PRIVATE_KEY; + if (!rawPk) throw new Error("PRIVATE_KEY missing in .env"); + + const PRIVATE_KEY = rawPk.startsWith("0x") ? rawPk : `0x${rawPk}`; + const CHAIN_MAP = { + 8453: { l2: base, l1: mainnet, l1NetworkName: "mainnet" }, + 84532: { l2: baseSepolia, l1: sepolia, l1NetworkName: "sepolia" }, + 690: { l2: redstone, l1: mainnet, l1NetworkName: "mainnet" }, + 10: { l2: optimism, l1: mainnet, l1NetworkName: "mainnet" }, + 130: { l2: unichain, l1: mainnet, l1NetworkName: "mainnet" }, + 11155420: { l2: optimismSepolia, l1: sepolia, l1NetworkName: "sepolia" }, + 1301: { l2: unichainSepolia, l1: sepolia, l1NetworkName: "sepolia" }, + }; + + const chainId = hre.network.config.chainId; + const chain = CHAIN_MAP[chainId]; + const l1RpcUrl = hre.config.networks[chain.l1NetworkName].url; + const l2RpcUrl = hre.network.config.url; + + const account = privateKeyToAccount(PRIVATE_KEY); + + // L1 clients + const l1Public = createPublicClient({ + chain: chain.l1, + transport: http(l1RpcUrl), + }).extend(publicActionsL1()); + + const l1Wallet = createWalletClient({ + account, + chain: chain.l1, + transport: http(l1RpcUrl), + }).extend(walletActionsL1()); + + // L2 clients + const l2Public = createPublicClient({ + chain: chain.l2, + transport: http(l2RpcUrl), + }).extend(publicActionsL2()); + + const l2Wallet = createWalletClient({ + account, + chain: chain.l2, + transport: http(l2RpcUrl), + }).extend(walletActionsL2()); + + // Retrieve L2 tx + const receipt = await l2Public.getTransactionReceipt({ hash: txhash }); + const status = await l1Public.getWithdrawalStatus({ + receipt, + targetChain: l2Public.chain, + }); + + console.log(`Withdrawal status: ${status}`); + + const { output, withdrawal } = await l1Public.waitToProve({ + receipt, + targetChain: l2Public.chain, + }); + + // Only prove if necessary + // Note that proving the message resets the 1 week timeout each time, so this condition is mandatory. + if (status === "waiting-to-prove" || status === "ready-to-prove") { + console.log("Proving withdrawal..."); + + const proveArgs = await l2Public.buildProveWithdrawal({ + account, + output, + withdrawal + }); + + // Note that proof cant be obtained with Infura RPC + await l1Wallet.proveWithdrawal(proveArgs); + console.log("Proven ✅"); + } + + if (status === "ready-to-finalize") { + // Not required by this script but keep in case bots need it + /* + console.log("Waiting until message becomes relayable..."); + await l1Public.waitToFinalize({ + targetChain: l2Public.chain, + withdrawalHash: receipt.transactionHash + });*/ + + console.log("Finalizing withdrawal..."); + await l1Wallet.finalizeWithdrawal({ + targetChain: l2Wallet.chain, + withdrawal, + }); + console.log("Done ✅"); + } else if (status === "waiting-to-finalize") { + console.log("Not ready to finalize yet"); + } + + if (status === "finalized") { + console.log("Already finalized. Nothing to do."); + return; + } + }); diff --git a/yarn.lock b/yarn.lock index 9ef9d10..e17c4f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -36,6 +36,13 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:^1.11.0": + version: 1.11.1 + resolution: "@adraffy/ens-normalize@npm:1.11.1" + checksum: e8b17fcc730ccc45a956e1fbb09edfe42be41c291079512082e9964f8ef4287e67913183cdd02fff71d2e215340d5b98a9bbbd9be32c5d36fad4ba2c1ec33ff2 + languageName: node + linkType: hard + "@alloc/quick-lru@npm:^5.2.0": version: 5.2.0 resolution: "@alloc/quick-lru@npm:5.2.0" @@ -65,16 +72,16 @@ __metadata: languageName: node linkType: hard -"@arbitrum/sdk@npm:^v3.1.9": - version: 3.7.1 - resolution: "@arbitrum/sdk@npm:3.7.1" +"@arbitrum/sdk@npm:^4.0.4": + version: 4.0.4 + resolution: "@arbitrum/sdk@npm:4.0.4" dependencies: "@ethersproject/address": ^5.0.8 "@ethersproject/bignumber": ^5.1.1 "@ethersproject/bytes": ^5.0.8 async-mutex: ^0.4.0 ethers: ^5.1.0 - checksum: 2da5e69bc6e903dcaccf4905a68b8490a88081e29769509aecaa3f9438065cf98cd2262b88430c0f742b63df3116e8e8aee435e80dc8c53b1abb120e2edb509e + checksum: c7d13f7e9c40ea78e6526bc8211ddc3aeafa5cd40fc02ede0245f128613248b3d2c0b5a8176552dc8523ac150108f5f427436a85120a99460026ace93024a8a1 languageName: node linkType: hard @@ -3208,7 +3215,7 @@ __metadata: resolution: "@kleros/cross-chain-realitio-contracts@workspace:contracts" dependencies: "@arbitrum/nitro-contracts": ^1.3.0 - "@arbitrum/sdk": ^v3.1.9 + "@arbitrum/sdk": ^4.0.4 "@biomejs/biome": 1.9.4 "@kleros/dispute-resolver-interface-contract-0.7": "npm:@kleros/dispute-resolver-interface-contract@^2.0.0" "@kleros/dispute-resolver-interface-contract-0.8": "npm:@kleros/dispute-resolver-interface-contract@^8.0.0" @@ -3234,6 +3241,7 @@ __metadata: chai: ^4.5.0 dotenv: ^16.4.7 ethers: ^6.13.5 + ethers5: "npm:ethers@5.7.2" hardhat: ^2.22.18 hardhat-deploy: ^0.14.0 hardhat-deploy-ethers: ^0.4.2 @@ -3246,6 +3254,7 @@ __metadata: ts-node: ^10.9.2 typechain: ^8.3.2 typescript: ^5.8.3 + viem: ^2.38.3 zksync-ethers: ^6.15.4 languageName: unknown linkType: soft @@ -3461,6 +3470,13 @@ __metadata: languageName: node linkType: hard +"@noble/ciphers@npm:^1.3.0": + version: 1.3.0 + resolution: "@noble/ciphers@npm:1.3.0" + checksum: 19722c35475df9bc78db60d261d0b5ef8a6d722561efc2135453f943eaa421b492195dc666e3e4df2b755bca3739e04f04b9c660198559f5dd05d3cfbf1b9e92 + languageName: node + linkType: hard + "@noble/curves@npm:1.2.0, @noble/curves@npm:~1.2.0": version: 1.2.0 resolution: "@noble/curves@npm:1.2.0" @@ -3488,6 +3504,24 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.9.1": + version: 1.9.1 + resolution: "@noble/curves@npm:1.9.1" + dependencies: + "@noble/hashes": 1.8.0 + checksum: 4f3483a1001538d2f55516cdcb19319d1eaef79550633f670e7d570b989cdbc0129952868b72bb67643329746b8ffefe8e4cd791c8cc35574e05a37f873eef42 + languageName: node + linkType: hard + +"@noble/curves@npm:~1.9.0": + version: 1.9.7 + resolution: "@noble/curves@npm:1.9.7" + dependencies: + "@noble/hashes": 1.8.0 + checksum: 65acad44ac6944ab96471109087d6cfcbcaa251faad6295961be9a5ace220634f4b7c74a96d1ee2274ad3880ea953d8e8259893ed8c906c831ef29f5c04ec9cc + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -3516,6 +3550,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.8.0, @noble/hashes@npm:^1.8.0, @noble/hashes@npm:~1.8.0": + version: 1.8.0 + resolution: "@noble/hashes@npm:1.8.0" + checksum: c94e98b941963676feaba62475b1ccfa8341e3f572adbb3b684ee38b658df44100187fa0ef4220da580b13f8d27e87d5492623c8a02ecc61f23fb9960c7918f5 + languageName: node + linkType: hard + "@noble/hashes@npm:^1.4.0": version: 1.7.0 resolution: "@noble/hashes@npm:1.7.0" @@ -4402,6 +4443,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:~1.2.5": + version: 1.2.6 + resolution: "@scure/base@npm:1.2.6" + checksum: 1058cb26d5e4c1c46c9cc0ae0b67cc66d306733baf35d6ebdd8ddaba242b80c3807b726e3b48cb0411bb95ec10d37764969063ea62188f86ae9315df8ea6b325 + languageName: node + linkType: hard + "@scure/bip32@npm:1.1.5": version: 1.1.5 resolution: "@scure/bip32@npm:1.1.5" @@ -4446,6 +4494,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.7.0, @scure/bip32@npm:^1.7.0": + version: 1.7.0 + resolution: "@scure/bip32@npm:1.7.0" + dependencies: + "@noble/curves": ~1.9.0 + "@noble/hashes": ~1.8.0 + "@scure/base": ~1.2.5 + checksum: c83adca5a74ec5c4ded8ba93900d0065e4767c4759cf24c2674923aef01d45ba56f171574e3519f2341be99f53a333f01b674eb6cfeb6fa8379607c6d1bc90b5 + languageName: node + linkType: hard + "@scure/bip39@npm:1.1.1": version: 1.1.1 resolution: "@scure/bip39@npm:1.1.1" @@ -4486,6 +4545,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.6.0, @scure/bip39@npm:^1.6.0": + version: 1.6.0 + resolution: "@scure/bip39@npm:1.6.0" + dependencies: + "@noble/hashes": ~1.8.0 + "@scure/base": ~1.2.5 + checksum: 96d46420780473d6c6c9700254a0eceec60302f61d7f9d7f29024e90c7acff3e8e40a5ee52dfaf104db539a10462e531996aaf9e69f082b8540b0a25870545fc + languageName: node + linkType: hard + "@selderee/plugin-htmlparser2@npm:^0.6.0": version: 0.6.0 resolution: "@selderee/plugin-htmlparser2@npm:0.6.0" @@ -5811,6 +5880,36 @@ __metadata: languageName: node linkType: hard +"abitype@npm:1.1.0": + version: 1.1.0 + resolution: "abitype@npm:1.1.0" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3.22.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 55f724d038a60cc5e4ce4913298f912f0c34c53e13240cd3b97b272f4122bdf4c84541d85d1e3bb36f6e8dab6685f232c69600718fad62ccc389bea3f63ed7e4 + languageName: node + linkType: hard + +"abitype@npm:^1.0.9": + version: 1.1.1 + resolution: "abitype@npm:1.1.1" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3.22.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 8df4754f73e0552c5aad228e2ae62368ab858855ffc99ff27698696c27d60883c9655b8d0615448474b8cdecf1733dc188318e4bbd7b18d5f87eaf895fcb5ceb + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -10407,7 +10506,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.1.0, ethers@npm:^5.7.0, ethers@npm:~5.7.0": +"ethers5@npm:ethers@5.7.2, ethers@npm:^5.1.0, ethers@npm:^5.7.0, ethers@npm:~5.7.0": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -13540,6 +13639,15 @@ __metadata: languageName: node linkType: hard +"isows@npm:1.0.7": + version: 1.0.7 + resolution: "isows@npm:1.0.7" + peerDependencies: + ws: "*" + checksum: 044b949b369872882af07b60b613b5801ae01b01a23b5b72b78af80c8103bbeed38352c3e8ceff13a7834bc91fd2eb41cf91ec01d59a041d8705680e6b0ec546 + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -16221,6 +16329,27 @@ __metadata: languageName: node linkType: hard +"ox@npm:0.9.6": + version: 0.9.6 + resolution: "ox@npm:0.9.6" + dependencies: + "@adraffy/ens-normalize": ^1.11.0 + "@noble/ciphers": ^1.3.0 + "@noble/curves": 1.9.1 + "@noble/hashes": ^1.8.0 + "@scure/bip32": ^1.7.0 + "@scure/bip39": ^1.6.0 + abitype: ^1.0.9 + eventemitter3: 5.0.1 + peerDependencies: + typescript: ">=5.4.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 5f5094502cab9b135f3de3dfe60691fc312a1e534b3a9ef03bd867bfe0921245360c78dcb59bb438f6d66316b7da29506da4b46633f48cd8f7c4f37f56a76e4c + languageName: node + linkType: hard + "p-cancelable@npm:^1.0.0": version: 1.1.0 resolution: "p-cancelable@npm:1.1.0" @@ -21757,6 +21886,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:^2.38.3": + version: 2.38.6 + resolution: "viem@npm:2.38.6" + dependencies: + "@noble/curves": 1.9.1 + "@noble/hashes": 1.8.0 + "@scure/bip32": 1.7.0 + "@scure/bip39": 1.6.0 + abitype: 1.1.0 + isows: 1.0.7 + ox: 0.9.6 + ws: 8.18.3 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 19b1d3fab009731c99d6bca7db3d0615de0232716e279026cd69d3495c977c19abc2d05cbb1227a8fc74a332d15108c96e988f4a6acc57a673eccc0a2ec61312 + languageName: node + linkType: hard + "vite-node@npm:1.6.1": version: 1.6.1 resolution: "vite-node@npm:1.6.1" @@ -22745,6 +22895,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.18.3": + version: 8.18.3 + resolution: "ws@npm:8.18.3" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: d64ef1631227bd0c5fe21b3eb3646c9c91229402fb963d12d87b49af0a1ef757277083af23a5f85742bae1e520feddfb434cb882ea59249b15673c16dc3f36e0 + languageName: node + linkType: hard + "ws@npm:^3.0.0": version: 3.3.3 resolution: "ws@npm:3.3.3"