kleros-interaction-2
Version:
Smart contracts interacting with Kleros.
506 lines (505 loc) • 518 kB
JSON
{
"contractName": "TwoPartyArbitrable",
"abi": [
{
"constant": true,
"inputs": [],
"name": "arbitratorExtraData",
"outputs": [
{
"name": "",
"type": "bytes"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "partyA",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "status",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "partyB",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_disputeID",
"type": "uint256"
},
{
"name": "_ruling",
"type": "uint256"
}
],
"name": "rule",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "partyAFee",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "partyBFee",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "arbitrator",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "timeout",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "lastInteraction",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "disputeID",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "amountOfChoices",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_arbitrator",
"type": "address"
},
{
"name": "_timeout",
"type": "uint256"
},
{
"name": "_partyB",
"type": "address"
},
{
"name": "_amountOfChoices",
"type": "uint8"
},
{
"name": "_arbitratorExtraData",
"type": "bytes"
},
{
"name": "_metaEvidence",
"type": "string"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_party",
"type": "uint8"
}
],
"name": "HasToPayFee",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_metaEvidenceID",
"type": "uint256"
},
{
"indexed": false,
"name": "_evidence",
"type": "string"
}
],
"name": "MetaEvidence",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_arbitrator",
"type": "address"
},
{
"indexed": true,
"name": "_disputeID",
"type": "uint256"
},
{
"indexed": false,
"name": "_metaEvidenceID",
"type": "uint256"
}
],
"name": "Dispute",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_arbitrator",
"type": "address"
},
{
"indexed": true,
"name": "_disputeID",
"type": "uint256"
},
{
"indexed": true,
"name": "_party",
"type": "address"
},
{
"indexed": false,
"name": "_evidence",
"type": "string"
}
],
"name": "Evidence",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_arbitrator",
"type": "address"
},
{
"indexed": true,
"name": "_disputeID",
"type": "uint256"
},
{
"indexed": false,
"name": "_ruling",
"type": "uint256"
}
],
"name": "Ruling",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "payArbitrationFeeByPartyA",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "payArbitrationFeeByPartyB",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "timeOutByPartyA",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "timeOutByPartyB",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_evidence",
"type": "string"
}
],
"name": "submitEvidence",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_extraData",
"type": "bytes"
}
],
"name": "appeal",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
}
],
"bytecode": "0x60806040523480156200001157600080fd5b5060405162001673380380620016738339810160409081528151602080840151928401516060850151608086015160a087015160008054600160a060020a031916600160a060020a0388161790559087018051959793959294909391909101918791849162000087916001919084019062000172565b50505060028590556003805460048054600160a060020a031916600160a060020a03881617905561010060a860020a03191633610100021760ff191660ff851617905560408051602080825283518183015283516000937f61606860eb6c87306811e2695215385101daab53bd6ab4e9f9049aead9363c7d938693909283928301918501908083838a5b838110156200012b57818101518382015260200162000111565b50505050905090810190601f168015620001595780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050505062000217565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001b557805160ff1916838001178555620001e5565b82800160010185558215620001e5579182015b82811115620001e5578251825591602001919060010190620001c8565b50620001f3929150620001f7565b5090565b6200021491905b80821115620001f35760008155600101620001fe565b90565b61144c80620002276000396000f3006080604052600436106100fb5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663069fae2a81146101005780630c7ac7b61461014e57806310e1d8ca146101d857806319e2641e14610209578063200d2ed21461021e5780632904011314610257578063311a6c561461026c5780634b40c97414610287578063512491f1146102ae5780636cc6cde1146102c357806370dea79a146102d8578063853c80ce146102ed5780638f71a26514610302578063a010963114610317578063b0a1e2b41461031f578063b1bcce3a14610334578063bac91e2e1461033c578063ce425c8014610395575b600080fd5b6040805160206004803580820135601f810184900484028501840190955284845261014c9436949293602493928401919081908401838280828437509497506103c09650505050505050565b005b34801561015a57600080fd5b50610163610554565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101e457600080fd5b506101ed6105e1565b60408051600160a060020a039092168252519081900360200190f35b34801561021557600080fd5b5061014c6105f5565b34801561022a57600080fd5b50610233610732565b6040518082600481111561024357fe5b60ff16815260200191505060405180910390f35b34801561026357600080fd5b506101ed61073b565b34801561027857600080fd5b5061014c60043560243561074a565b34801561029357600080fd5b5061029c610817565b60408051918252519081900360200190f35b3480156102ba57600080fd5b5061029c61081d565b3480156102cf57600080fd5b506101ed610823565b3480156102e457600080fd5b5061029c610832565b3480156102f957600080fd5b5061014c610838565b34801561030e57600080fd5b5061029c61096e565b61014c610974565b34801561032b57600080fd5b5061029c610c67565b61014c610c6d565b34801561034857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261014c943694929360249392840191908190840183828082843750949750610f3b9650505050505050565b3480156103a157600080fd5b506103aa611135565b6040805160ff9092168252519081900360200190f35b6003546101009004600160a060020a03163314806103e85750600454600160a060020a031633145b1515610464576040805160e560020a62461bcd02815260206004820152602960248201527f43616e206f6e6c792062652063616c6c65642062792070617274792041206f7260448201527f20706172747920422e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054600854604080517f49912f880000000000000000000000000000000000000000000000000000000081526004810183815260248201928352865160448301528651600160a060020a03909516956349912f88953495948994909260649091019160208601918190849084905b838110156104ec5781810151838201526020016104d4565b50505050905090810190601f1680156105195780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b15801561053857600080fd5b505af115801561054c573d6000803e3d6000fd5b505050505050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105d95780601f106105ae576101008083540402835291602001916105d9565b820191906000526020600020905b8154815290600101906020018083116105bc57829003601f168201915b505050505081565b6003546101009004600160a060020a031681565b6003546101009004600160a060020a0316331461065c576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920412e0000604482015290519081900360640190fd5b600260095460ff16600481111561066f57fe5b146106c4576040805160e560020a62461bcd02815260206004820152601860248201527f4e6f742077616974696e6720666f7220706172747920422e0000000000000000604482015290519081900360640190fd5b60025460075401421015610722576040805160e560020a62461bcd02815260206004820181905260248201527f5468652074696d656f75742074696d6520686173206e6f74207061737365642e604482015290519081900360640190fd5b60085461073090600161113e565b565b60095460ff1681565b600454600160a060020a031681565b600054600160a060020a031633146107d2576040805160e560020a62461bcd02815260206004820152602560248201527f43616e206f6e6c792062652063616c6c6564206279207468652061726269747260448201527f61746f722e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080518281529051839133917f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769181900360200190a3610813828261113e565b5050565b60055481565b60065481565b600054600160a060020a031681565b60025481565b600454600160a060020a0316331461089a576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920422e0000604482015290519081900360640190fd5b600160095460ff1660048111156108ad57fe5b14610902576040805160e560020a62461bcd02815260206004820152601860248201527f4e6f742077616974696e6720666f7220706172747920412e0000000000000000604482015290519081900360640190fd5b60025460075401421015610960576040805160e560020a62461bcd02815260206004820181905260248201527f5468652074696d656f75742074696d6520686173206e6f74207061737365642e604482015290519081900360640190fd5b60085461073090600261113e565b60075481565b6003546000906101009004600160a060020a031633146109de576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920412e0000604482015290519081900360640190fd5b6000546040517ff7434ea90000000000000000000000000000000000000000000000000000000081526020600482019081526001805460026000198284161561010002019091160460248401819052600160a060020a039094169363f7434ea993919291829160449091019084908015610a995780601f10610a6e57610100808354040283529160200191610a99565b820191906000526020600020905b815481529060010190602001808311610a7c57829003601f168201915b505092505050602060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b505050506040513d6020811015610ae357600080fd5b505160058054340190819055909150811115610b6f576040805160e560020a62461bcd02815260206004820152602a60248201527f4e6f7420656e6f7567682045544820746f20636f76657220617262697472617460448201527f696f6e20636f7374732e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b600360095460ff166004811115610b8257fe5b10610bfd576040805160e560020a62461bcd02815260206004820152602160248201527f446973707574652068617320616c7265616479206265656e206372656174656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b42600755600654811115610c5b576009805460ff191660021790556040517fba8db766b5582c21593909b57af48297714ea2c508bfff6c537ce36bb853e5689060019080825b60ff16815260200191505060405180910390a1610c64565b610c64816112af565b50565b60085481565b600454600090600160a060020a03163314610cd2576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920422e0000604482015290519081900360640190fd5b6000546040517ff7434ea90000000000000000000000000000000000000000000000000000000081526020600482019081526001805460026000198284161561010002019091160460248401819052600160a060020a039094169363f7434ea993919291829160449091019084908015610d8d5780601f10610d6257610100808354040283529160200191610d8d565b820191906000526020600020905b815481529060010190602001808311610d7057829003601f168201915b505092505050602060405180830381600087803b158015610dad57600080fd5b505af1158015610dc1573d6000803e3d6000fd5b505050506040513d6020811015610dd757600080fd5b505160068054340190819055909150811115610e63576040805160e560020a62461bcd02815260206004820152602a60248201527f4e6f7420656e6f7567682045544820746f20636f76657220617262697472617460448201527f696f6e20636f7374732e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b600360095460ff166004811115610e7657fe5b10610ef1576040805160e560020a62461bcd02815260206004820152602160248201527f446973707574652068617320616c7265616479206265656e206372656174656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b42600755600554811115610c5b576009805460ff191660011790556040517fba8db766b5582c21593909b57af48297714ea2c508bfff6c537ce36bb853e568906000908082610c43565b6003546101009004600160a060020a0316331480610f635750600454600160a060020a031633145b1515610fdf576040805160e560020a62461bcd02815260206004820152602960248201527f43616e206f6e6c792062652063616c6c65642062792070617274792041206f7260448201527f20706172747920422e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600360095460ff166004811115610ff257fe5b101561106e576040805160e560020a62461bcd02815260206004820152602560248201527f546865206469737075746520686173206e6f74206265656e206372656174656460448201527f207965742e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b33600160a060020a03166008546000809054906101000a9004600160a060020a0316600160a060020a03167fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c846040518080602001828103825283818151815260200191508051906020019080838360005b838110156110f85781810151838201526020016110e0565b50505050905090810190601f1680156111255780820380516001836020036101000a031916815260200191505b509250505060405180910390a450565b60035460ff1681565b6008548214611197576040805160e560020a62461bcd02815260206004820152601160248201527f57726f6e6720646973707574652049442e000000000000000000000000000000604482015290519081900360640190fd5b60035460ff168111156111f4576040805160e560020a62461bcd02815260206004820152600f60248201527f496e76616c69642072756c696e672e0000000000000000000000000000000000604482015290519081900360640190fd5b600181141561125357600360019054906101000a9004600160a060020a0316600160a060020a03166108fc6006546005541161123257600654611236565b6005545b6040518115909202916000818181858888f193505050505061129e565b600281141561129e57600454600654600554600160a060020a03909216916108fc911061128257600654611286565b6005545b6040518115909202916000818181858888f150505050505b50506009805460ff19166004179055565b6009805460ff191660039081179091556000549054604080517fc13517e100000000000000000000000000000000000000000000000000000000815260ff90921660048301818152602484019283526001805460026101008284161502600019019091160460448601819052600160a060020a039096169563c13517e195889592939291606490910190849080156113885780601f1061135d57610100808354040283529160200191611388565b820191906000526020600020905b81548152906001019060200180831161136b57829003601f168201915b505093505050506020604051808303818588803b1580156113a857600080fd5b505af11580156113bc573d6000803e3d6000fd5b50505050506040513d60208110156113d357600080fd5b50516008819055600080546040805192835251600160a060020a03909116917fc21357d76c2ee05713ed6e2edb9a5f60ab1e8748c56201385df30007f774f58d919081900360200190a3505600a165627a7a723058209e89e227253aa71afd645e5d0acbc15f6590b2acc6e2c2ec146fb352b2db2a3f0029",
"deployedBytecode": "0x6080604052600436106100fb5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663069fae2a81146101005780630c7ac7b61461014e57806310e1d8ca146101d857806319e2641e14610209578063200d2ed21461021e5780632904011314610257578063311a6c561461026c5780634b40c97414610287578063512491f1146102ae5780636cc6cde1146102c357806370dea79a146102d8578063853c80ce146102ed5780638f71a26514610302578063a010963114610317578063b0a1e2b41461031f578063b1bcce3a14610334578063bac91e2e1461033c578063ce425c8014610395575b600080fd5b6040805160206004803580820135601f810184900484028501840190955284845261014c9436949293602493928401919081908401838280828437509497506103c09650505050505050565b005b34801561015a57600080fd5b50610163610554565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101e457600080fd5b506101ed6105e1565b60408051600160a060020a039092168252519081900360200190f35b34801561021557600080fd5b5061014c6105f5565b34801561022a57600080fd5b50610233610732565b6040518082600481111561024357fe5b60ff16815260200191505060405180910390f35b34801561026357600080fd5b506101ed61073b565b34801561027857600080fd5b5061014c60043560243561074a565b34801561029357600080fd5b5061029c610817565b60408051918252519081900360200190f35b3480156102ba57600080fd5b5061029c61081d565b3480156102cf57600080fd5b506101ed610823565b3480156102e457600080fd5b5061029c610832565b3480156102f957600080fd5b5061014c610838565b34801561030e57600080fd5b5061029c61096e565b61014c610974565b34801561032b57600080fd5b5061029c610c67565b61014c610c6d565b34801561034857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261014c943694929360249392840191908190840183828082843750949750610f3b9650505050505050565b3480156103a157600080fd5b506103aa611135565b6040805160ff9092168252519081900360200190f35b6003546101009004600160a060020a03163314806103e85750600454600160a060020a031633145b1515610464576040805160e560020a62461bcd02815260206004820152602960248201527f43616e206f6e6c792062652063616c6c65642062792070617274792041206f7260448201527f20706172747920422e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b60008054600854604080517f49912f880000000000000000000000000000000000000000000000000000000081526004810183815260248201928352865160448301528651600160a060020a03909516956349912f88953495948994909260649091019160208601918190849084905b838110156104ec5781810151838201526020016104d4565b50505050905090810190601f1680156105195780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b15801561053857600080fd5b505af115801561054c573d6000803e3d6000fd5b505050505050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105d95780601f106105ae576101008083540402835291602001916105d9565b820191906000526020600020905b8154815290600101906020018083116105bc57829003601f168201915b505050505081565b6003546101009004600160a060020a031681565b6003546101009004600160a060020a0316331461065c576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920412e0000604482015290519081900360640190fd5b600260095460ff16600481111561066f57fe5b146106c4576040805160e560020a62461bcd02815260206004820152601860248201527f4e6f742077616974696e6720666f7220706172747920422e0000000000000000604482015290519081900360640190fd5b60025460075401421015610722576040805160e560020a62461bcd02815260206004820181905260248201527f5468652074696d656f75742074696d6520686173206e6f74207061737365642e604482015290519081900360640190fd5b60085461073090600161113e565b565b60095460ff1681565b600454600160a060020a031681565b600054600160a060020a031633146107d2576040805160e560020a62461bcd02815260206004820152602560248201527f43616e206f6e6c792062652063616c6c6564206279207468652061726269747260448201527f61746f722e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b604080518281529051839133917f394027a5fa6e098a1191094d1719d6929b9abc535fcc0c8f448d6a4e756222769181900360200190a3610813828261113e565b5050565b60055481565b60065481565b600054600160a060020a031681565b60025481565b600454600160a060020a0316331461089a576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920422e0000604482015290519081900360640190fd5b600160095460ff1660048111156108ad57fe5b14610902576040805160e560020a62461bcd02815260206004820152601860248201527f4e6f742077616974696e6720666f7220706172747920412e0000000000000000604482015290519081900360640190fd5b60025460075401421015610960576040805160e560020a62461bcd02815260206004820181905260248201527f5468652074696d656f75742074696d6520686173206e6f74207061737365642e604482015290519081900360640190fd5b60085461073090600261113e565b60075481565b6003546000906101009004600160a060020a031633146109de576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920412e0000604482015290519081900360640190fd5b6000546040517ff7434ea90000000000000000000000000000000000000000000000000000000081526020600482019081526001805460026000198284161561010002019091160460248401819052600160a060020a039094169363f7434ea993919291829160449091019084908015610a995780601f10610a6e57610100808354040283529160200191610a99565b820191906000526020600020905b815481529060010190602001808311610a7c57829003601f168201915b505092505050602060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b505050506040513d6020811015610ae357600080fd5b505160058054340190819055909150811115610b6f576040805160e560020a62461bcd02815260206004820152602a60248201527f4e6f7420656e6f7567682045544820746f20636f76657220617262697472617460448201527f696f6e20636f7374732e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b600360095460ff166004811115610b8257fe5b10610bfd576040805160e560020a62461bcd02815260206004820152602160248201527f446973707574652068617320616c7265616479206265656e206372656174656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b42600755600654811115610c5b576009805460ff191660021790556040517fba8db766b5582c21593909b57af48297714ea2c508bfff6c537ce36bb853e5689060019080825b60ff16815260200191505060405180910390a1610c64565b610c64816112af565b50565b60085481565b600454600090600160a060020a03163314610cd2576040805160e560020a62461bcd02815260206004820152601e60248201527f43616e206f6e6c792062652063616c6c656420627920706172747920422e0000604482015290519081900360640190fd5b6000546040517ff7434ea90000000000000000000000000000000000000000000000000000000081526020600482019081526001805460026000198284161561010002019091160460248401819052600160a060020a039094169363f7434ea993919291829160449091019084908015610d8d5780601f10610d6257610100808354040283529160200191610d8d565b820191906000526020600020905b815481529060010190602001808311610d7057829003601f168201915b505092505050602060405180830381600087803b158015610dad57600080fd5b505af1158015610dc1573d6000803e3d6000fd5b505050506040513d6020811015610dd757600080fd5b505160068054340190819055909150811115610e63576040805160e560020a62461bcd02815260206004820152602a60248201527f4e6f7420656e6f7567682045544820746f20636f76657220617262697472617460448201527f696f6e20636f7374732e00000000000000000000000000000000000000000000606482015290519081900360840190fd5b600360095460ff166004811115610e7657fe5b10610ef1576040805160e560020a62461bcd02815260206004820152602160248201527f446973707574652068617320616c7265616479206265656e206372656174656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b42600755600554811115610c5b576009805460ff191660011790556040517fba8db766b5582c21593909b57af48297714ea2c508bfff6c537ce36bb853e568906000908082610c43565b6003546101009004600160a060020a0316331480610f635750600454600160a060020a031633145b1515610fdf576040805160e560020a62461bcd02815260206004820152602960248201527f43616e206f6e6c792062652063616c6c65642062792070617274792041206f7260448201527f20706172747920422e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600360095460ff166004811115610ff257fe5b101561106e576040805160e560020a62461bcd02815260206004820152602560248201527f546865206469737075746520686173206e6f74206265656e206372656174656460448201527f207965742e000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b33600160a060020a03166008546000809054906101000a9004600160a060020a0316600160a060020a03167fdccf2f8b2cc26eafcd61905cba744cff4b81d14740725f6376390dc6298a6a3c846040518080602001828103825283818151815260200191508051906020019080838360005b838110156110f85781810151838201526020016110e0565b50505050905090810190601f1680156111255780820380516001836020036101000a031916815260200191505b509250505060405180910390a450565b60035460ff1681565b6008548214611197576040805160e560020a62461bcd02815260206004820152601160248201527f57726f6e6720646973707574652049442e000000000000000000000000000000604482015290519081900360640190fd5b60035460ff168111156111f4576040805160e560020a62461bcd02815260206004820152600f60248201527f496e76616c69642072756c696e672e0000000000000000000000000000000000604482015290519081900360640190fd5b600181141561125357600360019054906101000a9004600160a060020a0316600160a060020a03166108fc6006546005541161123257600654611236565b6005545b6040518115909202916000818181858888f193505050505061129e565b600281141561129e57600454600654600554600160a060020a03909216916108fc911061128257600654611286565b6005545b6040518115909202916000818181858888f150505050505b50506009805460ff19166004179055565b6009805460ff191660039081179091556000549054604080517fc13517e100000000000000000000000000000000000000000000000000000000815260ff90921660048301818152602484019283526001805460026101008284161502600019019091160460448601819052600160a060020a039096169563c13517e195889592939291606490910190849080156113885780601f1061135d57610100808354040283529160200191611388565b820191906000526020600020905b81548152906001019060200180831161136b57829003601f168201915b505093505050506020604051808303818588803b1580156113a857600080fd5b505af11580156113bc573d6000803e3d6000fd5b50505050506040513d60208110156113d357600080fd5b50516008819055600080546040805192835251600160a060020a03909116917fc21357d76c2ee05713ed6e2edb9a5f60ab1e8748c56201385df30007f774f58d919081900360200190a3505600a165627a7a723058209e89e227253aa71afd645e5d0acbc15f6590b2acc6e2c2ec146fb352b2db2a3f0029",
"sourceMap": "678:7458:32:-;;;2480:453;8:9:-1;5:2;;;30:1;27;20:12;5:2;2480:453:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2848:10:2;:24;;-1:-1:-1;;;;;;2848:24:2;-1:-1:-1;;;;;2848:24:2;;;;;2480:453:32;;;2882:42:2;;2480:453:32;;;;;;;;;;;;;;;;;2882:42:2;;-1:-1:-1;;2882:42:2;;;;;:::i;:::-;-1:-1:-1;;;2764:7:32;:18;;;2792:6;:19;;2821:6;:16;;-1:-1:-1;;;;;;2821:16:32;-1:-1:-1;;;;;2821:16:32;;;;;-1:-1:-1;;;;;;2792:19:32;2801:10;2792:19;;;-1:-1:-1;;2847:34:32;;;;;;;2896:30;;;;;;;;;;;;;;;-1:-1:-1;;2896:30:32;;;;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2896:30:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2480:453;;;;;;678:7458;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;678:7458:32;;;-1:-1:-1;678:7458:32;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "678:7458:32:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6945:132;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6945:132:32;;-1:-1:-1;6945:132:32;;-1:-1:-1;;;;;;;6945:132:32;;;691:32:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;691:32:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;691:32:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;879:21:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;879:21:32;;;;;;;;-1:-1:-1;;;;;879:21:32;;;;;;;;;;;;;;5737:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5737:264:32;;;;1246:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1246:20:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;906:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;906:21:32;;;;3332:182:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3332:182:2;;;;;;;933:21:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;933:21:32;;;;;;;;;;;;;;;;;;;;994;;8:9:-1;5:2;;;30:1;27;20:12;5:2;994:21:32;;;;657:28:2;;8:9:-1;5:2;;;30:1;27;20:12;5:2;657:28:2;;;;726:19:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;726:19:32;;;;6071:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6071:264:32;;;;1055:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1055:27:32;;;;3293:909;;;;1135:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1135:21:32;;;;4380:909;;;;6463:223;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6463:223:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6463:223:32;;-1:-1:-1;6463:223:32;;-1:-1:-1;;;;;;;6463:223:32;845:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;845:28:32;;;;;;;;;;;;;;;;;;;;;;;6945:132;1721:6;;;;;-1:-1:-1;;;;;1721:6:32;1707:10;:20;;:44;;-1:-1:-1;1745:6:32;;-1:-1:-1;;;;;1745:6:32;1731:10;:20;1707:44;1699:98;;;;;;;-1:-1:-1;;;;;1699:98:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7014:10;;;7049:9;;7014:56;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7014:10:32;;;;:17;;7038:9;;7049;7059:10;;7014:56;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;7014:56:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7014:56:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7014:56:32;;;;;6945:132;:::o;691:32:2:-;;;;;;;;;;;;;;;-1:-1:-1;;691:32:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;879:21:32:-;;;;;;-1:-1:-1;;;;;879:21:32;;:::o;5737:264::-;1536:6;;;;;-1:-1:-1;;;;;1536:6:32;1522:10;:20;1514:63;;;;;-1:-1:-1;;;;;1514:63:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;5810:20;5800:6;;;;:30;;;;;;;;;5792:67;;;;;-1:-1:-1;;;;;5792:67:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;5902:7;;5884:15;;:25;5877:3;:32;;5869:77;;;;;-1:-1:-1;;;;;5869:77:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5971:9;;5957:37;;1303:1;5957:13;:37::i;:::-;5737:264::o;1246:20::-;;;;;;:::o;906:21::-;;;-1:-1:-1;;;;;906:21:32;;:::o;3332:182:2:-;851:10;;-1:-1:-1;;;;;851:10:2;829;:33;821:83;;;;;-1:-1:-1;;;;;821:83:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3414:49;;;;;;;;3444:10;;3432;;3414:49;;;;;;;;;3474:33;3488:10;3499:7;3474:13;:33::i;:::-;3332:182;;:::o;933:21:32:-;;;;:::o;994:::-;;;;:::o;657:28:2:-;;;-1:-1:-1;;;;;657:28:2;;:::o;726:19:32:-;;;;:::o;6071:264::-;1629:6;;-1:-1:-1;;;;;1629:6:32;1615:10;:20;1607:63;;;;;-1:-1:-1;;;;;1607:63:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;6144:20;6134:6;;;;:30;;;;;;;;;6126:67;;;;;-1:-1:-1;;;;;6126:67:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;6236:7;;6218:15;;:25;6211:3;:32;;6203:77;;;;;-1:-1:-1;;;;;6203:77:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6305:9;;6291:37;;1340:1;6291:13;:37::i;1055:27::-;;;;:::o;3293:909::-;1536:6;;3366:20;;1536:6;;;-1:-1:-1;;;;;1536:6:32;1522:10;:20;1514:63;;;;;-1:-1:-1;;;;;1514:63:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;3389:10;;:47;;;;;;;;;;;;:10;:47;;;-1:-1:-1;;3389:47:32;;;;:10;:47;;;;;;;;;;;;-1:-1:-1;;;;;3389:10:32;;;;:26;;:10;;:47;;;;;;;;:10;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3389:47:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3389:47:32;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3389:47:32;3446:9;:22;;3459:9;3446:22;;;;;3389:47;;-1:-1:-1;3499:28:32;-1:-1:-1;3499:28:32;3478:117;;;;;-1:-1:-1;;;;;3478:117:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3683:21;3674:6;;;;:30;;;;;;;;;3666:76;;;;;-1:-1:-1;;;;;3666:76:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3820:3;3802:15;:21;3950:9;;:27;-1:-1:-1;3946:250:32;;;3993:6;:29;;-1:-1:-1;;3993:29:32;4002:20;3993:29;;;4041:25;;;;3993:29;;4041:25;3993:29;4041:25;;;;;;;;;;;;;;;;;3946:250;;;4156:29;4169:15;4156:12;:29::i;:::-;3293:909;:::o;1135:21::-;;;;:::o;4380:909::-;1629:6;;4453:20;;-1:-1:-1;;;;;1629:6:32;1615:10;:20;1607:63;;;;;-1:-1:-1;;;;;1607:63:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;4476:10;;:47;;;;;;;;;;;;:10;:47;;;-1:-1:-1;;4476:47:32;;;;:10;:47;;;;;;;;;;;;-1:-1:-1;;;;;4476:10:32;;;;:26;;:10;;:47;;;;;;;;:10;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4476:47:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4476:47:32;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4476:47:32;4533:9;:22;;4546:9;4533:22;;;;;4476:47;;-1:-1:-1;4586:28:32;-1:-1:-1;4586:28:32;4565:117;;;;;-1:-1:-1;;;;;4565:117:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4770:21;4761:6;;;;:30;;;;;;;;;4753:76;;;;;-1:-1:-1;;;;;4753:76:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4907:3;4889:15;:21;5037:9;;:27;-1:-1:-1;5033:250:32;;;5080:6;:29;;-1:-1:-1;;5080:29:32;5089:20;5080:29;;;5128:25;;;;-1:-1:-1;;5128:25:32;-1:-1:-1;5128:25:32;;6463:223;1721:6;;;;;-1:-1:-1;;;;;1721:6:32;1707:10;:20;;:44;;-1:-1:-1;1745:6:32;;-1:-1:-1;;;;;1745:6:32;1731:10;:20;1707:44;1699:98;;;;;;;-1:-1:-1;;;;;1699:98:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6550:21;6540:6;;;;:31;;;;;;;;;;6532:81;;;;;-1:-1:-1;;;;;6532:81:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6658:10;-1:-1:-1;;;;;6628:51:32;6648:9;;6637:10;;;;;;;;;-1:-1:-1;;;;;6637:10:32;-1:-1:-1;;;;;6628:51:32;;6669:9;6628:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6628:51:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6463:223;:::o;845:28::-;;;;;;:::o;7416:717::-;7511:9;;7497:23;;7489:53;;;;;-1:-1:-1;;;;;7489:53:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;7571:15;;;;7560:26;;;7552:54;;;;;-1:-1:-1;;;;;7552:54:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;1303:1;7886:21;;7882:209;;;7921:6;;;;;;;;;-1:-1:-1;;;;;7921:6:32;-1:-1:-1;;;;;7921:11:32;:58;7945:9;;7933;;:21;:45;;7969:9;;7933:45;;;7957:9;;7933:45;7921:58;;;;;;;;;;;;;;;;;;;;;;7882:209;;;1340:1;7998:21;;7994:97;;;8033:6;;8057:9;;8045;;-1:-1:-1;;;;;8033:6:32;;;;:58;;-1:-1:-1;8045:45:32;;8081:9;;8045:45;;;8069:9;;8045:45;8033:58;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7994:97:32;-1:-1:-1;;8102:6:32;:24;;-1:-1:-1;;8102:24:32;8111:15;8102:24;;;7416:717::o;5407:254::-;5471:6;:30;;-1:-1:-1;;5471:30:32;5480:21;5471:30;;;;;;-1:-1:-1;5523:10:32;5572:15;;5523:85;;;;;;5572:15;;;;5523:85;;;;;;;;;;;;5471:30;5523:85;;;:10;:85;;;;;-1:-1:-1;;5523:85:32;;;;;;;;;;;-1:-1:-1;;;;;5523:10:32;;;;:24;;5554:16;;5471:30;;5523:85;;;;;;;5471:30;;5523:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5523:85:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5523:85:32;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5523:85:32;5511:9;:97;;;5631:10;;;5623:31;;;;;;;-1:-1:-1;;;;;5631:10:32;;;;5623:31;;;;;;5523:85;5623:31;;;5407:254;:::o",
"source": "/**\n * @title Two-Party Arbitrable\n * @author Clément Lesaege - <clement@lesaege.com>\n * Bug Bounties: This code hasn't undertaken a bug bounty program yet.\n */\n\n\npragma solidity ^0.4.15;\nimport \"./Arbitrable.sol\";\n\n\n/** @title Two-Party Arbitrable\n * @dev A contract between two parties which can be arbitrated. Both parties has to pay for the arbitration fee. The winning party will get its fee refunded.\n * To develop a contract inheriting from this one, you need to:\n * - Redefine RULING_OPTIONS to explain the consequences of the possible rulings.\n * - Redefine executeRuling while still calling super.executeRuling to implement the results of the arbitration.\n */\ncontract TwoPartyArbitrable is Arbitrable {\n uint public timeout; // Time in second a party can take before being considered unresponding and lose the dispute.\n uint8 public amountOfChoices;\n address public partyA;\n address public partyB;\n uint public partyAFee; // Total fees paid by the partyA.\n uint public partyBFee; // Total fees paid by the partyB.\n uint public lastInteraction; // Last interaction for the dispute procedure.\n uint public disputeID;\n enum Status {NoDispute, WaitingPartyA, WaitingPartyB, DisputeCreated, Resolved}\n Status public status;\n\n uint8 constant PARTY_A_WINS = 1;\n uint8 constant PARTY_B_WINS = 2;\n string constant RULING_OPTIONS = \"Party A wins;Party B wins\"; // A plain English of what rulings do. Need to be redefined by the child class.\n\n modifier onlyPartyA{require(msg.sender == partyA, \"Can only be called by party A.\"); _;}\n modifier onlyPartyB{require(msg.sender == partyB, \"Can only be called by party B.\"); _;}\n modifier onlyParty{require(msg.sender == partyA || msg.sender == partyB, \"Can only be called by party A or party B.\"); _;}\n\n enum Party {PartyA, PartyB}\n\n /** @dev Indicate that a party has to pay a fee or would otherwise be considered as loosing.\n * @param _party The party who has to pay.\n */\n event HasToPayFee(Party _party);\n\n /** @dev Constructor. Choose the arbitrator.\n * @param _arbitrator The arbitrator of the contract.\n * @param _timeout Time after which a party automatically loose a dispute.\n * @param _partyB The recipient of the transaction.\n * @param _amountOfChoices The number of ruling options available.\n * @param _arbitratorExtraData Extra data for the arbitrator.\n * @param _metaEvidence Link to the meta-evidence.\n */\n constructor(\n Arbitrator _arbitrator, \n uint _timeout, \n address _partyB,\n uint8 _amountOfChoices,\n bytes _arbitratorExtraData, \n string _metaEvidence\n ) \n Arbitrable(_arbitrator,_arbitratorExtraData) \n public \n {\n timeout = _timeout;\n partyA = msg.sender;\n partyB = _partyB;\n amountOfChoices = _amountOfChoices;\n emit MetaEvidence(0, _metaEvidence);\n }\n\n\n /** @dev Pay the arbitration fee to raise a dispute. To be called by the party A. UNTRUSTED.\n * Note that the arbitrator can have createDispute throw, which will make this function \n * 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 */\n function payArbitrationFeeByPartyA() public payable onlyPartyA {\n uint arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\n partyAFee += msg.value;\n require(\n partyAFee >= arbitrationCost,\n \"Not enough ETH to cover arbitration costs.\"\n ); // Require that the total pay at least the arbitration cost.\n require(status < Status.DisputeCreated, \"Dispute has already been created.\"); // Make sure a dispute has not been created yet.\n\n lastInteraction = now;\n // The partyB still has to pay. This can also happens if he has paid, but arbitrationCost has increased.\n if (partyBFee < arbitrationCost) {\n status = Status.WaitingPartyB;\n emit HasToPayFee(Party.PartyB);\n } else { // The partyB has also paid the fee. We create the dispute\n raiseDispute(arbitrationCost);\n }\n }\n\n\n /** @dev Pay the arbitration fee to raise a dispute. To be called by the party B. UNTRUSTED.\n * Note that this function mirror payArbitrationFeeByPartyA.\n */\n function payArbitrationFeeByPartyB() public payable onlyPartyB {\n uint arbitrationCost = arbitrator.arbitrationCost(arbitratorExtraData);\n partyBFee += msg.value;\n require(\n partyBFee >= arbitrationCost,\n \"Not enough ETH to cover arbitration costs.\"\n ); // Require that the total pay at least the arbitration cost.\n require(status < Status.DisputeCreated, \"Dispute has already been created.\"); // Make sure a dispute has not been created yet.\n\n lastInteraction = now;\n // The partyA still has to pay. This can also happens if he has paid, but arbitrationCost has increased.\n if (partyAFee < arbitrationCost) {\n status = Status.WaitingPartyA;\n emit HasToPayFee(Party.PartyA);\n } else { // The partyA has also paid the fee. We create the dispute\n raiseDispute(arbitrationCost);\n }\n }\n\n /** @dev Create a dispute. UNTRUSTED.\n * @param _arbitrationCost Amount to pay the arbitrator.\n */\n function raiseDispute(uint _arbitrationCost) internal {\n status = Status.DisputeCreated;\n disputeID = arbitrator.createDispute.value(_arbitrationCost)(amountOfChoices,arbitratorExtraData);\n emit Dispute(arbitrator,disputeID,0);\n }\n\n /** @dev Reimburse partyA if partyB fails to pay the fee.\n */\n function timeOutByPartyA() public onlyPartyA {\n require(status == Status.WaitingPartyB, \"Not waiting for party B.\");\n require(now >= lastInteraction + timeout, \"The timeout time has not passed.\");\n\n executeRuling(disputeID,PARTY_A_WINS);\n }\n\n /** @dev Pay partyB if partyA fails to pay the fee.\n */\n function timeOutByPartyB() public onlyPartyB {\n require(status == Status.WaitingPartyA, \"Not waiting for party A.\");\n require(now >= lastInteraction + timeout, \"The timeout time has not passed.\");\n\n executeRuling(disputeID,PARTY_B_WINS);\n }\n\n /** @dev Submit a reference to evidence. EVENT.\n * @param _evidence A link to an evidence using its URI.\n */\n function submitEvidence(string _evidence) public onlyParty {\n require(status >= Status.DisputeCreated, \"The dispute has not been created yet.\");\n emit Evidence(arbitrator,disputeID,msg.sender,_evidence);\n }\n\n /** @dev Appeal an appealable ruling.\n * Transfer the funds to the arbitrator.\n * Note that no checks are required as the checks are done by the arbitrator.\n * @param _extraData Extra data for the arbitrator appeal procedure.\n */\n function appeal(bytes _extraData) public onlyParty payable {\n arbitrator.appeal.value(msg.value)(disputeID,_extraData);\n }\n\n /** @dev Execute a ruling of a dispute. It reimburse the fee to the winning party.\n * This need to be extended by contract inheriting from it.\n * @param _disputeID ID of the dispute in the Arbitrator contract.\n * @param _ruling Ruling given by the arbitrator. 1 : Reimburse the partyA. 2 : Pay the partyB.\n */\n function executeRuling(uint _disputeID, uint _ruling) internal {\n require(_disputeID == disputeID, \"Wrong dispute ID.\");\n require(_ruling <= amountOfChoices, \"Invalid ruling.\");\n\n // Give the arbitration fee back.\n // Note that we use send to prevent a party from blocking the execution.\n // In both cases sends the highest amount paid to avoid ETH to be stuck in \n // the contract if the arbitrator lowers its fee.\n if (_ruling==PARTY_A_WINS)\n partyA.send(partyAFee > partyBFee ? partyAFee : partyBFee);\n else if (_ruling==PARTY_B_WINS)\n partyB.send(partyAFee > partyBFee ? partyAFee : partyBFee);\n\n status = Status.Resolved;\n }\n\n}\n",
"sourcePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/TwoPartyArbitrable.sol",
"ast": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/TwoPartyArbitrable.sol",
"exportedSymbols": {
"TwoPartyArbitrable": [
10439
]
},
"id": 10440,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10013,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "167:24:32"
},
{
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/arbitration/Arbitrable.sol",
"file": "./Arbitrable.sol",
"id": 10014,
"nodeType": "ImportDirective",
"scope": 10440,
"sourceUnit": 596,
"src": "192:26:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 10015,
"name": "Arbitrable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 595,
"src": "709:10:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Arbitrable_$595",
"typeString": "contract Arbitrable"
}
},
"id": 10016,
"nodeType": "InheritanceSpecifier",
"src": "709:10:32"
}
],
"contractDependencies": [
595
],
"contractKind": "contract",
"documentation": "@title Two-Party Arbitrable\n @dev A contract between two parties which can be arbitrated. Both parties has to pay for the arbitration fee. The winning party will get its fee refunded.\n To develop a contract inheriting from this one, you need to:\n - Redefine RULING_OPTIONS to explain the consequences of the possible rulings.\n - Redefine executeRuling while still calling super.executeRuling to implement the results of the arbitration.",
"fullyImplemented": true,
"id": 10439,
"linearizedBaseContracts": [
10439,
595
],
"name": "TwoPartyArbitrable",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 10018,
"name": "timeout",
"nodeType": "VariableDeclaration",
"scope": 10439,
"src": "726:19:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10017,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "726:4:32",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 10020,
"name": "amountOfChoices",
"nodeType": "VariableDeclaration",
"scope": 10439,
"src": "845:28:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 10019,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "845:5:32",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 10022,
"name": "partyA",
"nodeType": "VariableDeclaration",
"scope": 10439,
"src": "879:21:32",
"stateVariable": true,
"storageLocation": "default",