From fb510edd69a334688be0662a4b6b1805e4f5a97d Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Fri, 31 Jan 2025 15:19:05 +0000 Subject: [PATCH] chore: deployment --- contracts/README.md | 3 +- .../EscrowUniversal.json | 213 +++++++++++++----- .../arbitrumSepoliaDevnet/EscrowView.json | 184 +++++++++++++++ .../scripts/generateDeploymentsMarkdown.sh | 2 + 4 files changed, 349 insertions(+), 53 deletions(-) create mode 100644 contracts/deployments/arbitrumSepoliaDevnet/EscrowView.json diff --git a/contracts/README.md b/contracts/README.md index 98dcfda..b1f73de 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -16,7 +16,8 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments ### Devnet #### Arbitrum Sepolia -- [EscrowUniversal](https://sepolia.arbiscan.io/address/0x6e2aC8E5E18191bBa2894F9317d6F2fc50d0830E) +- [EscrowUniversal](https://sepolia.arbiscan.io/address/0xb551978A48612e9Bf03CD0c5F1130021915d72ac) +- [EscrowView](https://sepolia.arbiscan.io/address/0xB219345918EcaE794ae0c1480C280686d65E560d) #### Sepolia diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EscrowUniversal.json b/contracts/deployments/arbitrumSepoliaDevnet/EscrowUniversal.json index 0b51856..7cb9f9e 100644 --- a/contracts/deployments/arbitrumSepoliaDevnet/EscrowUniversal.json +++ b/contracts/deployments/arbitrumSepoliaDevnet/EscrowUniversal.json @@ -1,5 +1,5 @@ { - "address": "0x6e2aC8E5E18191bBa2894F9317d6F2fc50d0830E", + "address": "0xb551978A48612e9Bf03CD0c5F1130021915d72ac", "abi": [ { "inputs": [ @@ -42,6 +42,11 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [], + "name": "AmountExceedsCap", + "type": "error" + }, { "inputs": [], "name": "ArbitratorOnly", @@ -450,6 +455,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "name": "amountCaps", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "arbitrator", @@ -476,6 +500,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amountCap", + "type": "uint256" + } + ], + "name": "changeAmountCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -685,6 +727,45 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_transactionID", + "type": "uint256" + }, + { + "internalType": "enum Party", + "name": "_winningParty", + "type": "uint8" + } + ], + "name": "getPayouts", + "outputs": [ + { + "internalType": "uint256", + "name": "buyerPayout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buyerPayoutToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sellerPayout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sellerPayoutToken", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getTransactionCount", @@ -949,63 +1030,63 @@ "type": "function" } ], - "transactionHash": "0x73ca2ac99228baf708968c1a452408e62f0aa8fee8990c2e847624fd648ba8c1", + "transactionHash": "0x97f51e772683b31630da636363f6ea4524dc954a9c323d2a71715215adb86d96", "receipt": { "to": null, "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", - "contractAddress": "0x6e2aC8E5E18191bBa2894F9317d6F2fc50d0830E", + "contractAddress": "0xb551978A48612e9Bf03CD0c5F1130021915d72ac", "transactionIndex": 1, - "gasUsed": "17693191", - "logsBloom": "0x00000000000000000000000000000000000000000000000000040000000000008000080000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000080000000000000000000200000000000000080000000000002000000000000000000000000000000000000000000000000000000000040000000000000000000000000000004000000000000000400000000000000000000000000000000000000000000000000000020000000000000000082000000400000000000100000000000000000000000000000000000000", - "blockHash": "0xe1eb396d89b6d1744b2265a5e291824eaa8f6898832f8db4bff0b675d1f388ad", - "transactionHash": "0x73ca2ac99228baf708968c1a452408e62f0aa8fee8990c2e847624fd648ba8c1", + "gasUsed": "2443732", + "logsBloom": "0x00000000000000000000000000000000080000000000000000040000000000008000080000000000004000000000000000000000000080000000000000000000000000000000000000000000000800000000000000000000000000000020000000000000000000000000000000000000080000000000000000000000000000010000080000000000002000000000000000000000200000000000000000000000000000000000040000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000002000000400000000000100000000000000000000000000000000000000", + "blockHash": "0xa17034204ef6a614d7f720451e667a860a29ebf2e756e44b853daf450dc68304", + "transactionHash": "0x97f51e772683b31630da636363f6ea4524dc954a9c323d2a71715215adb86d96", "logs": [ { "transactionIndex": 1, - "blockNumber": 58544887, - "transactionHash": "0x73ca2ac99228baf708968c1a452408e62f0aa8fee8990c2e847624fd648ba8c1", + "blockNumber": 119753457, + "transactionHash": "0x97f51e772683b31630da636363f6ea4524dc954a9c323d2a71715215adb86d96", "address": "0x596D3B09E684D62217682216e9b7a0De75933391", "topics": [ "0x00f7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff9924", - "0x000000000000000000000000000000000000000000000000000000000000018e", + "0x0000000000000000000000000000000000000000000000000000000000000225", "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000004d67b0a20202224736368656d61223a20222e2e2f4e65774469737075746554656d706c6174652e736368656d612e6a736f6e222c0a2020227469746c65223a2022457363726f7720646973707574653a207b7b657363726f775469746c657d7d222c200a2020226465736372697074696f6e223a20227b7b64656c6976657261626c65546578747d7d222c200a2020227175657374696f6e223a202257686963682070617274792061626964656420627920746865207465726d73206f662074686520636f6e74726163743f222c0a202022616e7377657273223a205b0a202020207b0a202020202020227469746c65223a2022526566756e6420746865204275796572222c0a202020202020226465736372697074696f6e223a202253656c656374207468697320746f2072657475726e207468652066756e647320746f207468652042757965722e220a202020207d2c0a202020207b0a202020202020227469746c65223a2022506179207468652053656c6c6572222c0a202020202020226465736372697074696f6e223a202253656c656374207468697320746f2072656c65617365207468652066756e647320746f207468652053656c6c65722e220a202020207d0a20205d2c0a202022706f6c696379555249223a20222f697066732f58787878785858582f657363726f772d67656e6572616c2d706f6c6963792e706466222c200a2020226174746163686d656e74223a207b200a20202020226c6162656c223a20225472616e73616374696f6e205465726d73222c0a2020202022757269223a20227b7b7b65787472614465736372697074696f6e5572697d7d7d220a20207d2c0a20202266726f6e74656e6455726c223a202268747470733a2f2f657363726f772d76322e6b6c65726f732e6275696c646572732f232f7472616e73616374696f6e732f7b7b65787465726e616c4469737075746549447d7d222c200a20202261726269747261626c65436861696e4944223a2022343231363134222c0a20202261726269747261626c6541646472657373223a2022307846726f6d436f6e74657874222c0a20202261726269747261746f72436861696e4944223a2022343231363134222c0a20202261726269747261746f7241646472657373223a2022307841353465374131366437343630653338613846333234654634363738324642353230643538434538222c200a2020226d65746164617461223a207b0a20202020226275796572223a20227b7b62757965727d7d222c0a202020202273656c6c6572223a20227b7b73656c6c65727d7d222c0a2020202022616d6f756e74223a20227b7b616d6f756e747d7d222c0a2020202022746f6b656e223a20227b7b746f6b656e7d7d222c0a2020202022646561646c696e65223a20227b7b646561646c696e657d7d222c0a20202020227472616e73616374696f6e557269223a20227b7b7b7472616e73616374696f6e5572697d7d7d22200a20207d2c0a20202263617465676f7279223a2022457363726f77222c0a20202273706563696669636174696f6e223a20224b4950585858222c0a202022616c6961736573223a207b0a20202020224275796572223a20227b7b62757965727d7d222c0a202020202253656c6c6572223a20227b7b73656c6c65727d7d220a20207d2c0a20202276657273696f6e223a2022312e30220a7d0a0000000000000000000000000000000000000000000000000000000000000000000000000000000003325b0a20207b0a202020202274797065223a20226772617068716c222c0a2020202022656e64706f696e74223a202268747470733a2f2f676174657761792d617262697472756d2e6e6574776f726b2e74686567726170682e636f6d2f6170692f7b7b7b67726170684170694b65797d7d7d2f7375626772617068732f69642f33615a7859635a705a4c35427556687555757071567243563856654e795a45766a6d50586962795048444651222c0a20202020227175657279223a20227175657279204765745472616e73616374696f6e28247472616e73616374696f6e49643a2049442129207b20657363726f772869643a20247472616e73616374696f6e496429207b207472616e73616374696f6e5572692062757965722073656c6c657220616d6f756e7420746f6b656e20646561646c696e65207d207d222c0a20202020227661726961626c6573223a207b0a202020202020227472616e73616374696f6e4964223a20227b7b65787465726e616c4469737075746549447d7d220a202020207d2c0a20202020227365656b223a205b22657363726f772e7472616e73616374696f6e557269222c2022657363726f772e6275796572222c2022657363726f772e73656c6c6572222c2022657363726f772e616d6f756e74222c2022657363726f772e746f6b656e222c2022657363726f772e646561646c696e65225d2c0a2020202022706f70756c617465223a205b227472616e73616374696f6e557269222c20226275796572222c202273656c6c6572222c2022616d6f756e74222c2022746f6b656e222c2022646561646c696e65225d0a20207d2c0a20207b0a202020202274797065223a202266657463682f697066732f6a736f6e222c0a202020202269706673557269223a20227b7b7b7472616e73616374696f6e5572697d7d7d222c0a20202020227365656b223a205b227469746c65222c20226465736372697074696f6e222c202265787472614465736372697074696f6e557269225d2c0a2020202022706f70756c617465223a205b22657363726f775469746c65222c202264656c6976657261626c6554657874222c202265787472614465736372697074696f6e557269225d0a20207d0a5d0000000000000000000000000000", + "data": "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logIndex": 0, - "blockHash": "0xe1eb396d89b6d1744b2265a5e291824eaa8f6898832f8db4bff0b675d1f388ad" + "blockHash": "0xa17034204ef6a614d7f720451e667a860a29ebf2e756e44b853daf450dc68304" }, { "transactionIndex": 1, - "blockNumber": 58544887, - "transactionHash": "0x73ca2ac99228baf708968c1a452408e62f0aa8fee8990c2e847624fd648ba8c1", - "address": "0x6e2aC8E5E18191bBa2894F9317d6F2fc50d0830E", + "blockNumber": 119753457, + "transactionHash": "0x97f51e772683b31630da636363f6ea4524dc954a9c323d2a71715215adb86d96", + "address": "0xb551978A48612e9Bf03CD0c5F1130021915d72ac", "topics": [ "0xf0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367" ], "data": "0x000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000002580000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", "logIndex": 1, - "blockHash": "0xe1eb396d89b6d1744b2265a5e291824eaa8f6898832f8db4bff0b675d1f388ad" + "blockHash": "0xa17034204ef6a614d7f720451e667a860a29ebf2e756e44b853daf450dc68304" } ], - "blockNumber": 58544887, - "cumulativeGasUsed": "17693191", + "blockNumber": 119753457, + "cumulativeGasUsed": "2443732", "status": 1, "byzantium": true }, "args": [ "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8", "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "{\n \"$schema\": \"../NewDisputeTemplate.schema.json\",\n \"title\": \"Escrow dispute: {{escrowTitle}}\", \n \"description\": \"{{deliverableText}}\", \n \"question\": \"Which party abided by the terms of the contract?\",\n \"answers\": [\n {\n \"title\": \"Refund the Buyer\",\n \"description\": \"Select this to return the funds to the Buyer.\"\n },\n {\n \"title\": \"Pay the Seller\",\n \"description\": \"Select this to release the funds to the Seller.\"\n }\n ],\n \"policyURI\": \"/ipfs/XxxxxXXX/escrow-general-policy.pdf\", \n \"attachment\": { \n \"label\": \"Transaction Terms\",\n \"uri\": \"{{{extraDescriptionUri}}}\"\n },\n \"frontendUrl\": \"https://escrow-v2.kleros.builders/#/transactions/{{externalDisputeID}}\", \n \"arbitrableChainID\": \"421614\",\n \"arbitrableAddress\": \"0xFromContext\",\n \"arbitratorChainID\": \"421614\",\n \"arbitratorAddress\": \"0xA54e7A16d7460e38a8F324eF46782FB520d58CE8\", \n \"metadata\": {\n \"buyer\": \"{{buyer}}\",\n \"seller\": \"{{seller}}\",\n \"amount\": \"{{amount}}\",\n \"token\": \"{{token}}\",\n \"deadline\": \"{{deadline}}\",\n \"transactionUri\": \"{{{transactionUri}}}\" \n },\n \"category\": \"Escrow\",\n \"specification\": \"KIPXXX\",\n \"aliases\": {\n \"Buyer\": \"{{buyer}}\",\n \"Seller\": \"{{seller}}\"\n },\n \"version\": \"1.0\"\n}\n", - "[\n {\n \"type\": \"graphql\",\n \"endpoint\": \"https://gateway-arbitrum.network.thegraph.com/api/{{{graphApiKey}}}/subgraphs/id/3aZxYcZpZL5BuVhuUupqVrCV8VeNyZEvjmPXibyPHDFQ\",\n \"query\": \"query GetTransaction($transactionId: ID!) { escrow(id: $transactionId) { transactionUri buyer seller amount token deadline } }\",\n \"variables\": {\n \"transactionId\": \"{{externalDisputeID}}\"\n },\n \"seek\": [\"escrow.transactionUri\", \"escrow.buyer\", \"escrow.seller\", \"escrow.amount\", \"escrow.token\", \"escrow.deadline\"],\n \"populate\": [\"transactionUri\", \"buyer\", \"seller\", \"amount\", \"token\", \"deadline\"]\n },\n {\n \"type\": \"fetch/ipfs/json\",\n \"ipfsUri\": \"{{{transactionUri}}}\",\n \"seek\": [\"title\", \"description\", \"extraDescriptionUri\"],\n \"populate\": [\"escrowTitle\", \"deliverableText\", \"extraDescriptionUri\"]\n }\n]", + "", + "", "0x596D3B09E684D62217682216e9b7a0De75933391", 600, 600 ], - "numDeployments": 5, - "solcInputHash": "dbddde37f87a84779f9e7a796f534c7c", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_settlementTimeout\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArbitratorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BuyerFeeNotCoverArbitrationCosts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BuyerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BuyerOrSellerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DeadlineNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeAlreadyResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRuling\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumPaymentAmountExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSettlementProposedOrTransactionMovedOnAcceptSettlement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSettlementProposedOrTransactionMovedOnPayFeeBuyer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSettlementProposedOrTransactionMovedOnPayFeeSeller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWaitingForBuyerFees\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWaitingForSellerFees\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SellerFeeNotCoverArbitrationCosts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SellerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SettlementPeriodNotOver\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TimeoutNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionDisputed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionEscalatedForArbitration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionExpired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitrableDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"}],\"name\":\"ERC20TransactionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum Party\",\"name\":\"_party\",\"type\":\"uint8\"}],\"name\":\"HasToPayFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"}],\"name\":\"NativeTransactionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_settlementTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"ParameterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"}],\"name\":\"Payment\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"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\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum Party\",\"name\":\"_party\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SettlementProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"enum Resolution\",\"name\":\"_resolution\",\"type\":\"uint8\"}],\"name\":\"TransactionResolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AMOUNT_OF_CHOICES\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"acceptSettlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitratorExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"changeArbitratorExtraData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"changeDisputeTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_feeTimeout\",\"type\":\"uint256\"}],\"name\":\"changeFeeTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_settlementTimeout\",\"type\":\"uint256\"}],\"name\":\"changeSettlementTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"internalType\":\"address payable\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"createERC20Transaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"internalType\":\"address payable\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"createNativeTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeIDtoTransactionID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeTimeout\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"pay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"payArbitrationFeeByBuyer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"payArbitrationFeeBySeller\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"proposeSettlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountReimbursed\",\"type\":\"uint256\"}],\"name\":\"reimburse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"settlementTimeout\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"timeOutByBuyer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"timeOutBySeller\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"buyer\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"settlementBuyer\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"settlementSeller\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sellerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastFeePaymentTime\",\"type\":\"uint256\"},{\"internalType\":\"enum Status\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Adapted from MultipleArbitrableTokenTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTokenTransaction.sol and from MultipleArbitrableTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTransaction.sol Note that the contract expects the tokens to have standard ERC20 behaviour. The tokens that don't conform to this type of behaviour should be filtered by the UI. Tokens should not reenter or allow recipients to refuse the transfer. Also note that arbitration fees are still paid in ETH.\",\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrableDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\",\"_arbitrator\":\"The arbitrator of the contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"ERC20TransactionCreated(uint256,string,address,address,address,uint256,uint256)\":{\"details\":\"Emitted when a transaction paid in ERC20 token is created.\",\"params\":{\"_amount\":\"The initial amount in the transaction.\",\"_buyer\":\"The address of the buyer.\",\"_deadline\":\"The deadline of the transaction.\",\"_seller\":\"The address of the seller.\",\"_token\":\"The token address.\",\"_transactionID\":\"The index of the transaction.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"}},\"HasToPayFee(uint256,uint8)\":{\"details\":\"Indicate that a party has to pay a fee or would otherwise be considered as losing.\",\"params\":{\"_party\":\"The party who has to pay.\",\"_transactionID\":\"The index of the transaction.\"}},\"NativeTransactionCreated(uint256,string,address,address,uint256,uint256)\":{\"details\":\"Emitted when a transaction paid in native currency is created.\",\"params\":{\"_amount\":\"The initial amount in the transaction.\",\"_buyer\":\"The address of the buyer.\",\"_deadline\":\"The deadline of the transaction.\",\"_seller\":\"The address of the seller.\",\"_transactionID\":\"The index of the transaction.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"}},\"ParameterUpdated(uint256,uint256,bytes)\":{\"details\":\"To be emitted when Escrow parameters are updated.\"},\"Payment(uint256,uint256,address)\":{\"details\":\"To be emitted when a party pays or reimburses the other.\",\"params\":{\"_amount\":\"The amount paid.\",\"_party\":\"The party that paid.\",\"_transactionID\":\"The index of the transaction.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"SettlementProposed(uint256,uint8,uint256)\":{\"details\":\"Emitted when a party proposes a settlement.\",\"params\":{\"_amount\":\"The amount proposed.\",\"_party\":\"The party that proposed a settlement.\",\"_transactionID\":\"The index of the transaction.\"}},\"TransactionResolved(uint256,uint8)\":{\"details\":\"To be emitted when a transaction is resolved, either by its execution, a timeout or because a ruling was enforced.\",\"params\":{\"_resolution\":\"Short description of what caused the transaction to be solved.\",\"_transactionID\":\"The ID of the respective transaction.\"}}},\"kind\":\"dev\",\"methods\":{\"acceptSettlement(uint256)\":{\"details\":\"Accept a settlement proposed by the other party.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorExtraData\":\"Extra data for the arbitrator.\",\"_feeTimeout\":\"Arbitration fee timeout for the parties.\",\"_settlementTimeout\":\"Settlement timeout for the parties.\",\"_templateData\":\"The dispute template data.\",\"_templateDataMappings\":\"The dispute template data mappings.\",\"_templateRegistry\":\"The dispute template registry.\"}},\"createERC20Transaction(uint256,address,uint256,string,address)\":{\"details\":\"Create a transaction.\",\"params\":{\"_amount\":\"The amount of tokens in this transaction.\",\"_deadline\":\"Time after which a party can automatically execute the arbitrable transaction.\",\"_seller\":\"The recipient of the transaction.\",\"_token\":\"The ERC20 token contract.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"},\"returns\":{\"transactionID\":\"The index of the transaction.\"}},\"createNativeTransaction(uint256,string,address)\":{\"details\":\"Create a transaction.\",\"params\":{\"_deadline\":\"Time after which a party can automatically execute the arbitrable transaction.\",\"_seller\":\"The recipient of the transaction.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"},\"returns\":{\"transactionID\":\"The index of the transaction.\"}},\"executeTransaction(uint256)\":{\"details\":\"Transfer the transaction's amount to the seller if the timeout has passed.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"getTransactionCount()\":{\"details\":\"Getter to know the count of transactions.\",\"returns\":{\"_0\":\"The count of transactions.\"}},\"pay(uint256,uint256)\":{\"details\":\"Pay seller. To be called if the good or service is provided.\",\"params\":{\"_amount\":\"Amount to pay in wei.\",\"_transactionID\":\"The index of the transaction.\"}},\"payArbitrationFeeByBuyer(uint256)\":{\"details\":\"Pay the arbitration fee to raise a dispute. To be called by the buyer. Note that it can only be called after settlement proposition. Also note that the arbitrator can have createDispute throw, which will make this function throw and therefore lead to a party being timed-out. This is not a vulnerability as the arbitrator can rule in favor of one party anyway.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"payArbitrationFeeBySeller(uint256)\":{\"details\":\"Pay the arbitration fee to raise a dispute. To be called by the seller. Note that this function mirrors payArbitrationFeeByBuyer.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"proposeSettlement(uint256,uint256)\":{\"details\":\"Propose a settlement as a compromise from the initial terms to the other party. Note that a party can only propose a settlement again after the other party has done so as well to prevent front running/griefing issues.\",\"params\":{\"_amount\":\"The settlement amount.\",\"_transactionID\":\"The index of the transaction.\"}},\"reimburse(uint256,uint256)\":{\"details\":\"Reimburse buyer. To be called if the good or service can't be fully provided.\",\"params\":{\"_amountReimbursed\":\"Amount to reimburse in wei.\",\"_transactionID\":\"The index of the transaction.\"}},\"rule(uint256,uint256)\":{\"details\":\"Give a ruling for a dispute. Must be called by the arbitrator. The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\",\"params\":{\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"Ruling given by the arbitrator. Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\"}},\"timeOutByBuyer(uint256)\":{\"details\":\"Reimburse buyer if seller fails to pay the fee.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"timeOutBySeller(uint256)\":{\"details\":\"Pay seller if buyer fails to pay the fee.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}}},\"title\":\"EscrowUniversal for a sale paid in native currency or ERC20 tokens without platform fees.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/EscrowUniversal.sol\":\"EscrowUniversal\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice 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);\\ninterface IArbitrableV2 {\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// 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 The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). 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).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// 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 Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// 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 Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x88b0038d226532e6cf862a485d162f7bca61ac3d361d6801146b55a240f091ac\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/EscrowUniversal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @authors: [@unknownunknown1, @jaybuidl]\\n/// @reviewers: []\\n/// @auditors: []\\n/// @bounties: []\\n\\npragma solidity 0.8.18;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol\\\";\\nimport \\\"@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"./libraries/SafeERC20.sol\\\";\\nimport \\\"./interfaces/IEscrow.sol\\\";\\n\\n/// @title EscrowUniversal for a sale paid in native currency or ERC20 tokens without platform fees.\\n/// @dev Adapted from MultipleArbitrableTokenTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTokenTransaction.sol\\n/// and from MultipleArbitrableTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTransaction.sol\\n/// Note that the contract expects the tokens to have standard ERC20 behaviour.\\n/// The tokens that don't conform to this type of behaviour should be filtered by the UI.\\n/// Tokens should not reenter or allow recipients to refuse the transfer.\\n/// Also note that arbitration fees are still paid in ETH.\\ncontract EscrowUniversal is IEscrow, IArbitrableV2 {\\n // Use safe transfers when both parties are paid simultaneously (save for acceptSettlement) to prevent griefing.\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant AMOUNT_OF_CHOICES = 2;\\n address public governor;\\n IArbitratorV2 public arbitrator; // Address of the arbitrator contract.\\n bytes public arbitratorExtraData; // Extra data to set up the arbitration.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n uint256 public templateId; // The current dispute template identifier.\\n uint256 public feeTimeout; // Time in seconds a party can take to pay arbitration fees before being considered unresponsive and lose the dispute.\\n uint256 public settlementTimeout; // Time in seconds a party can take to accept or propose a settlement before being considered unresponsive.\\n Transaction[] public transactions; // List of all created transactions.\\n mapping(uint256 => uint256) public disputeIDtoTransactionID; // Naps dispute ID to tx ID.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator.\\n /// @param _templateData The dispute template data.\\n /// @param _templateDataMappings The dispute template data mappings.\\n /// @param _templateRegistry The dispute template registry.\\n /// @param _feeTimeout Arbitration fee timeout for the parties.\\n /// @param _settlementTimeout Settlement timeout for the parties.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n bytes memory _arbitratorExtraData,\\n string memory _templateData,\\n string memory _templateDataMappings,\\n IDisputeTemplateRegistry _templateRegistry,\\n uint256 _feeTimeout,\\n uint256 _settlementTimeout\\n ) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n arbitratorExtraData = _arbitratorExtraData;\\n templateRegistry = _templateRegistry;\\n feeTimeout = _feeTimeout;\\n settlementTimeout = _settlementTimeout;\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n\\n emit ParameterUpdated(_feeTimeout, _settlementTimeout, _arbitratorExtraData);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByGovernor {\\n arbitrator = _arbitrator;\\n }\\n\\n function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByGovernor {\\n arbitratorExtraData = _arbitratorExtraData;\\n emit ParameterUpdated(feeTimeout, settlementTimeout, _arbitratorExtraData);\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByGovernor {\\n templateRegistry = _templateRegistry;\\n }\\n\\n function changeDisputeTemplate(\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external onlyByGovernor {\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n function changeFeeTimeout(uint256 _feeTimeout) external onlyByGovernor {\\n feeTimeout = _feeTimeout;\\n emit ParameterUpdated(_feeTimeout, settlementTimeout, arbitratorExtraData);\\n }\\n\\n function changeSettlementTimeout(uint256 _settlementTimeout) external onlyByGovernor {\\n settlementTimeout = _settlementTimeout;\\n emit ParameterUpdated(feeTimeout, _settlementTimeout, arbitratorExtraData);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IEscrow\\n function createNativeTransaction(\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external payable override returns (uint256 transactionID) {\\n Transaction storage transaction = transactions.push();\\n transaction.buyer = payable(msg.sender);\\n transaction.seller = _seller;\\n transaction.amount = msg.value;\\n transaction.token = NATIVE;\\n transaction.deadline = _deadline;\\n\\n transactionID = transactions.length - 1;\\n\\n emit NativeTransactionCreated(\\n transactionID,\\n _transactionUri,\\n msg.sender,\\n _seller,\\n msg.value,\\n transaction.deadline\\n );\\n }\\n\\n /// @inheritdoc IEscrow\\n function createERC20Transaction(\\n uint256 _amount,\\n IERC20 _token,\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external override returns (uint256 transactionID) {\\n // Transfers token from sender wallet to contract.\\n if (!_token.safeTransferFrom(msg.sender, address(this), _amount)) revert TokenTransferFailed();\\n Transaction storage transaction = transactions.push();\\n transaction.buyer = payable(msg.sender);\\n transaction.seller = _seller;\\n transaction.amount = _amount;\\n transaction.token = _token;\\n transaction.deadline = _deadline;\\n\\n transactionID = transactions.length - 1;\\n\\n emit ERC20TransactionCreated(\\n transactionID,\\n _transactionUri,\\n msg.sender,\\n _seller,\\n _token,\\n _amount,\\n transaction.deadline\\n );\\n }\\n\\n /// @inheritdoc IEscrow\\n function pay(uint256 _transactionID, uint256 _amount) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.buyer != msg.sender) revert BuyerOnly();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n if (_amount > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n emit Payment(_transactionID, _amount, msg.sender);\\n\\n transaction.amount -= _amount;\\n if (transaction.amount == 0) {\\n transaction.status = Status.TransactionResolved;\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n if (transaction.token == NATIVE) {\\n transaction.seller.send(_amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, _amount)) revert TokenTransferFailed();\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function reimburse(uint256 _transactionID, uint256 _amountReimbursed) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.seller != msg.sender) revert SellerOnly();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n if (_amountReimbursed > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n emit Payment(_transactionID, _amountReimbursed, msg.sender);\\n\\n transaction.amount -= _amountReimbursed;\\n if (transaction.amount == 0) {\\n transaction.status = Status.TransactionResolved;\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n if (transaction.token == NATIVE) {\\n transaction.buyer.send(_amountReimbursed); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, _amountReimbursed)) revert TokenTransferFailed();\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function executeTransaction(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (block.timestamp < transaction.deadline) revert DeadlineNotPassed();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n\\n uint256 amount = transaction.amount;\\n transaction.amount = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (transaction.token == NATIVE) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, amount)) revert TokenTransferFailed();\\n }\\n\\n emit Payment(_transactionID, amount, msg.sender);\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n /// @inheritdoc IEscrow\\n function proposeSettlement(uint256 _transactionID, uint256 _amount) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status == Status.NoDispute && block.timestamp >= transaction.deadline)\\n revert TransactionExpired();\\n if (transaction.status >= Status.WaitingBuyer) revert TransactionEscalatedForArbitration();\\n if (_amount > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n Party party;\\n transaction.lastFeePaymentTime = block.timestamp;\\n if (transaction.status == Status.WaitingSettlementBuyer) {\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n transaction.settlementBuyer = _amount;\\n transaction.status = Status.WaitingSettlementSeller;\\n party = Party.Buyer;\\n } else if (transaction.status == Status.WaitingSettlementSeller) {\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n transaction.settlementSeller = _amount;\\n transaction.status = Status.WaitingSettlementBuyer;\\n party = Party.Seller;\\n } else {\\n if (msg.sender == transaction.buyer) {\\n transaction.settlementBuyer = _amount;\\n transaction.status = Status.WaitingSettlementSeller;\\n party = Party.Buyer;\\n } else if (msg.sender == transaction.seller) {\\n transaction.settlementSeller = _amount;\\n transaction.status = Status.WaitingSettlementBuyer;\\n party = Party.Seller;\\n } else revert BuyerOrSellerOnly();\\n }\\n emit SettlementProposed(_transactionID, party, _amount);\\n }\\n\\n /// @inheritdoc IEscrow\\n function acceptSettlement(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n uint256 settlementAmount;\\n if (transaction.status == Status.WaitingSettlementBuyer) {\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n settlementAmount = transaction.settlementSeller;\\n } else if (transaction.status == Status.WaitingSettlementSeller) {\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n settlementAmount = transaction.settlementBuyer;\\n } else revert NoSettlementProposedOrTransactionMovedOnAcceptSettlement();\\n\\n uint256 remainingAmount = transaction.amount - settlementAmount;\\n\\n transaction.amount = 0;\\n transaction.settlementBuyer = 0;\\n transaction.settlementSeller = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (transaction.token == NATIVE) {\\n // It is the users' responsibility to accept ETH.\\n transaction.buyer.send(remainingAmount);\\n transaction.seller.send(settlementAmount);\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, remainingAmount)) revert TokenTransferFailed();\\n if (!transaction.token.safeTransfer(transaction.seller, settlementAmount)) revert TokenTransferFailed();\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.SettlementReached);\\n }\\n\\n /// @inheritdoc IEscrow\\n function payArbitrationFeeByBuyer(uint256 _transactionID) external payable override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (\\n transaction.status != Status.WaitingSettlementBuyer &&\\n transaction.status != Status.WaitingSettlementSeller &&\\n transaction.status != Status.WaitingBuyer\\n ) revert NoSettlementProposedOrTransactionMovedOnPayFeeBuyer();\\n\\n // Allow the other party enough time to respond to a settlement before allowing the proposer to raise a dispute.\\n if (\\n transaction.status == Status.WaitingSettlementSeller &&\\n block.timestamp - transaction.lastFeePaymentTime < settlementTimeout\\n ) revert SettlementPeriodNotOver();\\n\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n\\n transaction.buyerFee += msg.value;\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\n if (transaction.buyerFee < arbitrationCost) revert BuyerFeeNotCoverArbitrationCosts();\\n\\n transaction.lastFeePaymentTime = block.timestamp;\\n\\n if (transaction.sellerFee < arbitrationCost) {\\n // The seller still has to pay. This can also happen if he has paid, but arbitrationCost has increased.\\n transaction.status = Status.WaitingSeller;\\n emit HasToPayFee(_transactionID, Party.Seller);\\n } else {\\n // The seller has also paid the fee. We create the dispute.\\n raiseDispute(_transactionID, arbitrationCost);\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function payArbitrationFeeBySeller(uint256 _transactionID) external payable override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (\\n transaction.status != Status.WaitingSettlementBuyer &&\\n transaction.status != Status.WaitingSettlementSeller &&\\n transaction.status != Status.WaitingSeller\\n ) revert NoSettlementProposedOrTransactionMovedOnPayFeeSeller();\\n\\n // Allow the other party enough time to respond to a settlement before allowing the proposer to raise a dispute.\\n if (\\n transaction.status == Status.WaitingSettlementBuyer &&\\n block.timestamp - transaction.lastFeePaymentTime < settlementTimeout\\n ) revert SettlementPeriodNotOver();\\n\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n\\n transaction.sellerFee += msg.value;\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\n if (transaction.sellerFee < arbitrationCost) revert SellerFeeNotCoverArbitrationCosts();\\n\\n transaction.lastFeePaymentTime = block.timestamp;\\n\\n if (transaction.buyerFee < arbitrationCost) {\\n // The buyer still has to pay. This can also happen if he has paid, but arbitrationCost has increased.\\n transaction.status = Status.WaitingBuyer;\\n emit HasToPayFee(_transactionID, Party.Buyer);\\n } else {\\n // The buyer has also paid the fee. We create the dispute.\\n raiseDispute(_transactionID, arbitrationCost);\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function timeOutByBuyer(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status != Status.WaitingSeller) revert NotWaitingForSellerFees();\\n if (block.timestamp - transaction.lastFeePaymentTime < feeTimeout) revert TimeoutNotPassed();\\n\\n uint256 amount = transaction.sellerFee;\\n transaction.sellerFee = 0;\\n\\n executeRuling(_transactionID, uint256(Party.Buyer));\\n\\n if (amount != 0) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.TimeoutByBuyer);\\n }\\n\\n /// @inheritdoc IEscrow\\n function timeOutBySeller(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status != Status.WaitingBuyer) revert NotWaitingForBuyerFees();\\n if (block.timestamp - transaction.lastFeePaymentTime < feeTimeout) revert TimeoutNotPassed();\\n\\n uint256 amount = transaction.buyerFee;\\n transaction.buyerFee = 0;\\n\\n executeRuling(_transactionID, uint256(Party.Seller));\\n\\n if (amount != 0) {\\n transaction.buyer.send(amount); // It is the user responsibility to accept ETH.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.TimeoutBySeller);\\n }\\n\\n /// @inheritdoc IArbitrableV2\\n function rule(uint256 _disputeID, uint256 _ruling) external override {\\n if (msg.sender != address(arbitrator)) revert ArbitratorOnly();\\n if (_ruling > AMOUNT_OF_CHOICES) revert InvalidRuling();\\n\\n uint256 transactionID = disputeIDtoTransactionID[_disputeID];\\n Transaction storage transaction = transactions[transactionID];\\n if (transaction.status != Status.DisputeCreated) revert DisputeAlreadyResolved();\\n\\n emit Ruling(arbitrator, _disputeID, _ruling);\\n executeRuling(transactionID, _ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Create a dispute.\\n /// @param _transactionID The index of the transaction.\\n /// @param _arbitrationCost Amount to pay the arbitrator.\\n function raiseDispute(uint256 _transactionID, uint256 _arbitrationCost) internal {\\n Transaction storage transaction = transactions[_transactionID];\\n transaction.status = Status.DisputeCreated;\\n transaction.disputeID = arbitrator.createDispute{value: _arbitrationCost}(\\n AMOUNT_OF_CHOICES,\\n arbitratorExtraData\\n );\\n disputeIDtoTransactionID[transaction.disputeID] = _transactionID;\\n emit DisputeRequest(arbitrator, transaction.disputeID, _transactionID, templateId, \\\"\\\");\\n\\n // Refund buyer if he overpaid.\\n if (transaction.buyerFee > _arbitrationCost) {\\n uint256 extraFeeBuyer = transaction.buyerFee - _arbitrationCost;\\n transaction.buyerFee = _arbitrationCost;\\n transaction.buyer.send(extraFeeBuyer); // It is the user responsibility to accept ETH.\\n }\\n\\n // Refund seller if he overpaid.\\n if (transaction.sellerFee > _arbitrationCost) {\\n uint256 extraFeeSeller = transaction.sellerFee - _arbitrationCost;\\n transaction.sellerFee = _arbitrationCost;\\n transaction.seller.send(extraFeeSeller); // It is the user responsibility to accept ETH.\\n }\\n }\\n\\n /// @dev Execute a ruling of a dispute. It reimburses the fee to the winning party.\\n /// @param _transactionID The index of the transaction.\\n /// @param _ruling Ruling given by the arbitrator. 1 : Reimburse the seller. 2 : Pay the buyer.\\n function executeRuling(uint256 _transactionID, uint256 _ruling) internal {\\n Transaction storage transaction = transactions[_transactionID];\\n uint256 amount = transaction.amount;\\n uint256 settlementBuyer = transaction.settlementBuyer;\\n uint256 settlementSeller = transaction.settlementSeller;\\n uint256 buyerFee = transaction.buyerFee;\\n uint256 sellerFee = transaction.sellerFee;\\n bool nativePayment = transaction.token == NATIVE;\\n\\n transaction.amount = 0;\\n transaction.settlementBuyer = 0;\\n transaction.settlementSeller = 0;\\n transaction.buyerFee = 0;\\n transaction.sellerFee = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n // Give the arbitration fee back.\\n if (_ruling == uint256(Party.Buyer)) {\\n transaction.buyer.send(buyerFee);\\n // If there was a settlement amount proposed, we use that to make the partial payment and refund the rest.\\n if (settlementBuyer != 0) {\\n if (nativePayment) {\\n transaction.buyer.send(amount - settlementBuyer); // It is the user responsibility to accept ETH.\\n transaction.seller.send(settlementBuyer);\\n } else {\\n transaction.token.safeTransfer(transaction.buyer, amount - settlementBuyer);\\n transaction.token.safeTransfer(transaction.seller, settlementBuyer);\\n }\\n } else {\\n if (nativePayment) {\\n transaction.buyer.send(amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, amount)) revert TokenTransferFailed();\\n }\\n }\\n } else if (_ruling == uint256(Party.Seller)) {\\n transaction.seller.send(sellerFee);\\n // If there was a settlement amount proposed, we use that to make the partial payment and refund the rest to buyer.\\n if (settlementSeller != 0) {\\n if (nativePayment) {\\n transaction.buyer.send(amount - settlementSeller); // It is the user responsibility to accept ETH.\\n transaction.seller.send(settlementSeller);\\n } else {\\n transaction.token.safeTransfer(transaction.buyer, amount - settlementSeller);\\n transaction.token.safeTransfer(transaction.seller, settlementSeller);\\n }\\n } else {\\n if (nativePayment) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, amount)) revert TokenTransferFailed();\\n }\\n }\\n } else {\\n uint256 splitArbitrationFee = buyerFee / 2;\\n transaction.buyer.send(splitArbitrationFee);\\n transaction.seller.send(splitArbitrationFee);\\n\\n // Tokens should not reenter or allow recipients to refuse the transfer.\\n // In case of an uneven token amount, one basic token unit can be burnt.\\n uint256 splitAmount = amount / 2;\\n if (nativePayment) {\\n transaction.buyer.send(splitAmount); // It is the user responsibility to accept ETH.\\n transaction.seller.send(splitAmount);\\n } else {\\n transaction.token.safeTransfer(transaction.buyer, splitAmount);\\n transaction.token.safeTransfer(transaction.seller, splitAmount);\\n }\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.RulingEnforced);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IEscrow\\n function getTransactionCount() external view override returns (uint256) {\\n return transactions.length;\\n }\\n}\\n\",\"keccak256\":\"0xd0094d8bc4358fcd05f5eab88338426133b1e05c6f7d1fa98d8fb6784565a446\",\"license\":\"MIT\"},\"src/interfaces/IEscrow.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./Types.sol\\\";\\n\\ninterface IEscrow {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when Escrow parameters are updated.\\n event ParameterUpdated(uint256 _feeTimeout, uint256 _settlementTimeout, bytes _arbitratorExtraData);\\n\\n /// @dev To be emitted when a party pays or reimburses the other.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount The amount paid.\\n /// @param _party The party that paid.\\n event Payment(uint256 indexed _transactionID, uint256 _amount, address _party);\\n\\n /// @dev Indicate that a party has to pay a fee or would otherwise be considered as losing.\\n /// @param _transactionID The index of the transaction.\\n /// @param _party The party who has to pay.\\n event HasToPayFee(uint256 indexed _transactionID, Party _party);\\n\\n /// @dev Emitted when a party proposes a settlement.\\n /// @param _transactionID The index of the transaction.\\n /// @param _party The party that proposed a settlement.\\n /// @param _amount The amount proposed.\\n event SettlementProposed(uint256 indexed _transactionID, Party _party, uint256 _amount);\\n\\n /// @dev Emitted when a transaction paid in native currency is created.\\n /// @param _transactionID The index of the transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _buyer The address of the buyer.\\n /// @param _seller The address of the seller.\\n /// @param _amount The initial amount in the transaction.\\n /// @param _deadline The deadline of the transaction.\\n event NativeTransactionCreated(\\n uint256 indexed _transactionID,\\n string _transactionUri,\\n address indexed _buyer,\\n address indexed _seller,\\n uint256 _amount,\\n uint256 _deadline\\n );\\n\\n /// @dev Emitted when a transaction paid in ERC20 token is created.\\n /// @param _transactionID The index of the transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _buyer The address of the buyer.\\n /// @param _seller The address of the seller.\\n /// @param _token The token address.\\n /// @param _amount The initial amount in the transaction.\\n /// @param _deadline The deadline of the transaction.\\n event ERC20TransactionCreated(\\n uint256 indexed _transactionID,\\n string _transactionUri,\\n address indexed _buyer,\\n address indexed _seller,\\n IERC20 _token,\\n uint256 _amount,\\n uint256 _deadline\\n );\\n\\n /// @dev To be emitted when a transaction is resolved, either by its\\n /// execution, a timeout or because a ruling was enforced.\\n /// @param _transactionID The ID of the respective transaction.\\n /// @param _resolution Short description of what caused the transaction to be solved.\\n event TransactionResolved(uint256 indexed _transactionID, Resolution indexed _resolution);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Create a transaction.\\n /// @param _deadline Time after which a party can automatically execute the arbitrable transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _seller The recipient of the transaction.\\n /// @return transactionID The index of the transaction.\\n function createNativeTransaction(\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external payable returns (uint256 transactionID);\\n\\n /// @dev Create a transaction.\\n /// @param _amount The amount of tokens in this transaction.\\n /// @param _token The ERC20 token contract.\\n /// @param _deadline Time after which a party can automatically execute the arbitrable transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _seller The recipient of the transaction.\\n /// @return transactionID The index of the transaction.\\n function createERC20Transaction(\\n uint256 _amount,\\n IERC20 _token,\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external returns (uint256 transactionID);\\n\\n /// @dev Pay seller. To be called if the good or service is provided.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount Amount to pay in wei.\\n function pay(uint256 _transactionID, uint256 _amount) external;\\n\\n /// @dev Reimburse buyer. To be called if the good or service can't be fully provided.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amountReimbursed Amount to reimburse in wei.\\n function reimburse(uint256 _transactionID, uint256 _amountReimbursed) external;\\n\\n /// @dev Transfer the transaction's amount to the seller if the timeout has passed.\\n /// @param _transactionID The index of the transaction.\\n function executeTransaction(uint256 _transactionID) external;\\n\\n /// @dev Propose a settlement as a compromise from the initial terms to the other party.\\n /// Note that a party can only propose a settlement again after the other party has\\n /// done so as well to prevent front running/griefing issues.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount The settlement amount.\\n function proposeSettlement(uint256 _transactionID, uint256 _amount) external;\\n\\n /// @dev Accept a settlement proposed by the other party.\\n /// @param _transactionID The index of the transaction.\\n function acceptSettlement(uint256 _transactionID) external;\\n\\n /// @dev Pay the arbitration fee to raise a dispute. To be called by the buyer.\\n /// Note that it can only be called after settlement proposition.\\n /// Also note that the arbitrator can have createDispute throw, which will make\\n /// this function throw and therefore lead to a party being timed-out.\\n /// This is not a vulnerability as the arbitrator can rule in favor of one party anyway.\\n /// @param _transactionID The index of the transaction.\\n function payArbitrationFeeByBuyer(uint256 _transactionID) external payable;\\n\\n /// @dev Pay the arbitration fee to raise a dispute. To be called by the seller.\\n /// Note that this function mirrors payArbitrationFeeByBuyer.\\n /// @param _transactionID The index of the transaction.\\n function payArbitrationFeeBySeller(uint256 _transactionID) external payable;\\n\\n /// @dev Reimburse buyer if seller fails to pay the fee.\\n /// @param _transactionID The index of the transaction.\\n function timeOutByBuyer(uint256 _transactionID) external;\\n\\n /// @dev Pay seller if buyer fails to pay the fee.\\n /// @param _transactionID The index of the transaction.\\n function timeOutBySeller(uint256 _transactionID) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Getter to know the count of transactions.\\n /// @return The count of transactions.\\n function getTransactionCount() external view returns (uint256);\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error BuyerOnly();\\n error SellerOnly();\\n error BuyerOrSellerOnly();\\n error ArbitratorOnly();\\n error TransactionDisputed();\\n error MaximumPaymentAmountExceeded();\\n error DeadlineNotPassed();\\n error BuyerFeeNotCoverArbitrationCosts();\\n error SellerFeeNotCoverArbitrationCosts();\\n error NotWaitingForSellerFees();\\n error NotWaitingForBuyerFees();\\n error TimeoutNotPassed();\\n error InvalidRuling();\\n error DisputeAlreadyResolved();\\n error TransactionExpired();\\n error TransactionEscalatedForArbitration();\\n error NoSettlementProposedOrTransactionMovedOnAcceptSettlement();\\n error NoSettlementProposedOrTransactionMovedOnPayFeeBuyer();\\n error NoSettlementProposedOrTransactionMovedOnPayFeeSeller();\\n error SettlementPeriodNotOver();\\n error NotSupported();\\n error TokenTransferFailed();\\n}\\n\",\"keccak256\":\"0x6fdd459de9004fdefd999a9b7ffa3e58a26b7e054149ee8ecd9bc87b9e845d0b\",\"license\":\"MIT\"},\"src/interfaces/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport {IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\n\\nIERC20 constant NATIVE = IERC20(address(0));\\n\\nenum Party {\\n None,\\n Buyer, // Makes a purchase in native currency or ERC20 token.\\n Seller // Provides a good or service in exchange for native currency or ERC20 token.\\n}\\n\\nenum Status {\\n NoDispute,\\n WaitingSettlementBuyer,\\n WaitingSettlementSeller,\\n WaitingBuyer,\\n WaitingSeller,\\n DisputeCreated,\\n TransactionResolved\\n}\\n\\nenum Resolution {\\n TransactionExecuted,\\n TimeoutByBuyer,\\n TimeoutBySeller,\\n RulingEnforced,\\n SettlementReached\\n}\\n\\nstruct Transaction {\\n address payable buyer;\\n address payable seller;\\n uint256 amount;\\n uint256 settlementBuyer; // Settlement amount proposed by the buyer.\\n uint256 settlementSeller; // Settlement amount proposed by the seller.\\n uint256 deadline; // Timestamp at which the transaction can be automatically executed if not disputed.\\n uint256 disputeID; // If dispute exists, the ID of the dispute.\\n uint256 buyerFee; // Total fees paid by the buyer.\\n uint256 sellerFee; // Total fees paid by the seller.\\n uint256 lastFeePaymentTime; // Last time the dispute fees were paid by either party or settlement proposed.\\n Status status;\\n IERC20 token; // Token to pay the seller with.\\n}\\n\",\"keccak256\":\"0x7503e4f09724c869957761fa21f782fa79804e172257d1c35f3f73879d93e544\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\",\"keccak256\":\"0x60df38c872cae58f18d4b706251445e13542a5d9d94b9db71de02bfcaf7575ee\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040516200324138038062003241833981016040819052620000349162000233565b60008054336001600160a01b031991821617909155600180549091166001600160a01b03891617905560026200006b878262000393565b50600380546001600160a01b0319166001600160a01b038516908117909155600583905560068290556040516312a6505d60e21b8152634a99417490620000b990889088906004016200048d565b6020604051808303816000875af1158015620000d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ff9190620004cd565b6004556040517ff0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367906200013890849084908a90620004e7565b60405180910390a15050505050505062000508565b6001600160a01b03811681146200016357600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001995781810151838201526020016200017f565b50506000910152565b600082601f830112620001b457600080fd5b81516001600160401b0380821115620001d157620001d162000166565b604051601f8301601f19908116603f01168101908282118183101715620001fc57620001fc62000166565b816040528381528660208588010111156200021657600080fd5b620002298460208301602089016200017c565b9695505050505050565b600080600080600080600060e0888a0312156200024f57600080fd5b87516200025c816200014d565b60208901519097506001600160401b03808211156200027a57600080fd5b620002888b838c01620001a2565b975060408a01519150808211156200029f57600080fd5b620002ad8b838c01620001a2565b965060608a0151915080821115620002c457600080fd5b50620002d38a828b01620001a2565b9450506080880151620002e6816200014d565b8093505060a0880151915060c0880151905092959891949750929550565b600181811c908216806200031957607f821691505b6020821081036200033a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200038e57600081815260208120601f850160051c81016020861015620003695750805b601f850160051c820191505b818110156200038a5782815560010162000375565b5050505b505050565b81516001600160401b03811115620003af57620003af62000166565b620003c781620003c0845462000304565b8462000340565b602080601f831160018114620003ff5760008415620003e65750858301515b600019600386901b1c1916600185901b1785556200038a565b600085815260208120601f198616915b8281101562000430578886015182559484019460019091019084016200040f565b50858210156200044f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008151808452620004798160208601602086016200017c565b601f01601f19169290920160200192915050565b6060815260006060820152608060208201526000620004b060808301856200045f565b8281036040840152620004c481856200045f565b95945050505050565b600060208284031215620004e057600080fd5b5051919050565b838152826020820152606060408201526000620004c460608301846200045f565b612d2980620005186000396000f3fe60806040526004361061018d5760003560e01c806393ee2678116100d7578063e3f07e9011610085578063e3f07e901461044b578063e4c0aaf41461046b578063e77d0bd31461048b578063e98c579b146104ab578063ee22610b146104cb578063ef48eee6146104eb578063fc548f081461050b578063fe43a9921461052b57600080fd5b806393ee26781461035d5780639ace38c21461037d578063a0af81f0146103b5578063b2b96792146103d5578063b329036b146103f5578063c5d552881461040b578063cb44c3fa1461042b57600080fd5b80632fbe3b031161013f5780632fbe3b0314610271578063311a6c561461029e57806334e2672d146102be5780633bf54724146102de578063441080fe146102f15780634660ebbe146103075780636cc6cde1146103275780637aa77f291461034757600080fd5b80630c340a24146101925780630c7ac7b6146101cf5780631bd1823a146101f15780632a7027de146102135780632be6d005146102345780632e0b6422146102475780632e7700f01461025c575b600080fd5b34801561019e57600080fd5b506000546101b2906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101db57600080fd5b506101e461054b565b6040516101c69190612512565b3480156101fd57600080fd5b5061021161020c36600461252c565b6105d9565b005b610226610221366004612600565b6106d0565b6040519081526020016101c6565b61021161024236600461252c565b610838565b34801561025357600080fd5b50610226600281565b34801561026857600080fd5b50600754610226565b34801561027d57600080fd5b5061022661028c36600461252c565b60086020526000908152604090205481565b3480156102aa57600080fd5b506102116102b936600461265b565b610a86565b3480156102ca57600080fd5b506102116102d936600461267d565b610b96565b6102116102ec36600461252c565b610c02565b3480156102fd57600080fd5b5061022660065481565b34801561031357600080fd5b506102116103223660046126ef565b610e37565b34801561033357600080fd5b506001546101b2906001600160a01b031681565b34801561035357600080fd5b5061022660045481565b34801561036957600080fd5b5061021161037836600461252c565b610e84565b34801561038957600080fd5b5061039d61039836600461252c565b6110bb565b6040516101c69c9b9a99989796959493929190612722565b3480156103c157600080fd5b506003546101b2906001600160a01b031681565b3480156103e157600080fd5b506102116103f036600461265b565b611140565b34801561040157600080fd5b5061022660055481565b34801561041757600080fd5b506102116104263660046127a3565b6113af565b34801561043757600080fd5b5061021161044636600461252c565b611456565b34801561045757600080fd5b50610226610466366004612807565b6114b6565b34801561047757600080fd5b506102116104863660046126ef565b611665565b34801561049757600080fd5b506102116104a636600461252c565b6116b2565b3480156104b757600080fd5b506102116104c636600461252c565b611792565b3480156104d757600080fd5b506102116104e636600461252c565b6117e6565b3480156104f757600080fd5b5061021161050636600461265b565b61193b565b34801561051757600080fd5b506102116105263660046126ef565b611aed565b34801561053757600080fd5b5061021161054636600461265b565b611b3a565b600280546105589061287f565b80601f01602080910402602001604051908101604052809291908181526020018280546105849061287f565b80156105d15780601f106105a6576101008083540402835291602001916105d1565b820191906000526020600020905b8154815290600101906020018083116105b457829003601f168201915b505050505081565b6000600782815481106105ee576105ee6128b9565b60009182526020909120600b9091020190506003600a82015460ff16600681111561061b5761061b61270c565b1461063957604051635ed7670b60e11b815260040160405180910390fd5b600554600982015461064b90426128e5565b101561066a57604051634799187b60e01b815260040160405180910390fd5b6007810180546000909155610680836002611ccd565b80156106af5781546040516001600160a01b039091169082156108fc029083906000818181858888f150505050505b60025b6040518490600080516020612c9483398151915290600090a3505050565b600780546001808201835560008381527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600b9093029283018054336001600160a01b03199182161782557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689850180549091166001600160a01b038816179055347fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a8501557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c69284018054610100600160a81b03191690557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68d90930187905592546107da91906128e5565b9150826001600160a01b0316336001600160a01b0316837f0a7ca50c43ec865fdc8519822762f88432e18409024b9c036d6507b9c8f79d8087348660050154604051610828939291906128fe565b60405180910390a4509392505050565b60006007828154811061084d5761084d6128b9565b60009182526020909120600b9091020190506001600a82015460ff16600681111561087a5761087a61270c565b141580156108a157506002600a82015460ff16600681111561089e5761089e61270c565b14155b80156108c657506003600a82015460ff1660068111156108c3576108c361270c565b14155b156108e45760405163376af24960e21b815260040160405180910390fd5b6002600a82015460ff1660068111156108ff576108ff61270c565b14801561091b5750600654600982015461091990426128e5565b105b1561093957604051630627cd6b60e01b815260040160405180910390fd5b80546001600160a01b031633146109635760405163e2bc376b60e01b815260040160405180910390fd5b348160070160008282546109779190612923565b909155505060015460405163f7434ea960e01b81526000916001600160a01b03169063f7434ea9906109ae906002906004016129b3565b602060405180830381865afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef91906129c6565b90508082600701541015610a1657604051631a48f3db60e11b815260040160405180910390fd5b4260098301556008820154811115610a7757600a8201805460ff1916600417905560405183907fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b590610a6a906002906129f3565b60405180910390a2505050565b610a81838261214c565b505050565b6001546001600160a01b03163314610ab157604051630955f84760e31b815260040160405180910390fd5b6002811115610ad3576040516309efd47960e41b815260040160405180910390fd5b6000828152600860205260408120546007805491929183908110610af957610af96128b9565b60009182526020909120600b9091020190506005600a82015460ff166006811115610b2657610b2661270c565b14610b445760405163f10068b560e01b815260040160405180910390fd5b60015460405184815285916001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3610b908284611ccd565b50505050565b6000546001600160a01b03163314610bc15760405163c383977560e01b815260040160405180910390fd5b6002610bce828483612a4f565b50600080516020612cb48339815191526005546006548484604051610bf69493929190612b10565b60405180910390a15050565b600060078281548110610c1757610c176128b9565b60009182526020909120600b9091020190506001600a82015460ff166006811115610c4457610c4461270c565b14158015610c6b57506002600a82015460ff166006811115610c6857610c6861270c565b14155b8015610c9057506004600a82015460ff166006811115610c8d57610c8d61270c565b14155b15610cae5760405163365105ef60e11b815260040160405180910390fd5b6001600a82015460ff166006811115610cc957610cc961270c565b148015610ce557506006546009820154610ce390426128e5565b105b15610d0357604051630627cd6b60e01b815260040160405180910390fd5b60018101546001600160a01b03163314610d3057604051635800797f60e11b815260040160405180910390fd5b34816008016000828254610d449190612923565b909155505060015460405163f7434ea960e01b81526000916001600160a01b03169063f7434ea990610d7b906002906004016129b3565b602060405180830381865afa158015610d98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbc91906129c6565b90508082600801541015610de35760405163818d938f60e01b815260040160405180910390fd5b4260098301556007820154811115610a7757600a8201805460ff1916600317905560405183907fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b590610a6a906001906129f3565b6000546001600160a01b03163314610e625760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600060078281548110610e9957610e996128b9565b600091825260208220600b9091020191506001600a83015460ff166006811115610ec557610ec561270c565b03610eff5781546001600160a01b03163314610ef45760405163e2bc376b60e01b815260040160405180910390fd5b506004810154610f70565b6002600a83015460ff166006811115610f1a57610f1a61270c565b03610f575760018201546001600160a01b03163314610f4c57604051635800797f60e11b815260040160405180910390fd5b506003810154610f70565b604051630a7b6ec160e01b815260040160405180910390fd5b6000818360020154610f8291906128e5565b600060028501819055600385018190556004850155600a8401805460ff1916600617908190559091506001600160a01b03610100909104166110175782546040516001600160a01b039091169082156108fc029083906000818181858888f150505060018501546040516001600160a01b03909116925084156108fc02915084906000818181858888f193505050505061109a565b8254600a84015461103a916001600160a01b036101009092048216911683612313565b6110575760405163022e258160e11b815260040160405180910390fd5b6001830154600a84015461107d916001600160a01b036101009092048216911684612313565b61109a5760405163022e258160e11b815260040160405180910390fd5b60046040518590600080516020612c9483398151915290600090a350505050565b600781815481106110cb57600080fd5b60009182526020909120600b9091020180546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a909a01546001600160a01b03998a169b50978916999698959794969395929491939092909160ff811691610100909104168c565b600060078381548110611155576111556128b9565b600091825260208220600b909102019150600a82015460ff16600681111561117f5761117f61270c565b148015611190575080600501544210155b156111ae576040516338e5e54b60e21b815260040160405180910390fd5b6003600a82015460ff1660068111156111c9576111c961270c565b106111e757604051630d71592960e31b815260040160405180910390fd5b806002015482111561120c576040516305aafecf60e01b815260040160405180910390fd5b42600982015560006001600a83015460ff16600681111561122f5761122f61270c565b036112855781546001600160a01b0316331461125e5760405163e2bc376b60e01b815260040160405180910390fd5b60038201839055600a820180546002919060ff19166001835b02179055506001905061136f565b6002600a83015460ff1660068111156112a0576112a061270c565b036112f85760018201546001600160a01b031633146112d257604051635800797f60e11b815260040160405180910390fd5b60048201839055600a820180546001919060ff191682805b02179055506002905061136f565b81546001600160a01b031633036113265760038201839055600a820180546002919060ff1916600183611277565b60018201546001600160a01b031633036113565760048201839055600a820180546001919060ff191682806112ea565b60405163351c18ff60e21b815260040160405180910390fd5b837f10c8b22b69e324b0227c6adfa65183c771304c11385423e93ce99779a7483dbf82856040516113a1929190612b4d565b60405180910390a250505050565b6000546001600160a01b031633146113da5760405163c383977560e01b815260040160405180910390fd5b6003546040516312a6505d60e21b81526001600160a01b0390911690634a9941749061140c9085908590600401612b68565b6020604051808303816000875af115801561142b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144f91906129c6565b6004555050565b6000546001600160a01b031633146114815760405163c383977560e01b815260040160405180910390fd5b6005819055600654604051600080516020612cb4833981519152916114ab91849190600290612ba4565b60405180910390a150565b60006114cd6001600160a01b0386163330896123e6565b6114ea5760405163022e258160e11b815260040160405180910390fd5b60078054600181810183556000839052600b9091027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688810180546001600160a01b0319908116331782557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830180546001600160a01b03898116919093161790557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a83018b90557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c69283018054918b1661010002610100600160a81b03199092169190911790557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68d909101879055915461160391906128e5565b9150826001600160a01b0316336001600160a01b0316837fb96ca2c0c34e2ad6384277748b8101f4bddc3cbeaad7086e59cd315bd19aa8c5878a8c87600501546040516116539493929190612bc3565b60405180910390a45095945050505050565b6000546001600160a01b031633146116905760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000600782815481106116c7576116c76128b9565b60009182526020909120600b9091020190506004600a82015460ff1660068111156116f4576116f461270c565b1461171257604051638225aba560e01b815260040160405180910390fd5b600554600982015461172490426128e5565b101561174357604051634799187b60e01b815260040160405180910390fd5b6008810180546000909155611759836001611ccd565b801561178b5760018201546040516001600160a01b039091169082156108fc029083906000818181858888f150505050505b60016106b2565b6000546001600160a01b031633146117bd5760405163c383977560e01b815260040160405180910390fd5b6006819055600554604051600080516020612cb4833981519152916114ab918490600290612ba4565b6000600782815481106117fb576117fb6128b9565b90600052602060002090600b020190508060050154421015611830576040516302eb354360e41b815260040160405180910390fd5b6000600a82015460ff16600681111561184b5761184b61270c565b1461186957604051634e22597f60e11b815260040160405180910390fd5b6002810180546000909155600a8201805460ff1916600617908190556001600160a01b03610100909104166118c95760018201546040516001600160a01b039091169082156108fc029083906000818181858888f193505050505061190c565b6001820154600a8301546118ef916001600160a01b036101009092048216911683612313565b61190c5760405163022e258160e11b815260040160405180910390fd5b82600080516020612cd4833981519152823360405161192c929190612bfb565b60405180910390a260006106b2565b600060078381548110611950576119506128b9565b60009182526020909120600b9091020180549091506001600160a01b0316331461198d5760405163e2bc376b60e01b815260040160405180910390fd5b6000600a82015460ff1660068111156119a8576119a861270c565b146119c657604051634e22597f60e11b815260040160405180910390fd5b80600201548211156119eb576040516305aafecf60e01b815260040160405180910390fd5b82600080516020612cd48339815191528333604051611a0b929190612bfb565b60405180910390a281816002016000828254611a2791906128e5565b90915550506002810154600003611a6357600a8101805460ff191660061790556040516000908490600080516020612c94833981519152908390a35b600a81015461010090046001600160a01b0316611aaa5760018101546040516001600160a01b039091169083156108fc029084906000818181858888f15050505050505050565b6001810154600a820154611ad0916001600160a01b036101009092048216911684612313565b610a815760405163022e258160e11b815260040160405180910390fd5b6000546001600160a01b03163314611b185760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600060078381548110611b4f57611b4f6128b9565b600091825260209091206001600b90920201908101549091506001600160a01b03163314611b9057604051635800797f60e11b815260040160405180910390fd5b6000600a82015460ff166006811115611bab57611bab61270c565b14611bc957604051634e22597f60e11b815260040160405180910390fd5b8060020154821115611bee576040516305aafecf60e01b815260040160405180910390fd5b82600080516020612cd48339815191528333604051611c0e929190612bfb565b60405180910390a281816002016000828254611c2a91906128e5565b90915550506002810154600003611c6657600a8101805460ff191660061790556040516000908490600080516020612c94833981519152908390a35b600a81015461010090046001600160a01b0316611caa5780546040516001600160a01b039091169083156108fc029084906000818181858888f15050505050505050565b8054600a820154611ad0916001600160a01b036101009092048216911684612313565b600060078381548110611ce257611ce26128b9565b600091825260208220600b9190910201600281018054600383018054600485018054600787018054600889018054600a8b0180549a8d9055978c9055948b9055918a905598905560ff1986166006179093559496509194919390926001600160a01b0361010090910416156000198801611ec65786546040516001600160a01b039091169084156108fc029085906000818181858888f193505050505084600014611e4d578015611ded5786546001600160a01b03166108fc611da587896128e5565b6040518115909202916000818181858888f150505060018901546040516001600160a01b03909116925087156108fc02915087906000818181858888f1935050505050612126565b8654611e20906001600160a01b0316611e0687896128e5565b600a8a015461010090046001600160a01b03169190612313565b506001870154600a880154611e47916001600160a01b036101009092048216911687612313565b50612126565b8015611e815786546040516001600160a01b039091169087156108fc029088906000818181858888f1935050505050612126565b8654600a880154611ea4916001600160a01b036101009092048216911688612313565b611ec15760405163022e258160e11b815260040160405180910390fd5b612126565b600288036120055760018701546040516001600160a01b039091169083156108fc029084906000818181858888f193505050505083600014611fa8578015611f685786546001600160a01b03166108fc611f2086896128e5565b6040518115909202916000818181858888f150505060018901546040516001600160a01b03909116925086156108fc02915086906000818181858888f1935050505050612126565b8654611f81906001600160a01b0316611e0686896128e5565b506001870154600a880154611e47916001600160a01b036101009092048216911686612313565b8015611fdf5760018701546040516001600160a01b039091169087156108fc029088906000818181858888f1935050505050612126565b6001870154600a880154611ea4916001600160a01b036101009092048216911688612313565b6000612012600285612c12565b88546040519192506001600160a01b03169082156108fc029083906000818181858888f150505060018a01546040516001600160a01b03909116925083156108fc02915083906000818181858888f193505050505060006002886120769190612c12565b905082156120d75788546040516001600160a01b039091169082156108fc029083906000818181858888f150505060018b01546040516001600160a01b03909116925083156108fc02915083906000818181858888f1935050505050612123565b8854600a8a01546120fa916001600160a01b036101009092048216911683612313565b506001890154600a8a0154612121916001600160a01b036101009092048216911683612313565b505b50505b60036040518a90600080516020612c9483398151915290600090a3505050505050505050565b600060078381548110612161576121616128b9565b60009182526020909120600a600b90920201908101805460ff1916600517905560015460405163c13517e160e01b81529192506001600160a01b03169063c13517e19084906121b7906002908190600401612c34565b60206040518083038185885af11580156121d5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906121fa91906129c6565b60068201818155600091825260086020908152604080842087905591546001546004548451898152938401526060838501819052830194909452915191926001600160a01b0316917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869181900360800190a381816007015411156122bc57600082826007015461228a91906128e5565b6007830184905582546040519192506001600160a01b03169082156108fc029083906000818181858888f15050505050505b8181600801541115610a815760008282600801546122da91906128e5565b6008830184905560018301546040519192506001600160a01b03169082156108fc029083906000818181858888f1505050505050505050565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516123709190612c55565b6000604051808303816000865af19150503d80600081146123ad576040519150601f19603f3d011682016040523d82523d6000602084013e6123b2565b606091505b50915091508180156123dc5750805115806123dc5750808060200190518101906123dc9190612c71565b9695505050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161244b9190612c55565b6000604051808303816000865af19150503d8060008114612488576040519150601f19603f3d011682016040523d82523d6000602084013e61248d565b606091505b50915091508180156124b75750805115806124b75750808060200190518101906124b79190612c71565b979650505050505050565b60005b838110156124dd5781810151838201526020016124c5565b50506000910152565b600081518084526124fe8160208601602086016124c2565b601f01601f19169290920160200192915050565b60208152600061252560208301846124e6565b9392505050565b60006020828403121561253e57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261256c57600080fd5b813567ffffffffffffffff8082111561258757612587612545565b604051601f8301601f19908116603f011681019082821181831017156125af576125af612545565b816040528381528660208588010111156125c857600080fd5b836020870160208301376000602085830101528094505050505092915050565b6001600160a01b03811681146125fd57600080fd5b50565b60008060006060848603121561261557600080fd5b83359250602084013567ffffffffffffffff81111561263357600080fd5b61263f8682870161255b565b9250506040840135612650816125e8565b809150509250925092565b6000806040838503121561266e57600080fd5b50508035926020909101359150565b6000806020838503121561269057600080fd5b823567ffffffffffffffff808211156126a857600080fd5b818501915085601f8301126126bc57600080fd5b8135818111156126cb57600080fd5b8660208285010111156126dd57600080fd5b60209290920196919550909350505050565b60006020828403121561270157600080fd5b8135612525816125e8565b634e487b7160e01b600052602160045260246000fd5b60006101808201905060018060a01b03808f168352808e1660208401528c60408401528b60608401528a60808401528960a08401528860c08401528760e08401528661010084015285610120840152600785106127815761278161270c565b84610140840152808416610160840152509d9c50505050505050505050505050565b600080604083850312156127b657600080fd5b823567ffffffffffffffff808211156127ce57600080fd5b6127da8683870161255b565b935060208501359150808211156127f057600080fd5b506127fd8582860161255b565b9150509250929050565b600080600080600060a0868803121561281f57600080fd5b853594506020860135612831816125e8565b935060408601359250606086013567ffffffffffffffff81111561285457600080fd5b6128608882890161255b565b9250506080860135612871816125e8565b809150509295509295909350565b600181811c9082168061289357607f821691505b6020821081036128b357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156128f8576128f86128cf565b92915050565b60608152600061291160608301866124e6565b60208301949094525060400152919050565b808201808211156128f8576128f86128cf565b600081546129438161287f565b808552602060018381168015612960576001811461297a576129a8565b60ff1985168884015283151560051b8801830195506129a8565b866000528260002060005b858110156129a05781548a8201860152908301908401612985565b890184019650505b505050505092915050565b6020815260006125256020830184612936565b6000602082840312156129d857600080fd5b5051919050565b600381106129ef576129ef61270c565b9052565b602081016128f882846129df565b601f821115610a8157600081815260208120601f850160051c81016020861015612a285750805b601f850160051c820191505b81811015612a4757828155600101612a34565b505050505050565b67ffffffffffffffff831115612a6757612a67612545565b612a7b83612a75835461287f565b83612a01565b6000601f841160018114612aaf5760008515612a975750838201355b600019600387901b1c1916600186901b178355612b09565b600083815260209020601f19861690835b82811015612ae05786850135825560209485019460019092019101612ac0565b5086821015612afd5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b60408101612b5b82856129df565b8260208301529392505050565b6060815260006060820152608060208201526000612b8960808301856124e6565b8281036040840152612b9b81856124e6565b95945050505050565b838152826020820152606060408201526000612b9b6060830184612936565b608081526000612bd660808301876124e6565b6001600160a01b03959095166020830152506040810192909252606090910152919050565b9182526001600160a01b0316602082015260400190565b600082612c2f57634e487b7160e01b600052601260045260246000fd5b500490565b828152604060208201526000612c4d6040830184612936565b949350505050565b60008251612c678184602087016124c2565b9190910192915050565b600060208284031215612c8357600080fd5b8151801515811461252557600080fdfe89e6168584e1de3ec704ff46376271b5481b0d9b2b0ef0ae102f0d001093e000f0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367d1432ca9a38d944f01b256a411861b109bc4bfe200c40d7144e919a16b86a8a8a26469706673582212202a06d0fa92a3f95d6a9047ea1427b776ee4789dc210466789df25a3645687f6364736f6c63430008120033", - "deployedBytecode": "0x60806040526004361061018d5760003560e01c806393ee2678116100d7578063e3f07e9011610085578063e3f07e901461044b578063e4c0aaf41461046b578063e77d0bd31461048b578063e98c579b146104ab578063ee22610b146104cb578063ef48eee6146104eb578063fc548f081461050b578063fe43a9921461052b57600080fd5b806393ee26781461035d5780639ace38c21461037d578063a0af81f0146103b5578063b2b96792146103d5578063b329036b146103f5578063c5d552881461040b578063cb44c3fa1461042b57600080fd5b80632fbe3b031161013f5780632fbe3b0314610271578063311a6c561461029e57806334e2672d146102be5780633bf54724146102de578063441080fe146102f15780634660ebbe146103075780636cc6cde1146103275780637aa77f291461034757600080fd5b80630c340a24146101925780630c7ac7b6146101cf5780631bd1823a146101f15780632a7027de146102135780632be6d005146102345780632e0b6422146102475780632e7700f01461025c575b600080fd5b34801561019e57600080fd5b506000546101b2906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101db57600080fd5b506101e461054b565b6040516101c69190612512565b3480156101fd57600080fd5b5061021161020c36600461252c565b6105d9565b005b610226610221366004612600565b6106d0565b6040519081526020016101c6565b61021161024236600461252c565b610838565b34801561025357600080fd5b50610226600281565b34801561026857600080fd5b50600754610226565b34801561027d57600080fd5b5061022661028c36600461252c565b60086020526000908152604090205481565b3480156102aa57600080fd5b506102116102b936600461265b565b610a86565b3480156102ca57600080fd5b506102116102d936600461267d565b610b96565b6102116102ec36600461252c565b610c02565b3480156102fd57600080fd5b5061022660065481565b34801561031357600080fd5b506102116103223660046126ef565b610e37565b34801561033357600080fd5b506001546101b2906001600160a01b031681565b34801561035357600080fd5b5061022660045481565b34801561036957600080fd5b5061021161037836600461252c565b610e84565b34801561038957600080fd5b5061039d61039836600461252c565b6110bb565b6040516101c69c9b9a99989796959493929190612722565b3480156103c157600080fd5b506003546101b2906001600160a01b031681565b3480156103e157600080fd5b506102116103f036600461265b565b611140565b34801561040157600080fd5b5061022660055481565b34801561041757600080fd5b506102116104263660046127a3565b6113af565b34801561043757600080fd5b5061021161044636600461252c565b611456565b34801561045757600080fd5b50610226610466366004612807565b6114b6565b34801561047757600080fd5b506102116104863660046126ef565b611665565b34801561049757600080fd5b506102116104a636600461252c565b6116b2565b3480156104b757600080fd5b506102116104c636600461252c565b611792565b3480156104d757600080fd5b506102116104e636600461252c565b6117e6565b3480156104f757600080fd5b5061021161050636600461265b565b61193b565b34801561051757600080fd5b506102116105263660046126ef565b611aed565b34801561053757600080fd5b5061021161054636600461265b565b611b3a565b600280546105589061287f565b80601f01602080910402602001604051908101604052809291908181526020018280546105849061287f565b80156105d15780601f106105a6576101008083540402835291602001916105d1565b820191906000526020600020905b8154815290600101906020018083116105b457829003601f168201915b505050505081565b6000600782815481106105ee576105ee6128b9565b60009182526020909120600b9091020190506003600a82015460ff16600681111561061b5761061b61270c565b1461063957604051635ed7670b60e11b815260040160405180910390fd5b600554600982015461064b90426128e5565b101561066a57604051634799187b60e01b815260040160405180910390fd5b6007810180546000909155610680836002611ccd565b80156106af5781546040516001600160a01b039091169082156108fc029083906000818181858888f150505050505b60025b6040518490600080516020612c9483398151915290600090a3505050565b600780546001808201835560008381527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600b9093029283018054336001600160a01b03199182161782557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689850180549091166001600160a01b038816179055347fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a8501557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c69284018054610100600160a81b03191690557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68d90930187905592546107da91906128e5565b9150826001600160a01b0316336001600160a01b0316837f0a7ca50c43ec865fdc8519822762f88432e18409024b9c036d6507b9c8f79d8087348660050154604051610828939291906128fe565b60405180910390a4509392505050565b60006007828154811061084d5761084d6128b9565b60009182526020909120600b9091020190506001600a82015460ff16600681111561087a5761087a61270c565b141580156108a157506002600a82015460ff16600681111561089e5761089e61270c565b14155b80156108c657506003600a82015460ff1660068111156108c3576108c361270c565b14155b156108e45760405163376af24960e21b815260040160405180910390fd5b6002600a82015460ff1660068111156108ff576108ff61270c565b14801561091b5750600654600982015461091990426128e5565b105b1561093957604051630627cd6b60e01b815260040160405180910390fd5b80546001600160a01b031633146109635760405163e2bc376b60e01b815260040160405180910390fd5b348160070160008282546109779190612923565b909155505060015460405163f7434ea960e01b81526000916001600160a01b03169063f7434ea9906109ae906002906004016129b3565b602060405180830381865afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef91906129c6565b90508082600701541015610a1657604051631a48f3db60e11b815260040160405180910390fd5b4260098301556008820154811115610a7757600a8201805460ff1916600417905560405183907fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b590610a6a906002906129f3565b60405180910390a2505050565b610a81838261214c565b505050565b6001546001600160a01b03163314610ab157604051630955f84760e31b815260040160405180910390fd5b6002811115610ad3576040516309efd47960e41b815260040160405180910390fd5b6000828152600860205260408120546007805491929183908110610af957610af96128b9565b60009182526020909120600b9091020190506005600a82015460ff166006811115610b2657610b2661270c565b14610b445760405163f10068b560e01b815260040160405180910390fd5b60015460405184815285916001600160a01b0316907f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769060200160405180910390a3610b908284611ccd565b50505050565b6000546001600160a01b03163314610bc15760405163c383977560e01b815260040160405180910390fd5b6002610bce828483612a4f565b50600080516020612cb48339815191526005546006548484604051610bf69493929190612b10565b60405180910390a15050565b600060078281548110610c1757610c176128b9565b60009182526020909120600b9091020190506001600a82015460ff166006811115610c4457610c4461270c565b14158015610c6b57506002600a82015460ff166006811115610c6857610c6861270c565b14155b8015610c9057506004600a82015460ff166006811115610c8d57610c8d61270c565b14155b15610cae5760405163365105ef60e11b815260040160405180910390fd5b6001600a82015460ff166006811115610cc957610cc961270c565b148015610ce557506006546009820154610ce390426128e5565b105b15610d0357604051630627cd6b60e01b815260040160405180910390fd5b60018101546001600160a01b03163314610d3057604051635800797f60e11b815260040160405180910390fd5b34816008016000828254610d449190612923565b909155505060015460405163f7434ea960e01b81526000916001600160a01b03169063f7434ea990610d7b906002906004016129b3565b602060405180830381865afa158015610d98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbc91906129c6565b90508082600801541015610de35760405163818d938f60e01b815260040160405180910390fd5b4260098301556007820154811115610a7757600a8201805460ff1916600317905560405183907fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b590610a6a906001906129f3565b6000546001600160a01b03163314610e625760405163c383977560e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600060078281548110610e9957610e996128b9565b600091825260208220600b9091020191506001600a83015460ff166006811115610ec557610ec561270c565b03610eff5781546001600160a01b03163314610ef45760405163e2bc376b60e01b815260040160405180910390fd5b506004810154610f70565b6002600a83015460ff166006811115610f1a57610f1a61270c565b03610f575760018201546001600160a01b03163314610f4c57604051635800797f60e11b815260040160405180910390fd5b506003810154610f70565b604051630a7b6ec160e01b815260040160405180910390fd5b6000818360020154610f8291906128e5565b600060028501819055600385018190556004850155600a8401805460ff1916600617908190559091506001600160a01b03610100909104166110175782546040516001600160a01b039091169082156108fc029083906000818181858888f150505060018501546040516001600160a01b03909116925084156108fc02915084906000818181858888f193505050505061109a565b8254600a84015461103a916001600160a01b036101009092048216911683612313565b6110575760405163022e258160e11b815260040160405180910390fd5b6001830154600a84015461107d916001600160a01b036101009092048216911684612313565b61109a5760405163022e258160e11b815260040160405180910390fd5b60046040518590600080516020612c9483398151915290600090a350505050565b600781815481106110cb57600080fd5b60009182526020909120600b9091020180546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a909a01546001600160a01b03998a169b50978916999698959794969395929491939092909160ff811691610100909104168c565b600060078381548110611155576111556128b9565b600091825260208220600b909102019150600a82015460ff16600681111561117f5761117f61270c565b148015611190575080600501544210155b156111ae576040516338e5e54b60e21b815260040160405180910390fd5b6003600a82015460ff1660068111156111c9576111c961270c565b106111e757604051630d71592960e31b815260040160405180910390fd5b806002015482111561120c576040516305aafecf60e01b815260040160405180910390fd5b42600982015560006001600a83015460ff16600681111561122f5761122f61270c565b036112855781546001600160a01b0316331461125e5760405163e2bc376b60e01b815260040160405180910390fd5b60038201839055600a820180546002919060ff19166001835b02179055506001905061136f565b6002600a83015460ff1660068111156112a0576112a061270c565b036112f85760018201546001600160a01b031633146112d257604051635800797f60e11b815260040160405180910390fd5b60048201839055600a820180546001919060ff191682805b02179055506002905061136f565b81546001600160a01b031633036113265760038201839055600a820180546002919060ff1916600183611277565b60018201546001600160a01b031633036113565760048201839055600a820180546001919060ff191682806112ea565b60405163351c18ff60e21b815260040160405180910390fd5b837f10c8b22b69e324b0227c6adfa65183c771304c11385423e93ce99779a7483dbf82856040516113a1929190612b4d565b60405180910390a250505050565b6000546001600160a01b031633146113da5760405163c383977560e01b815260040160405180910390fd5b6003546040516312a6505d60e21b81526001600160a01b0390911690634a9941749061140c9085908590600401612b68565b6020604051808303816000875af115801561142b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144f91906129c6565b6004555050565b6000546001600160a01b031633146114815760405163c383977560e01b815260040160405180910390fd5b6005819055600654604051600080516020612cb4833981519152916114ab91849190600290612ba4565b60405180910390a150565b60006114cd6001600160a01b0386163330896123e6565b6114ea5760405163022e258160e11b815260040160405180910390fd5b60078054600181810183556000839052600b9091027fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688810180546001600160a01b0319908116331782557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689830180546001600160a01b03898116919093161790557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a83018b90557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c69283018054918b1661010002610100600160a81b03199092169190911790557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68d909101879055915461160391906128e5565b9150826001600160a01b0316336001600160a01b0316837fb96ca2c0c34e2ad6384277748b8101f4bddc3cbeaad7086e59cd315bd19aa8c5878a8c87600501546040516116539493929190612bc3565b60405180910390a45095945050505050565b6000546001600160a01b031633146116905760405163c383977560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000600782815481106116c7576116c76128b9565b60009182526020909120600b9091020190506004600a82015460ff1660068111156116f4576116f461270c565b1461171257604051638225aba560e01b815260040160405180910390fd5b600554600982015461172490426128e5565b101561174357604051634799187b60e01b815260040160405180910390fd5b6008810180546000909155611759836001611ccd565b801561178b5760018201546040516001600160a01b039091169082156108fc029083906000818181858888f150505050505b60016106b2565b6000546001600160a01b031633146117bd5760405163c383977560e01b815260040160405180910390fd5b6006819055600554604051600080516020612cb4833981519152916114ab918490600290612ba4565b6000600782815481106117fb576117fb6128b9565b90600052602060002090600b020190508060050154421015611830576040516302eb354360e41b815260040160405180910390fd5b6000600a82015460ff16600681111561184b5761184b61270c565b1461186957604051634e22597f60e11b815260040160405180910390fd5b6002810180546000909155600a8201805460ff1916600617908190556001600160a01b03610100909104166118c95760018201546040516001600160a01b039091169082156108fc029083906000818181858888f193505050505061190c565b6001820154600a8301546118ef916001600160a01b036101009092048216911683612313565b61190c5760405163022e258160e11b815260040160405180910390fd5b82600080516020612cd4833981519152823360405161192c929190612bfb565b60405180910390a260006106b2565b600060078381548110611950576119506128b9565b60009182526020909120600b9091020180549091506001600160a01b0316331461198d5760405163e2bc376b60e01b815260040160405180910390fd5b6000600a82015460ff1660068111156119a8576119a861270c565b146119c657604051634e22597f60e11b815260040160405180910390fd5b80600201548211156119eb576040516305aafecf60e01b815260040160405180910390fd5b82600080516020612cd48339815191528333604051611a0b929190612bfb565b60405180910390a281816002016000828254611a2791906128e5565b90915550506002810154600003611a6357600a8101805460ff191660061790556040516000908490600080516020612c94833981519152908390a35b600a81015461010090046001600160a01b0316611aaa5760018101546040516001600160a01b039091169083156108fc029084906000818181858888f15050505050505050565b6001810154600a820154611ad0916001600160a01b036101009092048216911684612313565b610a815760405163022e258160e11b815260040160405180910390fd5b6000546001600160a01b03163314611b185760405163c383977560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600060078381548110611b4f57611b4f6128b9565b600091825260209091206001600b90920201908101549091506001600160a01b03163314611b9057604051635800797f60e11b815260040160405180910390fd5b6000600a82015460ff166006811115611bab57611bab61270c565b14611bc957604051634e22597f60e11b815260040160405180910390fd5b8060020154821115611bee576040516305aafecf60e01b815260040160405180910390fd5b82600080516020612cd48339815191528333604051611c0e929190612bfb565b60405180910390a281816002016000828254611c2a91906128e5565b90915550506002810154600003611c6657600a8101805460ff191660061790556040516000908490600080516020612c94833981519152908390a35b600a81015461010090046001600160a01b0316611caa5780546040516001600160a01b039091169083156108fc029084906000818181858888f15050505050505050565b8054600a820154611ad0916001600160a01b036101009092048216911684612313565b600060078381548110611ce257611ce26128b9565b600091825260208220600b9190910201600281018054600383018054600485018054600787018054600889018054600a8b0180549a8d9055978c9055948b9055918a905598905560ff1986166006179093559496509194919390926001600160a01b0361010090910416156000198801611ec65786546040516001600160a01b039091169084156108fc029085906000818181858888f193505050505084600014611e4d578015611ded5786546001600160a01b03166108fc611da587896128e5565b6040518115909202916000818181858888f150505060018901546040516001600160a01b03909116925087156108fc02915087906000818181858888f1935050505050612126565b8654611e20906001600160a01b0316611e0687896128e5565b600a8a015461010090046001600160a01b03169190612313565b506001870154600a880154611e47916001600160a01b036101009092048216911687612313565b50612126565b8015611e815786546040516001600160a01b039091169087156108fc029088906000818181858888f1935050505050612126565b8654600a880154611ea4916001600160a01b036101009092048216911688612313565b611ec15760405163022e258160e11b815260040160405180910390fd5b612126565b600288036120055760018701546040516001600160a01b039091169083156108fc029084906000818181858888f193505050505083600014611fa8578015611f685786546001600160a01b03166108fc611f2086896128e5565b6040518115909202916000818181858888f150505060018901546040516001600160a01b03909116925086156108fc02915086906000818181858888f1935050505050612126565b8654611f81906001600160a01b0316611e0686896128e5565b506001870154600a880154611e47916001600160a01b036101009092048216911686612313565b8015611fdf5760018701546040516001600160a01b039091169087156108fc029088906000818181858888f1935050505050612126565b6001870154600a880154611ea4916001600160a01b036101009092048216911688612313565b6000612012600285612c12565b88546040519192506001600160a01b03169082156108fc029083906000818181858888f150505060018a01546040516001600160a01b03909116925083156108fc02915083906000818181858888f193505050505060006002886120769190612c12565b905082156120d75788546040516001600160a01b039091169082156108fc029083906000818181858888f150505060018b01546040516001600160a01b03909116925083156108fc02915083906000818181858888f1935050505050612123565b8854600a8a01546120fa916001600160a01b036101009092048216911683612313565b506001890154600a8a0154612121916001600160a01b036101009092048216911683612313565b505b50505b60036040518a90600080516020612c9483398151915290600090a3505050505050505050565b600060078381548110612161576121616128b9565b60009182526020909120600a600b90920201908101805460ff1916600517905560015460405163c13517e160e01b81529192506001600160a01b03169063c13517e19084906121b7906002908190600401612c34565b60206040518083038185885af11580156121d5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906121fa91906129c6565b60068201818155600091825260086020908152604080842087905591546001546004548451898152938401526060838501819052830194909452915191926001600160a01b0316917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e271869181900360800190a381816007015411156122bc57600082826007015461228a91906128e5565b6007830184905582546040519192506001600160a01b03169082156108fc029083906000818181858888f15050505050505b8181600801541115610a815760008282600801546122da91906128e5565b6008830184905560018301546040519192506001600160a01b03169082156108fc029083906000818181858888f1505050505050505050565b6040516001600160a01b03838116602483015260448201839052600091829182919087169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516123709190612c55565b6000604051808303816000865af19150503d80600081146123ad576040519150601f19603f3d011682016040523d82523d6000602084013e6123b2565b606091505b50915091508180156123dc5750805115806123dc5750808060200190518101906123dc9190612c71565b9695505050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052600091829182919088169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b1790525161244b9190612c55565b6000604051808303816000865af19150503d8060008114612488576040519150601f19603f3d011682016040523d82523d6000602084013e61248d565b606091505b50915091508180156124b75750805115806124b75750808060200190518101906124b79190612c71565b979650505050505050565b60005b838110156124dd5781810151838201526020016124c5565b50506000910152565b600081518084526124fe8160208601602086016124c2565b601f01601f19169290920160200192915050565b60208152600061252560208301846124e6565b9392505050565b60006020828403121561253e57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261256c57600080fd5b813567ffffffffffffffff8082111561258757612587612545565b604051601f8301601f19908116603f011681019082821181831017156125af576125af612545565b816040528381528660208588010111156125c857600080fd5b836020870160208301376000602085830101528094505050505092915050565b6001600160a01b03811681146125fd57600080fd5b50565b60008060006060848603121561261557600080fd5b83359250602084013567ffffffffffffffff81111561263357600080fd5b61263f8682870161255b565b9250506040840135612650816125e8565b809150509250925092565b6000806040838503121561266e57600080fd5b50508035926020909101359150565b6000806020838503121561269057600080fd5b823567ffffffffffffffff808211156126a857600080fd5b818501915085601f8301126126bc57600080fd5b8135818111156126cb57600080fd5b8660208285010111156126dd57600080fd5b60209290920196919550909350505050565b60006020828403121561270157600080fd5b8135612525816125e8565b634e487b7160e01b600052602160045260246000fd5b60006101808201905060018060a01b03808f168352808e1660208401528c60408401528b60608401528a60808401528960a08401528860c08401528760e08401528661010084015285610120840152600785106127815761278161270c565b84610140840152808416610160840152509d9c50505050505050505050505050565b600080604083850312156127b657600080fd5b823567ffffffffffffffff808211156127ce57600080fd5b6127da8683870161255b565b935060208501359150808211156127f057600080fd5b506127fd8582860161255b565b9150509250929050565b600080600080600060a0868803121561281f57600080fd5b853594506020860135612831816125e8565b935060408601359250606086013567ffffffffffffffff81111561285457600080fd5b6128608882890161255b565b9250506080860135612871816125e8565b809150509295509295909350565b600181811c9082168061289357607f821691505b6020821081036128b357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156128f8576128f86128cf565b92915050565b60608152600061291160608301866124e6565b60208301949094525060400152919050565b808201808211156128f8576128f86128cf565b600081546129438161287f565b808552602060018381168015612960576001811461297a576129a8565b60ff1985168884015283151560051b8801830195506129a8565b866000528260002060005b858110156129a05781548a8201860152908301908401612985565b890184019650505b505050505092915050565b6020815260006125256020830184612936565b6000602082840312156129d857600080fd5b5051919050565b600381106129ef576129ef61270c565b9052565b602081016128f882846129df565b601f821115610a8157600081815260208120601f850160051c81016020861015612a285750805b601f850160051c820191505b81811015612a4757828155600101612a34565b505050505050565b67ffffffffffffffff831115612a6757612a67612545565b612a7b83612a75835461287f565b83612a01565b6000601f841160018114612aaf5760008515612a975750838201355b600019600387901b1c1916600186901b178355612b09565b600083815260209020601f19861690835b82811015612ae05786850135825560209485019460019092019101612ac0565b5086821015612afd5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b84815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b60408101612b5b82856129df565b8260208301529392505050565b6060815260006060820152608060208201526000612b8960808301856124e6565b8281036040840152612b9b81856124e6565b95945050505050565b838152826020820152606060408201526000612b9b6060830184612936565b608081526000612bd660808301876124e6565b6001600160a01b03959095166020830152506040810192909252606090910152919050565b9182526001600160a01b0316602082015260400190565b600082612c2f57634e487b7160e01b600052601260045260246000fd5b500490565b828152604060208201526000612c4d6040830184612936565b949350505050565b60008251612c678184602087016124c2565b9190910192915050565b600060208284031215612c8357600080fd5b8151801515811461252557600080fdfe89e6168584e1de3ec704ff46376271b5481b0d9b2b0ef0ae102f0d001093e000f0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367d1432ca9a38d944f01b256a411861b109bc4bfe200c40d7144e919a16b86a8a8a26469706673582212202a06d0fa92a3f95d6a9047ea1427b776ee4789dc210466789df25a3645687f6364736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "6deb161233d72b9820ead801b437ebf5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"},{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_feeTimeout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_settlementTimeout\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountExceedsCap\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ArbitratorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BuyerFeeNotCoverArbitrationCosts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BuyerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BuyerOrSellerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DeadlineNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DisputeAlreadyResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GovernorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRuling\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumPaymentAmountExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSettlementProposedOrTransactionMovedOnAcceptSettlement\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSettlementProposedOrTransactionMovedOnPayFeeBuyer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSettlementProposedOrTransactionMovedOnPayFeeSeller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWaitingForBuyerFees\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotWaitingForSellerFees\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SellerFeeNotCoverArbitrationCosts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SellerOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SettlementPeriodNotOver\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TimeoutNotPassed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionDisputed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionEscalatedForArbitration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionExpired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_arbitrableDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_externalDisputeID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_templateId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_templateUri\",\"type\":\"string\"}],\"name\":\"DisputeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"}],\"name\":\"ERC20TransactionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum Party\",\"name\":\"_party\",\"type\":\"uint8\"}],\"name\":\"HasToPayFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_buyer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_seller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"}],\"name\":\"NativeTransactionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_settlementTimeout\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"ParameterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_party\",\"type\":\"address\"}],\"name\":\"Payment\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IArbitratorV2\",\"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\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum Party\",\"name\":\"_party\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SettlementProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"enum Resolution\",\"name\":\"_resolution\",\"type\":\"uint8\"}],\"name\":\"TransactionResolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AMOUNT_OF_CHOICES\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"acceptSettlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"amountCaps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitrator\",\"outputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"arbitratorExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountCap\",\"type\":\"uint256\"}],\"name\":\"changeAmountCap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IArbitratorV2\",\"name\":\"_arbitrator\",\"type\":\"address\"}],\"name\":\"changeArbitrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_arbitratorExtraData\",\"type\":\"bytes\"}],\"name\":\"changeArbitratorExtraData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_templateData\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_templateDataMappings\",\"type\":\"string\"}],\"name\":\"changeDisputeTemplate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_feeTimeout\",\"type\":\"uint256\"}],\"name\":\"changeFeeTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"}],\"name\":\"changeGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_settlementTimeout\",\"type\":\"uint256\"}],\"name\":\"changeSettlementTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"_templateRegistry\",\"type\":\"address\"}],\"name\":\"changeTemplateRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"internalType\":\"address payable\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"createERC20Transaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionID\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deadline\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_transactionUri\",\"type\":\"string\"},{\"internalType\":\"address payable\",\"name\":\"_seller\",\"type\":\"address\"}],\"name\":\"createNativeTransaction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"transactionID\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"disputeIDtoTransactionID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeTimeout\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"enum Party\",\"name\":\"_winningParty\",\"type\":\"uint8\"}],\"name\":\"getPayouts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"buyerPayout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyerPayoutToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sellerPayout\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sellerPayoutToken\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTransactionCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"pay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"payArbitrationFeeByBuyer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"payArbitrationFeeBySeller\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"proposeSettlement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountReimbursed\",\"type\":\"uint256\"}],\"name\":\"reimburse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_ruling\",\"type\":\"uint256\"}],\"name\":\"rule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"settlementTimeout\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"templateRegistry\",\"outputs\":[{\"internalType\":\"contract IDisputeTemplateRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"timeOutByBuyer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"timeOutBySeller\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transactions\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"buyer\",\"type\":\"address\"},{\"internalType\":\"address payable\",\"name\":\"seller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"settlementBuyer\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"settlementSeller\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"disputeID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"buyerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sellerFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastFeePaymentTime\",\"type\":\"uint256\"},{\"internalType\":\"enum Status\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Adapted from MultipleArbitrableTokenTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTokenTransaction.sol and from MultipleArbitrableTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTransaction.sol Note that the contract expects the tokens to have standard ERC20 behaviour. The tokens that don't conform to this type of behaviour should be filtered by the UI. Tokens should not reenter or allow recipients to refuse the transfer. Also note that arbitration fees are still paid in ETH.\",\"events\":{\"DisputeRequest(address,uint256,uint256,uint256,string)\":{\"details\":\"To be emitted when a dispute is created to link the correct meta-evidence to the disputeID.\",\"params\":{\"_arbitrableDisputeID\":\"The identifier of the dispute in the Arbitrable contract.\",\"_arbitrator\":\"The arbitrator of the contract.\",\"_externalDisputeID\":\"An identifier created outside Kleros by the protocol requesting arbitration.\",\"_templateId\":\"The identifier of the dispute template. Should not be used with _templateUri.\",\"_templateUri\":\"The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\"}},\"ERC20TransactionCreated(uint256,string,address,address,address,uint256,uint256)\":{\"details\":\"Emitted when a transaction paid in ERC20 token is created.\",\"params\":{\"_amount\":\"The initial amount in the transaction.\",\"_buyer\":\"The address of the buyer.\",\"_deadline\":\"The deadline of the transaction.\",\"_seller\":\"The address of the seller.\",\"_token\":\"The token address.\",\"_transactionID\":\"The index of the transaction.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"}},\"HasToPayFee(uint256,uint8)\":{\"details\":\"Indicate that a party has to pay a fee or would otherwise be considered as losing.\",\"params\":{\"_party\":\"The party who has to pay.\",\"_transactionID\":\"The index of the transaction.\"}},\"NativeTransactionCreated(uint256,string,address,address,uint256,uint256)\":{\"details\":\"Emitted when a transaction paid in native currency is created.\",\"params\":{\"_amount\":\"The initial amount in the transaction.\",\"_buyer\":\"The address of the buyer.\",\"_deadline\":\"The deadline of the transaction.\",\"_seller\":\"The address of the seller.\",\"_transactionID\":\"The index of the transaction.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"}},\"ParameterUpdated(uint256,uint256,bytes)\":{\"details\":\"To be emitted when Escrow parameters are updated.\"},\"Payment(uint256,uint256,address)\":{\"details\":\"To be emitted when a party pays or reimburses the other.\",\"params\":{\"_amount\":\"The amount paid.\",\"_party\":\"The party that paid.\",\"_transactionID\":\"The index of the transaction.\"}},\"Ruling(address,uint256,uint256)\":{\"details\":\"To be raised when a ruling is given.\",\"params\":{\"_arbitrator\":\"The arbitrator giving the ruling.\",\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"The ruling which was given.\"}},\"SettlementProposed(uint256,uint8,uint256)\":{\"details\":\"Emitted when a party proposes a settlement.\",\"params\":{\"_amount\":\"The amount proposed.\",\"_party\":\"The party that proposed a settlement.\",\"_transactionID\":\"The index of the transaction.\"}},\"TransactionResolved(uint256,uint8)\":{\"details\":\"To be emitted when a transaction is resolved, either by its execution, a timeout or because a ruling was enforced.\",\"params\":{\"_resolution\":\"Short description of what caused the transaction to be solved.\",\"_transactionID\":\"The ID of the respective transaction.\"}}},\"kind\":\"dev\",\"methods\":{\"acceptSettlement(uint256)\":{\"details\":\"Accept a settlement proposed by the other party.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_arbitrator\":\"The arbitrator of the contract.\",\"_arbitratorExtraData\":\"Extra data for the arbitrator.\",\"_feeTimeout\":\"Arbitration fee timeout for the parties.\",\"_settlementTimeout\":\"Settlement timeout for the parties.\",\"_templateData\":\"The dispute template data.\",\"_templateDataMappings\":\"The dispute template data mappings.\",\"_templateRegistry\":\"The dispute template registry.\"}},\"createERC20Transaction(uint256,address,uint256,string,address)\":{\"details\":\"Create a transaction.\",\"params\":{\"_amount\":\"The amount of tokens in this transaction.\",\"_deadline\":\"Time after which a party can automatically execute the arbitrable transaction.\",\"_seller\":\"The recipient of the transaction.\",\"_token\":\"The ERC20 token contract.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"},\"returns\":{\"transactionID\":\"The index of the transaction.\"}},\"createNativeTransaction(uint256,string,address)\":{\"details\":\"Create a transaction.\",\"params\":{\"_deadline\":\"Time after which a party can automatically execute the arbitrable transaction.\",\"_seller\":\"The recipient of the transaction.\",\"_transactionUri\":\"The IPFS Uri Hash of the transaction.\"},\"returns\":{\"transactionID\":\"The index of the transaction.\"}},\"executeTransaction(uint256)\":{\"details\":\"Transfer the transaction's amount to the seller if the timeout has passed.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"getPayouts(uint256,uint8)\":{\"details\":\"Get the payout depending on the winning party.The cost for the buyer is the seller payout non-inclusive of any arbitration fees.\",\"params\":{\"_transactionID\":\"The index of the transaction.\",\"_winningParty\":\"The winning party.\"},\"returns\":{\"buyerPayout\":\"The payout for the buyer.\",\"buyerPayoutToken\":\"The payout for the buyer in tokens.\",\"sellerPayout\":\"The payout for the seller.\",\"sellerPayoutToken\":\"The payout for the seller in tokens.\"}},\"getTransactionCount()\":{\"details\":\"Getter to know the count of transactions.\",\"returns\":{\"_0\":\"The count of transactions.\"}},\"pay(uint256,uint256)\":{\"details\":\"Pay seller. To be called if the good or service is provided.\",\"params\":{\"_amount\":\"Amount to pay in wei.\",\"_transactionID\":\"The index of the transaction.\"}},\"payArbitrationFeeByBuyer(uint256)\":{\"details\":\"Pay the arbitration fee to raise a dispute. To be called by the buyer. Note that it can only be called after settlement proposition. Also note that the arbitrator can have createDispute throw, which will make this function throw and therefore lead to a party being timed-out. This is not a vulnerability as the arbitrator can rule in favor of one party anyway.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"payArbitrationFeeBySeller(uint256)\":{\"details\":\"Pay the arbitration fee to raise a dispute. To be called by the seller. Note that this function mirrors payArbitrationFeeByBuyer.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"proposeSettlement(uint256,uint256)\":{\"details\":\"Propose a settlement as a compromise from the initial terms to the other party. Note that a party can only propose a settlement again after the other party has done so as well to prevent front running/griefing issues.\",\"params\":{\"_amount\":\"The settlement amount.\",\"_transactionID\":\"The index of the transaction.\"}},\"reimburse(uint256,uint256)\":{\"details\":\"Reimburse buyer. To be called if the good or service can't be fully provided.\",\"params\":{\"_amountReimbursed\":\"Amount to reimburse in wei.\",\"_transactionID\":\"The index of the transaction.\"}},\"rule(uint256,uint256)\":{\"details\":\"Give a ruling for a dispute. Must be called by the arbitrator. The purpose of this function is to ensure that the address calling it has the right to rule on the contract.\",\"params\":{\"_disputeID\":\"The identifier of the dispute in the Arbitrator contract.\",\"_ruling\":\"Ruling given by the arbitrator. Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\"}},\"timeOutByBuyer(uint256)\":{\"details\":\"Reimburse buyer if seller fails to pay the fee.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}},\"timeOutBySeller(uint256)\":{\"details\":\"Pay seller if buyer fails to pay the fee.\",\"params\":{\"_transactionID\":\"The index of the transaction.\"}}},\"title\":\"EscrowUniversal for a sale paid in native currency or ERC20 tokens without platform fees.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/EscrowUniversal.sol\":\"EscrowUniversal\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice 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);\\ninterface IArbitrableV2 {\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// 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 The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). 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).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// 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 Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// 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 Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x88b0038d226532e6cf862a485d162f7bca61ac3d361d6801146b55a240f091ac\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"src/EscrowUniversal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @authors: [@unknownunknown1, @jaybuidl]\\n/// @reviewers: []\\n/// @auditors: []\\n/// @bounties: []\\n\\npragma solidity 0.8.18;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol\\\";\\nimport \\\"@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"./libraries/SafeERC20.sol\\\";\\nimport \\\"./interfaces/IEscrow.sol\\\";\\n\\n/// @title EscrowUniversal for a sale paid in native currency or ERC20 tokens without platform fees.\\n/// @dev Adapted from MultipleArbitrableTokenTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTokenTransaction.sol\\n/// and from MultipleArbitrableTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTransaction.sol\\n/// Note that the contract expects the tokens to have standard ERC20 behaviour.\\n/// The tokens that don't conform to this type of behaviour should be filtered by the UI.\\n/// Tokens should not reenter or allow recipients to refuse the transfer.\\n/// Also note that arbitration fees are still paid in ETH.\\ncontract EscrowUniversal is IEscrow, IArbitrableV2 {\\n // Use safe transfers when both parties are paid simultaneously (save for acceptSettlement) to prevent griefing.\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant AMOUNT_OF_CHOICES = 2;\\n address public governor;\\n IArbitratorV2 public arbitrator; // Address of the arbitrator contract.\\n bytes public arbitratorExtraData; // Extra data to set up the arbitration.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n uint256 public templateId; // The current dispute template identifier.\\n uint256 public feeTimeout; // Time in seconds a party can take to pay arbitration fees before being considered unresponsive and lose the dispute.\\n uint256 public settlementTimeout; // Time in seconds a party can take to accept or propose a settlement before being considered unresponsive.\\n Transaction[] public transactions; // List of all created transactions.\\n mapping(uint256 => uint256) public disputeIDtoTransactionID; // Naps dispute ID to tx ID.\\n mapping(IERC20 => uint256) public amountCaps; // Caps the amount of the respective token for the Escrow transaction.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier shouldNotExceedCap(IERC20 _token, uint256 _amount) {\\n if (amountCaps[_token] != 0 && _amount > amountCaps[_token]) revert AmountExceedsCap();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator.\\n /// @param _templateData The dispute template data.\\n /// @param _templateDataMappings The dispute template data mappings.\\n /// @param _templateRegistry The dispute template registry.\\n /// @param _feeTimeout Arbitration fee timeout for the parties.\\n /// @param _settlementTimeout Settlement timeout for the parties.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n bytes memory _arbitratorExtraData,\\n string memory _templateData,\\n string memory _templateDataMappings,\\n IDisputeTemplateRegistry _templateRegistry,\\n uint256 _feeTimeout,\\n uint256 _settlementTimeout\\n ) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n arbitratorExtraData = _arbitratorExtraData;\\n templateRegistry = _templateRegistry;\\n feeTimeout = _feeTimeout;\\n settlementTimeout = _settlementTimeout;\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n\\n emit ParameterUpdated(_feeTimeout, _settlementTimeout, _arbitratorExtraData);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByGovernor {\\n arbitrator = _arbitrator;\\n }\\n\\n function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByGovernor {\\n arbitratorExtraData = _arbitratorExtraData;\\n emit ParameterUpdated(feeTimeout, settlementTimeout, _arbitratorExtraData);\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByGovernor {\\n templateRegistry = _templateRegistry;\\n }\\n\\n function changeDisputeTemplate(\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external onlyByGovernor {\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n function changeFeeTimeout(uint256 _feeTimeout) external onlyByGovernor {\\n feeTimeout = _feeTimeout;\\n emit ParameterUpdated(_feeTimeout, settlementTimeout, arbitratorExtraData);\\n }\\n\\n function changeSettlementTimeout(uint256 _settlementTimeout) external onlyByGovernor {\\n settlementTimeout = _settlementTimeout;\\n emit ParameterUpdated(feeTimeout, _settlementTimeout, arbitratorExtraData);\\n }\\n\\n function changeAmountCap(IERC20 _token, uint256 _amountCap) external onlyByGovernor {\\n amountCaps[_token] = _amountCap;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IEscrow\\n function createNativeTransaction(\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external payable override shouldNotExceedCap(NATIVE, msg.value) returns (uint256 transactionID) {\\n Transaction storage transaction = transactions.push();\\n transaction.buyer = payable(msg.sender);\\n transaction.seller = _seller;\\n transaction.amount = msg.value;\\n transaction.token = NATIVE;\\n transaction.deadline = _deadline;\\n\\n transactionID = transactions.length - 1;\\n\\n emit NativeTransactionCreated(\\n transactionID,\\n _transactionUri,\\n msg.sender,\\n _seller,\\n msg.value,\\n transaction.deadline\\n );\\n }\\n\\n /// @inheritdoc IEscrow\\n function createERC20Transaction(\\n uint256 _amount,\\n IERC20 _token,\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external override shouldNotExceedCap(_token, _amount) returns (uint256 transactionID) {\\n // Transfers token from sender wallet to contract.\\n if (!_token.safeTransferFrom(msg.sender, address(this), _amount)) revert TokenTransferFailed();\\n Transaction storage transaction = transactions.push();\\n transaction.buyer = payable(msg.sender);\\n transaction.seller = _seller;\\n transaction.amount = _amount;\\n transaction.token = _token;\\n transaction.deadline = _deadline;\\n\\n transactionID = transactions.length - 1;\\n\\n emit ERC20TransactionCreated(\\n transactionID,\\n _transactionUri,\\n msg.sender,\\n _seller,\\n _token,\\n _amount,\\n transaction.deadline\\n );\\n }\\n\\n /// @inheritdoc IEscrow\\n function pay(uint256 _transactionID, uint256 _amount) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.buyer != msg.sender) revert BuyerOnly();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n if (_amount > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n emit Payment(_transactionID, _amount, msg.sender);\\n\\n transaction.amount -= _amount;\\n if (transaction.amount == 0) {\\n transaction.status = Status.TransactionResolved;\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n if (transaction.token == NATIVE) {\\n transaction.seller.send(_amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, _amount)) revert TokenTransferFailed();\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function reimburse(uint256 _transactionID, uint256 _amountReimbursed) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.seller != msg.sender) revert SellerOnly();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n if (_amountReimbursed > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n emit Payment(_transactionID, _amountReimbursed, msg.sender);\\n\\n transaction.amount -= _amountReimbursed;\\n if (transaction.amount == 0) {\\n transaction.status = Status.TransactionResolved;\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n if (transaction.token == NATIVE) {\\n transaction.buyer.send(_amountReimbursed); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, _amountReimbursed)) revert TokenTransferFailed();\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function executeTransaction(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (block.timestamp < transaction.deadline) revert DeadlineNotPassed();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n\\n uint256 amount = transaction.amount;\\n transaction.amount = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (transaction.token == NATIVE) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, amount)) revert TokenTransferFailed();\\n }\\n\\n emit Payment(_transactionID, amount, msg.sender);\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n /// @inheritdoc IEscrow\\n function proposeSettlement(uint256 _transactionID, uint256 _amount) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status == Status.NoDispute && block.timestamp >= transaction.deadline)\\n revert TransactionExpired();\\n if (transaction.status >= Status.WaitingBuyer) revert TransactionEscalatedForArbitration();\\n if (_amount > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n Party party;\\n transaction.lastFeePaymentTime = block.timestamp;\\n if (transaction.status == Status.WaitingSettlementBuyer) {\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n transaction.settlementBuyer = _amount;\\n transaction.status = Status.WaitingSettlementSeller;\\n party = Party.Buyer;\\n } else if (transaction.status == Status.WaitingSettlementSeller) {\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n transaction.settlementSeller = _amount;\\n transaction.status = Status.WaitingSettlementBuyer;\\n party = Party.Seller;\\n } else {\\n if (msg.sender == transaction.buyer) {\\n transaction.settlementBuyer = _amount;\\n transaction.status = Status.WaitingSettlementSeller;\\n party = Party.Buyer;\\n } else if (msg.sender == transaction.seller) {\\n transaction.settlementSeller = _amount;\\n transaction.status = Status.WaitingSettlementBuyer;\\n party = Party.Seller;\\n } else revert BuyerOrSellerOnly();\\n }\\n emit SettlementProposed(_transactionID, party, _amount);\\n }\\n\\n /// @inheritdoc IEscrow\\n function acceptSettlement(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n uint256 settlementAmount;\\n if (transaction.status == Status.WaitingSettlementBuyer) {\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n settlementAmount = transaction.settlementSeller;\\n } else if (transaction.status == Status.WaitingSettlementSeller) {\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n settlementAmount = transaction.settlementBuyer;\\n } else revert NoSettlementProposedOrTransactionMovedOnAcceptSettlement();\\n\\n uint256 remainingAmount = transaction.amount - settlementAmount;\\n\\n transaction.amount = 0;\\n transaction.settlementBuyer = 0;\\n transaction.settlementSeller = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (transaction.token == NATIVE) {\\n // It is the users' responsibility to accept ETH.\\n transaction.buyer.send(remainingAmount);\\n transaction.seller.send(settlementAmount);\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, remainingAmount)) revert TokenTransferFailed();\\n if (!transaction.token.safeTransfer(transaction.seller, settlementAmount)) revert TokenTransferFailed();\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.SettlementReached);\\n }\\n\\n /// @inheritdoc IEscrow\\n function payArbitrationFeeByBuyer(uint256 _transactionID) external payable override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (\\n transaction.status != Status.WaitingSettlementBuyer &&\\n transaction.status != Status.WaitingSettlementSeller &&\\n transaction.status != Status.WaitingBuyer\\n ) revert NoSettlementProposedOrTransactionMovedOnPayFeeBuyer();\\n\\n // Allow the other party enough time to respond to a settlement before allowing the proposer to raise a dispute.\\n if (\\n transaction.status == Status.WaitingSettlementSeller &&\\n block.timestamp - transaction.lastFeePaymentTime < settlementTimeout\\n ) revert SettlementPeriodNotOver();\\n\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n\\n transaction.buyerFee += msg.value;\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\n if (transaction.buyerFee < arbitrationCost) revert BuyerFeeNotCoverArbitrationCosts();\\n\\n transaction.lastFeePaymentTime = block.timestamp;\\n\\n if (transaction.sellerFee < arbitrationCost) {\\n // The seller still has to pay. This can also happen if he has paid, but arbitrationCost has increased.\\n transaction.status = Status.WaitingSeller;\\n emit HasToPayFee(_transactionID, Party.Seller);\\n } else {\\n // The seller has also paid the fee. We create the dispute.\\n raiseDispute(_transactionID, arbitrationCost);\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function payArbitrationFeeBySeller(uint256 _transactionID) external payable override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (\\n transaction.status != Status.WaitingSettlementBuyer &&\\n transaction.status != Status.WaitingSettlementSeller &&\\n transaction.status != Status.WaitingSeller\\n ) revert NoSettlementProposedOrTransactionMovedOnPayFeeSeller();\\n\\n // Allow the other party enough time to respond to a settlement before allowing the proposer to raise a dispute.\\n if (\\n transaction.status == Status.WaitingSettlementBuyer &&\\n block.timestamp - transaction.lastFeePaymentTime < settlementTimeout\\n ) revert SettlementPeriodNotOver();\\n\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n\\n transaction.sellerFee += msg.value;\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\n if (transaction.sellerFee < arbitrationCost) revert SellerFeeNotCoverArbitrationCosts();\\n\\n transaction.lastFeePaymentTime = block.timestamp;\\n\\n if (transaction.buyerFee < arbitrationCost) {\\n // The buyer still has to pay. This can also happen if he has paid, but arbitrationCost has increased.\\n transaction.status = Status.WaitingBuyer;\\n emit HasToPayFee(_transactionID, Party.Buyer);\\n } else {\\n // The buyer has also paid the fee. We create the dispute.\\n raiseDispute(_transactionID, arbitrationCost);\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function timeOutByBuyer(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status != Status.WaitingSeller) revert NotWaitingForSellerFees();\\n if (block.timestamp - transaction.lastFeePaymentTime < feeTimeout) revert TimeoutNotPassed();\\n\\n uint256 amount = transaction.sellerFee;\\n transaction.sellerFee = 0;\\n\\n executeRuling(_transactionID, uint256(Party.Buyer));\\n\\n if (amount != 0) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.TimeoutByBuyer);\\n }\\n\\n /// @inheritdoc IEscrow\\n function timeOutBySeller(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status != Status.WaitingBuyer) revert NotWaitingForBuyerFees();\\n if (block.timestamp - transaction.lastFeePaymentTime < feeTimeout) revert TimeoutNotPassed();\\n\\n uint256 amount = transaction.buyerFee;\\n transaction.buyerFee = 0;\\n\\n executeRuling(_transactionID, uint256(Party.Seller));\\n\\n if (amount != 0) {\\n transaction.buyer.send(amount); // It is the user responsibility to accept ETH.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.TimeoutBySeller);\\n }\\n\\n /// @inheritdoc IArbitrableV2\\n function rule(uint256 _disputeID, uint256 _ruling) external override {\\n if (msg.sender != address(arbitrator)) revert ArbitratorOnly();\\n if (_ruling > AMOUNT_OF_CHOICES) revert InvalidRuling();\\n\\n uint256 transactionID = disputeIDtoTransactionID[_disputeID];\\n Transaction storage transaction = transactions[transactionID];\\n if (transaction.status != Status.DisputeCreated) revert DisputeAlreadyResolved();\\n\\n emit Ruling(arbitrator, _disputeID, _ruling);\\n executeRuling(transactionID, _ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Create a dispute.\\n /// @param _transactionID The index of the transaction.\\n /// @param _arbitrationCost Amount to pay the arbitrator.\\n function raiseDispute(uint256 _transactionID, uint256 _arbitrationCost) internal {\\n Transaction storage transaction = transactions[_transactionID];\\n transaction.status = Status.DisputeCreated;\\n transaction.disputeID = arbitrator.createDispute{value: _arbitrationCost}(\\n AMOUNT_OF_CHOICES,\\n arbitratorExtraData\\n );\\n disputeIDtoTransactionID[transaction.disputeID] = _transactionID;\\n emit DisputeRequest(arbitrator, transaction.disputeID, _transactionID, templateId, \\\"\\\");\\n\\n // Refund buyer if he overpaid.\\n if (transaction.buyerFee > _arbitrationCost) {\\n uint256 extraFeeBuyer = transaction.buyerFee - _arbitrationCost;\\n transaction.buyerFee = _arbitrationCost;\\n transaction.buyer.send(extraFeeBuyer); // It is the user responsibility to accept ETH.\\n }\\n\\n // Refund seller if he overpaid.\\n if (transaction.sellerFee > _arbitrationCost) {\\n uint256 extraFeeSeller = transaction.sellerFee - _arbitrationCost;\\n transaction.sellerFee = _arbitrationCost;\\n transaction.seller.send(extraFeeSeller); // It is the user responsibility to accept ETH.\\n }\\n }\\n\\n /// @dev Execute a ruling of a dispute. It reimburses the fee to the winning party.\\n /// @param _transactionID The index of the transaction.\\n /// @param _ruling Ruling given by the arbitrator. 1 : Reimburse the seller. 2 : Pay the buyer.\\n function executeRuling(uint256 _transactionID, uint256 _ruling) internal {\\n Transaction storage transaction = transactions[_transactionID];\\n address payable buyer = transaction.buyer;\\n address payable seller = transaction.seller;\\n\\n (uint256 buyerPayout, uint256 buyerPayoutToken, uint256 sellerPayout, uint256 sellerPayoutToken) = getPayouts(\\n _transactionID,\\n Party(_ruling)\\n );\\n\\n transaction.amount = 0;\\n transaction.settlementBuyer = 0;\\n transaction.settlementSeller = 0;\\n transaction.buyerFee = 0;\\n transaction.sellerFee = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (buyerPayout > 0) {\\n buyer.send(buyerPayout); // It is the user responsibility to accept ETH.\\n }\\n if (sellerPayout > 0) {\\n seller.send(sellerPayout); // It is the user responsibility to accept ETH.\\n }\\n if (buyerPayoutToken > 0) {\\n transaction.token.safeTransfer(buyer, buyerPayoutToken); // Tokens should not reenter or allow recipients to refuse the transfer.\\n }\\n if (sellerPayoutToken > 0) {\\n transaction.token.safeTransfer(seller, sellerPayoutToken); // Tokens should not reenter or allow recipients to refuse the transfer.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.RulingEnforced);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IEscrow\\n function getTransactionCount() external view override returns (uint256) {\\n return transactions.length;\\n }\\n\\n /// @dev Get the payout depending on the winning party.\\n /// @dev The cost for the buyer is the seller payout non-inclusive of any arbitration fees.\\n /// @param _transactionID The index of the transaction.\\n /// @param _winningParty The winning party.\\n /// @return buyerPayout The payout for the buyer.\\n /// @return buyerPayoutToken The payout for the buyer in tokens.\\n /// @return sellerPayout The payout for the seller.\\n /// @return sellerPayoutToken The payout for the seller in tokens.\\n function getPayouts(\\n uint256 _transactionID,\\n Party _winningParty\\n )\\n public\\n view\\n returns (uint256 buyerPayout, uint256 buyerPayoutToken, uint256 sellerPayout, uint256 sellerPayoutToken)\\n {\\n Transaction storage transaction = transactions[_transactionID];\\n uint256 amount = transaction.amount;\\n uint256 settlementBuyer = transaction.settlementBuyer;\\n uint256 settlementSeller = transaction.settlementSeller;\\n uint256 buyerFee = transaction.buyerFee;\\n uint256 sellerFee = transaction.sellerFee;\\n bool nativePayment = transaction.token == NATIVE;\\n if (_winningParty == Party.Buyer) {\\n // The Seller gets the settlement amount proposed by the Buyer if any, otherwise nothing.\\n // The Buyer gets the remaining amount of the transaction back if any.\\n // The Buyer gets the arbitration fee back.\\n uint256 settledAmount = settlementBuyer;\\n if (nativePayment) {\\n buyerPayout = buyerFee + amount - settledAmount;\\n sellerPayout = settledAmount;\\n } else {\\n buyerPayout = buyerFee;\\n buyerPayoutToken = amount - settledAmount;\\n sellerPayoutToken = settledAmount;\\n }\\n } else if (_winningParty == Party.Seller) {\\n // The Seller gets his proposed settlement amount if any, otherwise the transaction amount.\\n // The Buyer gets the remaining amount of the transaction back if any.\\n // The Seller gets the arbitration fee back.\\n uint256 settledAmount = settlementSeller != 0 ? settlementSeller : amount;\\n if (nativePayment) {\\n buyerPayout = amount - settledAmount;\\n sellerPayout = sellerFee + settledAmount;\\n } else {\\n buyerPayoutToken = amount - settledAmount;\\n sellerPayout = sellerFee;\\n sellerPayoutToken = settledAmount;\\n }\\n } else {\\n // No party wins, we split the arbitration fee and the transaction amount.\\n // The arbitration fee has been paid twice, once by the Buyer and once by the Seller in equal amount once arbitration starts.\\n // In case of an uneven token amount, one basic token unit can be burnt.\\n uint256 splitArbitrationFee = buyerFee / 2; // buyerFee equals sellerFee.\\n buyerPayout = splitArbitrationFee;\\n sellerPayout = splitArbitrationFee;\\n uint256 splitAmount = amount / 2;\\n if (nativePayment) {\\n buyerPayout += splitAmount;\\n sellerPayout += splitAmount;\\n } else {\\n buyerPayoutToken = splitAmount;\\n sellerPayoutToken = splitAmount;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x495fd1d042e051ecf1458aa9fb0c659f61022f83ee01df48c2a99ee944eca7bf\",\"license\":\"MIT\"},\"src/interfaces/IEscrow.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./Types.sol\\\";\\n\\ninterface IEscrow {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when Escrow parameters are updated.\\n event ParameterUpdated(uint256 _feeTimeout, uint256 _settlementTimeout, bytes _arbitratorExtraData);\\n\\n /// @dev To be emitted when a party pays or reimburses the other.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount The amount paid.\\n /// @param _party The party that paid.\\n event Payment(uint256 indexed _transactionID, uint256 _amount, address _party);\\n\\n /// @dev Indicate that a party has to pay a fee or would otherwise be considered as losing.\\n /// @param _transactionID The index of the transaction.\\n /// @param _party The party who has to pay.\\n event HasToPayFee(uint256 indexed _transactionID, Party _party);\\n\\n /// @dev Emitted when a party proposes a settlement.\\n /// @param _transactionID The index of the transaction.\\n /// @param _party The party that proposed a settlement.\\n /// @param _amount The amount proposed.\\n event SettlementProposed(uint256 indexed _transactionID, Party _party, uint256 _amount);\\n\\n /// @dev Emitted when a transaction paid in native currency is created.\\n /// @param _transactionID The index of the transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _buyer The address of the buyer.\\n /// @param _seller The address of the seller.\\n /// @param _amount The initial amount in the transaction.\\n /// @param _deadline The deadline of the transaction.\\n event NativeTransactionCreated(\\n uint256 indexed _transactionID,\\n string _transactionUri,\\n address indexed _buyer,\\n address indexed _seller,\\n uint256 _amount,\\n uint256 _deadline\\n );\\n\\n /// @dev Emitted when a transaction paid in ERC20 token is created.\\n /// @param _transactionID The index of the transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _buyer The address of the buyer.\\n /// @param _seller The address of the seller.\\n /// @param _token The token address.\\n /// @param _amount The initial amount in the transaction.\\n /// @param _deadline The deadline of the transaction.\\n event ERC20TransactionCreated(\\n uint256 indexed _transactionID,\\n string _transactionUri,\\n address indexed _buyer,\\n address indexed _seller,\\n IERC20 _token,\\n uint256 _amount,\\n uint256 _deadline\\n );\\n\\n /// @dev To be emitted when a transaction is resolved, either by its\\n /// execution, a timeout or because a ruling was enforced.\\n /// @param _transactionID The ID of the respective transaction.\\n /// @param _resolution Short description of what caused the transaction to be solved.\\n event TransactionResolved(uint256 indexed _transactionID, Resolution indexed _resolution);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Create a transaction.\\n /// @param _deadline Time after which a party can automatically execute the arbitrable transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _seller The recipient of the transaction.\\n /// @return transactionID The index of the transaction.\\n function createNativeTransaction(\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external payable returns (uint256 transactionID);\\n\\n /// @dev Create a transaction.\\n /// @param _amount The amount of tokens in this transaction.\\n /// @param _token The ERC20 token contract.\\n /// @param _deadline Time after which a party can automatically execute the arbitrable transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _seller The recipient of the transaction.\\n /// @return transactionID The index of the transaction.\\n function createERC20Transaction(\\n uint256 _amount,\\n IERC20 _token,\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external returns (uint256 transactionID);\\n\\n /// @dev Pay seller. To be called if the good or service is provided.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount Amount to pay in wei.\\n function pay(uint256 _transactionID, uint256 _amount) external;\\n\\n /// @dev Reimburse buyer. To be called if the good or service can't be fully provided.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amountReimbursed Amount to reimburse in wei.\\n function reimburse(uint256 _transactionID, uint256 _amountReimbursed) external;\\n\\n /// @dev Transfer the transaction's amount to the seller if the timeout has passed.\\n /// @param _transactionID The index of the transaction.\\n function executeTransaction(uint256 _transactionID) external;\\n\\n /// @dev Propose a settlement as a compromise from the initial terms to the other party.\\n /// Note that a party can only propose a settlement again after the other party has\\n /// done so as well to prevent front running/griefing issues.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount The settlement amount.\\n function proposeSettlement(uint256 _transactionID, uint256 _amount) external;\\n\\n /// @dev Accept a settlement proposed by the other party.\\n /// @param _transactionID The index of the transaction.\\n function acceptSettlement(uint256 _transactionID) external;\\n\\n /// @dev Pay the arbitration fee to raise a dispute. To be called by the buyer.\\n /// Note that it can only be called after settlement proposition.\\n /// Also note that the arbitrator can have createDispute throw, which will make\\n /// this function throw and therefore lead to a party being timed-out.\\n /// This is not a vulnerability as the arbitrator can rule in favor of one party anyway.\\n /// @param _transactionID The index of the transaction.\\n function payArbitrationFeeByBuyer(uint256 _transactionID) external payable;\\n\\n /// @dev Pay the arbitration fee to raise a dispute. To be called by the seller.\\n /// Note that this function mirrors payArbitrationFeeByBuyer.\\n /// @param _transactionID The index of the transaction.\\n function payArbitrationFeeBySeller(uint256 _transactionID) external payable;\\n\\n /// @dev Reimburse buyer if seller fails to pay the fee.\\n /// @param _transactionID The index of the transaction.\\n function timeOutByBuyer(uint256 _transactionID) external;\\n\\n /// @dev Pay seller if buyer fails to pay the fee.\\n /// @param _transactionID The index of the transaction.\\n function timeOutBySeller(uint256 _transactionID) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Getter to know the count of transactions.\\n /// @return The count of transactions.\\n function getTransactionCount() external view returns (uint256);\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error BuyerOnly();\\n error SellerOnly();\\n error BuyerOrSellerOnly();\\n error ArbitratorOnly();\\n error TransactionDisputed();\\n error MaximumPaymentAmountExceeded();\\n error DeadlineNotPassed();\\n error BuyerFeeNotCoverArbitrationCosts();\\n error SellerFeeNotCoverArbitrationCosts();\\n error NotWaitingForSellerFees();\\n error NotWaitingForBuyerFees();\\n error TimeoutNotPassed();\\n error InvalidRuling();\\n error DisputeAlreadyResolved();\\n error TransactionExpired();\\n error TransactionEscalatedForArbitration();\\n error NoSettlementProposedOrTransactionMovedOnAcceptSettlement();\\n error NoSettlementProposedOrTransactionMovedOnPayFeeBuyer();\\n error NoSettlementProposedOrTransactionMovedOnPayFeeSeller();\\n error SettlementPeriodNotOver();\\n error NotSupported();\\n error TokenTransferFailed();\\n error AmountExceedsCap();\\n}\\n\",\"keccak256\":\"0xe19b65e684577bda587a80b9a1bec15690eded03fa0e98e20c187a0a24a45e3b\",\"license\":\"MIT\"},\"src/interfaces/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport {IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\n\\nIERC20 constant NATIVE = IERC20(address(0));\\n\\nenum Party {\\n None,\\n Buyer, // Makes a purchase in native currency or ERC20 token.\\n Seller // Provides a good or service in exchange for native currency or ERC20 token.\\n}\\n\\nenum Status {\\n NoDispute,\\n WaitingSettlementBuyer,\\n WaitingSettlementSeller,\\n WaitingBuyer,\\n WaitingSeller,\\n DisputeCreated,\\n TransactionResolved\\n}\\n\\nenum Resolution {\\n TransactionExecuted,\\n TimeoutByBuyer,\\n TimeoutBySeller,\\n RulingEnforced,\\n SettlementReached\\n}\\n\\nstruct Transaction {\\n address payable buyer;\\n address payable seller;\\n uint256 amount;\\n uint256 settlementBuyer; // Settlement amount proposed by the buyer.\\n uint256 settlementSeller; // Settlement amount proposed by the seller.\\n uint256 deadline; // Timestamp at which the transaction can be automatically executed if not disputed.\\n uint256 disputeID; // If dispute exists, the ID of the dispute.\\n uint256 buyerFee; // Total fees paid by the buyer.\\n uint256 sellerFee; // Total fees paid by the seller.\\n uint256 lastFeePaymentTime; // Last time the dispute fees were paid by either party or settlement proposed.\\n Status status;\\n IERC20 token; // Token to pay the seller with.\\n}\\n\",\"keccak256\":\"0x7503e4f09724c869957761fa21f782fa79804e172257d1c35f3f73879d93e544\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\",\"keccak256\":\"0x60df38c872cae58f18d4b706251445e13542a5d9d94b9db71de02bfcaf7575ee\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608080604052346200026657620029cd8038038091620000208285620003ad565b833981019060e081830312620002665780516001600160a01b03928382169291839003620002665760208201516001600160401b03908181116200026657830182601f820112156200026657828160206200007e93519101620003f6565b9460408401518281116200026657836200009a91860162000442565b926060850151908382116200026657620000b691860162000442565b926080850151928284168403620002665760c060a0870151960151963360018060a01b0319600054161760005560018060a01b0319600154161760015587519081116200039757600254600181811c911680156200038c575b60208210146200037657601f81116200030c575b506020601f82116001146200028c57620001c695936020959383620001b394600094859162000280575b508160011b9185199060031b1c1916176002555b600380546001600160a01b031916868416179055600589905560068a90556040516312a6505d60e21b815260606004820152606481018490526080602482015297889687958693608485019062000462565b8381036003190160448501529062000462565b0393165af1908115620002745760009162000228575b50600080516020620029ad8339815191529362000215916004556040519384938452602084015260606040840152606083019062000462565b0390a160405161252390816200048a8239f35b90506020813d6020116200026b575b816200024660209383620003ad565b81010312620002665751600080516020620029ad833981519152620001dc565b600080fd5b3d915062000237565b6040513d6000823e3d90fd5b90508c0151386200014d565b601f1982169060026000528960206000209260005b818110620002f1575084600094620001c69a989460209a9894620001b39860019510620002d8575b505050811b0160025562000161565b0151861960f88460031b161c1916905538808e620002c9565b9183015184556001909301926020928301928c9201620002a1565b60026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f830160051c810191602084106200036b575b601f0160051c01905b8181106200035e575062000123565b600081556001016200034f565b909150819062000346565b634e487b7160e01b600052602260045260246000fd5b90607f16906200010f565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b038211908210176200039757604052565b60005b838110620003e55750506000910152565b8181015183820152602001620003d4565b919291906001600160401b03811162000397576040519162000423601f8301601f191660200184620003ad565b8294828452828201116200026657602062000440930190620003d1565b565b9080601f83011215620002665781516200045f92602001620003f6565b90565b906020916200047d81518092818552858086019101620003d1565b601f01601f191601019056fe60806040908082526004918236101561001757600080fd5b600091823560e01c9081630c340a2414611e60575080630c7ac7b614611d7c5780631bd1823a14611b5f5780632a7027de14611a2b5780632be6d0051461184e5780632e0b6422146118335780632e7700f0146118155780632fbe3b03146117ed578063311a6c561461160d57806334e2672d146114515780633bf547241461125c578063441080fe1461123e5780634660ebbe146111f35780636cc6cde1146111cb5780637aa77f29146111ad578063871fbf861461116557806393ee267814610fb15780639ace38c214610ed5578063a0af81f014610ead578063b2b9679214610cc5578063b329036b14610ca7578063c5d5528814610b8f578063cb44c3fa14610b31578063d2b8ae9c14610ae2578063e3f07e90146108ca578063e4c0aaf414610880578063e77d0bd31461064e578063e98c579b146105db578063ee22610b14610498578063ef48eee61461038b578063f05a59f914610354578063fc548f08146102f45763fe43a9921461019057600080fd5b346102f05761019e36611f9c565b9190936101aa85611fb2565b5060018101546001600160a01b039391929190841633036102e357600a830196875460ff811660078110156102d0576102c1576002850180548089116102b1578451898152336020820152999a8b9a899591948c94929390929161022a918d9186906000805160206124ce8339815191529080604081015b0390a26120a5565b8091551561028e575b5050505460081c16801560001461026557505050839283928392541682821561025c575bf15080f35b506108fc610257565b91955093919261027793541690612400565b1561028157505080f35b5163022e258160e11b8152fd5b60ff1916600617835560008051602061248e8339815191528280a3873880610233565b84516305aafecf60e01b81528690fd5b505051634e22597f60e11b8152fd5b634e487b7160e01b895260218552602489fd5b51635800797f60e11b8152fd5b5080fd5b5082346103505760203660031901126103505780356001600160a01b03818116939184900361034c57845416330361033f575050600180546001600160a01b03191691909117905580f35b5163c383977560e01b8152fd5b8480fd5b8280fd5b50346102f05760203660031901126102f05760209181906001600160a01b0361037b611fe7565b1681526009845220549051908152f35b50346102f05761039a36611f9c565b9190936103a685611fb2565b5080546001600160a01b0393919291908416330361048b57600a830196875460ff811660078110156102d0576102c1576002850180548089116102b1578451898152336020820152999a8b9a899591948c94929390929161041f918d9186906000805160206124ce833981519152908060408101610222565b80915515610468575b5050505460081c16801560001461045357505050839283926001849301541682821561025c57f15080f35b91955093919260016102779401541690612400565b60ff1916600617835560008051602061248e8339815191528280a3873880610428565b5163e2bc376b60e01b8152fd5b50346102f05760203660031901126102f0578235906104b682611fb2565b50600581015442106105cb57600a81019081549560ff871660078110156105b8576105aa576002820180549087905560ff19909716600617928390556001600160a01b039260081c83168061056957505085849386808080809b6000805160206124ce83398151915298600161054899015416828215610560575bf1505b519081523360208201529081906040820190565b0390a260008051602061248e8339815191528280a380f35b506108fc610531565b879193600161057b9401541690612400565b1561059c57506000805160206124ce83398151915261054884958493610534565b905163022e258160e11b8152fd5b8351634e22597f60e11b8152fd5b634e487b7160e01b875260218252602487fd5b81516302eb354360e41b81528590fd5b50829034610350576020366003190112610350578254823592906001600160a01b0316330361064057509060606000805160206124ae833981519152928260065560055492815193845260208401528201528061063a60608201611ffd565b0390a180f35b905163c383977560e01b8152fd5b50346102f05760203660031901126102f05782359061066c82611fb2565b509060ff600a83015416600781101561086d57850361085e576106936009830154426120a5565b6005541161084f57508260019394600883019082825492556106b485611fb2565b5090868060a01b039182815416838983015416908687809581956106d78d611fb2565b506002810154906003810154998b600a600784015493015460081c1615600014610831575091846107148b61070f600a9584976120c8565b6120a5565b9a945b8160028401558160038401558201558260078201558260088201550197600660ff198a54161789558581158015610810575b5050505084811580156107ef575b50505050806107d7575b505083826107bf575b5050505060008051602061248e83398151915293600386868680a38215928315610798575b5050505080a380f35b849384938985940154169083906107b6575bf150833880808061078f565b506108fc6107aa565b6107cd935460081c16612400565b503880808361076a565b6107e79186865460081c16612400565b503880610761565b8392839283928390610807575bf15087388481610757565b506108fc6107fc565b8392839283928390610828575bf15081388581610749565b506108fc61081d565b9398508995509184610848600a939b82959c6120a5565b9699610717565b51634799187b60e01b81528490fd5b51638225aba560e01b81528490fd5b634e487b7160e01b855260218652602485fd5b50829034610350576020366003190112610350576001600160a01b0382358181169391929084900361034c57845492339084160361033f5750506001600160a01b03191617815580f35b508290346103505760a0366003190112610350576001600160a01b03602435818116908435828203610ade5760443590606435976001600160401b03988981116102f05761091b9036908a01611f50565b936084359687168097036102f05785825260209960098b52888320548015159081610ad4575b50610ac45788516323b872dd60e01b8c8201908152336024830152306044830152606480830187905282529160a0820190811182821017610ab1578a52518391829190828a5af16109906123b8565b81610a81575b5015610a7157600584916109a8612082565b5080546001600160a01b0319908116331782556001820180549091168b17905560028101869055600a81018054610100600160a81b03191660089390931b610100600160a81b0316929092179091550155600754600019810198908911610a5e575050917fb96ca2c0c34e2ad6384277748b8101f4bddc3cbeaad7086e59cd315bd19aa8c5918793610a44885193608085526080850190611ef5565b958a8401528783015260608201528033940390a451908152f35b634e487b7160e01b825260119052602490fd5b875163022e258160e11b81528990fd5b8051801592508c908315610a99575b5050508b610996565b610aa993508201810191016123e8565b8b8b81610a90565b634e487b7160e01b855260418c52602485fd5b8851631d9c3dff60e31b81528a90fd5b905084118c610941565b8680fd5b508234610350578160031936011261035057610afc611fe7565b83546001600160a01b03929083163303610b23575016825260096020526024359082205580f35b835163c383977560e01b8152fd5b50829034610350576020366003190112610350578254823592906001600160a01b0316330361064057509060606000805160206124ae8339815191529282600555600654815193845260208401528201528061063a60608201611ffd565b508234610350576003198281360112610ca3576001600160401b038235818111610c9f57610bc09036908501611f50565b90602435908111610c9f57610bd89036908501611f50565b85549091906001600160a01b039081163303610c8f5790610c2f87602094936003541692610c3e8951978896879586946312a6505d60e21b865260608d870152866064870152608060248701526084860190611ef5565b91848303016044850152611ef5565b03925af1928315610c8657508392610c5557505580f35b9091506020813d8211610c7e575b81610c7060209383611ebe565b810103126103505751905580f35b3d9150610c63565b513d85823e3d90fd5b855163c383977560e01b81528590fd5b8580fd5b8380fd5b50346102f057816003193601126102f0576020906005549051908152f35b50346102f057610cd436611f9c565b610cdf829392611fb2565b50600a8101805460ff8116926007841015610e9a57831580610e8c575b610e7c576003841015610e6c5788600292838301548711610e5d578690426009850155600196878114600014610db357505082546001600160a01b031633039150610da3905057600301849055815460ff1916179055905b8251916003811015610d90577f10c8b22b69e324b0227c6adfa65183c771304c11385423e93ce99779a7483dbf9495965082526020820152a280f35b634e487b7160e01b865260218752602486fd5b855163e2bc376b60e01b81528990fd5b9496949293928703610df6575050808301546001600160a01b03163303610de75701849055815460ff191617905590610d54565b508551635800797f60e11b8152fd5b8254949694919390916001600160a01b03903390821603610e275750505060030155815460ff191617905590610d54565b909291935086829795970154163314600014610e4e570185905560ff191617905590610d54565b50865163351c18ff60e21b8152fd5b5086516305aafecf60e01b8152fd5b8551630d71592960e31b81528990fd5b85516338e5e54b60e21b81528990fd5b506005810154421015610cfc565b634e487b7160e01b885260218952602488fd5b50346102f057816003193601126102f05760035490516001600160a01b039091168152602090f35b50346102f05760203660031901126102f057823560075481101561035057610efc90611fb2565b5090600160a01b60019003918281541693836001830154169160028101546003820154888301546005840154600685015491600786015493600887015495600988015497600a01549a60ff8c169a81519e8f908152602001528d015260608c015260808b015260a08a015260c089015260e08801526101008701526101208601526007821015610f9e5750610180945061014084015260081c16610160820152f35b634e487b7160e01b815260218652602490fd5b5082903461035057602036600319011261035057813590610fd182611fb2565b50600a810180549160ff831660078110156111525760018103611108575080546001600160a01b031633036110f8579081868894930154925b600660028301918661101d8785546120a5565b93556003840187905589840187905560ff1916178084556001600160a01b03939060081c84168061109d57505084955091600182868080808099979887829a5416828215611094575bf15001541682821561108b575bf1505b60008051602061248e8339815191528380a380f35b506108fc611073565b506108fc611066565b83959650846110b0939294541690612400565b156110e857906001816110ce9594935460081c169201541690612400565b156110d95750611076565b5163022e258160e11b81529050fd5b845163022e258160e11b81528790fd5b835163e2bc376b60e01b81528690fd5b6002036111425760018101546001600160a01b03163303611132579081600388949301549261100a565b8351635800797f60e11b81528690fd5b8351630a7b6ec160e01b81528690fd5b634e487b7160e01b885260218752602488fd5b5082346103505781600319360112610350576024359260038410156111aa57506080926111929135612292565b92939091815194855260208501528301526060820152f35b80fd5b50823461035057826003193601126103505760209250549051908152f35b50346102f057816003193601126102f05760015490516001600160a01b039091168152602090f35b5082346103505760203660031901126103505780356001600160a01b03818116939184900361034c57845416330361033f575050600380546001600160a01b03191691909117905580f35b50346102f057816003193601126102f0576020906006549051908152f35b508290602080600319360112610ca35782359161127883611fb2565b50600a81019060ff82541660078110158061143e5760018214918215908161142f575b828261140b575b50506113fb5761115257806113e3575b6113d35760018101546001600160a01b039690871633036113c55760088201966112dd3489546120c8565b8098556001541696858551809963f7434ea960e01b82528285830152818061130760248201611ffd565b03915afa9788156113bb578998611388575b50871161137a57504260098201556007015485111561136a577fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b5939450600360ff198254161790555160018152a280f35b50505090611377916120d5565b80f35b835163818d938f60e01b8152fd5b9097508581813d83116113b4575b6113a08183611ebe565b810103126113b057519689611319565b8880fd5b503d611396565b85513d8b823e3d90fd5b8351635800797f60e11b8152fd5b8251630627cd6b60e01b81528690fd5b506113f26009820154426120a5565b600654116112b2565b845163365105ef60e11b81528890fd5b90915061141c578814158a826112a2565b634e487b7160e01b8a526021895260248afd5b8a92506002811415915061129b565b634e487b7160e01b895260218852602489fd5b50346102f05760209081600319360112610350578335936001600160401b039081861161034c573660238701121561034c578581013591821161034c5760249036828489010111610c9f5785546001600160a01b03163303610b2357506114b9600254611e84565b601f81116115c9575b508495601f831160011461154d57918160809493828094899a6000805160206124ae8339815191529a92611540575b50508360011b906000198560031b1c1916176002555b6060600554956006548151998a98895288015286015282606086015201848401378181018301869052601f01601f19168101030190a180f35b83010135905082386114f1565b60028652848620601f198416875b8181106115b05750918493916000805160206124ae833981519152989985608098979510611594575b5050600183811b01600255611507565b8201830135600019600386901b60f8161c191690553880611584565b838a01850135835598870198600190920191870161155b565b60028652848620601f840160051c810191868510611603575b601f0160051c01905b8181106115f857506114c2565b8681556001016115eb565b90915081906115e2565b50346102f05761161c36611f9c565b6001546001600160a01b0392908316338190036117dd57600283116117cd578186526008602052848620549460ff600a61165588611fb2565b500154166007811015610e9a576005036117be5760207f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769151858152a361169b83611fb2565b509180835416816001850154169260038110156117ab5790868080996003996116c8600a9897968b612292565b9a929b91969094816002840155818f8401558201558260078201558260088201550198600660ff198b5416178a55858115801561178a575b505050508581158015611769575b5050505080611751575b505082611739575b5050505060008051602061248e8339815191528380a380f35b611747935460081c16612400565b5038808080611720565b6117619183875460081c16612400565b503880611718565b8392839283928390611781575bf1508838858161170e565b506108fc611776565b83928392839283906117a2575bf15081388581611700565b506108fc611797565b634e487b7160e01b875260218852602487fd5b5163f10068b560e01b81528790fd5b84516309efd47960e41b81528790fd5b8451630955f84760e31b81528790fd5b5082346103505760203660031901126103505760209282913581526008845220549051908152f35b50346102f057816003193601126102f0576020906007549051908152f35b50346102f057816003193601126102f0576020905160028152f35b508290602080600319360112610ca35782359161186a83611fb2565b5093600a85019060ff825416600781101580611a0b57600182141580611a1e575b81816119fa575b506119ea576119d757600214806119bf575b6119b15785546001600160a01b039690871633036119a25760078101966118cc3489546120c8565b8098556001541696858551809963f7434ea960e01b8252828683015281806118f660248201611ffd565b03915afa9788156113bb578998611973575b5087116119645742600982015560080154861115611956577fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b594955060ff198254161790555160028152a280f35b5050505090611377916120d5565b508251631a48f3db60e11b8152fd5b9097508581813d831161199b575b61198b8183611ebe565b810103126113b057519689611908565b503d611981565b50825163e2bc376b60e01b8152fd5b8251630627cd6b60e01b8152fd5b506119ce6009870154426120a5565b600654116118a4565b634e487b7160e01b885260218252602488fd5b845163376af24960e21b81528390fd5b9050611a0b57600382141581611892565b634e487b7160e01b895260218352602489fd5b505087600282141561188b565b5060603660031901126102f05782356024356001600160401b038111610ca357611a589036908601611f50565b6044356001600160a01b03811692919083900361034c578480526009602052838520548015159081611b55575b50611b4557816005611a95612082565b5080546001600160a01b03199081163317825560018201805490911687179055346002820155600a81018054610100600160a81b03191690550155600754600019810195908611611b325750602095507f0a7ca50c43ec865fdc8519822762f88432e18409024b9c036d6507b9c8f79d808591611b1c865191606083526060830190611ef5565b933489830152868201528033940390a451908152f35b634e487b7160e01b815260118752602490fd5b8351631d9c3dff60e31b81528690fd5b9050341138611a85565b50346102f05760203660031901126102f057823590611b7d82611fb2565b509060ff600a83015416600781101561086d57600303611d6d57611ba56009830154426120a5565b6005541161084f5750826002939460078301908282549255611bc685611fb2565b50805460018201546001600160a01b039386938493928616928616918491829190611bf08d611fb2565b50978e890154838a0154918b600a60088d01549c015460081c161592801515600014611d6557925b15611d4757509184611c3783611c31600a9584976120a5565b9c6120c8565b945b600282908401558160038401558201558260078201558260088201550197600660ff198a54161789558581158015611d26575b505050508481158015611d05575b5050505080611ced575b50508382611cd5575b5050505060008051602061248e83398151915293600386868680a38215928315611cba575050505080a380f35b84938493849354169083906107b657f150833880808061078f565b611ce3935460081c16612400565b5038808083611c8d565b611cfd9186865460081c16612400565b503880611c84565b8392839283928390611d1d575bf15087388481611c7a565b506108fc611d12565b8392839283928390611d3e575bf15081388581611c6c565b506108fc611d33565b999550819398509184611d5d600a9382956120a5565b969499611c39565b508192611c18565b51635ed7670b60e11b81528490fd5b50346102f057816003193601126102f05780519082600254611d9d81611e84565b80855290600190818116908115611e385750600114611ddf575b505050611dc982611ddb940383611ebe565b51918291602083526020830190611ef5565b0390f35b60028352602095507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410611e255750505082611ddb94611dc99282010194611db7565b8054868501880152928601928101611e09565b611ddb9750611dc99450602092508693915060ff191682840152151560051b82010194611db7565b8390346102f057816003193601126102f05790546001600160a01b03168152602090f35b90600182811c92168015611eb4575b6020831014611e9e57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611e93565b90601f801991011681019081106001600160401b03821117611edf57604052565b634e487b7160e01b600052604160045260246000fd5b919082519283825260005b848110611f21575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201611f00565b6001600160401b038111611edf57601f01601f191660200190565b81601f82011215611f9757803590611f6782611f35565b92611f756040519485611ebe565b82845260208383010111611f9757816000926020809301838601378301015290565b600080fd5b6040906003190112611f97576004359060243590565b600754811015611fd1576007600052600b602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b600435906001600160a01b0382168203611f9757565b6002546000929161200d82611e84565b908181526001928381169081600014612067575060011461202d57505050565b9092935060026000526020928360002092846000945b8386106120535750505050010190565b805485870183015294019385908201612043565b91935050602093945060ff191683830152151560051b010190565b600754600160401b811015611edf578060016120a19201600755611fb2565b9091565b919082039182116120b257565b634e487b7160e01b600052601160045260246000fd5b919082018092116120b257565b906120df82611fb2565b50600a8101805460ff191660051790556001546040805163c13517e160e01b815260026004820152602481018290526001600160a01b03956020939192909184908490891681898161213360448201611ffd565b03925af192831561228757600093612238575b507f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186916060608092600688019580875560005260088752828160002055896001541695549660045490825194855284015282015260006060820152a36007810180549083808311612204575b50505060088101918254928184116121cc575b5050505050565b6000946001869594846121e288979688976120a5565b94550154168282156121fb575bf15038808080806121c5565b506108fc6121ef565b60008093928261221783959484956120a5565b91558786541682821561222f575bf1503880836121b2565b506108fc612225565b90928482813d8311612280575b61224f8183611ebe565b810103126111aa575051917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186612146565b503d612245565b50513d6000823e3d90fd5b9160009260009283806122a58294611fb2565b50926002840154936003810154986004820154600783015495600884015493600a60018060a01b0391015460081c16159460038110156123a4576001810361231a575050505050600014612306575061070f6123029287926120c8565b9391565b93925085945094612316916120a5565b9290565b939b509396959194509291600203612371575050801561236957925b1561235357509061234a81612350936120a5565b956120c8565b91565b9594508193925090612364916120a5565b929190565b508192612336565b93985050505060011c8095819060011c9260001461239857509061234a81612350936120c8565b93925094508093509290565b634e487b7160e01b82526021600452602482fd5b3d156123e3573d906123c982611f35565b916123d76040519384611ebe565b82523d6000602084013e565b606090565b90816020910312611f9757518015158103611f975790565b60405163a9059cbb60e01b602082019081526001600160a01b0393841660248301526044808301959095529381529192608083016001600160401b03811184821017611edf57600094859485926040525193165af161245d6123b8565b81612466575090565b805180159250821561247757505090565b61248a92506020809183010191016123e8565b9056fe89e6168584e1de3ec704ff46376271b5481b0d9b2b0ef0ae102f0d001093e000f0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367d1432ca9a38d944f01b256a411861b109bc4bfe200c40d7144e919a16b86a8a8a264697066735822122084f0b8811ddbe49725054dc07fa63a7054cfd271c5daad6a7de8eb0c117676a564736f6c63430008120033f0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367", + "deployedBytecode": "0x60806040908082526004918236101561001757600080fd5b600091823560e01c9081630c340a2414611e60575080630c7ac7b614611d7c5780631bd1823a14611b5f5780632a7027de14611a2b5780632be6d0051461184e5780632e0b6422146118335780632e7700f0146118155780632fbe3b03146117ed578063311a6c561461160d57806334e2672d146114515780633bf547241461125c578063441080fe1461123e5780634660ebbe146111f35780636cc6cde1146111cb5780637aa77f29146111ad578063871fbf861461116557806393ee267814610fb15780639ace38c214610ed5578063a0af81f014610ead578063b2b9679214610cc5578063b329036b14610ca7578063c5d5528814610b8f578063cb44c3fa14610b31578063d2b8ae9c14610ae2578063e3f07e90146108ca578063e4c0aaf414610880578063e77d0bd31461064e578063e98c579b146105db578063ee22610b14610498578063ef48eee61461038b578063f05a59f914610354578063fc548f08146102f45763fe43a9921461019057600080fd5b346102f05761019e36611f9c565b9190936101aa85611fb2565b5060018101546001600160a01b039391929190841633036102e357600a830196875460ff811660078110156102d0576102c1576002850180548089116102b1578451898152336020820152999a8b9a899591948c94929390929161022a918d9186906000805160206124ce8339815191529080604081015b0390a26120a5565b8091551561028e575b5050505460081c16801560001461026557505050839283928392541682821561025c575bf15080f35b506108fc610257565b91955093919261027793541690612400565b1561028157505080f35b5163022e258160e11b8152fd5b60ff1916600617835560008051602061248e8339815191528280a3873880610233565b84516305aafecf60e01b81528690fd5b505051634e22597f60e11b8152fd5b634e487b7160e01b895260218552602489fd5b51635800797f60e11b8152fd5b5080fd5b5082346103505760203660031901126103505780356001600160a01b03818116939184900361034c57845416330361033f575050600180546001600160a01b03191691909117905580f35b5163c383977560e01b8152fd5b8480fd5b8280fd5b50346102f05760203660031901126102f05760209181906001600160a01b0361037b611fe7565b1681526009845220549051908152f35b50346102f05761039a36611f9c565b9190936103a685611fb2565b5080546001600160a01b0393919291908416330361048b57600a830196875460ff811660078110156102d0576102c1576002850180548089116102b1578451898152336020820152999a8b9a899591948c94929390929161041f918d9186906000805160206124ce833981519152908060408101610222565b80915515610468575b5050505460081c16801560001461045357505050839283926001849301541682821561025c57f15080f35b91955093919260016102779401541690612400565b60ff1916600617835560008051602061248e8339815191528280a3873880610428565b5163e2bc376b60e01b8152fd5b50346102f05760203660031901126102f0578235906104b682611fb2565b50600581015442106105cb57600a81019081549560ff871660078110156105b8576105aa576002820180549087905560ff19909716600617928390556001600160a01b039260081c83168061056957505085849386808080809b6000805160206124ce83398151915298600161054899015416828215610560575bf1505b519081523360208201529081906040820190565b0390a260008051602061248e8339815191528280a380f35b506108fc610531565b879193600161057b9401541690612400565b1561059c57506000805160206124ce83398151915261054884958493610534565b905163022e258160e11b8152fd5b8351634e22597f60e11b8152fd5b634e487b7160e01b875260218252602487fd5b81516302eb354360e41b81528590fd5b50829034610350576020366003190112610350578254823592906001600160a01b0316330361064057509060606000805160206124ae833981519152928260065560055492815193845260208401528201528061063a60608201611ffd565b0390a180f35b905163c383977560e01b8152fd5b50346102f05760203660031901126102f05782359061066c82611fb2565b509060ff600a83015416600781101561086d57850361085e576106936009830154426120a5565b6005541161084f57508260019394600883019082825492556106b485611fb2565b5090868060a01b039182815416838983015416908687809581956106d78d611fb2565b506002810154906003810154998b600a600784015493015460081c1615600014610831575091846107148b61070f600a9584976120c8565b6120a5565b9a945b8160028401558160038401558201558260078201558260088201550197600660ff198a54161789558581158015610810575b5050505084811580156107ef575b50505050806107d7575b505083826107bf575b5050505060008051602061248e83398151915293600386868680a38215928315610798575b5050505080a380f35b849384938985940154169083906107b6575bf150833880808061078f565b506108fc6107aa565b6107cd935460081c16612400565b503880808361076a565b6107e79186865460081c16612400565b503880610761565b8392839283928390610807575bf15087388481610757565b506108fc6107fc565b8392839283928390610828575bf15081388581610749565b506108fc61081d565b9398508995509184610848600a939b82959c6120a5565b9699610717565b51634799187b60e01b81528490fd5b51638225aba560e01b81528490fd5b634e487b7160e01b855260218652602485fd5b50829034610350576020366003190112610350576001600160a01b0382358181169391929084900361034c57845492339084160361033f5750506001600160a01b03191617815580f35b508290346103505760a0366003190112610350576001600160a01b03602435818116908435828203610ade5760443590606435976001600160401b03988981116102f05761091b9036908a01611f50565b936084359687168097036102f05785825260209960098b52888320548015159081610ad4575b50610ac45788516323b872dd60e01b8c8201908152336024830152306044830152606480830187905282529160a0820190811182821017610ab1578a52518391829190828a5af16109906123b8565b81610a81575b5015610a7157600584916109a8612082565b5080546001600160a01b0319908116331782556001820180549091168b17905560028101869055600a81018054610100600160a81b03191660089390931b610100600160a81b0316929092179091550155600754600019810198908911610a5e575050917fb96ca2c0c34e2ad6384277748b8101f4bddc3cbeaad7086e59cd315bd19aa8c5918793610a44885193608085526080850190611ef5565b958a8401528783015260608201528033940390a451908152f35b634e487b7160e01b825260119052602490fd5b875163022e258160e11b81528990fd5b8051801592508c908315610a99575b5050508b610996565b610aa993508201810191016123e8565b8b8b81610a90565b634e487b7160e01b855260418c52602485fd5b8851631d9c3dff60e31b81528a90fd5b905084118c610941565b8680fd5b508234610350578160031936011261035057610afc611fe7565b83546001600160a01b03929083163303610b23575016825260096020526024359082205580f35b835163c383977560e01b8152fd5b50829034610350576020366003190112610350578254823592906001600160a01b0316330361064057509060606000805160206124ae8339815191529282600555600654815193845260208401528201528061063a60608201611ffd565b508234610350576003198281360112610ca3576001600160401b038235818111610c9f57610bc09036908501611f50565b90602435908111610c9f57610bd89036908501611f50565b85549091906001600160a01b039081163303610c8f5790610c2f87602094936003541692610c3e8951978896879586946312a6505d60e21b865260608d870152866064870152608060248701526084860190611ef5565b91848303016044850152611ef5565b03925af1928315610c8657508392610c5557505580f35b9091506020813d8211610c7e575b81610c7060209383611ebe565b810103126103505751905580f35b3d9150610c63565b513d85823e3d90fd5b855163c383977560e01b81528590fd5b8580fd5b8380fd5b50346102f057816003193601126102f0576020906005549051908152f35b50346102f057610cd436611f9c565b610cdf829392611fb2565b50600a8101805460ff8116926007841015610e9a57831580610e8c575b610e7c576003841015610e6c5788600292838301548711610e5d578690426009850155600196878114600014610db357505082546001600160a01b031633039150610da3905057600301849055815460ff1916179055905b8251916003811015610d90577f10c8b22b69e324b0227c6adfa65183c771304c11385423e93ce99779a7483dbf9495965082526020820152a280f35b634e487b7160e01b865260218752602486fd5b855163e2bc376b60e01b81528990fd5b9496949293928703610df6575050808301546001600160a01b03163303610de75701849055815460ff191617905590610d54565b508551635800797f60e11b8152fd5b8254949694919390916001600160a01b03903390821603610e275750505060030155815460ff191617905590610d54565b909291935086829795970154163314600014610e4e570185905560ff191617905590610d54565b50865163351c18ff60e21b8152fd5b5086516305aafecf60e01b8152fd5b8551630d71592960e31b81528990fd5b85516338e5e54b60e21b81528990fd5b506005810154421015610cfc565b634e487b7160e01b885260218952602488fd5b50346102f057816003193601126102f05760035490516001600160a01b039091168152602090f35b50346102f05760203660031901126102f057823560075481101561035057610efc90611fb2565b5090600160a01b60019003918281541693836001830154169160028101546003820154888301546005840154600685015491600786015493600887015495600988015497600a01549a60ff8c169a81519e8f908152602001528d015260608c015260808b015260a08a015260c089015260e08801526101008701526101208601526007821015610f9e5750610180945061014084015260081c16610160820152f35b634e487b7160e01b815260218652602490fd5b5082903461035057602036600319011261035057813590610fd182611fb2565b50600a810180549160ff831660078110156111525760018103611108575080546001600160a01b031633036110f8579081868894930154925b600660028301918661101d8785546120a5565b93556003840187905589840187905560ff1916178084556001600160a01b03939060081c84168061109d57505084955091600182868080808099979887829a5416828215611094575bf15001541682821561108b575bf1505b60008051602061248e8339815191528380a380f35b506108fc611073565b506108fc611066565b83959650846110b0939294541690612400565b156110e857906001816110ce9594935460081c169201541690612400565b156110d95750611076565b5163022e258160e11b81529050fd5b845163022e258160e11b81528790fd5b835163e2bc376b60e01b81528690fd5b6002036111425760018101546001600160a01b03163303611132579081600388949301549261100a565b8351635800797f60e11b81528690fd5b8351630a7b6ec160e01b81528690fd5b634e487b7160e01b885260218752602488fd5b5082346103505781600319360112610350576024359260038410156111aa57506080926111929135612292565b92939091815194855260208501528301526060820152f35b80fd5b50823461035057826003193601126103505760209250549051908152f35b50346102f057816003193601126102f05760015490516001600160a01b039091168152602090f35b5082346103505760203660031901126103505780356001600160a01b03818116939184900361034c57845416330361033f575050600380546001600160a01b03191691909117905580f35b50346102f057816003193601126102f0576020906006549051908152f35b508290602080600319360112610ca35782359161127883611fb2565b50600a81019060ff82541660078110158061143e5760018214918215908161142f575b828261140b575b50506113fb5761115257806113e3575b6113d35760018101546001600160a01b039690871633036113c55760088201966112dd3489546120c8565b8098556001541696858551809963f7434ea960e01b82528285830152818061130760248201611ffd565b03915afa9788156113bb578998611388575b50871161137a57504260098201556007015485111561136a577fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b5939450600360ff198254161790555160018152a280f35b50505090611377916120d5565b80f35b835163818d938f60e01b8152fd5b9097508581813d83116113b4575b6113a08183611ebe565b810103126113b057519689611319565b8880fd5b503d611396565b85513d8b823e3d90fd5b8351635800797f60e11b8152fd5b8251630627cd6b60e01b81528690fd5b506113f26009820154426120a5565b600654116112b2565b845163365105ef60e11b81528890fd5b90915061141c578814158a826112a2565b634e487b7160e01b8a526021895260248afd5b8a92506002811415915061129b565b634e487b7160e01b895260218852602489fd5b50346102f05760209081600319360112610350578335936001600160401b039081861161034c573660238701121561034c578581013591821161034c5760249036828489010111610c9f5785546001600160a01b03163303610b2357506114b9600254611e84565b601f81116115c9575b508495601f831160011461154d57918160809493828094899a6000805160206124ae8339815191529a92611540575b50508360011b906000198560031b1c1916176002555b6060600554956006548151998a98895288015286015282606086015201848401378181018301869052601f01601f19168101030190a180f35b83010135905082386114f1565b60028652848620601f198416875b8181106115b05750918493916000805160206124ae833981519152989985608098979510611594575b5050600183811b01600255611507565b8201830135600019600386901b60f8161c191690553880611584565b838a01850135835598870198600190920191870161155b565b60028652848620601f840160051c810191868510611603575b601f0160051c01905b8181106115f857506114c2565b8681556001016115eb565b90915081906115e2565b50346102f05761161c36611f9c565b6001546001600160a01b0392908316338190036117dd57600283116117cd578186526008602052848620549460ff600a61165588611fb2565b500154166007811015610e9a576005036117be5760207f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769151858152a361169b83611fb2565b509180835416816001850154169260038110156117ab5790868080996003996116c8600a9897968b612292565b9a929b91969094816002840155818f8401558201558260078201558260088201550198600660ff198b5416178a55858115801561178a575b505050508581158015611769575b5050505080611751575b505082611739575b5050505060008051602061248e8339815191528380a380f35b611747935460081c16612400565b5038808080611720565b6117619183875460081c16612400565b503880611718565b8392839283928390611781575bf1508838858161170e565b506108fc611776565b83928392839283906117a2575bf15081388581611700565b506108fc611797565b634e487b7160e01b875260218852602487fd5b5163f10068b560e01b81528790fd5b84516309efd47960e41b81528790fd5b8451630955f84760e31b81528790fd5b5082346103505760203660031901126103505760209282913581526008845220549051908152f35b50346102f057816003193601126102f0576020906007549051908152f35b50346102f057816003193601126102f0576020905160028152f35b508290602080600319360112610ca35782359161186a83611fb2565b5093600a85019060ff825416600781101580611a0b57600182141580611a1e575b81816119fa575b506119ea576119d757600214806119bf575b6119b15785546001600160a01b039690871633036119a25760078101966118cc3489546120c8565b8098556001541696858551809963f7434ea960e01b8252828683015281806118f660248201611ffd565b03915afa9788156113bb578998611973575b5087116119645742600982015560080154861115611956577fc74b9f7dedf2887cd3c113b6d8da9cea19e55c1116e25f1f0e1b72d7543179b594955060ff198254161790555160028152a280f35b5050505090611377916120d5565b508251631a48f3db60e11b8152fd5b9097508581813d831161199b575b61198b8183611ebe565b810103126113b057519689611908565b503d611981565b50825163e2bc376b60e01b8152fd5b8251630627cd6b60e01b8152fd5b506119ce6009870154426120a5565b600654116118a4565b634e487b7160e01b885260218252602488fd5b845163376af24960e21b81528390fd5b9050611a0b57600382141581611892565b634e487b7160e01b895260218352602489fd5b505087600282141561188b565b5060603660031901126102f05782356024356001600160401b038111610ca357611a589036908601611f50565b6044356001600160a01b03811692919083900361034c578480526009602052838520548015159081611b55575b50611b4557816005611a95612082565b5080546001600160a01b03199081163317825560018201805490911687179055346002820155600a81018054610100600160a81b03191690550155600754600019810195908611611b325750602095507f0a7ca50c43ec865fdc8519822762f88432e18409024b9c036d6507b9c8f79d808591611b1c865191606083526060830190611ef5565b933489830152868201528033940390a451908152f35b634e487b7160e01b815260118752602490fd5b8351631d9c3dff60e31b81528690fd5b9050341138611a85565b50346102f05760203660031901126102f057823590611b7d82611fb2565b509060ff600a83015416600781101561086d57600303611d6d57611ba56009830154426120a5565b6005541161084f5750826002939460078301908282549255611bc685611fb2565b50805460018201546001600160a01b039386938493928616928616918491829190611bf08d611fb2565b50978e890154838a0154918b600a60088d01549c015460081c161592801515600014611d6557925b15611d4757509184611c3783611c31600a9584976120a5565b9c6120c8565b945b600282908401558160038401558201558260078201558260088201550197600660ff198a54161789558581158015611d26575b505050508481158015611d05575b5050505080611ced575b50508382611cd5575b5050505060008051602061248e83398151915293600386868680a38215928315611cba575050505080a380f35b84938493849354169083906107b657f150833880808061078f565b611ce3935460081c16612400565b5038808083611c8d565b611cfd9186865460081c16612400565b503880611c84565b8392839283928390611d1d575bf15087388481611c7a565b506108fc611d12565b8392839283928390611d3e575bf15081388581611c6c565b506108fc611d33565b999550819398509184611d5d600a9382956120a5565b969499611c39565b508192611c18565b51635ed7670b60e11b81528490fd5b50346102f057816003193601126102f05780519082600254611d9d81611e84565b80855290600190818116908115611e385750600114611ddf575b505050611dc982611ddb940383611ebe565b51918291602083526020830190611ef5565b0390f35b60028352602095507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410611e255750505082611ddb94611dc99282010194611db7565b8054868501880152928601928101611e09565b611ddb9750611dc99450602092508693915060ff191682840152151560051b82010194611db7565b8390346102f057816003193601126102f05790546001600160a01b03168152602090f35b90600182811c92168015611eb4575b6020831014611e9e57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611e93565b90601f801991011681019081106001600160401b03821117611edf57604052565b634e487b7160e01b600052604160045260246000fd5b919082519283825260005b848110611f21575050826000602080949584010152601f8019910116010190565b602081830181015184830182015201611f00565b6001600160401b038111611edf57601f01601f191660200190565b81601f82011215611f9757803590611f6782611f35565b92611f756040519485611ebe565b82845260208383010111611f9757816000926020809301838601378301015290565b600080fd5b6040906003190112611f97576004359060243590565b600754811015611fd1576007600052600b602060002091020190600090565b634e487b7160e01b600052603260045260246000fd5b600435906001600160a01b0382168203611f9757565b6002546000929161200d82611e84565b908181526001928381169081600014612067575060011461202d57505050565b9092935060026000526020928360002092846000945b8386106120535750505050010190565b805485870183015294019385908201612043565b91935050602093945060ff191683830152151560051b010190565b600754600160401b811015611edf578060016120a19201600755611fb2565b9091565b919082039182116120b257565b634e487b7160e01b600052601160045260246000fd5b919082018092116120b257565b906120df82611fb2565b50600a8101805460ff191660051790556001546040805163c13517e160e01b815260026004820152602481018290526001600160a01b03956020939192909184908490891681898161213360448201611ffd565b03925af192831561228757600093612238575b507f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186916060608092600688019580875560005260088752828160002055896001541695549660045490825194855284015282015260006060820152a36007810180549083808311612204575b50505060088101918254928184116121cc575b5050505050565b6000946001869594846121e288979688976120a5565b94550154168282156121fb575bf15038808080806121c5565b506108fc6121ef565b60008093928261221783959484956120a5565b91558786541682821561222f575bf1503880836121b2565b506108fc612225565b90928482813d8311612280575b61224f8183611ebe565b810103126111aa575051917f8bd32f430ff060e6bd204709b3790c9807987263d3230c580dc80b5f89e27186612146565b503d612245565b50513d6000823e3d90fd5b9160009260009283806122a58294611fb2565b50926002840154936003810154986004820154600783015495600884015493600a60018060a01b0391015460081c16159460038110156123a4576001810361231a575050505050600014612306575061070f6123029287926120c8565b9391565b93925085945094612316916120a5565b9290565b939b509396959194509291600203612371575050801561236957925b1561235357509061234a81612350936120a5565b956120c8565b91565b9594508193925090612364916120a5565b929190565b508192612336565b93985050505060011c8095819060011c9260001461239857509061234a81612350936120c8565b93925094508093509290565b634e487b7160e01b82526021600452602482fd5b3d156123e3573d906123c982611f35565b916123d76040519384611ebe565b82523d6000602084013e565b606090565b90816020910312611f9757518015158103611f975790565b60405163a9059cbb60e01b602082019081526001600160a01b0393841660248301526044808301959095529381529192608083016001600160401b03811184821017611edf57600094859485926040525193165af161245d6123b8565b81612466575090565b805180159250821561247757505090565b61248a92506020809183010191016123e8565b9056fe89e6168584e1de3ec704ff46376271b5481b0d9b2b0ef0ae102f0d001093e000f0d0a0b363c32316c3e6e7e797bbc126af09c634db439ed65a3f96afe7ae2367d1432ca9a38d944f01b256a411861b109bc4bfe200c40d7144e919a16b86a8a8a264697066735822122084f0b8811ddbe49725054dc07fa63a7054cfd271c5daad6a7de8eb0c117676a564736f6c63430008120033", "devdoc": { "details": "Adapted from MultipleArbitrableTokenTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTokenTransaction.sol and from MultipleArbitrableTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTransaction.sol Note that the contract expects the tokens to have standard ERC20 behaviour. The tokens that don't conform to this type of behaviour should be filtered by the UI. Tokens should not reenter or allow recipients to refuse the transfer. Also note that arbitration fees are still paid in ETH.", "events": { @@ -1134,6 +1215,19 @@ "_transactionID": "The index of the transaction." } }, + "getPayouts(uint256,uint8)": { + "details": "Get the payout depending on the winning party.The cost for the buyer is the seller payout non-inclusive of any arbitration fees.", + "params": { + "_transactionID": "The index of the transaction.", + "_winningParty": "The winning party." + }, + "returns": { + "buyerPayout": "The payout for the buyer.", + "buyerPayoutToken": "The payout for the buyer in tokens.", + "sellerPayout": "The payout for the seller.", + "sellerPayoutToken": "The payout for the seller in tokens." + } + }, "getTransactionCount()": { "details": "Getter to know the count of transactions.", "returns": { @@ -1204,7 +1298,7 @@ "storageLayout": { "storage": [ { - "astId": 262, + "astId": 1487, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "governor", "offset": 0, @@ -1212,7 +1306,7 @@ "type": "t_address" }, { - "astId": 265, + "astId": 1490, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "arbitrator", "offset": 0, @@ -1220,7 +1314,7 @@ "type": "t_contract(IArbitratorV2)134" }, { - "astId": 267, + "astId": 1492, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "arbitratorExtraData", "offset": 0, @@ -1228,7 +1322,7 @@ "type": "t_bytes_storage" }, { - "astId": 270, + "astId": 1495, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "templateRegistry", "offset": 0, @@ -1236,7 +1330,7 @@ "type": "t_contract(IDisputeTemplateRegistry)160" }, { - "astId": 272, + "astId": 1497, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "templateId", "offset": 0, @@ -1244,7 +1338,7 @@ "type": "t_uint256" }, { - "astId": 274, + "astId": 1499, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "feeTimeout", "offset": 0, @@ -1252,7 +1346,7 @@ "type": "t_uint256" }, { - "astId": 276, + "astId": 1501, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "settlementTimeout", "offset": 0, @@ -1260,20 +1354,28 @@ "type": "t_uint256" }, { - "astId": 280, + "astId": 1505, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "transactions", "offset": 0, "slot": "7", - "type": "t_array(t_struct(Transaction)2448_storage)dyn_storage" + "type": "t_array(t_struct(Transaction)4353_storage)dyn_storage" }, { - "astId": 284, + "astId": 1509, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "disputeIDtoTransactionID", "offset": 0, "slot": "8", "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 1514, + "contract": "src/EscrowUniversal.sol:EscrowUniversal", + "label": "amountCaps", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_contract(IERC20)238,t_uint256)" } ], "types": { @@ -1287,8 +1389,8 @@ "label": "address payable", "numberOfBytes": "20" }, - "t_array(t_struct(Transaction)2448_storage)dyn_storage": { - "base": "t_struct(Transaction)2448_storage", + "t_array(t_struct(Transaction)4353_storage)dyn_storage": { + "base": "t_struct(Transaction)4353_storage", "encoding": "dynamic_array", "label": "struct Transaction[]", "numberOfBytes": "32" @@ -1313,11 +1415,18 @@ "label": "contract IERC20", "numberOfBytes": "20" }, - "t_enum(Status)2415": { + "t_enum(Status)4320": { "encoding": "inplace", "label": "enum Status", "numberOfBytes": "1" }, + "t_mapping(t_contract(IERC20)238,t_uint256)": { + "encoding": "mapping", + "key": "t_contract(IERC20)238", + "label": "mapping(contract IERC20 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, "t_mapping(t_uint256,t_uint256)": { "encoding": "mapping", "key": "t_uint256", @@ -1325,12 +1434,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Transaction)2448_storage": { + "t_struct(Transaction)4353_storage": { "encoding": "inplace", "label": "struct Transaction", "members": [ { - "astId": 2423, + "astId": 4328, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "buyer", "offset": 0, @@ -1338,7 +1447,7 @@ "type": "t_address_payable" }, { - "astId": 2425, + "astId": 4330, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "seller", "offset": 0, @@ -1346,7 +1455,7 @@ "type": "t_address_payable" }, { - "astId": 2427, + "astId": 4332, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "amount", "offset": 0, @@ -1354,7 +1463,7 @@ "type": "t_uint256" }, { - "astId": 2429, + "astId": 4334, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "settlementBuyer", "offset": 0, @@ -1362,7 +1471,7 @@ "type": "t_uint256" }, { - "astId": 2431, + "astId": 4336, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "settlementSeller", "offset": 0, @@ -1370,7 +1479,7 @@ "type": "t_uint256" }, { - "astId": 2433, + "astId": 4338, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "deadline", "offset": 0, @@ -1378,7 +1487,7 @@ "type": "t_uint256" }, { - "astId": 2435, + "astId": 4340, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "disputeID", "offset": 0, @@ -1386,7 +1495,7 @@ "type": "t_uint256" }, { - "astId": 2437, + "astId": 4342, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "buyerFee", "offset": 0, @@ -1394,7 +1503,7 @@ "type": "t_uint256" }, { - "astId": 2439, + "astId": 4344, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "sellerFee", "offset": 0, @@ -1402,7 +1511,7 @@ "type": "t_uint256" }, { - "astId": 2441, + "astId": 4346, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "lastFeePaymentTime", "offset": 0, @@ -1410,15 +1519,15 @@ "type": "t_uint256" }, { - "astId": 2444, + "astId": 4349, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "status", "offset": 0, "slot": "10", - "type": "t_enum(Status)2415" + "type": "t_enum(Status)4320" }, { - "astId": 2447, + "astId": 4352, "contract": "src/EscrowUniversal.sol:EscrowUniversal", "label": "token", "offset": 1, diff --git a/contracts/deployments/arbitrumSepoliaDevnet/EscrowView.json b/contracts/deployments/arbitrumSepoliaDevnet/EscrowView.json new file mode 100644 index 0000000..5f393ee --- /dev/null +++ b/contracts/deployments/arbitrumSepoliaDevnet/EscrowView.json @@ -0,0 +1,184 @@ +{ + "address": "0xB219345918EcaE794ae0c1480C280686d65E560d", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_escrow", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "escrow", + "outputs": [ + { + "internalType": "contract EscrowUniversal", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amountWei", + "type": "uint256" + } + ], + "name": "formatEth", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amountWei", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "formatToken", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_transactionID", + "type": "uint256" + } + ], + "name": "getPayoutMessages", + "outputs": [ + { + "internalType": "string", + "name": "noWinner", + "type": "string" + }, + { + "internalType": "string", + "name": "buyerWins", + "type": "string" + }, + { + "internalType": "string", + "name": "sellerWins", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xbb0a054233437142455a306896f04a61603f156de710e4d8db48a52652944b29", + "receipt": { + "to": null, + "from": "0xf1C7c037891525E360C59f708739Ac09A7670c59", + "contractAddress": "0xB219345918EcaE794ae0c1480C280686d65E560d", + "transactionIndex": 1, + "gasUsed": "986763", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb752cab392683c5ef98008de6ca485d3e34f03f4971b8e98c1a57f3ba22404c3", + "transactionHash": "0xbb0a054233437142455a306896f04a61603f156de710e4d8db48a52652944b29", + "logs": [], + "blockNumber": 119753480, + "cumulativeGasUsed": "986763", + "status": 1, + "byzantium": true + }, + "args": [ + "0xb551978A48612e9Bf03CD0c5F1130021915d72ac" + ], + "numDeployments": 1, + "solcInputHash": "6deb161233d72b9820ead801b437ebf5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_escrow\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"escrow\",\"outputs\":[{\"internalType\":\"contract EscrowUniversal\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amountWei\",\"type\":\"uint256\"}],\"name\":\"formatEth\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amountWei\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"formatToken\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_transactionID\",\"type\":\"uint256\"}],\"name\":\"getPayoutMessages\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"noWinner\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"buyerWins\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"sellerWins\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_escrow\":\"The address of the EscrowUniversal contract.\"}},\"formatEth(uint256)\":{\"params\":{\"_amountWei\":\"The amount in wei.\"},\"returns\":{\"_0\":\"The formatted amount.\"}},\"formatToken(uint256,address)\":{\"params\":{\"_amountWei\":\"The amount in wei.\",\"_token\":\"The address of the token.\"},\"returns\":{\"_0\":\"The formatted amount.\"}},\"getPayoutMessages(uint256)\":{\"returns\":{\"buyerWins\":\"The payout message for the case where the buyer wins.\",\"noWinner\":\"The payout message for the case where nobody wins.\",\"sellerWins\":\"The payout message for the case where the seller wins.\"}}},\"title\":\"EscrowView\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Initialize the view contract with the address of the EscrowUniversal contract.\"},\"formatEth(uint256)\":{\"notice\":\"Format an amount in ETH to 3 decimal places.\"},\"formatToken(uint256,address)\":{\"notice\":\"Format an amount in a token to 3 decimal places.\"},\"getPayoutMessages(uint256)\":{\"notice\":\"Get the payout messages for a transaction *once* a dispute is created.The amounts are exclusive of arbitration fees for clarity.The amounts pre-dispute are imprecise as the arbitration fees are not paid yet by either or both parties.\"}},\"notice\":\"A view contract for EscrowUniversal to facilitate the display of ruling options.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/EscrowView.sol\":\"EscrowView\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IArbitratorV2.sol\\\";\\n\\n/// @title IArbitrableV2\\n/// @notice 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);\\ninterface IArbitrableV2 {\\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 _arbitrableDisputeID The identifier of the dispute in the Arbitrable contract.\\n /// @param _externalDisputeID An identifier created outside Kleros by the protocol requesting arbitration.\\n /// @param _templateId The identifier of the dispute template. Should not be used with _templateUri.\\n /// @param _templateUri The URI to the dispute template. For example on IPFS: starting with '/ipfs/'. Should not be used with _templateId.\\n event DisputeRequest(\\n IArbitratorV2 indexed _arbitrator,\\n uint256 indexed _arbitrableDisputeID,\\n uint256 _externalDisputeID,\\n uint256 _templateId,\\n string _templateUri\\n );\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrator The arbitrator giving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitratorV2 indexed _arbitrator, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev Give a ruling for a dispute.\\n /// 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 The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling Ruling given by the arbitrator.\\n /// Note that 0 is reserved for \\\"Not able/wanting to make a decision\\\".\\n function rule(uint256 _disputeID, uint256 _ruling) external;\\n}\\n\",\"keccak256\":\"0x389326b1f749454ed179bdac2f9d6ce24a1ef944bbce976ca78b93f4e173354a\",\"license\":\"MIT\"},\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitratorV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"./IArbitrableV2.sol\\\";\\n\\n/// @title Arbitrator\\n/// Arbitrator interface that implements the new arbitration standard.\\n/// Unlike the ERC-792 this standard is not concerned with appeals, so each arbitrator can implement an appeal system that suits it the most.\\n/// When developing arbitrator contracts we need to:\\n/// - Define the functions for dispute creation (createDispute). 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).\\n/// - Allow giving rulings. For this a function must call arbitrable.rule(disputeID, ruling).\\ninterface IArbitratorV2 {\\n /// @dev To be emitted when a dispute is created.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _arbitrable The contract which created the dispute.\\n event DisputeCreation(uint256 indexed _disputeID, IArbitrableV2 indexed _arbitrable);\\n\\n /// @dev To be raised when a ruling is given.\\n /// @param _arbitrable The arbitrable receiving the ruling.\\n /// @param _disputeID The identifier of the dispute in the Arbitrator contract.\\n /// @param _ruling The ruling which was given.\\n event Ruling(IArbitrableV2 indexed _arbitrable, uint256 indexed _disputeID, uint256 _ruling);\\n\\n /// @dev To be emitted when an ERC20 token is added or removed as a method to pay fees.\\n /// @param _token The ERC20 token.\\n /// @param _accepted Whether the token is accepted or not.\\n event AcceptedFeeToken(IERC20 indexed _token, bool indexed _accepted);\\n\\n /// @dev To be emitted when the fee for a particular ERC20 token is updated.\\n /// @param _feeToken The ERC20 token.\\n /// @param _rateInEth The new rate of the fee token in ETH.\\n /// @param _rateDecimals The new decimals of the fee token rate.\\n event NewCurrencyRate(IERC20 indexed _feeToken, uint64 _rateInEth, uint8 _rateDecimals);\\n\\n /// @dev Create a dispute and pay for the fees in the native currency, typically ETH.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData\\n ) external payable returns (uint256 disputeID);\\n\\n /// @dev Create a dispute and pay for the fees in a supported ERC20 token.\\n /// Must be called by the arbitrable contract.\\n /// Must pay at least arbitrationCost(_extraData).\\n /// @param _numberOfChoices The number of choices the arbitrator can choose from in this dispute.\\n /// @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @param _feeAmount Amount of the ERC20 token used to pay fees.\\n /// @return disputeID The identifier of the dispute created.\\n function createDispute(\\n uint256 _numberOfChoices,\\n bytes calldata _extraData,\\n IERC20 _feeToken,\\n uint256 _feeAmount\\n ) external returns (uint256 disputeID);\\n\\n /// @dev Compute the cost of arbitration denominated in the native currency, typically ETH.\\n /// 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 Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @return cost The arbitration cost in ETH.\\n function arbitrationCost(bytes calldata _extraData) external view returns (uint256 cost);\\n\\n /// @dev Compute the cost of arbitration denominated in `_feeToken`.\\n /// 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 Additional info about the dispute. We use it to pass the ID of the dispute's court (first 32 bytes), the minimum number of jurors required (next 32 bytes) and the ID of the specific dispute kit (last 32 bytes).\\n /// @param _feeToken The ERC20 token used to pay fees.\\n /// @return cost The arbitration cost in `_feeToken`.\\n function arbitrationCost(bytes calldata _extraData, IERC20 _feeToken) external view returns (uint256 cost);\\n\\n /// @dev Gets the current ruling of a specified dispute.\\n /// @param _disputeID The ID of the dispute.\\n /// @return ruling The current ruling.\\n /// @return tied Whether it's a tie or not.\\n /// @return overridden Whether the ruling was overridden by appeal funding or not.\\n function currentRuling(uint256 _disputeID) external view returns (uint256 ruling, bool tied, bool overridden);\\n}\\n\",\"keccak256\":\"0x453943ba5ccc94b9b9cdfd4afd3678682d62d8b90fe16b43e90215387d2f6a51\",\"license\":\"MIT\"},\"@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\n/// @title IDisputeTemplate\\n/// @notice Dispute Template interface.\\ninterface IDisputeTemplateRegistry {\\n /// @dev To be emitted when a new dispute template is created.\\n /// @param _templateId The identifier of the dispute template.\\n /// @param _templateTag An optional tag for the dispute template, such as \\\"registration\\\" or \\\"removal\\\".\\n /// @param _templateData The template data.\\n /// @param _templateDataMappings The data mappings.\\n event DisputeTemplate(\\n uint256 indexed _templateId,\\n string indexed _templateTag,\\n string _templateData,\\n string _templateDataMappings\\n );\\n\\n function setDisputeTemplate(\\n string memory _templateTag,\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external returns (uint256 templateId);\\n}\\n\",\"keccak256\":\"0x88b0038d226532e6cf862a485d162f7bca61ac3d361d6801146b55a240f091ac\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"src/EscrowUniversal.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @authors: [@unknownunknown1, @jaybuidl]\\n/// @reviewers: []\\n/// @auditors: []\\n/// @bounties: []\\n\\npragma solidity 0.8.18;\\n\\nimport {IArbitrableV2, IArbitratorV2} from \\\"@kleros/kleros-v2-contracts/arbitration/interfaces/IArbitrableV2.sol\\\";\\nimport \\\"@kleros/kleros-v2-contracts/arbitration/interfaces/IDisputeTemplateRegistry.sol\\\";\\nimport {SafeERC20, IERC20} from \\\"./libraries/SafeERC20.sol\\\";\\nimport \\\"./interfaces/IEscrow.sol\\\";\\n\\n/// @title EscrowUniversal for a sale paid in native currency or ERC20 tokens without platform fees.\\n/// @dev Adapted from MultipleArbitrableTokenTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTokenTransaction.sol\\n/// and from MultipleArbitrableTransaction contract: https://github.com/kleros/kleros-interaction/blob/master/contracts/standard/arbitration/MultipleArbitrableTransaction.sol\\n/// Note that the contract expects the tokens to have standard ERC20 behaviour.\\n/// The tokens that don't conform to this type of behaviour should be filtered by the UI.\\n/// Tokens should not reenter or allow recipients to refuse the transfer.\\n/// Also note that arbitration fees are still paid in ETH.\\ncontract EscrowUniversal is IEscrow, IArbitrableV2 {\\n // Use safe transfers when both parties are paid simultaneously (save for acceptSettlement) to prevent griefing.\\n using SafeERC20 for IERC20;\\n\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n uint256 public constant AMOUNT_OF_CHOICES = 2;\\n address public governor;\\n IArbitratorV2 public arbitrator; // Address of the arbitrator contract.\\n bytes public arbitratorExtraData; // Extra data to set up the arbitration.\\n IDisputeTemplateRegistry public templateRegistry; // The dispute template registry.\\n uint256 public templateId; // The current dispute template identifier.\\n uint256 public feeTimeout; // Time in seconds a party can take to pay arbitration fees before being considered unresponsive and lose the dispute.\\n uint256 public settlementTimeout; // Time in seconds a party can take to accept or propose a settlement before being considered unresponsive.\\n Transaction[] public transactions; // List of all created transactions.\\n mapping(uint256 => uint256) public disputeIDtoTransactionID; // Naps dispute ID to tx ID.\\n mapping(IERC20 => uint256) public amountCaps; // Caps the amount of the respective token for the Escrow transaction.\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier onlyByGovernor() {\\n if (governor != msg.sender) revert GovernorOnly();\\n _;\\n }\\n\\n modifier shouldNotExceedCap(IERC20 _token, uint256 _amount) {\\n if (amountCaps[_token] != 0 && _amount > amountCaps[_token]) revert AmountExceedsCap();\\n _;\\n }\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Constructor.\\n /// @param _arbitrator The arbitrator of the contract.\\n /// @param _arbitratorExtraData Extra data for the arbitrator.\\n /// @param _templateData The dispute template data.\\n /// @param _templateDataMappings The dispute template data mappings.\\n /// @param _templateRegistry The dispute template registry.\\n /// @param _feeTimeout Arbitration fee timeout for the parties.\\n /// @param _settlementTimeout Settlement timeout for the parties.\\n constructor(\\n IArbitratorV2 _arbitrator,\\n bytes memory _arbitratorExtraData,\\n string memory _templateData,\\n string memory _templateDataMappings,\\n IDisputeTemplateRegistry _templateRegistry,\\n uint256 _feeTimeout,\\n uint256 _settlementTimeout\\n ) {\\n governor = msg.sender;\\n arbitrator = _arbitrator;\\n arbitratorExtraData = _arbitratorExtraData;\\n templateRegistry = _templateRegistry;\\n feeTimeout = _feeTimeout;\\n settlementTimeout = _settlementTimeout;\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n\\n emit ParameterUpdated(_feeTimeout, _settlementTimeout, _arbitratorExtraData);\\n }\\n\\n // ************************************* //\\n // * Governance * //\\n // ************************************* //\\n\\n function changeGovernor(address _governor) external onlyByGovernor {\\n governor = _governor;\\n }\\n\\n function changeArbitrator(IArbitratorV2 _arbitrator) external onlyByGovernor {\\n arbitrator = _arbitrator;\\n }\\n\\n function changeArbitratorExtraData(bytes calldata _arbitratorExtraData) external onlyByGovernor {\\n arbitratorExtraData = _arbitratorExtraData;\\n emit ParameterUpdated(feeTimeout, settlementTimeout, _arbitratorExtraData);\\n }\\n\\n function changeTemplateRegistry(IDisputeTemplateRegistry _templateRegistry) external onlyByGovernor {\\n templateRegistry = _templateRegistry;\\n }\\n\\n function changeDisputeTemplate(\\n string memory _templateData,\\n string memory _templateDataMappings\\n ) external onlyByGovernor {\\n templateId = templateRegistry.setDisputeTemplate(\\\"\\\", _templateData, _templateDataMappings);\\n }\\n\\n function changeFeeTimeout(uint256 _feeTimeout) external onlyByGovernor {\\n feeTimeout = _feeTimeout;\\n emit ParameterUpdated(_feeTimeout, settlementTimeout, arbitratorExtraData);\\n }\\n\\n function changeSettlementTimeout(uint256 _settlementTimeout) external onlyByGovernor {\\n settlementTimeout = _settlementTimeout;\\n emit ParameterUpdated(feeTimeout, _settlementTimeout, arbitratorExtraData);\\n }\\n\\n function changeAmountCap(IERC20 _token, uint256 _amountCap) external onlyByGovernor {\\n amountCaps[_token] = _amountCap;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @inheritdoc IEscrow\\n function createNativeTransaction(\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external payable override shouldNotExceedCap(NATIVE, msg.value) returns (uint256 transactionID) {\\n Transaction storage transaction = transactions.push();\\n transaction.buyer = payable(msg.sender);\\n transaction.seller = _seller;\\n transaction.amount = msg.value;\\n transaction.token = NATIVE;\\n transaction.deadline = _deadline;\\n\\n transactionID = transactions.length - 1;\\n\\n emit NativeTransactionCreated(\\n transactionID,\\n _transactionUri,\\n msg.sender,\\n _seller,\\n msg.value,\\n transaction.deadline\\n );\\n }\\n\\n /// @inheritdoc IEscrow\\n function createERC20Transaction(\\n uint256 _amount,\\n IERC20 _token,\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external override shouldNotExceedCap(_token, _amount) returns (uint256 transactionID) {\\n // Transfers token from sender wallet to contract.\\n if (!_token.safeTransferFrom(msg.sender, address(this), _amount)) revert TokenTransferFailed();\\n Transaction storage transaction = transactions.push();\\n transaction.buyer = payable(msg.sender);\\n transaction.seller = _seller;\\n transaction.amount = _amount;\\n transaction.token = _token;\\n transaction.deadline = _deadline;\\n\\n transactionID = transactions.length - 1;\\n\\n emit ERC20TransactionCreated(\\n transactionID,\\n _transactionUri,\\n msg.sender,\\n _seller,\\n _token,\\n _amount,\\n transaction.deadline\\n );\\n }\\n\\n /// @inheritdoc IEscrow\\n function pay(uint256 _transactionID, uint256 _amount) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.buyer != msg.sender) revert BuyerOnly();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n if (_amount > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n emit Payment(_transactionID, _amount, msg.sender);\\n\\n transaction.amount -= _amount;\\n if (transaction.amount == 0) {\\n transaction.status = Status.TransactionResolved;\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n if (transaction.token == NATIVE) {\\n transaction.seller.send(_amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, _amount)) revert TokenTransferFailed();\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function reimburse(uint256 _transactionID, uint256 _amountReimbursed) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.seller != msg.sender) revert SellerOnly();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n if (_amountReimbursed > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n emit Payment(_transactionID, _amountReimbursed, msg.sender);\\n\\n transaction.amount -= _amountReimbursed;\\n if (transaction.amount == 0) {\\n transaction.status = Status.TransactionResolved;\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n if (transaction.token == NATIVE) {\\n transaction.buyer.send(_amountReimbursed); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, _amountReimbursed)) revert TokenTransferFailed();\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function executeTransaction(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (block.timestamp < transaction.deadline) revert DeadlineNotPassed();\\n if (transaction.status != Status.NoDispute) revert TransactionDisputed();\\n\\n uint256 amount = transaction.amount;\\n transaction.amount = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (transaction.token == NATIVE) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n } else {\\n if (!transaction.token.safeTransfer(transaction.seller, amount)) revert TokenTransferFailed();\\n }\\n\\n emit Payment(_transactionID, amount, msg.sender);\\n emit TransactionResolved(_transactionID, Resolution.TransactionExecuted);\\n }\\n\\n /// @inheritdoc IEscrow\\n function proposeSettlement(uint256 _transactionID, uint256 _amount) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status == Status.NoDispute && block.timestamp >= transaction.deadline)\\n revert TransactionExpired();\\n if (transaction.status >= Status.WaitingBuyer) revert TransactionEscalatedForArbitration();\\n if (_amount > transaction.amount) revert MaximumPaymentAmountExceeded();\\n\\n Party party;\\n transaction.lastFeePaymentTime = block.timestamp;\\n if (transaction.status == Status.WaitingSettlementBuyer) {\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n transaction.settlementBuyer = _amount;\\n transaction.status = Status.WaitingSettlementSeller;\\n party = Party.Buyer;\\n } else if (transaction.status == Status.WaitingSettlementSeller) {\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n transaction.settlementSeller = _amount;\\n transaction.status = Status.WaitingSettlementBuyer;\\n party = Party.Seller;\\n } else {\\n if (msg.sender == transaction.buyer) {\\n transaction.settlementBuyer = _amount;\\n transaction.status = Status.WaitingSettlementSeller;\\n party = Party.Buyer;\\n } else if (msg.sender == transaction.seller) {\\n transaction.settlementSeller = _amount;\\n transaction.status = Status.WaitingSettlementBuyer;\\n party = Party.Seller;\\n } else revert BuyerOrSellerOnly();\\n }\\n emit SettlementProposed(_transactionID, party, _amount);\\n }\\n\\n /// @inheritdoc IEscrow\\n function acceptSettlement(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n uint256 settlementAmount;\\n if (transaction.status == Status.WaitingSettlementBuyer) {\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n settlementAmount = transaction.settlementSeller;\\n } else if (transaction.status == Status.WaitingSettlementSeller) {\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n settlementAmount = transaction.settlementBuyer;\\n } else revert NoSettlementProposedOrTransactionMovedOnAcceptSettlement();\\n\\n uint256 remainingAmount = transaction.amount - settlementAmount;\\n\\n transaction.amount = 0;\\n transaction.settlementBuyer = 0;\\n transaction.settlementSeller = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (transaction.token == NATIVE) {\\n // It is the users' responsibility to accept ETH.\\n transaction.buyer.send(remainingAmount);\\n transaction.seller.send(settlementAmount);\\n } else {\\n if (!transaction.token.safeTransfer(transaction.buyer, remainingAmount)) revert TokenTransferFailed();\\n if (!transaction.token.safeTransfer(transaction.seller, settlementAmount)) revert TokenTransferFailed();\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.SettlementReached);\\n }\\n\\n /// @inheritdoc IEscrow\\n function payArbitrationFeeByBuyer(uint256 _transactionID) external payable override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (\\n transaction.status != Status.WaitingSettlementBuyer &&\\n transaction.status != Status.WaitingSettlementSeller &&\\n transaction.status != Status.WaitingBuyer\\n ) revert NoSettlementProposedOrTransactionMovedOnPayFeeBuyer();\\n\\n // Allow the other party enough time to respond to a settlement before allowing the proposer to raise a dispute.\\n if (\\n transaction.status == Status.WaitingSettlementSeller &&\\n block.timestamp - transaction.lastFeePaymentTime < settlementTimeout\\n ) revert SettlementPeriodNotOver();\\n\\n if (msg.sender != transaction.buyer) revert BuyerOnly();\\n\\n transaction.buyerFee += msg.value;\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\n if (transaction.buyerFee < arbitrationCost) revert BuyerFeeNotCoverArbitrationCosts();\\n\\n transaction.lastFeePaymentTime = block.timestamp;\\n\\n if (transaction.sellerFee < arbitrationCost) {\\n // The seller still has to pay. This can also happen if he has paid, but arbitrationCost has increased.\\n transaction.status = Status.WaitingSeller;\\n emit HasToPayFee(_transactionID, Party.Seller);\\n } else {\\n // The seller has also paid the fee. We create the dispute.\\n raiseDispute(_transactionID, arbitrationCost);\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function payArbitrationFeeBySeller(uint256 _transactionID) external payable override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (\\n transaction.status != Status.WaitingSettlementBuyer &&\\n transaction.status != Status.WaitingSettlementSeller &&\\n transaction.status != Status.WaitingSeller\\n ) revert NoSettlementProposedOrTransactionMovedOnPayFeeSeller();\\n\\n // Allow the other party enough time to respond to a settlement before allowing the proposer to raise a dispute.\\n if (\\n transaction.status == Status.WaitingSettlementBuyer &&\\n block.timestamp - transaction.lastFeePaymentTime < settlementTimeout\\n ) revert SettlementPeriodNotOver();\\n\\n if (msg.sender != transaction.seller) revert SellerOnly();\\n\\n transaction.sellerFee += msg.value;\\n uint256 arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\\n if (transaction.sellerFee < arbitrationCost) revert SellerFeeNotCoverArbitrationCosts();\\n\\n transaction.lastFeePaymentTime = block.timestamp;\\n\\n if (transaction.buyerFee < arbitrationCost) {\\n // The buyer still has to pay. This can also happen if he has paid, but arbitrationCost has increased.\\n transaction.status = Status.WaitingBuyer;\\n emit HasToPayFee(_transactionID, Party.Buyer);\\n } else {\\n // The buyer has also paid the fee. We create the dispute.\\n raiseDispute(_transactionID, arbitrationCost);\\n }\\n }\\n\\n /// @inheritdoc IEscrow\\n function timeOutByBuyer(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status != Status.WaitingSeller) revert NotWaitingForSellerFees();\\n if (block.timestamp - transaction.lastFeePaymentTime < feeTimeout) revert TimeoutNotPassed();\\n\\n uint256 amount = transaction.sellerFee;\\n transaction.sellerFee = 0;\\n\\n executeRuling(_transactionID, uint256(Party.Buyer));\\n\\n if (amount != 0) {\\n transaction.seller.send(amount); // It is the user responsibility to accept ETH.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.TimeoutByBuyer);\\n }\\n\\n /// @inheritdoc IEscrow\\n function timeOutBySeller(uint256 _transactionID) external override {\\n Transaction storage transaction = transactions[_transactionID];\\n if (transaction.status != Status.WaitingBuyer) revert NotWaitingForBuyerFees();\\n if (block.timestamp - transaction.lastFeePaymentTime < feeTimeout) revert TimeoutNotPassed();\\n\\n uint256 amount = transaction.buyerFee;\\n transaction.buyerFee = 0;\\n\\n executeRuling(_transactionID, uint256(Party.Seller));\\n\\n if (amount != 0) {\\n transaction.buyer.send(amount); // It is the user responsibility to accept ETH.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.TimeoutBySeller);\\n }\\n\\n /// @inheritdoc IArbitrableV2\\n function rule(uint256 _disputeID, uint256 _ruling) external override {\\n if (msg.sender != address(arbitrator)) revert ArbitratorOnly();\\n if (_ruling > AMOUNT_OF_CHOICES) revert InvalidRuling();\\n\\n uint256 transactionID = disputeIDtoTransactionID[_disputeID];\\n Transaction storage transaction = transactions[transactionID];\\n if (transaction.status != Status.DisputeCreated) revert DisputeAlreadyResolved();\\n\\n emit Ruling(arbitrator, _disputeID, _ruling);\\n executeRuling(transactionID, _ruling);\\n }\\n\\n // ************************************* //\\n // * Internal * //\\n // ************************************* //\\n\\n /// @dev Create a dispute.\\n /// @param _transactionID The index of the transaction.\\n /// @param _arbitrationCost Amount to pay the arbitrator.\\n function raiseDispute(uint256 _transactionID, uint256 _arbitrationCost) internal {\\n Transaction storage transaction = transactions[_transactionID];\\n transaction.status = Status.DisputeCreated;\\n transaction.disputeID = arbitrator.createDispute{value: _arbitrationCost}(\\n AMOUNT_OF_CHOICES,\\n arbitratorExtraData\\n );\\n disputeIDtoTransactionID[transaction.disputeID] = _transactionID;\\n emit DisputeRequest(arbitrator, transaction.disputeID, _transactionID, templateId, \\\"\\\");\\n\\n // Refund buyer if he overpaid.\\n if (transaction.buyerFee > _arbitrationCost) {\\n uint256 extraFeeBuyer = transaction.buyerFee - _arbitrationCost;\\n transaction.buyerFee = _arbitrationCost;\\n transaction.buyer.send(extraFeeBuyer); // It is the user responsibility to accept ETH.\\n }\\n\\n // Refund seller if he overpaid.\\n if (transaction.sellerFee > _arbitrationCost) {\\n uint256 extraFeeSeller = transaction.sellerFee - _arbitrationCost;\\n transaction.sellerFee = _arbitrationCost;\\n transaction.seller.send(extraFeeSeller); // It is the user responsibility to accept ETH.\\n }\\n }\\n\\n /// @dev Execute a ruling of a dispute. It reimburses the fee to the winning party.\\n /// @param _transactionID The index of the transaction.\\n /// @param _ruling Ruling given by the arbitrator. 1 : Reimburse the seller. 2 : Pay the buyer.\\n function executeRuling(uint256 _transactionID, uint256 _ruling) internal {\\n Transaction storage transaction = transactions[_transactionID];\\n address payable buyer = transaction.buyer;\\n address payable seller = transaction.seller;\\n\\n (uint256 buyerPayout, uint256 buyerPayoutToken, uint256 sellerPayout, uint256 sellerPayoutToken) = getPayouts(\\n _transactionID,\\n Party(_ruling)\\n );\\n\\n transaction.amount = 0;\\n transaction.settlementBuyer = 0;\\n transaction.settlementSeller = 0;\\n transaction.buyerFee = 0;\\n transaction.sellerFee = 0;\\n transaction.status = Status.TransactionResolved;\\n\\n if (buyerPayout > 0) {\\n buyer.send(buyerPayout); // It is the user responsibility to accept ETH.\\n }\\n if (sellerPayout > 0) {\\n seller.send(sellerPayout); // It is the user responsibility to accept ETH.\\n }\\n if (buyerPayoutToken > 0) {\\n transaction.token.safeTransfer(buyer, buyerPayoutToken); // Tokens should not reenter or allow recipients to refuse the transfer.\\n }\\n if (sellerPayoutToken > 0) {\\n transaction.token.safeTransfer(seller, sellerPayoutToken); // Tokens should not reenter or allow recipients to refuse the transfer.\\n }\\n\\n emit TransactionResolved(_transactionID, Resolution.RulingEnforced);\\n }\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @inheritdoc IEscrow\\n function getTransactionCount() external view override returns (uint256) {\\n return transactions.length;\\n }\\n\\n /// @dev Get the payout depending on the winning party.\\n /// @dev The cost for the buyer is the seller payout non-inclusive of any arbitration fees.\\n /// @param _transactionID The index of the transaction.\\n /// @param _winningParty The winning party.\\n /// @return buyerPayout The payout for the buyer.\\n /// @return buyerPayoutToken The payout for the buyer in tokens.\\n /// @return sellerPayout The payout for the seller.\\n /// @return sellerPayoutToken The payout for the seller in tokens.\\n function getPayouts(\\n uint256 _transactionID,\\n Party _winningParty\\n )\\n public\\n view\\n returns (uint256 buyerPayout, uint256 buyerPayoutToken, uint256 sellerPayout, uint256 sellerPayoutToken)\\n {\\n Transaction storage transaction = transactions[_transactionID];\\n uint256 amount = transaction.amount;\\n uint256 settlementBuyer = transaction.settlementBuyer;\\n uint256 settlementSeller = transaction.settlementSeller;\\n uint256 buyerFee = transaction.buyerFee;\\n uint256 sellerFee = transaction.sellerFee;\\n bool nativePayment = transaction.token == NATIVE;\\n if (_winningParty == Party.Buyer) {\\n // The Seller gets the settlement amount proposed by the Buyer if any, otherwise nothing.\\n // The Buyer gets the remaining amount of the transaction back if any.\\n // The Buyer gets the arbitration fee back.\\n uint256 settledAmount = settlementBuyer;\\n if (nativePayment) {\\n buyerPayout = buyerFee + amount - settledAmount;\\n sellerPayout = settledAmount;\\n } else {\\n buyerPayout = buyerFee;\\n buyerPayoutToken = amount - settledAmount;\\n sellerPayoutToken = settledAmount;\\n }\\n } else if (_winningParty == Party.Seller) {\\n // The Seller gets his proposed settlement amount if any, otherwise the transaction amount.\\n // The Buyer gets the remaining amount of the transaction back if any.\\n // The Seller gets the arbitration fee back.\\n uint256 settledAmount = settlementSeller != 0 ? settlementSeller : amount;\\n if (nativePayment) {\\n buyerPayout = amount - settledAmount;\\n sellerPayout = sellerFee + settledAmount;\\n } else {\\n buyerPayoutToken = amount - settledAmount;\\n sellerPayout = sellerFee;\\n sellerPayoutToken = settledAmount;\\n }\\n } else {\\n // No party wins, we split the arbitration fee and the transaction amount.\\n // The arbitration fee has been paid twice, once by the Buyer and once by the Seller in equal amount once arbitration starts.\\n // In case of an uneven token amount, one basic token unit can be burnt.\\n uint256 splitArbitrationFee = buyerFee / 2; // buyerFee equals sellerFee.\\n buyerPayout = splitArbitrationFee;\\n sellerPayout = splitArbitrationFee;\\n uint256 splitAmount = amount / 2;\\n if (nativePayment) {\\n buyerPayout += splitAmount;\\n sellerPayout += splitAmount;\\n } else {\\n buyerPayoutToken = splitAmount;\\n sellerPayoutToken = splitAmount;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x495fd1d042e051ecf1458aa9fb0c659f61022f83ee01df48c2a99ee944eca7bf\",\"license\":\"MIT\"},\"src/EscrowView.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport {Strings} from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {EscrowUniversal, Transaction, NATIVE, Party, Status, IERC20} from \\\"./EscrowUniversal.sol\\\";\\n\\n/// @title EscrowView\\n/// @notice A view contract for EscrowUniversal to facilitate the display of ruling options.\\ncontract EscrowView {\\n EscrowUniversal public immutable escrow;\\n\\n /// @notice Initialize the view contract with the address of the EscrowUniversal contract.\\n /// @param _escrow The address of the EscrowUniversal contract.\\n constructor(address _escrow) {\\n escrow = EscrowUniversal(_escrow);\\n }\\n\\n /// @notice Get the payout messages for a transaction *once* a dispute is created.\\n /// @notice The amounts are exclusive of arbitration fees for clarity.\\n /// @notice The amounts pre-dispute are imprecise as the arbitration fees are not paid yet by either or both parties.\\n /// @return noWinner The payout message for the case where nobody wins.\\n /// @return buyerWins The payout message for the case where the buyer wins.\\n /// @return sellerWins The payout message for the case where the seller wins.\\n function getPayoutMessages(\\n uint256 _transactionID\\n ) external view returns (string memory noWinner, string memory buyerWins, string memory sellerWins) {\\n (, , uint256 amount, , , , , uint256 buyerFee, uint256 sellerFee, , , IERC20 token) = escrow.transactions(\\n _transactionID\\n );\\n\\n (uint256 noWinnerPayout, uint256 noWinnerPayoutToken, , ) = escrow.getPayouts(_transactionID, Party.None);\\n (, , uint256 buyerWinsCost, uint256 buyerWinsCostToken) = escrow.getPayouts(_transactionID, Party.Buyer);\\n (, , uint256 sellerWinsCost, uint256 sellerWinsCostToken) = escrow.getPayouts(_transactionID, Party.Seller);\\n\\n if (token == NATIVE) {\\n string memory amountStr = formatEth(amount);\\n noWinner = string.concat(\\n \\\"Buyer and Seller get \\\",\\n formatEth(noWinnerPayout - (buyerFee / 2)),\\n \\\" back and half of the arbitration fees.\\\"\\n );\\n string memory insteadStr = buyerWinsCost != amount ? string.concat(\\\" instead of \\\", amountStr) : \\\"\\\";\\n buyerWins = string.concat(\\n \\\"Buyer pays \\\",\\n formatEth(buyerWinsCost), // Exclusive of arbitration fees\\n insteadStr,\\n \\\", gets the arbitration fees back.\\\"\\n );\\n insteadStr = sellerWinsCost - sellerFee != amount ? string.concat(\\\" instead of \\\", amountStr) : \\\"\\\";\\n sellerWins = string.concat(\\n \\\"Buyer pays \\\",\\n formatEth(sellerWinsCost - sellerFee), // Including of arbitration fees, deduct them\\n insteadStr,\\n \\\", Seller gets the arbitration fees back.\\\"\\n );\\n } else {\\n string memory amountTokenStr = formatToken(amount, address(token));\\n noWinner = string.concat(\\n \\\"Buyer and Seller get \\\",\\n formatToken(noWinnerPayoutToken, address(token)),\\n \\\" back and half of the arbitration fees.\\\"\\n );\\n string memory insteadStr = buyerWinsCost != amount ? string.concat(\\\" instead of \\\", amountTokenStr) : \\\"\\\";\\n buyerWins = string.concat(\\n \\\"Buyer pays \\\",\\n formatToken(buyerWinsCostToken, address(token)),\\n insteadStr,\\n \\\", gets the arbitration fees back.\\\"\\n );\\n insteadStr = sellerWinsCost - sellerFee != amount ? string.concat(\\\" instead of \\\", amountTokenStr) : \\\"\\\";\\n sellerWins = string.concat(\\n \\\"Buyer pays \\\",\\n formatToken(sellerWinsCostToken, address(token)),\\n insteadStr,\\n \\\", Seller gets the arbitration fees back.\\\"\\n );\\n }\\n }\\n\\n /// @notice Format an amount in ETH to 3 decimal places.\\n /// @param _amountWei The amount in wei.\\n /// @return The formatted amount.\\n function formatEth(uint256 _amountWei) public pure returns (string memory) {\\n uint256 ethWhole = _amountWei / 1 ether;\\n uint256 ethFraction = (_amountWei % 1 ether) / 1e15; // Get the first 3 decimal digits\\n\\n // Convert the whole and fractional parts to strings\\n string memory ethWholeStr = Strings.toString(ethWhole);\\n\\n // If the fractional part is zero, return only the whole part\\n if (ethFraction == 0) {\\n return string.concat(ethWholeStr, \\\" ETH\\\");\\n }\\n\\n // Convert the fractional part to string with leading zeros if necessary\\n string memory ethFractionStr = Strings.toString(ethFraction);\\n\\n // Pad the fractional part with leading zeros to ensure three digits\\n while (bytes(ethFractionStr).length < 3) {\\n ethFractionStr = string.concat(\\\"0\\\", ethFractionStr);\\n }\\n\\n // Remove trailing zeros from the fractional part\\n bytes memory fractionBytes = bytes(ethFractionStr);\\n uint256 fractionLength = fractionBytes.length;\\n while (fractionLength > 0 && fractionBytes[fractionLength - 1] == \\\"0\\\") {\\n fractionLength--;\\n }\\n\\n if (fractionLength == 0) {\\n return ethWholeStr;\\n } else {\\n bytes memory fractionTrimmed = new bytes(fractionLength);\\n for (uint256 i = 0; i < fractionLength; i++) {\\n fractionTrimmed[i] = fractionBytes[i];\\n }\\n return string.concat(ethWholeStr, \\\".\\\", string(fractionTrimmed), \\\" ETH\\\");\\n }\\n }\\n\\n /// @notice Format an amount in a token to 3 decimal places.\\n /// @param _amountWei The amount in wei.\\n /// @param _token The address of the token.\\n /// @return The formatted amount.\\n function formatToken(uint256 _amountWei, address _token) public view returns (string memory) {\\n require(_token != address(0), \\\"Invalid token address\\\");\\n IERC20Metadata token = IERC20Metadata(_token);\\n uint8 decimals = token.decimals();\\n string memory symbol = token.symbol();\\n\\n uint256 tenToDecimals = uint256(10) ** uint256(decimals);\\n uint256 tokenWhole = _amountWei / tenToDecimals;\\n\\n uint256 tokenFraction;\\n uint8 fractionDigits;\\n\\n if (decimals >= 3) {\\n uint256 divider = uint256(10) ** uint256(decimals - 3);\\n tokenFraction = (_amountWei % tenToDecimals) / divider;\\n fractionDigits = 3;\\n } else {\\n tokenFraction = _amountWei % tenToDecimals;\\n fractionDigits = decimals;\\n }\\n\\n string memory tokenWholeStr = Strings.toString(tokenWhole);\\n\\n if (tokenFraction == 0) {\\n return string.concat(tokenWholeStr, \\\" \\\", symbol);\\n }\\n\\n string memory tokenFractionStr = Strings.toString(tokenFraction);\\n\\n while (bytes(tokenFractionStr).length < fractionDigits) {\\n tokenFractionStr = string.concat(\\\"0\\\", tokenFractionStr);\\n }\\n\\n bytes memory fractionBytes = bytes(tokenFractionStr);\\n uint256 fractionLength = fractionBytes.length;\\n while (fractionLength > 0 && fractionBytes[fractionLength - 1] == bytes1(\\\"0\\\")) {\\n fractionLength--;\\n }\\n\\n if (fractionLength == 0) {\\n return string.concat(tokenWholeStr, \\\" \\\", symbol);\\n } else {\\n bytes memory fractionTrimmed = new bytes(fractionLength);\\n for (uint256 i = 0; i < fractionLength; i++) {\\n fractionTrimmed[i] = fractionBytes[i];\\n }\\n return string.concat(tokenWholeStr, \\\".\\\", string(fractionTrimmed), \\\" \\\", symbol);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2e8144d88a6e34cf028e9c9bccaf7bb7f43889d41bc2a3202c33377cac5f7116\",\"license\":\"MIT\"},\"src/interfaces/IEscrow.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./Types.sol\\\";\\n\\ninterface IEscrow {\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev To be emitted when Escrow parameters are updated.\\n event ParameterUpdated(uint256 _feeTimeout, uint256 _settlementTimeout, bytes _arbitratorExtraData);\\n\\n /// @dev To be emitted when a party pays or reimburses the other.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount The amount paid.\\n /// @param _party The party that paid.\\n event Payment(uint256 indexed _transactionID, uint256 _amount, address _party);\\n\\n /// @dev Indicate that a party has to pay a fee or would otherwise be considered as losing.\\n /// @param _transactionID The index of the transaction.\\n /// @param _party The party who has to pay.\\n event HasToPayFee(uint256 indexed _transactionID, Party _party);\\n\\n /// @dev Emitted when a party proposes a settlement.\\n /// @param _transactionID The index of the transaction.\\n /// @param _party The party that proposed a settlement.\\n /// @param _amount The amount proposed.\\n event SettlementProposed(uint256 indexed _transactionID, Party _party, uint256 _amount);\\n\\n /// @dev Emitted when a transaction paid in native currency is created.\\n /// @param _transactionID The index of the transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _buyer The address of the buyer.\\n /// @param _seller The address of the seller.\\n /// @param _amount The initial amount in the transaction.\\n /// @param _deadline The deadline of the transaction.\\n event NativeTransactionCreated(\\n uint256 indexed _transactionID,\\n string _transactionUri,\\n address indexed _buyer,\\n address indexed _seller,\\n uint256 _amount,\\n uint256 _deadline\\n );\\n\\n /// @dev Emitted when a transaction paid in ERC20 token is created.\\n /// @param _transactionID The index of the transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _buyer The address of the buyer.\\n /// @param _seller The address of the seller.\\n /// @param _token The token address.\\n /// @param _amount The initial amount in the transaction.\\n /// @param _deadline The deadline of the transaction.\\n event ERC20TransactionCreated(\\n uint256 indexed _transactionID,\\n string _transactionUri,\\n address indexed _buyer,\\n address indexed _seller,\\n IERC20 _token,\\n uint256 _amount,\\n uint256 _deadline\\n );\\n\\n /// @dev To be emitted when a transaction is resolved, either by its\\n /// execution, a timeout or because a ruling was enforced.\\n /// @param _transactionID The ID of the respective transaction.\\n /// @param _resolution Short description of what caused the transaction to be solved.\\n event TransactionResolved(uint256 indexed _transactionID, Resolution indexed _resolution);\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Create a transaction.\\n /// @param _deadline Time after which a party can automatically execute the arbitrable transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _seller The recipient of the transaction.\\n /// @return transactionID The index of the transaction.\\n function createNativeTransaction(\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external payable returns (uint256 transactionID);\\n\\n /// @dev Create a transaction.\\n /// @param _amount The amount of tokens in this transaction.\\n /// @param _token The ERC20 token contract.\\n /// @param _deadline Time after which a party can automatically execute the arbitrable transaction.\\n /// @param _transactionUri The IPFS Uri Hash of the transaction.\\n /// @param _seller The recipient of the transaction.\\n /// @return transactionID The index of the transaction.\\n function createERC20Transaction(\\n uint256 _amount,\\n IERC20 _token,\\n uint256 _deadline,\\n string memory _transactionUri,\\n address payable _seller\\n ) external returns (uint256 transactionID);\\n\\n /// @dev Pay seller. To be called if the good or service is provided.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount Amount to pay in wei.\\n function pay(uint256 _transactionID, uint256 _amount) external;\\n\\n /// @dev Reimburse buyer. To be called if the good or service can't be fully provided.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amountReimbursed Amount to reimburse in wei.\\n function reimburse(uint256 _transactionID, uint256 _amountReimbursed) external;\\n\\n /// @dev Transfer the transaction's amount to the seller if the timeout has passed.\\n /// @param _transactionID The index of the transaction.\\n function executeTransaction(uint256 _transactionID) external;\\n\\n /// @dev Propose a settlement as a compromise from the initial terms to the other party.\\n /// Note that a party can only propose a settlement again after the other party has\\n /// done so as well to prevent front running/griefing issues.\\n /// @param _transactionID The index of the transaction.\\n /// @param _amount The settlement amount.\\n function proposeSettlement(uint256 _transactionID, uint256 _amount) external;\\n\\n /// @dev Accept a settlement proposed by the other party.\\n /// @param _transactionID The index of the transaction.\\n function acceptSettlement(uint256 _transactionID) external;\\n\\n /// @dev Pay the arbitration fee to raise a dispute. To be called by the buyer.\\n /// Note that it can only be called after settlement proposition.\\n /// Also note that the arbitrator can have createDispute throw, which will make\\n /// this function throw and therefore lead to a party being timed-out.\\n /// This is not a vulnerability as the arbitrator can rule in favor of one party anyway.\\n /// @param _transactionID The index of the transaction.\\n function payArbitrationFeeByBuyer(uint256 _transactionID) external payable;\\n\\n /// @dev Pay the arbitration fee to raise a dispute. To be called by the seller.\\n /// Note that this function mirrors payArbitrationFeeByBuyer.\\n /// @param _transactionID The index of the transaction.\\n function payArbitrationFeeBySeller(uint256 _transactionID) external payable;\\n\\n /// @dev Reimburse buyer if seller fails to pay the fee.\\n /// @param _transactionID The index of the transaction.\\n function timeOutByBuyer(uint256 _transactionID) external;\\n\\n /// @dev Pay seller if buyer fails to pay the fee.\\n /// @param _transactionID The index of the transaction.\\n function timeOutBySeller(uint256 _transactionID) external;\\n\\n // ************************************* //\\n // * Public Views * //\\n // ************************************* //\\n\\n /// @dev Getter to know the count of transactions.\\n /// @return The count of transactions.\\n function getTransactionCount() external view returns (uint256);\\n\\n // ************************************* //\\n // * Errors * //\\n // ************************************* //\\n\\n error GovernorOnly();\\n error BuyerOnly();\\n error SellerOnly();\\n error BuyerOrSellerOnly();\\n error ArbitratorOnly();\\n error TransactionDisputed();\\n error MaximumPaymentAmountExceeded();\\n error DeadlineNotPassed();\\n error BuyerFeeNotCoverArbitrationCosts();\\n error SellerFeeNotCoverArbitrationCosts();\\n error NotWaitingForSellerFees();\\n error NotWaitingForBuyerFees();\\n error TimeoutNotPassed();\\n error InvalidRuling();\\n error DisputeAlreadyResolved();\\n error TransactionExpired();\\n error TransactionEscalatedForArbitration();\\n error NoSettlementProposedOrTransactionMovedOnAcceptSettlement();\\n error NoSettlementProposedOrTransactionMovedOnPayFeeBuyer();\\n error NoSettlementProposedOrTransactionMovedOnPayFeeSeller();\\n error SettlementPeriodNotOver();\\n error NotSupported();\\n error TokenTransferFailed();\\n error AmountExceedsCap();\\n}\\n\",\"keccak256\":\"0xe19b65e684577bda587a80b9a1bec15690eded03fa0e98e20c187a0a24a45e3b\",\"license\":\"MIT\"},\"src/interfaces/Types.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.18;\\n\\nimport {IERC20} from \\\"../libraries/SafeERC20.sol\\\";\\n\\nIERC20 constant NATIVE = IERC20(address(0));\\n\\nenum Party {\\n None,\\n Buyer, // Makes a purchase in native currency or ERC20 token.\\n Seller // Provides a good or service in exchange for native currency or ERC20 token.\\n}\\n\\nenum Status {\\n NoDispute,\\n WaitingSettlementBuyer,\\n WaitingSettlementSeller,\\n WaitingBuyer,\\n WaitingSeller,\\n DisputeCreated,\\n TransactionResolved\\n}\\n\\nenum Resolution {\\n TransactionExecuted,\\n TimeoutByBuyer,\\n TimeoutBySeller,\\n RulingEnforced,\\n SettlementReached\\n}\\n\\nstruct Transaction {\\n address payable buyer;\\n address payable seller;\\n uint256 amount;\\n uint256 settlementBuyer; // Settlement amount proposed by the buyer.\\n uint256 settlementSeller; // Settlement amount proposed by the seller.\\n uint256 deadline; // Timestamp at which the transaction can be automatically executed if not disputed.\\n uint256 disputeID; // If dispute exists, the ID of the dispute.\\n uint256 buyerFee; // Total fees paid by the buyer.\\n uint256 sellerFee; // Total fees paid by the seller.\\n uint256 lastFeePaymentTime; // Last time the dispute fees were paid by either party or settlement proposed.\\n Status status;\\n IERC20 token; // Token to pay the seller with.\\n}\\n\",\"keccak256\":\"0x7503e4f09724c869957761fa21f782fa79804e172257d1c35f3f73879d93e544\",\"license\":\"MIT\"},\"src/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/a7a94c77463acea95d979aae1580fb0ddc3b6a1e/contracts/token/ERC20/utils/SafeERC20.sol\\n\\npragma solidity ^0.8.18;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @title SafeERC20\\n/// @dev Wrappers around ERC20 operations that throw on failure (when the token\\n/// contract returns false). Tokens that return no value (and instead revert or\\n/// throw on failure) are also supported, non-reverting calls are assumed to be\\n/// successful.\\n/// To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n/// which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\nlibrary SafeERC20 {\\n /// @dev Calls transfer() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransfer(IERC20 _token, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(abi.encodeCall(IERC20.transfer, (_to, _value)));\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n\\n /// @dev Calls transferFrom() without reverting.\\n /// @param _token Token to transfer.\\n /// @param _from Sender address.\\n /// @param _to Recepient address.\\n /// @param _value Amount transferred.\\n /// @return Whether transfer succeeded or not.\\n function safeTransferFrom(IERC20 _token, address _from, address _to, uint256 _value) internal returns (bool) {\\n (bool success, bytes memory data) = address(_token).call(\\n abi.encodeCall(IERC20.transferFrom, (_from, _to, _value))\\n );\\n return (success && (data.length == 0 || abi.decode(data, (bool))));\\n }\\n}\",\"keccak256\":\"0x60df38c872cae58f18d4b706251445e13542a5d9d94b9db71de02bfcaf7575ee\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a03461007257601f6110ab38819003918201601f19168301916001600160401b038311848410176100775780849260209460405283398101031261007257516001600160a01b038116908190036100725760805260405161101d908161008e8239608051818181606101526101360152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040818152600436101561001457600080fd5b600091823560e01c90816366fb66751461010457508063b71dc2ba146100e3578063d65e9334146100945763e2fdcc171461004e57600080fd5b34610090578160031936011261009057517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b5034610090578060031936011261009057602435916001600160a01b03831683036100e057506100c96100dc92600435610c74565b9051918291602083526020830190610506565b0390f35b80fd5b5034610090576020366003190112610090576100dc906100c96004356108b7565b83833461009057602036600319011261009057634d671c6160e11b835260048035908401819052926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811693909161018091908281602481895afa9586156104d957829683928495859261045b575b505086519163438fdfc360e11b918284528a60048501528560248501526080978885604481865afa9182156104515760249b9c8896899461042a575b5060018c519d8e88815283600482015201528a8d604481885afa95861561042057899d8a976103f0575b509060448c928e51978893849283526004830152600260248301525afa9384156103e657889a89956103ac575b50501690816102fe57505050509361029d61025489956102c5956102a29561027d61025e6102596102b79f6100dc9e9d61024a610254926108b7565b9560011c9061072a565b6108b7565b6105ba565b9c8a81146102e7576102786102728461065b565b916108b7565b61069e565b98610288848861072a565b146102d257610297915061065b565b9361072a565b61074d565b915b8351968796606088526060880190610506565b908682036020880152610506565b9184830390850152610506565b508851906102df8261052b565b81529361072a565b6102788c516102f58161052b565b858152916108b7565b899897999550819396919294508b83916103188383610c74565b9261032291610c74565b61032b906105ba565b9b14156000149b61036b6100dc9b6103656102b79f9a61037a9a61029d996102c59d61039557610278915061035f8861065b565b92610c74565b9a61072a565b146103805761035f915061065b565b916102a4565b5087519061038d8261052b565b815292610c74565b61027891516103a38161052b565b89815292610c74565b6103d1939b508091929550903d106103df575b6103c9818361055d565b810190610598565b9a9250905098928d8061020e565b503d6103bf565b8b513d8a823e3d90fd5b8c92919e508d9750610410604491843d86116103df576103c9818361055d565b925090509f9098509192506101e1565b8c513d8b823e3d90fd5b9093506104459196508a3d8c116103df576103c9818361055d565b5050959095928e6101b7565b8a513d89823e3d90fd5b9350945050955082813d83116104d2575b610476818361055d565b810103126100e0576104878261057f565b506104946020830161057f565b50838201519160e08101519561010082015191600761014082015110156104ce5761016001519385851685036104ce57969193898061017b565b8380fd5b503d61046c565b85513d84823e3d90fd5b60005b8381106104f65750506000910152565b81810151838201526020016104e6565b9060209161051f815180928185528580860191016104e3565b601f01601f1916010190565b6020810190811067ffffffffffffffff82111761054757604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761054757604052565b51906001600160a01b038216820361059357565b600080fd5b9190826080910312610593578151916020810151916060604083015192015190565b9061063d605c6040518094740213abcb2b91030b7321029b2b63632b91033b2ba1605d1b60208301526105f78151809260206035860191016104e3565b81017f206261636b20616e642068616c66206f6620746865206172626974726174696f60358201526637103332b2b99760c91b605582015203603c81018552018361055d565b565b67ffffffffffffffff811161054757601f01601f191660200190565b9061063d602c60405180946b01034b739ba32b0b21037b3160a51b602083015261068e81518092602086860191016104e3565b810103600c81018552018361055d565b604c61063d919392936040519485916a0213abcb2b9103830bcb9960ad1b60208401526106d5815180926020602b870191016104e3565b82016106eb825180936020602b850191016104e3565b017f2c206765747320746865206172626974726174696f6e2066656573206261636b602b820152601760f91b604b82015203602c81018552018361055d565b9190820391821161073757565b634e487b7160e01b600052601160045260246000fd5b605361063d919392936040519485916a0213abcb2b9103830bcb9960ad1b6020840152610784815180926020602b870191016104e3565b820161079a825180936020602b850191016104e3565b017f2c2053656c6c6572206765747320746865206172626974726174696f6e206665602b8201526732b9903130b1b59760c11b604b82015203603381018552018361055d565b81156107ea570490565b634e487b7160e01b600052601260045260246000fd5b81156107ea570690565b9061063d60216040518094600360fc1b602083015261083281518092602086860191016104e3565b810103600181018552018361055d565b908151811015610853570160200190565b634e487b7160e01b600052603260045260246000fd5b8015610737576000190190565b906108808261063f565b61088d604051918261055d565b828152809261089e601f199161063f565b0190602036910137565b60001981146107375760010190565b6108d6670de0b6b3a764000066038d7ea4c68000818406049204610a52565b908015610a17576108e690610a52565b6003815110156108fe576108f99061080a565b6108e6565b80515b801515806109d3575b1561091d5761091890610869565b610901565b9091908061092b5750905090565b61093481610876565b92600090815b8381106109a3575050505060256109a09160405193816109648693518092602080870191016104e3565b8201601760f91b60208201526109848251809360206021850191016104e3565b01630408aa8960e31b602182015203600581018452018261055d565b90565b6109ce906001600160f81b03196109ba8285610842565b5116841a6109c88289610842565b536108a8565b61093a565b506000198101818111610a0257600360fc1b906001600160f81b0319906109fa9085610842565b51161461090a565b60246000634e487b7160e01b81526011600452fd5b506109a0602460405183610a358295518092602080860191016104e3565b8101630408aa8960e31b602082015203600481018452018261055d565b6000908072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b80821015610ba7575b506d04ee2d6d415b85acef810000000080831015610b98575b50662386f26fc1000080831015610b89575b506305f5e10080831015610b7a575b5061271080831015610b6b575b506064821015610b5b575b600a80921015610b51575b60019081602181860195610ae68761063f565b96610af4604051988961055d565b808852610b03601f199161063f565b01366020890137860101905b610b1b575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215610b4c57919082610b0f565b610b14565b9160010191610ad3565b9190606460029104910191610ac8565b60049193920491019138610abd565b60089193920491019138610ab0565b60109193920491019138610aa1565b60209193920491019138610a8f565b604093508104915038610a76565b8015610c1e57600190602081108216604e8210831617610c16578190600a925b808211610bed57505081600019048111610737570290565b90928060001904811161073757818416610c0d575b800292811c90610bd5565b80920291610c02565b9050600a0a90565b50600190565b602161063d919392936040519481610c468793518092602080870191016104e3565b8201600160fd1b6020820152610c6582518093602087850191016104e3565b0103600181018552018361055d565b916001600160a01b03909116908115610faa576040805163313ce56760e01b8152600493909160209182848781845afa938415610f9f57908694939291600094610f5b575b506000908251958680926395d89b4160e01b82525afa938415610f5057600094610ed3575b5060ff96878416610cee81610bb5565b90610cf982846107e0565b9560038210610ebb575060021901898111610ea657610d2c9291610d218b610d279316610bb5565b92610800565b6107e0565b92610d38600391610a52565b938015610e9457610d4890610a52565b80518983161115610d6157610d5c9061080a565b610d48565b97505086515b80151580610e50575b15610d8357610d7e90610869565b610d67565b92939495508215600014610d9f575050506109a0929350610c24565b610daa839593610876565b9460005b818110610e255750506109a09495965090610e166022949392519684610ddd899651809286808a0191016104e3565b8501601760f91b84820152610dfb82518093866021850191016104e3565b0191600160fd1b6021840152835193849187850191016104e3565b0103600281018452018261055d565b610e4b906001600160f81b0319610e3c828c610842565b511660001a6109c8828a610842565b610dae565b506000198101818111610e7f57600360fc1b906001600160f81b031990610e77908b610842565b511614610d70565b601188634e487b7160e01b6000525260246000fd5b50505050909193506109a09250610c24565b601189634e487b7160e01b6000525260246000fd5b9592610ecc915091610d3892610800565b9491610a52565b90933d8082843e610ee4818461055d565b82019183818403126100905780519067ffffffffffffffff8211610f4c570182601f8201121561009057805191610f1a8361063f565b93610f278851958661055d565b8385528584840101116100e0575090610f45918480850191016104e3565b9238610cde565b8280fd5b50513d6000823e3d90fd5b9094508281819593943d8311610f98575b610f76818361055d565b8101031261009057519060ff821682036100e057508593909291906000610cb9565b503d610f6c565b82513d6000823e3d90fd5b60405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606490fdfea2646970667358221220d957a92a13564ba32e6b8701b522f6c8b0ba386a654ff43a0614fdd8dfa0f73564736f6c63430008120033", + "deployedBytecode": "0x60806040818152600436101561001457600080fd5b600091823560e01c90816366fb66751461010457508063b71dc2ba146100e3578063d65e9334146100945763e2fdcc171461004e57600080fd5b34610090578160031936011261009057517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5080fd5b5034610090578060031936011261009057602435916001600160a01b03831683036100e057506100c96100dc92600435610c74565b9051918291602083526020830190610506565b0390f35b80fd5b5034610090576020366003190112610090576100dc906100c96004356108b7565b83833461009057602036600319011261009057634d671c6160e11b835260048035908401819052926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811693909161018091908281602481895afa9586156104d957829683928495859261045b575b505086519163438fdfc360e11b918284528a60048501528560248501526080978885604481865afa9182156104515760249b9c8896899461042a575b5060018c519d8e88815283600482015201528a8d604481885afa95861561042057899d8a976103f0575b509060448c928e51978893849283526004830152600260248301525afa9384156103e657889a89956103ac575b50501690816102fe57505050509361029d61025489956102c5956102a29561027d61025e6102596102b79f6100dc9e9d61024a610254926108b7565b9560011c9061072a565b6108b7565b6105ba565b9c8a81146102e7576102786102728461065b565b916108b7565b61069e565b98610288848861072a565b146102d257610297915061065b565b9361072a565b61074d565b915b8351968796606088526060880190610506565b908682036020880152610506565b9184830390850152610506565b508851906102df8261052b565b81529361072a565b6102788c516102f58161052b565b858152916108b7565b899897999550819396919294508b83916103188383610c74565b9261032291610c74565b61032b906105ba565b9b14156000149b61036b6100dc9b6103656102b79f9a61037a9a61029d996102c59d61039557610278915061035f8861065b565b92610c74565b9a61072a565b146103805761035f915061065b565b916102a4565b5087519061038d8261052b565b815292610c74565b61027891516103a38161052b565b89815292610c74565b6103d1939b508091929550903d106103df575b6103c9818361055d565b810190610598565b9a9250905098928d8061020e565b503d6103bf565b8b513d8a823e3d90fd5b8c92919e508d9750610410604491843d86116103df576103c9818361055d565b925090509f9098509192506101e1565b8c513d8b823e3d90fd5b9093506104459196508a3d8c116103df576103c9818361055d565b5050959095928e6101b7565b8a513d89823e3d90fd5b9350945050955082813d83116104d2575b610476818361055d565b810103126100e0576104878261057f565b506104946020830161057f565b50838201519160e08101519561010082015191600761014082015110156104ce5761016001519385851685036104ce57969193898061017b565b8380fd5b503d61046c565b85513d84823e3d90fd5b60005b8381106104f65750506000910152565b81810151838201526020016104e6565b9060209161051f815180928185528580860191016104e3565b601f01601f1916010190565b6020810190811067ffffffffffffffff82111761054757604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761054757604052565b51906001600160a01b038216820361059357565b600080fd5b9190826080910312610593578151916020810151916060604083015192015190565b9061063d605c6040518094740213abcb2b91030b7321029b2b63632b91033b2ba1605d1b60208301526105f78151809260206035860191016104e3565b81017f206261636b20616e642068616c66206f6620746865206172626974726174696f60358201526637103332b2b99760c91b605582015203603c81018552018361055d565b565b67ffffffffffffffff811161054757601f01601f191660200190565b9061063d602c60405180946b01034b739ba32b0b21037b3160a51b602083015261068e81518092602086860191016104e3565b810103600c81018552018361055d565b604c61063d919392936040519485916a0213abcb2b9103830bcb9960ad1b60208401526106d5815180926020602b870191016104e3565b82016106eb825180936020602b850191016104e3565b017f2c206765747320746865206172626974726174696f6e2066656573206261636b602b820152601760f91b604b82015203602c81018552018361055d565b9190820391821161073757565b634e487b7160e01b600052601160045260246000fd5b605361063d919392936040519485916a0213abcb2b9103830bcb9960ad1b6020840152610784815180926020602b870191016104e3565b820161079a825180936020602b850191016104e3565b017f2c2053656c6c6572206765747320746865206172626974726174696f6e206665602b8201526732b9903130b1b59760c11b604b82015203603381018552018361055d565b81156107ea570490565b634e487b7160e01b600052601260045260246000fd5b81156107ea570690565b9061063d60216040518094600360fc1b602083015261083281518092602086860191016104e3565b810103600181018552018361055d565b908151811015610853570160200190565b634e487b7160e01b600052603260045260246000fd5b8015610737576000190190565b906108808261063f565b61088d604051918261055d565b828152809261089e601f199161063f565b0190602036910137565b60001981146107375760010190565b6108d6670de0b6b3a764000066038d7ea4c68000818406049204610a52565b908015610a17576108e690610a52565b6003815110156108fe576108f99061080a565b6108e6565b80515b801515806109d3575b1561091d5761091890610869565b610901565b9091908061092b5750905090565b61093481610876565b92600090815b8381106109a3575050505060256109a09160405193816109648693518092602080870191016104e3565b8201601760f91b60208201526109848251809360206021850191016104e3565b01630408aa8960e31b602182015203600581018452018261055d565b90565b6109ce906001600160f81b03196109ba8285610842565b5116841a6109c88289610842565b536108a8565b61093a565b506000198101818111610a0257600360fc1b906001600160f81b0319906109fa9085610842565b51161461090a565b60246000634e487b7160e01b81526011600452fd5b506109a0602460405183610a358295518092602080860191016104e3565b8101630408aa8960e31b602082015203600481018452018261055d565b6000908072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b80821015610ba7575b506d04ee2d6d415b85acef810000000080831015610b98575b50662386f26fc1000080831015610b89575b506305f5e10080831015610b7a575b5061271080831015610b6b575b506064821015610b5b575b600a80921015610b51575b60019081602181860195610ae68761063f565b96610af4604051988961055d565b808852610b03601f199161063f565b01366020890137860101905b610b1b575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215610b4c57919082610b0f565b610b14565b9160010191610ad3565b9190606460029104910191610ac8565b60049193920491019138610abd565b60089193920491019138610ab0565b60109193920491019138610aa1565b60209193920491019138610a8f565b604093508104915038610a76565b8015610c1e57600190602081108216604e8210831617610c16578190600a925b808211610bed57505081600019048111610737570290565b90928060001904811161073757818416610c0d575b800292811c90610bd5565b80920291610c02565b9050600a0a90565b50600190565b602161063d919392936040519481610c468793518092602080870191016104e3565b8201600160fd1b6020820152610c6582518093602087850191016104e3565b0103600181018552018361055d565b916001600160a01b03909116908115610faa576040805163313ce56760e01b8152600493909160209182848781845afa938415610f9f57908694939291600094610f5b575b506000908251958680926395d89b4160e01b82525afa938415610f5057600094610ed3575b5060ff96878416610cee81610bb5565b90610cf982846107e0565b9560038210610ebb575060021901898111610ea657610d2c9291610d218b610d279316610bb5565b92610800565b6107e0565b92610d38600391610a52565b938015610e9457610d4890610a52565b80518983161115610d6157610d5c9061080a565b610d48565b97505086515b80151580610e50575b15610d8357610d7e90610869565b610d67565b92939495508215600014610d9f575050506109a0929350610c24565b610daa839593610876565b9460005b818110610e255750506109a09495965090610e166022949392519684610ddd899651809286808a0191016104e3565b8501601760f91b84820152610dfb82518093866021850191016104e3565b0191600160fd1b6021840152835193849187850191016104e3565b0103600281018452018261055d565b610e4b906001600160f81b0319610e3c828c610842565b511660001a6109c8828a610842565b610dae565b506000198101818111610e7f57600360fc1b906001600160f81b031990610e77908b610842565b511614610d70565b601188634e487b7160e01b6000525260246000fd5b50505050909193506109a09250610c24565b601189634e487b7160e01b6000525260246000fd5b9592610ecc915091610d3892610800565b9491610a52565b90933d8082843e610ee4818461055d565b82019183818403126100905780519067ffffffffffffffff8211610f4c570182601f8201121561009057805191610f1a8361063f565b93610f278851958661055d565b8385528584840101116100e0575090610f45918480850191016104e3565b9238610cde565b8280fd5b50513d6000823e3d90fd5b9094508281819593943d8311610f98575b610f76818361055d565b8101031261009057519060ff821682036100e057508593909291906000610cb9565b503d610f6c565b82513d6000823e3d90fd5b60405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606490fdfea2646970667358221220d957a92a13564ba32e6b8701b522f6c8b0ba386a654ff43a0614fdd8dfa0f73564736f6c63430008120033", + "devdoc": { + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_escrow": "The address of the EscrowUniversal contract." + } + }, + "formatEth(uint256)": { + "params": { + "_amountWei": "The amount in wei." + }, + "returns": { + "_0": "The formatted amount." + } + }, + "formatToken(uint256,address)": { + "params": { + "_amountWei": "The amount in wei.", + "_token": "The address of the token." + }, + "returns": { + "_0": "The formatted amount." + } + }, + "getPayoutMessages(uint256)": { + "returns": { + "buyerWins": "The payout message for the case where the buyer wins.", + "noWinner": "The payout message for the case where nobody wins.", + "sellerWins": "The payout message for the case where the seller wins." + } + } + }, + "title": "EscrowView", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "constructor": { + "notice": "Initialize the view contract with the address of the EscrowUniversal contract." + }, + "formatEth(uint256)": { + "notice": "Format an amount in ETH to 3 decimal places." + }, + "formatToken(uint256,address)": { + "notice": "Format an amount in a token to 3 decimal places." + }, + "getPayoutMessages(uint256)": { + "notice": "Get the payout messages for a transaction *once* a dispute is created.The amounts are exclusive of arbitration fees for clarity.The amounts pre-dispute are imprecise as the arbitration fees are not paid yet by either or both parties." + } + }, + "notice": "A view contract for EscrowUniversal to facilitate the display of ruling options.", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/contracts/scripts/generateDeploymentsMarkdown.sh b/contracts/scripts/generateDeploymentsMarkdown.sh index 7ae1dd3..b8db161 100755 --- a/contracts/scripts/generateDeploymentsMarkdown.sh +++ b/contracts/scripts/generateDeploymentsMarkdown.sh @@ -6,6 +6,8 @@ IGNORED_ARTIFACTS=( "CREATE3Factory.json" "MetaEvidence_*" "PNK.json" + "DAI.json" + "WETH.json" "RandomizerOracle.json" "_Implementation.json" "_Proxy.json"