diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95d70dc18..d3f173704 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,6 +42,12 @@ When you write Solidity code, be aware of the distinction between ``assert(cond) ``assert(cond)`` and ``require(cond)`` both cause a failure in the EVM execution when ``cond`` evaluates to 0. They use different EVM opcodes that cause different gas consumptions. More importantly, a convention dictates when to use which. Use ``assert(cond)`` only when you are confident that ``cond`` is always true. When an ``assert`` fires, that's considered as a bug in the Solidity program (or the Solidity compiler). For detecting invalid user inputs or invalid return values from other contracts, use ``require()``. +#### Returning a Boolean Indicating Success + +We currently check the return values from all external function calls. In the Solidity code, all external function calls should happen within `require(...)` unless the function returns nothing. + +When we implement a function that has nothing to return, we make the function always return true. So we have a more consistent visual look without naked calls. + #### Signature Convention A signature should be useful only in one context. For this purpose, we follow a convention dictating the format of signed messages. The first fields of a signed message must look like:: diff --git a/raiden_contracts/constants.py b/raiden_contracts/constants.py index 59df68f1a..774457e9d 100644 --- a/raiden_contracts/constants.py +++ b/raiden_contracts/constants.py @@ -23,6 +23,7 @@ CONTRACT_SERVICE_REGISTRY = "ServiceRegistry" CONTRACT_USER_DEPOSIT = "UserDeposit" CONTRACT_ONE_TO_N = "OneToN" +CONTRACT_DEPOSIT = "Deposit" # Timeouts TEST_SETTLE_TIMEOUT_MIN = 5 @@ -51,6 +52,9 @@ # EndpointRegistry EVENT_ADDRESS_REGISTERED = "AddressRegistered" +# ServiceRegistry +EVENT_REGISTERED_SERVICE = "RegisteredService" + class ChannelEvent(str, Enum): OPENED = "ChannelOpened" diff --git a/raiden_contracts/data/contracts.json b/raiden_contracts/data/contracts.json index 537248c49..c2f6670dd 100644 --- a/raiden_contracts/data/contracts.json +++ b/raiden_contracts/data/contracts.json @@ -378,6 +378,88 @@ "bin-runtime": "608060405234801561001057600080fd5b5060043610610128576000357c0100000000000000000000000000000000000000000000000000000000900480633c68eb81116100bf57806395d89b411161008e57806395d89b41146104a7578063a0712d681461052a578063a9059cbb14610558578063ad62f1ca146105be578063dd62ed3e1461060c57610128565b80633c68eb811461037857806354fd4d501461038257806370a082311461040557806380edef8e1461045d57610128565b806323b872dd116100fb57806323b872dd1461025257806327e235e3146102d8578063313ce5671461033057806332424aa31461035457610128565b806306fdde031461012d578063095ea7b3146101b057806318160ddd146102165780631b3ed72214610234575b600080fd5b610135610684565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017557808201518184015260208101905061015a565b50505050905090810190601f1680156101a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101fc600480360360408110156101c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610722565b604051808215151515815260200191505060405180910390f35b61021e610814565b6040518082815260200191505060405180910390f35b61023c61081d565b6040518082815260200191505060405180910390f35b6102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610823565b604051808215151515815260200191505060405180910390f35b61031a600480360360208110156102ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b87565b6040518082815260200191505060405180910390f35b610338610b9f565b604051808260ff1660ff16815260200191505060405180910390f35b61035c610bb6565b604051808260ff1660ff16815260200191505060405180910390f35b610380610bc9565b005b61038a610cf0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103ca5780820151818401526020810190506103af565b50505050905090810190601f1680156103f75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104476004803603602081101561041b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d8e565b6040518082815260200191505060405180910390f35b610465610dd7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104af610dfd565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ef5780820151818401526020810190506104d4565b50505050905090810190601f16801561051c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105566004803603602081101561054057600080fd5b8101908080359060200190929190505050610e9b565b005b6105a46004803603604081101561056e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ea8565b604051808215151515815260200191505060405180910390f35b61060a600480360360408110156105d457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611011565b005b61066e6004803603604081101561062257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611111565b6040518082815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561071a5780601f106106ef5761010080835404028352916020019161071a565b820191906000526020600020905b8154815290600101906020018083116106fd57829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008054905090565b60075481565b600081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561087357600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156108fe57600080fd5b60008211151561090d57600080fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109d8575081600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156109e45750600082115b15610b7b5781600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610b80565b600090505b9392505050565b60016020528060005260406000206000915090505481565b6000600660009054906101000a900460ff16905090565b600660009054906101000a900460ff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c2557600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff1631111515610c4b57600080fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610cca573d6000803e3d6000fd5b5060003073ffffffffffffffffffffffffffffffffffffffff1631141515610cee57fe5b565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d865780601f10610d5b57610100808354040283529160200191610d86565b820191906000526020600020905b815481529060010190602001808311610d6957829003601f168201915b505050505081565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e935780601f10610e6857610100808354040283529160200191610e93565b820191906000526020600020905b815481529060010190602001808311610e7657829003601f168201915b505050505081565b610ea58133611011565b50565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610ef95750600082115b156110065781600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905061100b565b600090505b92915050565b81600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808282540192505081905550818173ffffffffffffffffffffffffffffffffffffffff167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe60405160405180910390a381600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156110ff57600080fd5b816000541015151561110d57fe5b5050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490509291505056fea165627a7a72305820e3289fcdd1db772d229efe6866b098ec7e3f97dc5b0a43fb7b17bde8691de9000029", "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"supply\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplier\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"transferFunds\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner_address\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"num\",\"type\":\"uint256\"},{\"name\":\"target\",\"type\":\"address\"}],\"name\":\"mintFor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"initial_supply\",\"type\":\"uint256\"},{\"name\":\"decimal_units\",\"type\":\"uint8\"},{\"name\":\"token_name\",\"type\":\"string\"},{\"name\":\"token_symbol\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_num\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"details\":\"Contract constructor function.\",\"params\":{\"decimal_units\":\"Number of token decimals.\",\"initial_supply\":\"Initial supply of tokens.\",\"token_name\":\"Token name for display.\",\"token_symbol\":\"Token symbol.\"}}},\"title\":\"CustomToken\"},\"userdoc\":{\"methods\":{\"mint(uint256)\":{\"notice\":\"Allows `num` tokens to be minted and assigned to `msg.sender`\"},\"mintFor(uint256,address)\":{\"notice\":\"Allows `num` tokens to be minted and assigned to `target`\"},\"transferFunds()\":{\"notice\":\"Transfers the collected ETH to the contract owner.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/test/CustomToken.sol\":\"CustomToken\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/test/CustomToken.sol\":{\"keccak256\":\"0x828c5089b318fe59ddc7303d8506463c2d90521fcc80b01f6ffe624e16b4c80d\",\"urls\":[\"bzzr://c83d6ffe3b0745c38d57718c1d7bc1b5b1b0bfaa8025a80aa3151b52241e45b2\"]},\"data/source/test/StandardToken.sol\":{\"keccak256\":\"0x08ba7a6582ab0636410d27fab1dbed11c71200176a65779c35b9b79e55c84b9a\",\"urls\":[\"bzzr://b44fb2f169d6d4cab715780abbc885f9e80bccf829a106b9a65aa53512b6aff3\"]}},\"version\":1}" }, + "Deposit": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "release_at", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "withdrawer", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "token", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_token", + "type": "address" + }, + { + "name": "_release_at", + "type": "uint256" + }, + { + "name": "_withdrawer", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bin": "608060405234801561001057600080fd5b5060405160608061070c8339810180604052606081101561003057600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160028190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061061d806100ef6000396000f3fe608060405234801561001057600080fd5b5060043610610069576000357c01000000000000000000000000000000000000000000000000000000009004806351cff8d91461006e578063a0d711c4146100b2578063cdc18424146100d0578063fc0c546a1461011a575b600080fd5b6100b06004803603602081101561008457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610164565b005b6100ba6105a0565b6040518082815260200191505060405180910390f35b6100d86105a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101226105cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561022057600080fd5b505afa158015610234573d6000803e3d6000fd5b505050506040513d602081101561024a57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610322576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f7468652063616c6c6572206973206e6f7420746865207769746864726177657281525060200191505060405180910390fd5b600254421015151561039c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6465706f736974206e6f742072656c656173656420796574000000000000000081525060200191505060405180910390fd5b600081111515610414576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f6e6f7468696e6720746f2077697468647261770000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104d857600080fd5b505af11580156104ec573d6000803e3d6000fd5b505050506040513d602081101561050257600080fd5b81019080805190602001909291905050501515610587576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e206469646e2774207472616e73666572000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16ff5b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a723058208fbc1de5e64184305339d9d5a747de164a888131f80d248c0db35d96600a07050029", + "bin-runtime": "608060405234801561001057600080fd5b5060043610610069576000357c01000000000000000000000000000000000000000000000000000000009004806351cff8d91461006e578063a0d711c4146100b2578063cdc18424146100d0578063fc0c546a1461011a575b600080fd5b6100b06004803603602081101561008457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610164565b005b6100ba6105a0565b6040518082815260200191505060405180910390f35b6100d86105a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101226105cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561022057600080fd5b505afa158015610234573d6000803e3d6000fd5b505050506040513d602081101561024a57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610322576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f7468652063616c6c6572206973206e6f7420746865207769746864726177657281525060200191505060405180910390fd5b600254421015151561039c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6465706f736974206e6f742072656c656173656420796574000000000000000081525060200191505060405180910390fd5b600081111515610414576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f6e6f7468696e6720746f2077697468647261770000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104d857600080fd5b505af11580156104ec573d6000803e3d6000fd5b505050506040513d602081101561050257600080fd5b81019080805190602001909291905050501515610587576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e206469646e2774207472616e73666572000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16ff5b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a723058208fbc1de5e64184305339d9d5a747de164a888131f80d248c0db35d96600a07050029", + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"release_at\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawer\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"},{\"name\":\"_release_at\",\"type\":\"uint256\"},{\"name\":\"_withdrawer\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{\"constructor\":{\"params\":{\"_release_at\":\"The timestap after which the withdrawer can withdraw the deposit.\",\"_token\":\"The address of the ERC20 token contract where the deposit is accounted.\",\"_withdrawer\":\"The address that can withdraw the deposit after the release time.\"}},\"withdraw(address)\":{\"params\":{\"_to\":\"The address where the withdrawn tokens should go.\"}}}},\"userdoc\":{\"methods\":{\"withdraw(address)\":{\"notice\":\"Withdraws the tokens that have been deposited. Only `withdrawer` can call this.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/services/ServiceRegistry.sol\":\"Deposit\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x2566b42f123826aed4c039c50d6fbe3433e43461e0b7b8d8821c02bacfd34907\",\"urls\":[\"bzzr://16b6b8a940b5dedee7489f41faaad98ffafa76e738e828964d1d760fca7c355d\"]}},\"version\":1}" + }, "ECVerify": { "abi": [], "bin": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820d07d4ace801220bc77564a51b838fe92ea823858a63a7b5fddae4ea3c97105570029", @@ -966,9 +1048,9 @@ "type": "event" } ], - "bin": "60806040523480156200001157600080fd5b50604051606080620022cc833981018060405260608110156200003357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515620000fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f546f6b656e2061742061646472657373207a65726f000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620001a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5365727669636552656769737472792061742061646472657373207a65726f0081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200024a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f5544432061742061646472657373207a65726f0000000000000000000000000081525060200191505060405180910390fd5b6200026483620005fb640100000000026401000000009004565b1515620002d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f6b656e20686173206e6f20636f646500000000000000000000000000000081525060200191505060405180910390fd5b620002f382620005fb640100000000026401000000009004565b151562000368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f53657276696365526567697374727920686173206e6f20636f6465000000000081525060200191505060405180910390fd5b6200038281620005fb640100000000026401000000009004565b1515620003f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f55444320686173206e6f20636f6465000000000000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200053f57600080fd5b505afa15801562000554573d6000803e3d6000fd5b505050506040513d60208110156200056b57600080fd5b8101908080519060200190929190505050111515620005f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f546f6b656e2077697468207a65726f20746f74616c20737570706c790000000081525060200191505060405180910390fd5b5050506200060e565b600080823b905060008111915050919050565b611cae806200061e6000396000f3fe608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100785780637709bc781461023b57806381c6dac214610297578063d3b6c080146102e1578063fc0c546a146105535761009a565b80630e7dfb731461009f578063637d89d4146101455780636766923e1461018f575b600080fd5b61012b600480360360808110156100b557600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061059d565b604051808215151515815260200191505060405180910390f35b61014d610c4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610225600480360360a08110156101a557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c71565b6040518082815260200191505060405180910390f35b61027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e58565b604051808215151515815260200191505060405180910390f35b61029f610e6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61055160048036036101408110156102f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460018302840111640100000000831117156103a757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561040a57600080fd5b82018360208201111561041c57600080fd5b8035906020019184600183028401116401000000008311171561043e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104cb57600080fd5b8201836020820111156104dd57600080fd5b803590602001918460018302840111640100000000831117156104ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610e91565b005b61055b6112c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d604081101561071257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561074257fe5b82600481111561074e57fe5b148061077057506003600481111561076257fe5b82600481111561076e57fe5b145b80610790575060048081111561078257fe5b82600481111561078e57fe5b145b1515610804576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b438110151561087b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561095b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610aa057600080fd5b505af1158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b81019080805190602001909291905050501515610b4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610c9f57fe5b0485101515610d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610d4257fe5b0486101515610db9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e905060006050905060006064888402811515610dd557fe5b0489019050600060648985850302811515610dec57fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff160101811515610e4257fe5b0690508083019550505050505095945050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea1828b8b868b338a886112e9565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7557600080fd5b505afa158015610f89573d6000803e3d6000fd5b505050506040513d6020811015610f9f57600080fd5b81019080805190602001909291905050509050610fbf82828e8e3361175f565b1515611033576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611142578082015181840152602081019050611127565b50505050905090810190601f16801561116f5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156111a857808201518184015260208101905061118d565b50505050905090810190601f1680156111d55780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b1580156111fc57600080fd5b505af1158015611210573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113bd57600080fd5b505afa1580156113d1573d6000803e3d6000fd5b505050506040513d60208110156113e757600080fd5b8101908080519060200190929190505050905060006114a5308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b8101908080519060200190929190505050878b88611a52565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561154a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051602081830303815290604052805190602001209050600060036000838152602001908152602001600020905088816001015410151561164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b15801561183857600080fd5b505afa15801561184c573d6000803e3d6000fd5b505050506040513d604081101561186257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561189257fe5b82600481111561189e57fe5b141515611913576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561197757600080fd5b505afa15801561198b573d6000803e3d6000fd5b505050506040513d60208110156119a157600080fd5b81019080805190602001909291905050509050808210151515611a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611a4081838a8a8a610c71565b43101594505050505095945050505050565b6000808686600680811115611a6357fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b602083101515611b125780518252602082019150602081019050602083039250611aed565b6001836020036101000a03801982511681845116808217855250505050505090500182815260200195505050505050604051602081830303815290604052805190602001209050611b638184611b6f565b91505095945050505050565b600060418251141515611b8157600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff161015611bb157601b810190505b601b8160ff161480611bc65750601c8160ff16145b1515611bd157600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611c2e573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611c7657600080fd5b8393505050509291505056fea165627a7a723058204b92abba850d859de89dc45500d60e9941e2423459bff7db702f4308ebd0267f0029", - "bin-runtime": "608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100785780637709bc781461023b57806381c6dac214610297578063d3b6c080146102e1578063fc0c546a146105535761009a565b80630e7dfb731461009f578063637d89d4146101455780636766923e1461018f575b600080fd5b61012b600480360360808110156100b557600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061059d565b604051808215151515815260200191505060405180910390f35b61014d610c4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610225600480360360a08110156101a557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c71565b6040518082815260200191505060405180910390f35b61027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e58565b604051808215151515815260200191505060405180910390f35b61029f610e6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61055160048036036101408110156102f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460018302840111640100000000831117156103a757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561040a57600080fd5b82018360208201111561041c57600080fd5b8035906020019184600183028401116401000000008311171561043e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104cb57600080fd5b8201836020820111156104dd57600080fd5b803590602001918460018302840111640100000000831117156104ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610e91565b005b61055b6112c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d604081101561071257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561074257fe5b82600481111561074e57fe5b148061077057506003600481111561076257fe5b82600481111561076e57fe5b145b80610790575060048081111561078257fe5b82600481111561078e57fe5b145b1515610804576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b438110151561087b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561095b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610aa057600080fd5b505af1158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b81019080805190602001909291905050501515610b4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610c9f57fe5b0485101515610d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610d4257fe5b0486101515610db9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e905060006050905060006064888402811515610dd557fe5b0489019050600060648985850302811515610dec57fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff160101811515610e4257fe5b0690508083019550505050505095945050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea1828b8b868b338a886112e9565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7557600080fd5b505afa158015610f89573d6000803e3d6000fd5b505050506040513d6020811015610f9f57600080fd5b81019080805190602001909291905050509050610fbf82828e8e3361175f565b1515611033576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611142578082015181840152602081019050611127565b50505050905090810190601f16801561116f5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156111a857808201518184015260208101905061118d565b50505050905090810190601f1680156111d55780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b1580156111fc57600080fd5b505af1158015611210573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113bd57600080fd5b505afa1580156113d1573d6000803e3d6000fd5b505050506040513d60208110156113e757600080fd5b8101908080519060200190929190505050905060006114a5308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b8101908080519060200190929190505050878b88611a52565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561154a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051602081830303815290604052805190602001209050600060036000838152602001908152602001600020905088816001015410151561164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b15801561183857600080fd5b505afa15801561184c573d6000803e3d6000fd5b505050506040513d604081101561186257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561189257fe5b82600481111561189e57fe5b141515611913576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561197757600080fd5b505afa15801561198b573d6000803e3d6000fd5b505050506040513d60208110156119a157600080fd5b81019080805190602001909291905050509050808210151515611a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611a4081838a8a8a610c71565b43101594505050505095945050505050565b6000808686600680811115611a6357fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b602083101515611b125780518252602082019150602081019050602083039250611aed565b6001836020036101000a03801982511681845116808217855250505050505090500182815260200195505050505050604051602081830303815290604052805190602001209050611b638184611b6f565b91505095945050505050565b600060418251141515611b8157600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff161015611bb157601b810190505b601b8160ff161480611bc65750601c8160ff16145b1515611bd157600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611c2e573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611c7657600080fd5b8393505050509291505056fea165627a7a723058204b92abba850d859de89dc45500d60e9941e2423459bff7db702f4308ebd0267f0029", - "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"}],\"name\":\"claimReward\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"user_deposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"closed_at_block\",\"type\":\"uint256\"},{\"name\":\"settle_timeout\",\"type\":\"uint256\"},{\"name\":\"participant1\",\"type\":\"address\"},{\"name\":\"participant2\",\"type\":\"address\"},{\"name\":\"monitoring_service_address\",\"type\":\"address\"}],\"name\":\"firstBlockAllowedToMonitor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"contractExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"service_registry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"},{\"name\":\"balance_hash\",\"type\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"additional_hash\",\"type\":\"bytes32\"},{\"name\":\"closing_signature\",\"type\":\"bytes\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"reward_proof_signature\",\"type\":\"bytes\"}],\"name\":\"monitor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token_address\",\"type\":\"address\"},{\"name\":\"_service_registry_address\",\"type\":\"address\"},{\"name\":\"_udc_address\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"token_network_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"raiden_node_address\",\"type\":\"address\"}],\"name\":\"NewBalanceProofReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"reward_identifier\",\"type\":\"bytes32\"}],\"name\":\"RewardClaimed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"params\":{\"closing_participant\":\"Address of the participant of the channel that called close\",\"non_closing_participant\":\"The other participant of the channel\",\"token_network_address\":\"Address of the Token Network in which the channel exists\"}},\"constructor\":{\"params\":{\"_service_registry_address\":\"The address of the ServiceRegistry contract\",\"_token_address\":\"The address of the token to use for rewards\"}},\"contractExists(address)\":{\"params\":{\"contract_address\":\"The address to check whether a contract is deployed or not\"},\"return\":\"True if a contract exists, false otherwise\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"params\":{\"nonce\":\"Strictly monotonic value used to order BPs omitting PB specific params, since these will not be provided in the future\",\"reward_amount\":\"Amount of tokens to be rewarded\",\"reward_proof_signature\":\"The signature of the signed reward proof\",\"token_network_address\":\"Address of the Token Network in which the channel being monitored exists.\"}}}},\"userdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"notice\":\"Called after a monitored channel is settled in order for MS to claim the reward Can be called once per settled channel by everyone on behalf of MS\"},\"constructor\":\"Set the default values for the smart contract\",\"contractExists(address)\":{\"notice\":\"Check if a contract exists\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"notice\":\"Called by a registered MS, when providing a new balance proof to a monitored channel. Can be called multiple times by different registered MSs as long as the BP provided is newer than the current newest registered BP.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/services/MonitoringService.sol\":\"MonitoringService\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/lib/ECVerify.sol\":{\"keccak256\":\"0x8bb402baa478eb53252d77b63982e12685adda290cf4dfa1d8f510284f8df3e9\",\"urls\":[\"bzzr://474c3db1bb54bb831c32eb2ab67a0e870489994bd4d4b8a8fa24b54935211d43\"]},\"data/source/raiden/SecretRegistry.sol\":{\"keccak256\":\"0xb8078bc048ccdeb7c58026754f22fc378baf3b24090db0f17d10bda6cd4951b4\",\"urls\":[\"bzzr://f7a072330393a85a6a274ef526ac2ca0f8eb217bf5f48c18b3080be7ac3a7ede\"]},\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/TokenNetwork.sol\":{\"keccak256\":\"0xe8abde4af3b77ab25167f3bd056ce1acd8d16fa2aec09861b41b118e038ce0f5\",\"urls\":[\"bzzr://1161945467e0f0c7cc39df9b33450d88f35fa1b4d76306030f49fbdd481c4326\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/MonitoringService.sol\":{\"keccak256\":\"0x52f6eb0877d929cf69342fb3c0cd1e455d9804acf15bbc5be8ce1b6580b9a9a3\",\"urls\":[\"bzzr://e5aac1ffdf3ef3d3bf5d8c491312336b3eff7153d1cdb74eedf873d6cd88f204\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x69d05c038fa9777ab94296c12593ab4c341c858979b448be1338d4708db26192\",\"urls\":[\"bzzr://bf06e95a4a3deb2599a3e2cf6c5111c965ed610c622509580c5a5467b6eadf3e\"]},\"data/source/services/UserDeposit.sol\":{\"keccak256\":\"0x23fae922fe184ab0e4a1a25349f7ade63103c298625bc29c4f1b285619d054f0\",\"urls\":[\"bzzr://42777a151afd25154d5adfc875921c00261cae360b676cad959e62829b2fe5b6\"]}},\"version\":1}" + "bin": "60806040523480156200001157600080fd5b50604051606080620022cc833981018060405260608110156200003357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515620000fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f546f6b656e2061742061646472657373207a65726f000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620001a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5365727669636552656769737472792061742061646472657373207a65726f0081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200024a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f5544432061742061646472657373207a65726f0000000000000000000000000081525060200191505060405180910390fd5b6200026483620005fb640100000000026401000000009004565b1515620002d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f6b656e20686173206e6f20636f646500000000000000000000000000000081525060200191505060405180910390fd5b620002f382620005fb640100000000026401000000009004565b151562000368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f53657276696365526567697374727920686173206e6f20636f6465000000000081525060200191505060405180910390fd5b6200038281620005fb640100000000026401000000009004565b1515620003f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f55444320686173206e6f20636f6465000000000000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200053f57600080fd5b505afa15801562000554573d6000803e3d6000fd5b505050506040513d60208110156200056b57600080fd5b8101908080519060200190929190505050111515620005f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f546f6b656e2077697468207a65726f20746f74616c20737570706c790000000081525060200191505060405180910390fd5b5050506200060e565b600080823b905060008111915050919050565b611cae806200061e6000396000f3fe608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100785780637709bc781461023b57806381c6dac214610297578063d3b6c080146102e1578063fc0c546a146105535761009a565b80630e7dfb731461009f578063637d89d4146101455780636766923e1461018f575b600080fd5b61012b600480360360808110156100b557600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061059d565b604051808215151515815260200191505060405180910390f35b61014d610c4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610225600480360360a08110156101a557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c71565b6040518082815260200191505060405180910390f35b61027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e58565b604051808215151515815260200191505060405180910390f35b61029f610e6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61055160048036036101408110156102f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460018302840111640100000000831117156103a757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561040a57600080fd5b82018360208201111561041c57600080fd5b8035906020019184600183028401116401000000008311171561043e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104cb57600080fd5b8201836020820111156104dd57600080fd5b803590602001918460018302840111640100000000831117156104ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610e91565b005b61055b6112c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d604081101561071257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561074257fe5b82600481111561074e57fe5b148061077057506003600481111561076257fe5b82600481111561076e57fe5b145b80610790575060048081111561078257fe5b82600481111561078e57fe5b145b1515610804576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b438110151561087b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561095b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610aa057600080fd5b505af1158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b81019080805190602001909291905050501515610b4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610c9f57fe5b0485101515610d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610d4257fe5b0486101515610db9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e905060006050905060006064888402811515610dd557fe5b0489019050600060648985850302811515610dec57fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff160101811515610e4257fe5b0690508083019550505050505095945050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea1828b8b868b338a886112e9565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7557600080fd5b505afa158015610f89573d6000803e3d6000fd5b505050506040513d6020811015610f9f57600080fd5b81019080805190602001909291905050509050610fbf82828e8e3361175f565b1515611033576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611142578082015181840152602081019050611127565b50505050905090810190601f16801561116f5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156111a857808201518184015260208101905061118d565b50505050905090810190601f1680156111d55780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b1580156111fc57600080fd5b505af1158015611210573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113bd57600080fd5b505afa1580156113d1573d6000803e3d6000fd5b505050506040513d60208110156113e757600080fd5b8101908080519060200190929190505050905060006114a5308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b8101908080519060200190929190505050878b88611a52565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561154a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051602081830303815290604052805190602001209050600060036000838152602001908152602001600020905088816001015410151561164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b15801561183857600080fd5b505afa15801561184c573d6000803e3d6000fd5b505050506040513d604081101561186257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561189257fe5b82600481111561189e57fe5b141515611913576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561197757600080fd5b505afa15801561198b573d6000803e3d6000fd5b505050506040513d60208110156119a157600080fd5b81019080805190602001909291905050509050808210151515611a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611a4081838a8a8a610c71565b43101594505050505095945050505050565b6000808686600680811115611a6357fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b602083101515611b125780518252602082019150602081019050602083039250611aed565b6001836020036101000a03801982511681845116808217855250505050505090500182815260200195505050505050604051602081830303815290604052805190602001209050611b638184611b6f565b91505095945050505050565b600060418251141515611b8157600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff161015611bb157601b810190505b601b8160ff161480611bc65750601c8160ff16145b1515611bd157600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611c2e573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611c7657600080fd5b8393505050509291505056fea165627a7a72305820eba33b38938aaae58e4510356c6421ddd5b3642348f53e6aab5fa6ae8fa3d93a0029", + "bin-runtime": "608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100785780637709bc781461023b57806381c6dac214610297578063d3b6c080146102e1578063fc0c546a146105535761009a565b80630e7dfb731461009f578063637d89d4146101455780636766923e1461018f575b600080fd5b61012b600480360360808110156100b557600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061059d565b604051808215151515815260200191505060405180910390f35b61014d610c4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610225600480360360a08110156101a557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c71565b6040518082815260200191505060405180910390f35b61027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e58565b604051808215151515815260200191505060405180910390f35b61029f610e6b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61055160048036036101408110156102f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460018302840111640100000000831117156103a757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561040a57600080fd5b82018360208201111561041c57600080fd5b8035906020019184600183028401116401000000008311171561043e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104cb57600080fd5b8201836020820111156104dd57600080fd5b803590602001918460018302840111640100000000831117156104ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610e91565b005b61055b6112c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b1580156106e857600080fd5b505afa1580156106fc573d6000803e3d6000fd5b505050506040513d604081101561071257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561074257fe5b82600481111561074e57fe5b148061077057506003600481111561076257fe5b82600481111561076e57fe5b145b80610790575060048081111561078257fe5b82600481111561078e57fe5b145b1515610804576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b438110151561087b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561095b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610aa057600080fd5b505af1158015610ab4573d6000803e3d6000fd5b505050506040513d6020811015610aca57600080fd5b81019080805190602001909291905050501515610b4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610c9f57fe5b0485101515610d16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811515610d4257fe5b0486101515610db9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e905060006050905060006064888402811515610dd557fe5b0489019050600060648985850302811515610dec57fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff160101811515610e4257fe5b0690508083019550505050505095945050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ea1828b8b868b338a886112e9565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f7557600080fd5b505afa158015610f89573d6000803e3d6000fd5b505050506040513d6020811015610f9f57600080fd5b81019080805190602001909291905050509050610fbf82828e8e3361175f565b1515611033576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611142578082015181840152602081019050611127565b50505050905090810190601f16801561116f5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156111a857808201518184015260208101905061118d565b50505050905090810190601f1680156111d55780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b1580156111fc57600080fd5b505af1158015611210573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113bd57600080fd5b505afa1580156113d1573d6000803e3d6000fd5b505050506040513d60208110156113e757600080fd5b8101908080519060200190929190505050905060006114a5308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d602081101561148c57600080fd5b8101908080519060200190929190505050878b88611a52565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561154a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140192505050604051602081830303815290604052805190602001209050600060036000838152602001908152602001600020905088816001015410151561164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b15801561183857600080fd5b505afa15801561184c573d6000803e3d6000fd5b505050506040513d604081101561186257600080fd5b81019080805190602001909291908051906020019092919050505080935081925050506002600481111561189257fe5b82600481111561189e57fe5b141515611913576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561197757600080fd5b505afa15801561198b573d6000803e3d6000fd5b505050506040513d60208110156119a157600080fd5b81019080805190602001909291905050509050808210151515611a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611a4081838a8a8a610c71565b43101594505050505095945050505050565b6000808686600680811115611a6357fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b602083101515611b125780518252602082019150602081019050602083039250611aed565b6001836020036101000a03801982511681845116808217855250505050505090500182815260200195505050505050604051602081830303815290604052805190602001209050611b638184611b6f565b91505095945050505050565b600060418251141515611b8157600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff161015611bb157601b810190505b601b8160ff161480611bc65750601c8160ff16145b1515611bd157600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611c2e573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611c7657600080fd5b8393505050509291505056fea165627a7a72305820eba33b38938aaae58e4510356c6421ddd5b3642348f53e6aab5fa6ae8fa3d93a0029", + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"}],\"name\":\"claimReward\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"user_deposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"closed_at_block\",\"type\":\"uint256\"},{\"name\":\"settle_timeout\",\"type\":\"uint256\"},{\"name\":\"participant1\",\"type\":\"address\"},{\"name\":\"participant2\",\"type\":\"address\"},{\"name\":\"monitoring_service_address\",\"type\":\"address\"}],\"name\":\"firstBlockAllowedToMonitor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"contractExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"service_registry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"},{\"name\":\"balance_hash\",\"type\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"additional_hash\",\"type\":\"bytes32\"},{\"name\":\"closing_signature\",\"type\":\"bytes\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"reward_proof_signature\",\"type\":\"bytes\"}],\"name\":\"monitor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token_address\",\"type\":\"address\"},{\"name\":\"_service_registry_address\",\"type\":\"address\"},{\"name\":\"_udc_address\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"token_network_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"raiden_node_address\",\"type\":\"address\"}],\"name\":\"NewBalanceProofReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"reward_identifier\",\"type\":\"bytes32\"}],\"name\":\"RewardClaimed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"params\":{\"closing_participant\":\"Address of the participant of the channel that called close\",\"non_closing_participant\":\"The other participant of the channel\",\"token_network_address\":\"Address of the Token Network in which the channel exists\"}},\"constructor\":{\"params\":{\"_service_registry_address\":\"The address of the ServiceRegistry contract\",\"_token_address\":\"The address of the token to use for rewards\"}},\"contractExists(address)\":{\"params\":{\"contract_address\":\"The address to check whether a contract is deployed or not\"},\"return\":\"True if a contract exists, false otherwise\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"params\":{\"nonce\":\"Strictly monotonic value used to order BPs omitting PB specific params, since these will not be provided in the future\",\"reward_amount\":\"Amount of tokens to be rewarded\",\"reward_proof_signature\":\"The signature of the signed reward proof\",\"token_network_address\":\"Address of the Token Network in which the channel being monitored exists.\"}}}},\"userdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"notice\":\"Called after a monitored channel is settled in order for MS to claim the reward Can be called once per settled channel by everyone on behalf of MS\"},\"constructor\":\"Set the default values for the smart contract\",\"contractExists(address)\":{\"notice\":\"Check if a contract exists\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"notice\":\"Called by a registered MS, when providing a new balance proof to a monitored channel. Can be called multiple times by different registered MSs as long as the BP provided is newer than the current newest registered BP.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/services/MonitoringService.sol\":\"MonitoringService\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/lib/ECVerify.sol\":{\"keccak256\":\"0x8bb402baa478eb53252d77b63982e12685adda290cf4dfa1d8f510284f8df3e9\",\"urls\":[\"bzzr://474c3db1bb54bb831c32eb2ab67a0e870489994bd4d4b8a8fa24b54935211d43\"]},\"data/source/raiden/SecretRegistry.sol\":{\"keccak256\":\"0xb8078bc048ccdeb7c58026754f22fc378baf3b24090db0f17d10bda6cd4951b4\",\"urls\":[\"bzzr://f7a072330393a85a6a274ef526ac2ca0f8eb217bf5f48c18b3080be7ac3a7ede\"]},\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/TokenNetwork.sol\":{\"keccak256\":\"0xe8abde4af3b77ab25167f3bd056ce1acd8d16fa2aec09861b41b118e038ce0f5\",\"urls\":[\"bzzr://1161945467e0f0c7cc39df9b33450d88f35fa1b4d76306030f49fbdd481c4326\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/MonitoringService.sol\":{\"keccak256\":\"0x52f6eb0877d929cf69342fb3c0cd1e455d9804acf15bbc5be8ce1b6580b9a9a3\",\"urls\":[\"bzzr://e5aac1ffdf3ef3d3bf5d8c491312336b3eff7153d1cdb74eedf873d6cd88f204\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x2566b42f123826aed4c039c50d6fbe3433e43461e0b7b8d8821c02bacfd34907\",\"urls\":[\"bzzr://16b6b8a940b5dedee7489f41faaad98ffafa76e738e828964d1d760fca7c355d\"]},\"data/source/services/UserDeposit.sol\":{\"keccak256\":\"0x23fae922fe184ab0e4a1a25349f7ade63103c298625bc29c4f1b285619d054f0\",\"urls\":[\"bzzr://42777a151afd25154d5adfc875921c00261cae360b676cad959e62829b2fe5b6\"]}},\"version\":1}" }, "MonitoringServiceInternalsTest": { "abi": [ @@ -1324,9 +1406,9 @@ "type": "event" } ], - "bin": "60806040523480156200001157600080fd5b5060405160608062002736833981018060405260608110156200003357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050828282600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151562000101576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f546f6b656e2061742061646472657373207a65726f000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620001a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5365727669636552656769737472792061742061646472657373207a65726f0081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200024d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f5544432061742061646472657373207a65726f0000000000000000000000000081525060200191505060405180910390fd5b620002678362000601640100000000026401000000009004565b1515620002dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f6b656e20686173206e6f20636f646500000000000000000000000000000081525060200191505060405180910390fd5b620002f68262000601640100000000026401000000009004565b15156200036b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f53657276696365526567697374727920686173206e6f20636f6465000000000081525060200191505060405180910390fd5b620003858162000601640100000000026401000000009004565b1515620003fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f55444320686173206e6f20636f6465000000000000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200054257600080fd5b505afa15801562000557573d6000803e3d6000fd5b505050506040513d60208110156200056e57600080fd5b8101908080519060200190929190505050111515620005f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f546f6b656e2077697468207a65726f20746f74616c20737570706c790000000081525060200191505060405180910390fd5b50505050505062000614565b600080823b905060008111915050919050565b61211280620006246000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100835780637709bc781461060957806381c6dac214610665578063d3b6c080146106af578063dcf1376714610921578063fc0c546a14610963576100bb565b80630e7dfb73146100c05780633a48602e14610166578063637d89d41461032c5780636766923e146103765780636a83a94814610422575b600080fd5b61014c600480360360808110156100d657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b604051808215151515815260200191505060405180910390f35b6102ea600480360360a081101561017c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101c357600080fd5b8201836020820111156101d557600080fd5b803590602001918460018302840111640100000000831117156101f757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561026457600080fd5b82018360208201111561027657600080fd5b8035906020019184600183028401116401000000008311171561029857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061105b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610334611075565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040c600480360360a081101561038c57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061109b565b6040518082815260200191505060405180910390f35b610607600480360361010081101561043957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104ea57600080fd5b8201836020820111156104fc57600080fd5b8035906020019184600183028401116401000000008311171561051e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561058157600080fd5b82018360208201111561059357600080fd5b803590602001918460018302840111640100000000831117156105b557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611282565b005b61064b6004803603602081101561061f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061129c565b604051808215151515815260200191505060405180910390f35b61066d6112af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61091f60048036036101408110156106c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561074157600080fd5b82018360208201111561075357600080fd5b8035906020019184600183028401116401000000008311171561077557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156107d857600080fd5b8201836020820111156107ea57600080fd5b8035906020019184600183028401116401000000008311171561080c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561089957600080fd5b8201836020820111156108ab57600080fd5b803590602001918460018302840111640100000000831117156108cd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506112d5565b005b61094d6004803603602081101561093757600080fd5b8101908080359060200190929190505050611708565b6040518082815260200191505060405180910390f35b61096b611728565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6040811015610b2257600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115610b5257fe5b826004811115610b5e57fe5b1480610b80575060036004811115610b7257fe5b826004811115610b7e57fe5b145b80610ba05750600480811115610b9257fe5b826004811115610b9e57fe5b145b1515610c14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b4381101515610c8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515610d6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610eb057600080fd5b505af1158015610ec4573d6000803e3d6000fd5b505050506040513d6020811015610eda57600080fd5b81019080805190602001909291905050501515610f5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600061106a868686868661174d565b905095945050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8115156110c957fe5b0485101515611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81151561116c57fe5b04861015156111e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e9050600060509050600060648884028115156111ff57fe5b048901905060006064898585030281151561121657fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16010181151561126c57fe5b0690508083019550505050505095945050505050565b611292888888888888888861186a565b5050505050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6112e5828b8b868b338a8861186a565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113b957600080fd5b505afa1580156113cd573d6000803e3d6000fd5b505050506040513d60208110156113e357600080fd5b8101908080519060200190929190505050905061140382828e8e33611ce0565b1515611477576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561158657808201518184015260208101905061156b565b50505050905090810190601f1680156115b35780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156115ec5780820151818401526020810190506115d1565b50505050905090810190601f1680156116195780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b15801561164057600080fd5b505af1158015611654573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b600060036000838152602001908152602001600020600101549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080868660068081111561175e57fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b60208310151561180d57805182526020820191506020810190506020830392506117e8565b6001836020036101000a0380198251168184511680821785525050505050509050018281526020019550505050505060405160208183030381529060405280519060200120905061185e8184611fd3565b91505095945050505050565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561193e57600080fd5b505afa158015611952573d6000803e3d6000fd5b505050506040513d602081101561196857600080fd5b810190808051906020019092919050505090506000611a26308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156119e357600080fd5b505afa1580156119f7573d6000803e3d6000fd5b505050506040513d6020811015611a0d57600080fd5b8101908080519060200190929190505050878b8861174d565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611acb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000600360008381526020019081526020016000209050888160010154101515611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015611db957600080fd5b505afa158015611dcd573d6000803e3d6000fd5b505050506040513d6040811015611de357600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115611e1357fe5b826004811115611e1f57fe5b141515611e94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611ef857600080fd5b505afa158015611f0c573d6000803e3d6000fd5b505050506040513d6020811015611f2257600080fd5b81019080805190602001909291905050509050808210151515611fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611fc181838a8a8a61109b565b43101594505050505095945050505050565b600060418251141515611fe557600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff16101561201557601b810190505b601b8160ff16148061202a5750601c8160ff16145b151561203557600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612092573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156120da57600080fd5b8393505050509291505056fea165627a7a7230582011e24f3c92a78ef65afe98629b40bcbf361a601adce6834e15f36aea9d297a660029", - "bin-runtime": "608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100835780637709bc781461060957806381c6dac214610665578063d3b6c080146106af578063dcf1376714610921578063fc0c546a14610963576100bb565b80630e7dfb73146100c05780633a48602e14610166578063637d89d41461032c5780636766923e146103765780636a83a94814610422575b600080fd5b61014c600480360360808110156100d657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b604051808215151515815260200191505060405180910390f35b6102ea600480360360a081101561017c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101c357600080fd5b8201836020820111156101d557600080fd5b803590602001918460018302840111640100000000831117156101f757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561026457600080fd5b82018360208201111561027657600080fd5b8035906020019184600183028401116401000000008311171561029857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061105b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610334611075565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040c600480360360a081101561038c57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061109b565b6040518082815260200191505060405180910390f35b610607600480360361010081101561043957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104ea57600080fd5b8201836020820111156104fc57600080fd5b8035906020019184600183028401116401000000008311171561051e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561058157600080fd5b82018360208201111561059357600080fd5b803590602001918460018302840111640100000000831117156105b557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611282565b005b61064b6004803603602081101561061f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061129c565b604051808215151515815260200191505060405180910390f35b61066d6112af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61091f60048036036101408110156106c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561074157600080fd5b82018360208201111561075357600080fd5b8035906020019184600183028401116401000000008311171561077557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156107d857600080fd5b8201836020820111156107ea57600080fd5b8035906020019184600183028401116401000000008311171561080c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561089957600080fd5b8201836020820111156108ab57600080fd5b803590602001918460018302840111640100000000831117156108cd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506112d5565b005b61094d6004803603602081101561093757600080fd5b8101908080359060200190929190505050611708565b6040518082815260200191505060405180910390f35b61096b611728565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6040811015610b2257600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115610b5257fe5b826004811115610b5e57fe5b1480610b80575060036004811115610b7257fe5b826004811115610b7e57fe5b145b80610ba05750600480811115610b9257fe5b826004811115610b9e57fe5b145b1515610c14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b4381101515610c8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515610d6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610eb057600080fd5b505af1158015610ec4573d6000803e3d6000fd5b505050506040513d6020811015610eda57600080fd5b81019080805190602001909291905050501515610f5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600061106a868686868661174d565b905095945050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8115156110c957fe5b0485101515611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81151561116c57fe5b04861015156111e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e9050600060509050600060648884028115156111ff57fe5b048901905060006064898585030281151561121657fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16010181151561126c57fe5b0690508083019550505050505095945050505050565b611292888888888888888861186a565b5050505050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6112e5828b8b868b338a8861186a565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113b957600080fd5b505afa1580156113cd573d6000803e3d6000fd5b505050506040513d60208110156113e357600080fd5b8101908080519060200190929190505050905061140382828e8e33611ce0565b1515611477576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561158657808201518184015260208101905061156b565b50505050905090810190601f1680156115b35780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156115ec5780820151818401526020810190506115d1565b50505050905090810190601f1680156116195780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b15801561164057600080fd5b505af1158015611654573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b600060036000838152602001908152602001600020600101549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080868660068081111561175e57fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b60208310151561180d57805182526020820191506020810190506020830392506117e8565b6001836020036101000a0380198251168184511680821785525050505050509050018281526020019550505050505060405160208183030381529060405280519060200120905061185e8184611fd3565b91505095945050505050565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561193e57600080fd5b505afa158015611952573d6000803e3d6000fd5b505050506040513d602081101561196857600080fd5b810190808051906020019092919050505090506000611a26308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156119e357600080fd5b505afa1580156119f7573d6000803e3d6000fd5b505050506040513d6020811015611a0d57600080fd5b8101908080519060200190929190505050878b8861174d565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611acb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000600360008381526020019081526020016000209050888160010154101515611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015611db957600080fd5b505afa158015611dcd573d6000803e3d6000fd5b505050506040513d6040811015611de357600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115611e1357fe5b826004811115611e1f57fe5b141515611e94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611ef857600080fd5b505afa158015611f0c573d6000803e3d6000fd5b505050506040513d6020811015611f2257600080fd5b81019080805190602001909291905050509050808210151515611fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611fc181838a8a8a61109b565b43101594505050505095945050505050565b600060418251141515611fe557600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff16101561201557601b810190505b601b8160ff16148061202a5750601c8160ff16145b151561203557600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612092573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156120da57600080fd5b8393505050509291505056fea165627a7a7230582011e24f3c92a78ef65afe98629b40bcbf361a601adce6834e15f36aea9d297a660029", - "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"}],\"name\":\"claimReward\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"monitoring_service_contract_address\",\"type\":\"address\"},{\"name\":\"chain_id\",\"type\":\"uint256\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"recoverAddressFromRewardProofPublic\",\"outputs\":[{\"name\":\"signature_address\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"user_deposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"closed_at_block\",\"type\":\"uint256\"},{\"name\":\"settle_timeout\",\"type\":\"uint256\"},{\"name\":\"participant1\",\"type\":\"address\"},{\"name\":\"participant2\",\"type\":\"address\"},{\"name\":\"monitoring_service_address\",\"type\":\"address\"}],\"name\":\"firstBlockAllowedToMonitor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"monitoring_service_address\",\"type\":\"address\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_proof_signature\",\"type\":\"bytes\"}],\"name\":\"updateRewardPublic\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"contractExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"service_registry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"},{\"name\":\"balance_hash\",\"type\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"additional_hash\",\"type\":\"bytes32\"},{\"name\":\"closing_signature\",\"type\":\"bytes\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"reward_proof_signature\",\"type\":\"bytes\"}],\"name\":\"monitor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"reward_identifier\",\"type\":\"bytes32\"}],\"name\":\"rewardNonce\",\"outputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token_address\",\"type\":\"address\"},{\"name\":\"_service_registry_address\",\"type\":\"address\"},{\"name\":\"_udc_address\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"token_network_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"raiden_node_address\",\"type\":\"address\"}],\"name\":\"NewBalanceProofReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"reward_identifier\",\"type\":\"bytes32\"}],\"name\":\"RewardClaimed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"params\":{\"closing_participant\":\"Address of the participant of the channel that called close\",\"non_closing_participant\":\"The other participant of the channel\",\"token_network_address\":\"Address of the Token Network in which the channel exists\"}},\"contractExists(address)\":{\"params\":{\"contract_address\":\"The address to check whether a contract is deployed or not\"},\"return\":\"True if a contract exists, false otherwise\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"params\":{\"nonce\":\"Strictly monotonic value used to order BPs omitting PB specific params, since these will not be provided in the future\",\"reward_amount\":\"Amount of tokens to be rewarded\",\"reward_proof_signature\":\"The signature of the signed reward proof\",\"token_network_address\":\"Address of the Token Network in which the channel being monitored exists.\"}}}},\"userdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"notice\":\"Called after a monitored channel is settled in order for MS to claim the reward Can be called once per settled channel by everyone on behalf of MS\"},\"contractExists(address)\":{\"notice\":\"Check if a contract exists\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"notice\":\"Called by a registered MS, when providing a new balance proof to a monitored channel. Can be called multiple times by different registered MSs as long as the BP provided is newer than the current newest registered BP.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/test/MonitoringServiceInternalsTest.sol\":\"MonitoringServiceInternalsTest\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/lib/ECVerify.sol\":{\"keccak256\":\"0x8bb402baa478eb53252d77b63982e12685adda290cf4dfa1d8f510284f8df3e9\",\"urls\":[\"bzzr://474c3db1bb54bb831c32eb2ab67a0e870489994bd4d4b8a8fa24b54935211d43\"]},\"data/source/raiden/SecretRegistry.sol\":{\"keccak256\":\"0xb8078bc048ccdeb7c58026754f22fc378baf3b24090db0f17d10bda6cd4951b4\",\"urls\":[\"bzzr://f7a072330393a85a6a274ef526ac2ca0f8eb217bf5f48c18b3080be7ac3a7ede\"]},\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/TokenNetwork.sol\":{\"keccak256\":\"0xe8abde4af3b77ab25167f3bd056ce1acd8d16fa2aec09861b41b118e038ce0f5\",\"urls\":[\"bzzr://1161945467e0f0c7cc39df9b33450d88f35fa1b4d76306030f49fbdd481c4326\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/MonitoringService.sol\":{\"keccak256\":\"0x52f6eb0877d929cf69342fb3c0cd1e455d9804acf15bbc5be8ce1b6580b9a9a3\",\"urls\":[\"bzzr://e5aac1ffdf3ef3d3bf5d8c491312336b3eff7153d1cdb74eedf873d6cd88f204\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x69d05c038fa9777ab94296c12593ab4c341c858979b448be1338d4708db26192\",\"urls\":[\"bzzr://bf06e95a4a3deb2599a3e2cf6c5111c965ed610c622509580c5a5467b6eadf3e\"]},\"data/source/services/UserDeposit.sol\":{\"keccak256\":\"0x23fae922fe184ab0e4a1a25349f7ade63103c298625bc29c4f1b285619d054f0\",\"urls\":[\"bzzr://42777a151afd25154d5adfc875921c00261cae360b676cad959e62829b2fe5b6\"]},\"data/source/test/MonitoringServiceInternalsTest.sol\":{\"keccak256\":\"0x76f01cee7a703d7d000d49699050a752243935308b6685856ab4a5c454119491\",\"urls\":[\"bzzr://4519ab40621884f999c122784b72e9e1082115331857a44393e1927301d67f09\"]}},\"version\":1}" + "bin": "60806040523480156200001157600080fd5b5060405160608062002736833981018060405260608110156200003357600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050828282600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151562000101576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f546f6b656e2061742061646472657373207a65726f000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515620001a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5365727669636552656769737472792061742061646472657373207a65726f0081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156200024d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f5544432061742061646472657373207a65726f0000000000000000000000000081525060200191505060405180910390fd5b620002678362000601640100000000026401000000009004565b1515620002dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f6b656e20686173206e6f20636f646500000000000000000000000000000081525060200191505060405180910390fd5b620002f68262000601640100000000026401000000009004565b15156200036b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f53657276696365526567697374727920686173206e6f20636f6465000000000081525060200191505060405180910390fd5b620003858162000601640100000000026401000000009004565b1515620003fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f55444320686173206e6f20636f6465000000000000000000000000000000000081525060200191505060405180910390fd5b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156200054257600080fd5b505afa15801562000557573d6000803e3d6000fd5b505050506040513d60208110156200056e57600080fd5b8101908080519060200190929190505050111515620005f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f546f6b656e2077697468207a65726f20746f74616c20737570706c790000000081525060200191505060405180910390fd5b50505050505062000614565b600080823b905060008111915050919050565b61211280620006246000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100835780637709bc781461060957806381c6dac214610665578063d3b6c080146106af578063dcf1376714610921578063fc0c546a14610963576100bb565b80630e7dfb73146100c05780633a48602e14610166578063637d89d41461032c5780636766923e146103765780636a83a94814610422575b600080fd5b61014c600480360360808110156100d657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b604051808215151515815260200191505060405180910390f35b6102ea600480360360a081101561017c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101c357600080fd5b8201836020820111156101d557600080fd5b803590602001918460018302840111640100000000831117156101f757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561026457600080fd5b82018360208201111561027657600080fd5b8035906020019184600183028401116401000000008311171561029857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061105b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610334611075565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040c600480360360a081101561038c57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061109b565b6040518082815260200191505060405180910390f35b610607600480360361010081101561043957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104ea57600080fd5b8201836020820111156104fc57600080fd5b8035906020019184600183028401116401000000008311171561051e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561058157600080fd5b82018360208201111561059357600080fd5b803590602001918460018302840111640100000000831117156105b557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611282565b005b61064b6004803603602081101561061f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061129c565b604051808215151515815260200191505060405180910390f35b61066d6112af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61091f60048036036101408110156106c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561074157600080fd5b82018360208201111561075357600080fd5b8035906020019184600183028401116401000000008311171561077557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156107d857600080fd5b8201836020820111156107ea57600080fd5b8035906020019184600183028401116401000000008311171561080c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561089957600080fd5b8201836020820111156108ab57600080fd5b803590602001918460018302840111640100000000831117156108cd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506112d5565b005b61094d6004803603602081101561093757600080fd5b8101908080359060200190929190505050611708565b6040518082815260200191505060405180910390f35b61096b611728565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6040811015610b2257600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115610b5257fe5b826004811115610b5e57fe5b1480610b80575060036004811115610b7257fe5b826004811115610b7e57fe5b145b80610ba05750600480811115610b9257fe5b826004811115610b9e57fe5b145b1515610c14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b4381101515610c8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515610d6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610eb057600080fd5b505af1158015610ec4573d6000803e3d6000fd5b505050506040513d6020811015610eda57600080fd5b81019080805190602001909291905050501515610f5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600061106a868686868661174d565b905095945050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8115156110c957fe5b0485101515611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81151561116c57fe5b04861015156111e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e9050600060509050600060648884028115156111ff57fe5b048901905060006064898585030281151561121657fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16010181151561126c57fe5b0690508083019550505050505095945050505050565b611292888888888888888861186a565b5050505050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6112e5828b8b868b338a8861186a565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113b957600080fd5b505afa1580156113cd573d6000803e3d6000fd5b505050506040513d60208110156113e357600080fd5b8101908080519060200190929190505050905061140382828e8e33611ce0565b1515611477576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561158657808201518184015260208101905061156b565b50505050905090810190601f1680156115b35780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156115ec5780820151818401526020810190506115d1565b50505050905090810190601f1680156116195780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b15801561164057600080fd5b505af1158015611654573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b600060036000838152602001908152602001600020600101549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080868660068081111561175e57fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b60208310151561180d57805182526020820191506020810190506020830392506117e8565b6001836020036101000a0380198251168184511680821785525050505050509050018281526020019550505050505060405160208183030381529060405280519060200120905061185e8184611fd3565b91505095945050505050565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561193e57600080fd5b505afa158015611952573d6000803e3d6000fd5b505050506040513d602081101561196857600080fd5b810190808051906020019092919050505090506000611a26308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156119e357600080fd5b505afa1580156119f7573d6000803e3d6000fd5b505050506040513d6020811015611a0d57600080fd5b8101908080519060200190929190505050878b8861174d565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611acb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000600360008381526020019081526020016000209050888160010154101515611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015611db957600080fd5b505afa158015611dcd573d6000803e3d6000fd5b505050506040513d6040811015611de357600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115611e1357fe5b826004811115611e1f57fe5b141515611e94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611ef857600080fd5b505afa158015611f0c573d6000803e3d6000fd5b505050506040513d6020811015611f2257600080fd5b81019080805190602001909291905050509050808210151515611fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611fc181838a8a8a61109b565b43101594505050505095945050505050565b600060418251141515611fe557600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff16101561201557601b810190505b601b8160ff16148061202a5750601c8160ff16145b151561203557600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612092573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156120da57600080fd5b8393505050509291505056fea165627a7a723058204411534b835dbd87e4b595b18b338a0b5d4d594d0f3b3d2f91f889f78aaf1c800029", + "bin-runtime": "608060405234801561001057600080fd5b50600436106100bb576000357c0100000000000000000000000000000000000000000000000000000000900480637709bc78116100835780637709bc781461060957806381c6dac214610665578063d3b6c080146106af578063dcf1376714610921578063fc0c546a14610963576100bb565b80630e7dfb73146100c05780633a48602e14610166578063637d89d41461032c5780636766923e146103765780636a83a94814610422575b600080fd5b61014c600480360360808110156100d657600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109ad565b604051808215151515815260200191505060405180910390f35b6102ea600480360360a081101561017c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101c357600080fd5b8201836020820111156101d557600080fd5b803590602001918460018302840111640100000000831117156101f757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561026457600080fd5b82018360208201111561027657600080fd5b8035906020019184600183028401116401000000008311171561029857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061105b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610334611075565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040c600480360360a081101561038c57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061109b565b6040518082815260200191505060405180910390f35b610607600480360361010081101561043957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104ea57600080fd5b8201836020820111156104fc57600080fd5b8035906020019184600183028401116401000000008311171561051e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561058157600080fd5b82018360208201111561059357600080fd5b803590602001918460018302840111640100000000831117156105b557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611282565b005b61064b6004803603602081101561061f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061129c565b604051808215151515815260200191505060405180910390f35b61066d6112af565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61091f60048036036101408110156106c657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561074157600080fd5b82018360208201111561075357600080fd5b8035906020019184600183028401116401000000008311171561077557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156107d857600080fd5b8201836020820111156107ea57600080fd5b8035906020019184600183028401116401000000008311171561080c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561089957600080fd5b8201836020820111156108ab57600080fd5b803590602001918460018302840111640100000000831117156108cd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506112d5565b005b61094d6004803603602081101561093757600080fd5b8101908080359060200190929190505050611708565b6040518082815260200191505060405180910390f35b61096b611728565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008084905060008686604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000808373ffffffffffffffffffffffffffffffffffffffff1663838d6e058a89896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6040811015610b2257600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115610b5257fe5b826004811115610b5e57fe5b1480610b80575060036004811115610b7257fe5b826004811115610b7e57fe5b145b80610ba05750600480811115610b9257fe5b826004811115610b9e57fe5b145b1515610c14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6f206561726c79206368616e6e656c20737461746500000000000000000081525060200191505060405180910390fd5b4381101515610c8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6368616e6e656c206e6f7420736574746c65642079657400000000000000000081525060200191505060405180910390fd5b6000600360008581526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515610d6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f7265776172645f73656e646572206973207a65726f000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663beabacc88260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600001546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610eb057600080fd5b505af1158015610ec4573d6000803e3d6000fd5b505050506040513d6020811015610eda57600080fd5b81019080805190602001909291905050501515610f5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f55444320646964206e6f74207472616e7366657200000000000000000000000081525060200191505060405180910390fd5b838160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe413caa6d70a6d9b51c2af2575a2914490f614355049af8ae7cde5caab9fd20183600001546040518082815260200191505060405180910390a36003600085815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600195505050505050949350505050565b600061106a868686868661174d565b905095945050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8115156110c957fe5b0485101515611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d616c6963696f75736c792062696720736574746c652074696d656f7574000081525060200191505060405180910390fd5b60647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81151561116c57fe5b04861015156111e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d616c6963696f75736c792062696720636c6f7365645f61745f626c6f636b0081525060200191505060405180910390fd5b6000601e9050600060509050600060648884028115156111ff57fe5b048901905060006064898585030281151561121657fe5b0490506000818773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff16010181151561126c57fe5b0690508083019550505050505095945050505050565b611292888888888888888861186a565b5050505050505050565b600080823b905060008111915050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6112e5828b8b868b338a8861186a565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678d8d6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156113b957600080fd5b505afa1580156113cd573d6000803e3d6000fd5b505050506040513d60208110156113e357600080fd5b8101908080519060200190929190505050905061140382828e8e33611ce0565b1515611477576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f6e6f7420616c6c6f77656420746f206d6f6e69746f720000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663fadc554b828e8e8e8e8e8e8e6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561158657808201518184015260208101905061156b565b50505050905090810190601f1680156115b35780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156115ec5780820151818401526020810190506115d1565b50505050905090810190601f1680156116195780820380516001836020036101000a031916815260200191505b509a5050505050505050505050600060405180830381600087803b15801561164057600080fd5b505af1158015611654573d6000803e3d6000fd5b505050508a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168a7f486d5933a2980e097e7c32c7fe217158facf1a3973bac8235ac6c8b0e77d3dff87858a604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a4505050505050505050505050565b600060036000838152602001908152602001600020600101549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080868660068081111561175e57fe5b878760405160200180807f19457468657265756d205369676e6564204d6573736167653a0a313831000000815250601d018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140185815260200184815260200183805190602001908083835b60208310151561180d57805182526020820191506020810190506020830392506117e8565b6001836020036101000a0380198251168184511680821785525050505050509050018281526020019550505050505060405160208183030381529060405280519060200120905061185e8184611fd3565b91505095945050505050565b600088905060008173ffffffffffffffffffffffffffffffffffffffff1663938bcd678a8a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561193e57600080fd5b505afa158015611952573d6000803e3d6000fd5b505050506040513d602081101561196857600080fd5b810190808051906020019092919050505090506000611a26308473ffffffffffffffffffffffffffffffffffffffff16633af973b16040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156119e357600080fd5b505afa1580156119f7573d6000803e3d6000fd5b505050506040513d6020811015611a0d57600080fd5b8101908080519060200190929190505050878b8861174d565b90508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611acb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f426164207265776172642070726f6f660000000000000000000000000000000081525060200191505060405180910390fd5b6000828c604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401925050506040516020818303038152906040528051906020012090506000600360008381526020019081526020016000209050888160010154101515611bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f7374616c65206e6f6e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b6080604051908101604052808b81526020018a81526020018c73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681525060036000848152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505050505050505050505050505050565b60008060008773ffffffffffffffffffffffffffffffffffffffff1663838d6e058888886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604080518083038186803b158015611db957600080fd5b505afa158015611dcd573d6000803e3d6000fd5b505050506040513d6040811015611de357600080fd5b810190808051906020019092919080519060200190929190505050809350819250505060026004811115611e1357fe5b826004811115611e1f57fe5b141515611e94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f6368616e6e656c206e6f7420636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60008873ffffffffffffffffffffffffffffffffffffffff1663b8378f756040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b158015611ef857600080fd5b505afa158015611f0c573d6000803e3d6000fd5b505050506040513d6020811015611f2257600080fd5b81019080805190602001909291905050509050808210151515611fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f746f6f206c6f7720736574746c6520626c6f636b206e756d626572000000000081525060200191505060405180910390fd5b60008183039050611fc181838a8a8a61109b565b43101594505050505095945050505050565b600060418251141515611fe557600080fd5b60008060006020850151925060408501519150606085015160001a9050601b8160ff16101561201557601b810190505b601b8160ff16148061202a5750601c8160ff16145b151561203557600080fd5b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612092573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156120da57600080fd5b8393505050509291505056fea165627a7a723058204411534b835dbd87e4b595b18b338a0b5d4d594d0f3b3d2f91f889f78aaf1c800029", + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"}],\"name\":\"claimReward\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"monitoring_service_contract_address\",\"type\":\"address\"},{\"name\":\"chain_id\",\"type\":\"uint256\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"recoverAddressFromRewardProofPublic\",\"outputs\":[{\"name\":\"signature_address\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"user_deposit\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"closed_at_block\",\"type\":\"uint256\"},{\"name\":\"settle_timeout\",\"type\":\"uint256\"},{\"name\":\"participant1\",\"type\":\"address\"},{\"name\":\"participant2\",\"type\":\"address\"},{\"name\":\"monitoring_service_address\",\"type\":\"address\"}],\"name\":\"firstBlockAllowedToMonitor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"monitoring_service_address\",\"type\":\"address\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_proof_signature\",\"type\":\"bytes\"}],\"name\":\"updateRewardPublic\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"contractExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"service_registry\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"closing_participant\",\"type\":\"address\"},{\"name\":\"non_closing_participant\",\"type\":\"address\"},{\"name\":\"balance_hash\",\"type\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"additional_hash\",\"type\":\"bytes32\"},{\"name\":\"closing_signature\",\"type\":\"bytes\"},{\"name\":\"non_closing_signature\",\"type\":\"bytes\"},{\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"name\":\"token_network_address\",\"type\":\"address\"},{\"name\":\"reward_proof_signature\",\"type\":\"bytes\"}],\"name\":\"monitor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"reward_identifier\",\"type\":\"bytes32\"}],\"name\":\"rewardNonce\",\"outputs\":[{\"name\":\"nonce\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token_address\",\"type\":\"address\"},{\"name\":\"_service_registry_address\",\"type\":\"address\"},{\"name\":\"_udc_address\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"token_network_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"channel_identifier\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"reward_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"raiden_node_address\",\"type\":\"address\"}],\"name\":\"NewBalanceProofReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"ms_address\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"reward_identifier\",\"type\":\"bytes32\"}],\"name\":\"RewardClaimed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"params\":{\"closing_participant\":\"Address of the participant of the channel that called close\",\"non_closing_participant\":\"The other participant of the channel\",\"token_network_address\":\"Address of the Token Network in which the channel exists\"}},\"contractExists(address)\":{\"params\":{\"contract_address\":\"The address to check whether a contract is deployed or not\"},\"return\":\"True if a contract exists, false otherwise\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"params\":{\"nonce\":\"Strictly monotonic value used to order BPs omitting PB specific params, since these will not be provided in the future\",\"reward_amount\":\"Amount of tokens to be rewarded\",\"reward_proof_signature\":\"The signature of the signed reward proof\",\"token_network_address\":\"Address of the Token Network in which the channel being monitored exists.\"}}}},\"userdoc\":{\"methods\":{\"claimReward(uint256,address,address,address)\":{\"notice\":\"Called after a monitored channel is settled in order for MS to claim the reward Can be called once per settled channel by everyone on behalf of MS\"},\"contractExists(address)\":{\"notice\":\"Check if a contract exists\"},\"monitor(address,address,bytes32,uint256,bytes32,bytes,bytes,uint256,address,bytes)\":{\"notice\":\"Called by a registered MS, when providing a new balance proof to a monitored channel. Can be called multiple times by different registered MSs as long as the BP provided is newer than the current newest registered BP.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/test/MonitoringServiceInternalsTest.sol\":\"MonitoringServiceInternalsTest\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/lib/ECVerify.sol\":{\"keccak256\":\"0x8bb402baa478eb53252d77b63982e12685adda290cf4dfa1d8f510284f8df3e9\",\"urls\":[\"bzzr://474c3db1bb54bb831c32eb2ab67a0e870489994bd4d4b8a8fa24b54935211d43\"]},\"data/source/raiden/SecretRegistry.sol\":{\"keccak256\":\"0xb8078bc048ccdeb7c58026754f22fc378baf3b24090db0f17d10bda6cd4951b4\",\"urls\":[\"bzzr://f7a072330393a85a6a274ef526ac2ca0f8eb217bf5f48c18b3080be7ac3a7ede\"]},\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/TokenNetwork.sol\":{\"keccak256\":\"0xe8abde4af3b77ab25167f3bd056ce1acd8d16fa2aec09861b41b118e038ce0f5\",\"urls\":[\"bzzr://1161945467e0f0c7cc39df9b33450d88f35fa1b4d76306030f49fbdd481c4326\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/MonitoringService.sol\":{\"keccak256\":\"0x52f6eb0877d929cf69342fb3c0cd1e455d9804acf15bbc5be8ce1b6580b9a9a3\",\"urls\":[\"bzzr://e5aac1ffdf3ef3d3bf5d8c491312336b3eff7153d1cdb74eedf873d6cd88f204\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x2566b42f123826aed4c039c50d6fbe3433e43461e0b7b8d8821c02bacfd34907\",\"urls\":[\"bzzr://16b6b8a940b5dedee7489f41faaad98ffafa76e738e828964d1d760fca7c355d\"]},\"data/source/services/UserDeposit.sol\":{\"keccak256\":\"0x23fae922fe184ab0e4a1a25349f7ade63103c298625bc29c4f1b285619d054f0\",\"urls\":[\"bzzr://42777a151afd25154d5adfc875921c00261cae360b676cad959e62829b2fe5b6\"]},\"data/source/test/MonitoringServiceInternalsTest.sol\":{\"keccak256\":\"0x76f01cee7a703d7d000d49699050a752243935308b6685856ab4a5c454119491\",\"urls\":[\"bzzr://4519ab40621884f999c122784b72e9e1082115331857a44393e1927301d67f09\"]}},\"version\":1}" }, "OneToN": { "abi": [ @@ -1568,7 +1650,21 @@ { "constant": true, "inputs": [], - "name": "serviceCount", + "name": "set_price", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "set_price_at", "outputs": [ { "name": "", @@ -1607,19 +1703,33 @@ } ], "name": "setURL", - "outputs": [], + "outputs": [ + { + "name": "_success", + "type": "bool" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "owner", + "inputs": [ + { + "name": "_set_price", + "type": "uint256" + }, + { + "name": "_seconds_passed", + "type": "uint256" + } + ], + "name": "decayed_price", "outputs": [ { "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -1627,36 +1737,55 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "name": "amount", + "name": "", + "type": "address" + } + ], + "name": "service_valid_till", + "outputs": [ + { + "name": "", "type": "uint256" } ], - "name": "deposit", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "current_price", + "outputs": [ { "name": "", - "type": "address" + "type": "uint256" } ], - "name": "urls", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_limit_amount", + "type": "uint256" + } + ], + "name": "deposit", "outputs": [ { - "name": "", - "type": "string" + "name": "_success", + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -1664,14 +1793,14 @@ "inputs": [ { "name": "", - "type": "uint256" + "type": "address" } ], - "name": "service_addresses", + "name": "urls", "outputs": [ { "name": "", - "type": "address" + "type": "string" } ], "payable": false, @@ -1693,39 +1822,51 @@ "type": "function" }, { - "constant": true, "inputs": [ { - "name": "", + "name": "_token_for_registration", "type": "address" - } - ], - "name": "deposits", - "outputs": [ + }, { - "name": "", + "name": "_initial_price", "type": "uint256" } ], "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { + "anonymous": false, "inputs": [ { - "name": "_token_for_registration", + "indexed": true, + "name": "service", + "type": "address" + }, + { + "indexed": false, + "name": "valid_till", + "type": "uint256" + }, + { + "indexed": false, + "name": "deposit_amount", + "type": "uint256" + }, + { + "indexed": false, + "name": "deposit_contract", "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "RegisteredService", + "type": "event" } ], - "bin": "608060405234801561001057600080fd5b50604051602080610d5b8339810180604052602081101561003057600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156100e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e2061742061646472657373207a65726f000000000000000000000081525060200191505060405180910390fd5b6100fe8161032e640100000000026401000000009004565b1515610172576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f6b656e20686173206e6f20636f646500000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b15801561023757600080fd5b505afa15801561024b573d6000803e3d6000fd5b505050506040513d602081101561026157600080fd5b81019080805190602001909291905050501115156102e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f74616c20737570706c79207a65726f00000000000000000000000000000081525060200191505060405180910390fd5b33600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610341565b600080823b905060008111915050919050565b610a0b806103506000396000f3fe608060405234801561001057600080fd5b50600436106100b0576000357c010000000000000000000000000000000000000000000000000000000090048063b6b55f2511610083578063b6b55f2514610234578063d888e61414610262578063da0ef9231461031f578063fc0c546a1461038d578063fc7e286d146103d7576100b0565b806306237526146100b55780637709bc78146100d3578063773434081461012f5780638da5cb5b146101ea575b600080fd5b6100bd61042f565b6040518082815260200191505060405180910390f35b610115600480360360208110156100e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043c565b604051808215151515815260200191505060405180910390f35b6101e86004803603602081101561014557600080fd5b810190808035906020019064010000000081111561016257600080fd5b82018360208201111561017457600080fd5b8035906020019184600183028401116401000000008311171561019657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061044f565b005b6101f26105e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102606004803603602081101561024a57600080fd5b8101908080359060200190929190505050610609565b005b6102a46004803603602081101561027857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061080f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e45780820151818401526020810190506102c9565b50505050905090810190601f1680156103115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61034b6004803603602081101561033557600080fd5b81019080803590602001909291905050506108bf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103956108fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610419600480360360208110156103ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610922565b6040518082815260200191505060405180910390f35b6000600480549050905090565b600080823b905060008111915050919050565b60008151141515156104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6e65772075726c20697320656d70747920737472696e6700000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805460018160011615610100020316600290049050141561058c5760043390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105df92919061093a565b5050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008111151561061857600080fd5b80600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561075d57600080fd5b505af1158015610771573d6000803e3d6000fd5b505050506040513d602081101561078757600080fd5b8101908080519060200190929190505050151561080c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6b656e7320646964206e6f74207472616e7366657200000000000000000081525060200191505060405180910390fd5b50565b60036020528060005260406000206000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b75780601f1061088c576101008083540402835291602001916108b7565b820191906000526020600020905b81548152906001019060200180831161089a57829003601f168201915b505050505081565b6004818154811015156108ce57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090505481565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061097b57805160ff19168380011785556109a9565b828001600101855582156109a9579182015b828111156109a857825182559160200191906001019061098d565b5b5090506109b691906109ba565b5090565b6109dc91905b808211156109d85760008160009055506001016109c0565b5090565b9056fea165627a7a723058201786e813fb0d0722c15ffb40991002d1a9ce0548c352d03af710e158fb8d03130029", - "bin-runtime": "608060405234801561001057600080fd5b50600436106100b0576000357c010000000000000000000000000000000000000000000000000000000090048063b6b55f2511610083578063b6b55f2514610234578063d888e61414610262578063da0ef9231461031f578063fc0c546a1461038d578063fc7e286d146103d7576100b0565b806306237526146100b55780637709bc78146100d3578063773434081461012f5780638da5cb5b146101ea575b600080fd5b6100bd61042f565b6040518082815260200191505060405180910390f35b610115600480360360208110156100e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043c565b604051808215151515815260200191505060405180910390f35b6101e86004803603602081101561014557600080fd5b810190808035906020019064010000000081111561016257600080fd5b82018360208201111561017457600080fd5b8035906020019184600183028401116401000000008311171561019657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061044f565b005b6101f26105e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102606004803603602081101561024a57600080fd5b8101908080359060200190929190505050610609565b005b6102a46004803603602081101561027857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061080f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e45780820151818401526020810190506102c9565b50505050905090810190601f1680156103115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61034b6004803603602081101561033557600080fd5b81019080803590602001909291905050506108bf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103956108fd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610419600480360360208110156103ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610922565b6040518082815260200191505060405180910390f35b6000600480549050905090565b600080823b905060008111915050919050565b60008151141515156104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6e65772075726c20697320656d70747920737472696e6700000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805460018160011615610100020316600290049050141561058c5760043390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105df92919061093a565b5050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008111151561061857600080fd5b80600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561075d57600080fd5b505af1158015610771573d6000803e3d6000fd5b505050506040513d602081101561078757600080fd5b8101908080519060200190929190505050151561080c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6b656e7320646964206e6f74207472616e7366657200000000000000000081525060200191505060405180910390fd5b50565b60036020528060005260406000206000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b75780601f1061088c576101008083540402835291602001916108b7565b820191906000526020600020905b81548152906001019060200180831161089a57829003601f168201915b505050505081565b6004818154811015156108ce57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090505481565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061097b57805160ff19168380011785556109a9565b828001600101855582156109a9579182015b828111156109a857825182559160200191906001019061098d565b5b5090506109b691906109ba565b5090565b6109dc91905b808211156109d85760008160009055506001016109c0565b5090565b9056fea165627a7a723058201786e813fb0d0722c15ffb40991002d1a9ce0548c352d03af710e158fb8d03130029", - "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"serviceCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"contractExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"new_url\",\"type\":\"string\"}],\"name\":\"setURL\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"urls\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"service_addresses\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"deposits\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token_for_registration\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{\"contractExists(address)\":{\"params\":{\"contract_address\":\"The address to check whether a contract is deployed or not\"},\"return\":\"True if a contract exists, false otherwise\"}}},\"userdoc\":{\"methods\":{\"contractExists(address)\":{\"notice\":\"Check if a contract exists\"},\"serviceCount()\":{\"notice\":\"Returns number of registered services. Useful for accessing service_addresses.\"},\"setURL(string)\":{\"notice\":\"Set the URL used to access a service via HTTP. When this is called for the first time, the service's ethereum address is also added to `service_addresses`.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/services/ServiceRegistry.sol\":\"ServiceRegistry\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x69d05c038fa9777ab94296c12593ab4c341c858979b448be1338d4708db26192\",\"urls\":[\"bzzr://bf06e95a4a3deb2599a3e2cf6c5111c965ed610c622509580c5a5467b6eadf3e\"]}},\"version\":1}" + "bin": "608060405234801561001057600080fd5b506040516040806118a18339810180604052604081101561003057600080fd5b810190808051906020019092919080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156100f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e2061742061646472657373207a65726f000000000000000000000081525060200191505060405180910390fd5b61010882610380640100000000026401000000009004565b151561017c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f6b656e20686173206e6f20636f646500000000000000000000000000000081525060200191505060405180910390fd5b6103e881101515156101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f696e697469616c20707269636520746f6f206c6f77000000000000000000000081525060200191505060405180910390fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b1580156102bb57600080fd5b505afa1580156102cf573d6000803e3d6000fd5b505050506040513d60208110156102e557600080fd5b810190808051906020019092919050505011151561036b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f746f74616c20737570706c79207a65726f00000000000000000000000000000081525060200191505060405180910390fd5b80600181905550426002819055505050610393565b600080823b905060008111915050919050565b6114ff806103a26000396000f3fe608060405234801561001057600080fd5b50600436106100bb576000357c01000000000000000000000000000000000000000000000000000000009004806399b787951161008357806399b7879514610277578063ab2b3137146102cf578063b6b55f25146102ed578063d888e61414610333578063fc0c546a146103f0576100bb565b806331000384146100c05780635236a4e6146100de5780637709bc78146100fc578063773434081461015857806380e2aeff1461022b575b600080fd5b6100c861043a565b6040518082815260200191505060405180910390f35b6100e6610440565b6040518082815260200191505060405180910390f35b61013e6004803603602081101561011257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610446565b604051808215151515815260200191505060405180910390f35b6102116004803603602081101561016e57600080fd5b810190808035906020019064010000000081111561018b57600080fd5b82018360208201111561019d57600080fd5b803590602001918460018302840111640100000000831117156101bf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610459565b604051808215151515815260200191505060405180910390f35b6102616004803603604081101561024157600080fd5b8101908080359060200190929190803590602001909291905050506105e8565b6040518082815260200191505060405180910390f35b6102b96004803603602081101561028d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061067a565b6040518082815260200191505060405180910390f35b6102d7610692565b6040518082815260200191505060405180910390f35b6103196004803603602081101561030357600080fd5b810190808035906020019092919050505061070c565b604051808215151515815260200191505060405180910390f35b6103756004803603602081101561034957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bd4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103b557808201518184015260208101905061039a565b50505050905090810190601f1680156103e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f8610c84565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60015481565b60025481565b600080823b905060008111915050919050565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442101515610511576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f726567697374726174696f6e206578706972656400000000000000000000000081525060200191505060405180910390fd5b600082511415151561058b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6e65772075726c20697320656d70747920737472696e6700000000000000000081525060200191505060405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105de929190610ca9565b5060019050919050565b6000808290506710000000000000008110151561060a576103e8915050610674565b6000630107ac00905060006004820a601802905060006004840a6003850a84600402026002860a6002860a600c0202866003870a601802028501010101905060008183890281151561065857fe5b0490506103e881101561066b576103e890505b80955050505050505b92915050565b60036020528060005260406000206000915090505481565b600060025442101515156106f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806114b36021913960400191505060405180910390fd5b600060025442039050610706600154826105e8565b91505090565b600080610717610692565b9050808310151515610791576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f6e6f7420656e6f756768206c696d69740000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050428110156107e1574290505b62ed4e00810181101515610840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611489602a913960400191505060405180910390fd5b62ed4e0081019050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111151561089257fe5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506005600683028115156108e557fe5b046001819055504260028190555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16823360405161092590610d29565b808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051809103906000f0801580156109b1573d6000803e3d6000fd5b5090506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3383866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610aac57600080fd5b505af1158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b81019080805190602001909291905050501515610b3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806114686021913960400191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f318a723b2ed9fac0536d971fcca40b4653a29e1956dd7b7b8972486947d86529838584604051808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390a260019350505050919050565b60046020528060005260406000206000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c7c5780601f10610c5157610100808354040283529160200191610c7c565b820191906000526020600020905b815481529060010190602001808311610c5f57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cea57805160ff1916838001178555610d18565b82800160010185558215610d18579182015b82811115610d17578251825591602001919060010190610cfc565b5b509050610d259190610d36565b5090565b61070c80610d5c83390190565b610d5891905b80821115610d54576000816000905550600101610d3c565b5090565b9056fe608060405234801561001057600080fd5b5060405160608061070c8339810180604052606081101561003057600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160028190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061061d806100ef6000396000f3fe608060405234801561001057600080fd5b5060043610610069576000357c01000000000000000000000000000000000000000000000000000000009004806351cff8d91461006e578063a0d711c4146100b2578063cdc18424146100d0578063fc0c546a1461011a575b600080fd5b6100b06004803603602081101561008457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610164565b005b6100ba6105a0565b6040518082815260200191505060405180910390f35b6100d86105a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101226105cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561022057600080fd5b505afa158015610234573d6000803e3d6000fd5b505050506040513d602081101561024a57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610322576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f7468652063616c6c6572206973206e6f7420746865207769746864726177657281525060200191505060405180910390fd5b600254421015151561039c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6465706f736974206e6f742072656c656173656420796574000000000000000081525060200191505060405180910390fd5b600081111515610414576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f6e6f7468696e6720746f2077697468647261770000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104d857600080fd5b505af11580156104ec573d6000803e3d6000fd5b505050506040513d602081101561050257600080fd5b81019080805190602001909291905050501515610587576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e206469646e2774207472616e73666572000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16ff5b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a723058208fbc1de5e64184305339d9d5a747de164a888131f80d248c0db35d96600a07050029546f6b656e207472616e7366657220666f72206465706f736974206661696c65646f766572666c6f7720647572696e6720657874656e64696e672074686520726567697374726174696f6e416e20756e646572666c6f7720696e20707269636520636f6d7075746174696f6ea165627a7a723058206cf8447e805c0b20e6197883014490e74d804100bab5847d47172fc4b81b63070029", + "bin-runtime": "608060405234801561001057600080fd5b50600436106100bb576000357c01000000000000000000000000000000000000000000000000000000009004806399b787951161008357806399b7879514610277578063ab2b3137146102cf578063b6b55f25146102ed578063d888e61414610333578063fc0c546a146103f0576100bb565b806331000384146100c05780635236a4e6146100de5780637709bc78146100fc578063773434081461015857806380e2aeff1461022b575b600080fd5b6100c861043a565b6040518082815260200191505060405180910390f35b6100e6610440565b6040518082815260200191505060405180910390f35b61013e6004803603602081101561011257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610446565b604051808215151515815260200191505060405180910390f35b6102116004803603602081101561016e57600080fd5b810190808035906020019064010000000081111561018b57600080fd5b82018360208201111561019d57600080fd5b803590602001918460018302840111640100000000831117156101bf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610459565b604051808215151515815260200191505060405180910390f35b6102616004803603604081101561024157600080fd5b8101908080359060200190929190803590602001909291905050506105e8565b6040518082815260200191505060405180910390f35b6102b96004803603602081101561028d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061067a565b6040518082815260200191505060405180910390f35b6102d7610692565b6040518082815260200191505060405180910390f35b6103196004803603602081101561030357600080fd5b810190808035906020019092919050505061070c565b604051808215151515815260200191505060405180910390f35b6103756004803603602081101561034957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bd4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103b557808201518184015260208101905061039a565b50505050905090810190601f1680156103e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f8610c84565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60015481565b60025481565b600080823b905060008111915050919050565b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442101515610511576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f726567697374726174696f6e206578706972656400000000000000000000000081525060200191505060405180910390fd5b600082511415151561058b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6e65772075726c20697320656d70747920737472696e6700000000000000000081525060200191505060405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090805190602001906105de929190610ca9565b5060019050919050565b6000808290506710000000000000008110151561060a576103e8915050610674565b6000630107ac00905060006004820a601802905060006004840a6003850a84600402026002860a6002860a600c0202866003870a601802028501010101905060008183890281151561065857fe5b0490506103e881101561066b576103e890505b80955050505050505b92915050565b60036020528060005260406000206000915090505481565b600060025442101515156106f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806114b36021913960400191505060405180910390fd5b600060025442039050610706600154826105e8565b91505090565b600080610717610692565b9050808310151515610791576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f6e6f7420656e6f756768206c696d69740000000000000000000000000000000081525060200191505060405180910390fd5b6000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050428110156107e1574290505b62ed4e00810181101515610840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611489602a913960400191505060405180910390fd5b62ed4e0081019050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111151561089257fe5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506005600683028115156108e557fe5b046001819055504260028190555060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16823360405161092590610d29565b808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050604051809103906000f0801580156109b1573d6000803e3d6000fd5b5090506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3383866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610aac57600080fd5b505af1158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b81019080805190602001909291905050501515610b3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806114686021913960400191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f318a723b2ed9fac0536d971fcca40b4653a29e1956dd7b7b8972486947d86529838584604051808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390a260019350505050919050565b60046020528060005260406000206000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c7c5780601f10610c5157610100808354040283529160200191610c7c565b820191906000526020600020905b815481529060010190602001808311610c5f57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610cea57805160ff1916838001178555610d18565b82800160010185558215610d18579182015b82811115610d17578251825591602001919060010190610cfc565b5b509050610d259190610d36565b5090565b61070c80610d5c83390190565b610d5891905b80821115610d54576000816000905550600101610d3c565b5090565b9056fe608060405234801561001057600080fd5b5060405160608061070c8339810180604052606081101561003057600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160028190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061061d806100ef6000396000f3fe608060405234801561001057600080fd5b5060043610610069576000357c01000000000000000000000000000000000000000000000000000000009004806351cff8d91461006e578063a0d711c4146100b2578063cdc18424146100d0578063fc0c546a1461011a575b600080fd5b6100b06004803603602081101561008457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610164565b005b6100ba6105a0565b6040518082815260200191505060405180910390f35b6100d86105a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101226105cc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561022057600080fd5b505afa158015610234573d6000803e3d6000fd5b505050506040513d602081101561024a57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610322576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f7468652063616c6c6572206973206e6f7420746865207769746864726177657281525060200191505060405180910390fd5b600254421015151561039c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f6465706f736974206e6f742072656c656173656420796574000000000000000081525060200191505060405180910390fd5b600081111515610414576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f6e6f7468696e6720746f2077697468647261770000000000000000000000000081525060200191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156104d857600080fd5b505af11580156104ec573d6000803e3d6000fd5b505050506040513d602081101561050257600080fd5b81019080805190602001909291905050501515610587576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f746f6b656e206469646e2774207472616e73666572000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16ff5b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea165627a7a723058208fbc1de5e64184305339d9d5a747de164a888131f80d248c0db35d96600a07050029546f6b656e207472616e7366657220666f72206465706f736974206661696c65646f766572666c6f7720647572696e6720657874656e64696e672074686520726567697374726174696f6e416e20756e646572666c6f7720696e20707269636520636f6d7075746174696f6ea165627a7a723058206cf8447e805c0b20e6197883014490e74d804100bab5847d47172fc4b81b63070029", + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"set_price\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"set_price_at\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"contract_address\",\"type\":\"address\"}],\"name\":\"contractExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"new_url\",\"type\":\"string\"}],\"name\":\"setURL\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_set_price\",\"type\":\"uint256\"},{\"name\":\"_seconds_passed\",\"type\":\"uint256\"}],\"name\":\"decayed_price\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"service_valid_till\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"current_price\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_limit_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"urls\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_token_for_registration\",\"type\":\"address\"},{\"name\":\"_initial_price\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"service\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"valid_till\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"deposit_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"deposit_contract\",\"type\":\"address\"}],\"name\":\"RegisteredService\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"contractExists(address)\":{\"params\":{\"contract_address\":\"The address to check whether a contract is deployed or not\"},\"return\":\"True if a contract exists, false otherwise\"},\"decayed_price(uint256,uint256)\":{\"params\":{\"_seconds_passed\":\"The number of seconds passed since the initial price was set.\",\"_set_price\":\"The initial price.\"}},\"setURL(string)\":{\"params\":{\"new_url\":\"The new URL string to be stored.\"}}}},\"userdoc\":{\"methods\":{\"contractExists(address)\":{\"notice\":\"Check if a contract exists\"},\"current_price()\":{\"notice\":\"The amount of deposits for registration or extension. Note: the price moves quickly depending on what other addresses do. The current price might change after you send a `deposit()` transaction before the transaction is executed.\"},\"decayed_price(uint256,uint256)\":{\"notice\":\"Calculates the decreased price after a number of seconds.\"},\"setURL(string)\":{\"notice\":\"Sets the URL used to access a service via HTTP. Only a currently registered service can call this successfully.\"}}}},\"settings\":{\"compilationTarget\":{\"data/source/services/ServiceRegistry.sol\":\"ServiceRegistry\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":.=.\",\":lib=data/source/lib\",\":raiden=data/source/raiden\",\":services=data/source/services\",\":test=data/source/test\"]},\"sources\":{\"data/source/raiden/Token.sol\":{\"keccak256\":\"0x41b40819d7f6714550c742f48ce46daeb97255c08bc56e83bb9fde4fbe14c3b4\",\"urls\":[\"bzzr://a20e2bea336fb01584cf4dc80e77bb8db3c33666f77f840fd58559116849ae4b\"]},\"data/source/raiden/Utils.sol\":{\"keccak256\":\"0x602fd914e5644696d3c5d42e3a39fe6f16e7ddcc93f8864aa7e368a70cb56d0b\",\"urls\":[\"bzzr://b884810b9826074efb212a825d33409c35d9a159681690e821da3643052be3d1\"]},\"data/source/services/ServiceRegistry.sol\":{\"keccak256\":\"0x2566b42f123826aed4c039c50d6fbe3433e43461e0b7b8d8821c02bacfd34907\",\"urls\":[\"bzzr://16b6b8a940b5dedee7489f41faaad98ffafa76e738e828964d1d760fca7c355d\"]}},\"version\":1}" }, "SignatureVerifyTest": { "abi": [ @@ -6713,7 +6854,7 @@ "MonitoringServiceInternalsTest.sol": "422a316bc07f38b1754bee07ecf10053fb0a9a36d2c0f6512f1c08a459ef74f2", "OneToN.sol": "b6ac1a94a6c9d7b968c776ba5bddc6820815d942e6493505a318024d9cfc405e", "SecretRegistry.sol": "c44e068b6e612c1a66267da30f88f203d2d700552fe36bcae48d669d9322d8b7", - "ServiceRegistry.sol": "f59fdea299b8917732de8fcb2bc4d697b46faff8c9c3edaf4fa4d8bdfbcc017d", + "ServiceRegistry.sol": "55232fccbc03d71d545c94d6c9d125319c152a39a77491624d9b2f038c887fe3", "SignatureVerifyTest.sol": "505b5b380b36f5aff4b7cb6316a5985b31f7f78c61b23ca56c545473085d6f3b", "StandardToken.sol": "3dcb1cc738bd525c27a00afdcec0b177e47be2e622906d210001995ab99141ab", "Token.sol": "1a73cc2b96ad17dca1b5ba83d943e4576764862c56037905daea0544277d4cd4", @@ -6725,5 +6866,5 @@ "Utils.sol": "c37282ebe7cae3a26a8bdb34c25f779202e99d95e09a68cae6b9e92199f10f32" }, "contracts_version": null, - "overall_checksum": "594b0ffd0abef99bc416599a3ca038bc38c44131ec0104daa3785e1e66587b81" + "overall_checksum": "7f9aa47def7f05a6dea8bd0314755c059f367cc87acb8141798735cc1dd0a57e" } \ No newline at end of file diff --git a/raiden_contracts/data/gas.json b/raiden_contracts/data/gas.json index 89ec16345..35c897d06 100644 --- a/raiden_contracts/data/gas.json +++ b/raiden_contracts/data/gas.json @@ -4,20 +4,22 @@ "CustomToken.transfer": 36123, "CustomToken.transferFrom": 29557, "MonitoringService.claimReward": 41931, - "MonitoringService.monitor": 207422, - "OneToN.claim": 92705, + "MonitoringService.monitor": 207736, + "OneToN.claim": 92786, "SecretRegistry.registerSecret": 46892, - "TokenNetwork DEPLOYMENT": 4277369, - "TokenNetwork.closeChannel": 111155, + "ServiceRegistry.deposit": 433192, + "ServiceRegistry.setURL": 44555, + "TokenNetwork DEPLOYMENT": 4283201, + "TokenNetwork.closeChannel": 111439, "TokenNetwork.openChannel": 97745, - "TokenNetwork.setTotalDeposit": 44909, - "TokenNetwork.setTotalWithdraw": 103306, - "TokenNetwork.settleChannel": 108229, - "TokenNetwork.unlock 1 locks": 31549, - "TokenNetwork.unlock 6 locks": 58649, - "TokenNetwork.updateNonClosingBalanceProof": 93786, - "TokenNetworkRegistry DEPLOYMENT": 4947971, - "TokenNetworkRegistry createERC20TokenNetwork": 3300096, + "TokenNetwork.setTotalDeposit": 44845, + "TokenNetwork.setTotalWithdraw": 103178, + "TokenNetwork.settleChannel": 108197, + "TokenNetwork.unlock 1 locks": 31485, + "TokenNetwork.unlock 6 locks": 58457, + "TokenNetwork.updateNonClosingBalanceProof": 93972, + "TokenNetworkRegistry DEPLOYMENT": 4953811, + "TokenNetworkRegistry createERC20TokenNetwork": 3304504, "UserDeposit.deposit": 92392, "UserDeposit.deposit (increase balance)": 32392, "UserDeposit.planWithdraw": 64021, diff --git a/raiden_contracts/data/source/services/ServiceRegistry.sol b/raiden_contracts/data/source/services/ServiceRegistry.sol index d2b8c4980..0fe760b70 100644 --- a/raiden_contracts/data/source/services/ServiceRegistry.sol +++ b/raiden_contracts/data/source/services/ServiceRegistry.sol @@ -3,49 +3,173 @@ pragma solidity 0.5.4; import "raiden/Token.sol"; import "raiden/Utils.sol"; +contract Deposit { + // This contract holds ERC20 tokens as deposit until a predetemined point of time. + + // The ERC20 token contract that the deposit is about. + Token public token; + + // The address that can withdraw the deposit after the release time. + address public withdrawer; + + // The timestamp after which the withdrawer can withdraw the deposit. + uint256 public release_at; + + /// @param _token The address of the ERC20 token contract where the deposit is accounted. + /// @param _release_at The timestap after which the withdrawer can withdraw the deposit. + /// @param _withdrawer The address that can withdraw the deposit after the release time. + constructor(address _token, uint256 _release_at, address _withdrawer) public { + token = Token(_token); + // Don't care even if it's in the past. + release_at = _release_at; + withdrawer = _withdrawer; + } + + // In order to make a deposit, transfer the ERC20 token into this contract. + // If you transfer a wrong kind of ERC20 token or ETH into this contract, + // these tokens will be lost forever. + + /// @notice Withdraws the tokens that have been deposited. + /// Only `withdrawer` can call this. + /// @param _to The address where the withdrawn tokens should go. + function withdraw(address payable _to) external { + uint256 balance = token.balanceOf(address(this)); + require(msg.sender == withdrawer, "the caller is not the withdrawer"); + require(now >= release_at, "deposit not released yet"); + require(balance > 0, "nothing to withdraw"); + require(token.transfer(_to, balance), "token didn't transfer"); + selfdestruct(_to); // The contract can disappear. + } +} + + contract ServiceRegistry is Utils { Token public token; - address public owner; - mapping(address => uint256) public deposits; // token amount staked by the service provider + // After a price is set to set_price at timestamp set_price_at, + // the price decays according to decayed_price(). + uint256 public set_price; + uint256 public set_price_at; + + // Once the price is at min_price, it can't decay further. + uint256 constant min_price = 1000; + + mapping(address => uint256) public service_valid_till; mapping(address => string) public urls; // URLs of services for HTTP access - address[] public service_addresses; // list of available services (ethereum addresses) + + // @param service The address of the registered service provider + // @param valid_till The timestamp of the moment when the registration expires + // @param deposit_amount The amount of deposit transferred + // @param deposit The address of Deposit instance where the deposit is stored. + event RegisteredService(address indexed service, uint256 valid_till, uint256 deposit_amount, Deposit deposit_contract); // @param _token_for_registration The address of the ERC20 token contract that services use for registration fees - constructor(address _token_for_registration) public { + constructor(address _token_for_registration, uint256 _initial_price) public { require(_token_for_registration != address(0x0), "token at address zero"); require(contractExists(_token_for_registration), "token has no code"); + require(_initial_price >= min_price, "initial price too low"); token = Token(_token_for_registration); // Check if the contract is indeed a token contract require(token.totalSupply() > 0, "total supply zero"); - owner = msg.sender; + + // Set up the price and the set price timestamp + set_price = _initial_price; + set_price_at = now; } - function deposit(uint amount) public { - require(amount > 0); + // @notice Locks tokens and registers a service or extends the registration. + // @param _limit_amount The biggest amount of tokens that the caller is willing to deposit. + // The call fails if the current price is higher (this is always possible + // when other parties have just called `deposit()`). + function deposit(uint _limit_amount) public returns (bool _success) { + uint256 amount = current_price(); + require(_limit_amount >= amount, "not enough limit"); + + // Extend the service position. + uint256 valid_till = service_valid_till[msg.sender]; + if (valid_till < now) { // a first time joiner or an expired service. + valid_till = now; + } + // Check against overflow. + require(valid_till < valid_till + 180 days, "overflow during extending the registration"); + valid_till = valid_till + 180 days; + assert(valid_till > service_valid_till[msg.sender]); + service_valid_till[msg.sender] = valid_till; + + // Record the price + set_price = amount * 6 / 5; + set_price_at = now; + + // Move the deposit in a new Deposit contract. + Deposit depo = new Deposit(address(token), valid_till, msg.sender); + require(token.transferFrom(msg.sender, address(depo), amount), "Token transfer for deposit failed"); - // This also allows for MSs to deposit and use other MSs - deposits[msg.sender] += amount; + // Fire event + emit RegisteredService(msg.sender, valid_till, amount, depo); - // Transfer the deposit to the smart contract - require(token.transferFrom(msg.sender, address(this), amount), "tokens did not transfer"); + return true; } - /// Set the URL used to access a service via HTTP. - /// When this is called for the first time, the service's ethereum address - /// is also added to `service_addresses`. - function setURL(string memory new_url) public { + /// @notice Sets the URL used to access a service via HTTP. + /// Only a currently registered service can call this successfully. + /// @param new_url The new URL string to be stored. + function setURL(string memory new_url) public returns (bool _success) { + require(now < service_valid_till[msg.sender], "registration expired"); require(bytes(new_url).length != 0, "new url is empty string"); - if (bytes(urls[msg.sender]).length == 0) { - service_addresses.push(msg.sender); - } urls[msg.sender] = new_url; + return true; + } + + /// The amount of time till the price decreases to roughly 1/e. + uint constant decay_constant = 200 days; // Maybe make this configurable? + + /// @notice Calculates the decreased price after a number of seconds. + /// @param _set_price The initial price. + /// @param _seconds_passed The number of seconds passed since the initial + /// price was set. + function decayed_price(uint256 _set_price, uint256 _seconds_passed) public + view returns (uint256) { + // We are here trying to approximate some exponential decay. + // exp(- X / A) where + // X is the number of seconds since the last price change + // A is the decay constant (A = 200 days corresponds to 0.5% decrease per day) + + // exp(- X / A) ~~ P / Q where + // P = 24 A^4 + // Q = 24 A^4 + 24 A^3X + 12 A^2X^2 + 4 AX^3 + X^4 + // Note: swap P and Q, and then think about the Taylor expansion. + + uint256 X = _seconds_passed; + + if (X >= 2 ** 60) { // The computation below overflows. + return min_price; + } + + uint256 A = decay_constant; + + uint256 P = 24 * (A ** 4); + uint256 Q = P + 24*(A**3)*X + 12*(A**2)*(X**2) + 4*A*(X**3) + X**4; + + uint256 price = _set_price * P / Q; + + // Not allowing a price smaller than 1000. + // Once it's too low it's too low forever. + if (price < min_price) { // Maybe make this configurable too? + price = min_price; + } + return price; } - /// Returns number of registered services. Useful for accessing service_addresses. - function serviceCount() public view returns(uint) { - return service_addresses.length; + /// @notice The amount of deposits for registration or extension. + /// Note: the price moves quickly depending on what other addresses do. + /// The current price might change after you send a `deposit()` transaction + /// before the transaction is executed. + function current_price() public view returns (uint256) { + require(now >= set_price_at, "An underflow in price computation"); + uint256 seconds_passed = now - set_price_at; + + return decayed_price(set_price, seconds_passed); } } diff --git a/raiden_contracts/deploy/__main__.py b/raiden_contracts/deploy/__main__.py index d9ff9699a..8bd5b84dd 100644 --- a/raiden_contracts/deploy/__main__.py +++ b/raiden_contracts/deploy/__main__.py @@ -208,6 +208,12 @@ def raiden( type=int, help="Maximum amount of tokens deposited in UserDeposit", ) +@click.option( + "--initial-service-registration-price", + required=True, + type=int, + help="Initial amount of deposit for a registration in ServiceRegistry", +) @click.option("--save-info/--no-save-info", default=True, help="Save deployment info to a file.") @click.pass_context def services( @@ -221,12 +227,15 @@ def services( save_info: bool, contracts_version: Optional[str], user_deposit_whole_limit: int, + initial_service_registration_price: int, ) -> None: setup_ctx(ctx, private_key, rpc_provider, wait, gas_price, gas_limit, contracts_version) deployer: ContractDeployer = ctx.obj["deployer"] deployed_contracts_info = deployer.deploy_service_contracts( - token_address=token_address, user_deposit_whole_balance_limit=user_deposit_whole_limit + token_address=token_address, + user_deposit_whole_balance_limit=user_deposit_whole_limit, + initial_service_registration_price=initial_service_registration_price, ) deployed_contracts = { contract_name: info["address"] diff --git a/raiden_contracts/deploy/contract_deployer.py b/raiden_contracts/deploy/contract_deployer.py index 4f3f848fe..1b2ed904b 100644 --- a/raiden_contracts/deploy/contract_deployer.py +++ b/raiden_contracts/deploy/contract_deployer.py @@ -27,7 +27,10 @@ from raiden_contracts.utils.file_ops import load_json_from_path from raiden_contracts.utils.signature import private_key_to_address from raiden_contracts.utils.transaction import check_successful_tx -from raiden_contracts.utils.versions import contracts_version_expects_deposit_limits +from raiden_contracts.utils.versions import ( + contracts_version_expects_deposit_limits, + contracts_version_has_initial_service_deposit, +) LOG = getLogger(__name__) @@ -303,9 +306,17 @@ def _register_token_network_with_limits( return token_network_address def deploy_service_contracts( - self, token_address: HexAddress, user_deposit_whole_balance_limit: int + self, + token_address: HexAddress, + user_deposit_whole_balance_limit: int, + initial_service_registration_price: int, ) -> DeployedContracts: """Deploy 3rd party service contracts""" + if not contracts_version_has_initial_service_deposit( + self.contract_manager.contracts_version + ): + raise RuntimeError("Deployment of older service contracts is not suppported.") + chain_id = int(self.web3.version.network) deployed_contracts: DeployedContracts = { "contracts_version": self.contract_manager.contracts_version, @@ -313,7 +324,11 @@ def deploy_service_contracts( "contracts": {}, } - self._deploy_and_remember(CONTRACT_SERVICE_REGISTRY, [token_address], deployed_contracts) + self._deploy_and_remember( + CONTRACT_SERVICE_REGISTRY, + [token_address, initial_service_registration_price], + deployed_contracts, + ) user_deposit = self._deploy_and_remember( contract_name=CONTRACT_USER_DEPOSIT, arguments=[token_address, user_deposit_whole_balance_limit], diff --git a/raiden_contracts/deploy/contract_verifier.py b/raiden_contracts/deploy/contract_verifier.py index de14bf6a5..4b681a487 100644 --- a/raiden_contracts/deploy/contract_verifier.py +++ b/raiden_contracts/deploy/contract_verifier.py @@ -132,9 +132,13 @@ def verify_deployment_data(self, deployment_data: DeployedContracts) -> bool: != secret_registry.address ): raise RuntimeError("secret_registry_address onchain has an unexpected value.") + if len(constructor_arguments) != 5: + raise RuntimeError( + "TokenNetworkRegistry received a wrong number of constructor arguments." + ) if secret_registry.address != constructor_arguments[0]: raise RuntimeError( - "TokenNetwork's constructor received a different SecretRegistry address." + "TokenNetworkRegistry's constructor received a different SecretRegistry address." ) if token_network_registry.functions.chain_id().call() != constructor_arguments[1]: raise RuntimeError("TokenNetwork remembers a wrong chain_id.") @@ -348,14 +352,14 @@ def _verify_service_registry_deployment( ) -> None: """ Check an onchain deployment of ServiceRegistry and constructor arguments """ if to_checksum_address(service_registry.functions.token().call()) != token_address: - raise RuntimeError("service_registry has a wrong token address") + raise RuntimeError("ServiceRegistry has a wrong token address") + if len(constructor_arguments) != 2: + raise RuntimeError( + "ServiceRegistry was deployed with a wrong number of constructor arguments" + ) if token_address != constructor_arguments[0]: raise RuntimeError( f"expected token addredd {token_address} " f"but the constructor argument for {CONTRACT_SERVICE_REGISTRY} is " f"{constructor_arguments[0]}" ) - if len(constructor_arguments) != 1: - raise RuntimeError( - "service_registry was deployed with a wrong number of constructor arguments" - ) diff --git a/raiden_contracts/tests/fixtures/__init__.py b/raiden_contracts/tests/fixtures/__init__.py index 3e8c76721..68ed58b4c 100644 --- a/raiden_contracts/tests/fixtures/__init__.py +++ b/raiden_contracts/tests/fixtures/__init__.py @@ -3,6 +3,7 @@ from .base import * from .channel import * from .contracts import * +from .deposit_fixtures import * from .monitoring_service import * from .one_to_n import * from .secret_registry import * diff --git a/raiden_contracts/tests/fixtures/deposit_fixtures.py b/raiden_contracts/tests/fixtures/deposit_fixtures.py new file mode 100644 index 000000000..3e9361897 --- /dev/null +++ b/raiden_contracts/tests/fixtures/deposit_fixtures.py @@ -0,0 +1,16 @@ +from typing import Callable, List + +import pytest +from web3.contract import Contract + +from raiden_contracts.constants import CONTRACT_DEPOSIT + + +@pytest.fixture +def get_deposit_contract(deploy_tester_contract: Callable) -> Callable: + """Deploy a Deposit contract with the given arguments""" + + def get(arguments: List) -> Contract: + return deploy_tester_contract(CONTRACT_DEPOSIT, arguments) + + return get diff --git a/raiden_contracts/tests/fixtures/service_registry_fixtures.py b/raiden_contracts/tests/fixtures/service_registry_fixtures.py index f9d72b8b8..ea990a9fb 100644 --- a/raiden_contracts/tests/fixtures/service_registry_fixtures.py +++ b/raiden_contracts/tests/fixtures/service_registry_fixtures.py @@ -8,4 +8,6 @@ @pytest.fixture(scope="session") def service_registry(deploy_tester_contract: Callable, custom_token: Contract) -> Contract: - return deploy_tester_contract(CONTRACT_SERVICE_REGISTRY, [custom_token.address]) + return deploy_tester_contract( + CONTRACT_SERVICE_REGISTRY, [custom_token.address, 3000 * (10 ** 18)] + ) diff --git a/raiden_contracts/tests/fixtures/token_network_fixtures.py b/raiden_contracts/tests/fixtures/token_network_fixtures.py index 9eea0122e..dadb6ad30 100644 --- a/raiden_contracts/tests/fixtures/token_network_fixtures.py +++ b/raiden_contracts/tests/fixtures/token_network_fixtures.py @@ -21,7 +21,7 @@ @pytest.fixture -def get_token_network(deploy_tester_contract: Contract) -> Callable: +def get_token_network(deploy_tester_contract: Callable) -> Callable: """Deploy a token network as a separate contract (registry is not used)""" def get(arguments: List) -> Contract: diff --git a/raiden_contracts/tests/test_deploy_script.py b/raiden_contracts/tests/test_deploy_script.py index 99793b3e0..a7afba358 100644 --- a/raiden_contracts/tests/test_deploy_script.py +++ b/raiden_contracts/tests/test_deploy_script.py @@ -41,7 +41,10 @@ validate_address, verify, ) -from raiden_contracts.deploy.contract_deployer import contracts_version_expects_deposit_limits +from raiden_contracts.deploy.contract_deployer import ( + contracts_version_expects_deposit_limits, + contracts_version_has_initial_service_deposit, +) from raiden_contracts.deploy.contract_verifier import ( _verify_monitoring_service_deployment, _verify_user_deposit_deployment, @@ -51,6 +54,7 @@ CONTRACT_DEPLOYER_ADDRESS, EMPTY_ADDRESS, FAUCET_PRIVATE_KEY, + SERVICE_DEPOSIT, UINT256_MAX, ) @@ -130,7 +134,9 @@ def deployed_service_info( deployer: ContractDeployer, token_address: HexAddress ) -> DeployedContracts: return deployer.deploy_service_contracts( - token_address=token_address, user_deposit_whole_balance_limit=DEPOSIT_LIMIT + token_address=token_address, + user_deposit_whole_balance_limit=DEPOSIT_LIMIT, + initial_service_registration_price=SERVICE_DEPOSIT // 2, ) @@ -250,6 +256,13 @@ def test_deploy_script_raiden( with pytest.raises(RuntimeError): deployer.verify_deployment_data(deployed_contracts_info_fail) + deployed_contracts_info_fail = deepcopy(deployed_contracts_info) + deployed_contracts_info_fail["contracts"][CONTRACT_TOKEN_NETWORK_REGISTRY][ + "constructor_arguments" + ] = [] + with pytest.raises(RuntimeError): + deployer.verify_deployment_data(deployed_contracts_info_fail) + # check that it fails if sender has no eth deployer = ContractDeployer( web3=web3, private_key=get_random_privkey(), gas_limit=GAS_LIMIT, gas_price=1, wait=10 @@ -761,6 +774,18 @@ def test_contracts_version_expects_deposit_limits() -> None: contracts_version_expects_deposit_limits("not a semver string") +def test_contracts_version_has_initial_service_deposit() -> None: + assert not contracts_version_has_initial_service_deposit("0.3._") + assert not contracts_version_has_initial_service_deposit("0.4.0") + assert not contracts_version_has_initial_service_deposit("0.8.0_unlimited") + assert not contracts_version_has_initial_service_deposit("0.9.0") + assert not contracts_version_has_initial_service_deposit("0.10.0") + assert not contracts_version_has_initial_service_deposit("0.10.1") + assert contracts_version_has_initial_service_deposit(None) + with pytest.raises(ValueError): + contracts_version_has_initial_service_deposit("not a semver string") + + def deploy_token_arguments(privkey: str) -> List[str]: return [ "--rpc-provider", @@ -1008,6 +1033,8 @@ def deploy_services_arguments(privkey: str, save_info: Optional[bool]) -> List: "rpc_provider", "--user-deposit-whole-limit", 100, + "--initial-service-registration-price", + SERVICE_DEPOSIT // 2, ] return common_arguments + save_info_arguments diff --git a/raiden_contracts/tests/test_monitoring_service.py b/raiden_contracts/tests/test_monitoring_service.py index 1daf9441e..313cdcd7f 100644 --- a/raiden_contracts/tests/test_monitoring_service.py +++ b/raiden_contracts/tests/test_monitoring_service.py @@ -13,6 +13,7 @@ TEST_SETTLE_TIMEOUT_MIN, MonitoringServiceEvent, ) +from raiden_contracts.tests.utils import SERVICE_DEPOSIT from raiden_contracts.utils.proofs import sign_reward_proof REWARD_AMOUNT = 10 @@ -25,9 +26,11 @@ def ms_address( (ms,) = get_accounts(1) # register MS in the ServiceRegistry contract - custom_token.functions.mint(50).call_and_transact({"from": ms}) - custom_token.functions.approve(service_registry.address, 20).call_and_transact({"from": ms}) - service_registry.functions.deposit(20).call_and_transact({"from": ms}) + custom_token.functions.mint(2 * SERVICE_DEPOSIT).call_and_transact({"from": ms}) + custom_token.functions.approve(service_registry.address, SERVICE_DEPOSIT).call_and_transact( + {"from": ms} + ) + service_registry.functions.deposit(SERVICE_DEPOSIT).call_and_transact({"from": ms}) return ms diff --git a/raiden_contracts/tests/test_print_gas.py b/raiden_contracts/tests/test_print_gas.py index 5b839e983..6bd774f54 100644 --- a/raiden_contracts/tests/test_print_gas.py +++ b/raiden_contracts/tests/test_print_gas.py @@ -8,6 +8,7 @@ CONTRACT_MONITORING_SERVICE, CONTRACT_ONE_TO_N, CONTRACT_SECRET_REGISTRY, + CONTRACT_SERVICE_REGISTRY, CONTRACT_TOKEN_NETWORK, CONTRACT_TOKEN_NETWORK_REGISTRY, CONTRACT_USER_DEPOSIT, @@ -15,7 +16,11 @@ TEST_SETTLE_TIMEOUT_MIN, ) from raiden_contracts.contract_manager import gas_measurements -from raiden_contracts.tests.utils.constants import CONTRACT_DEPLOYER_ADDRESS, UINT256_MAX +from raiden_contracts.tests.utils.constants import ( + CONTRACT_DEPLOYER_ADDRESS, + SERVICE_DEPOSIT, + UINT256_MAX, +) from raiden_contracts.utils.pending_transfers import get_locked_amount, get_pending_transfers_tree from raiden_contracts.utils.proofs import sign_one_to_n_iou, sign_reward_proof @@ -33,6 +38,8 @@ def test_gas_json_has_enough_fields(version: Optional[str]) -> None: "MonitoringService.monitor", "OneToN.claim", "SecretRegistry.registerSecret", + "ServiceRegistry.deposit", + "ServiceRegistry.setURL", "TokenNetwork DEPLOYMENT", "TokenNetwork.closeChannel", "TokenNetwork.openChannel", @@ -247,9 +254,11 @@ def print_gas_monitoring_service( deposit_to_udc(B, reward_amount) # register MS in the ServiceRegistry contract - custom_token.functions.mint(50).call_and_transact({"from": MS}) - custom_token.functions.approve(service_registry.address, 20).call_and_transact({"from": MS}) - service_registry.functions.deposit(20).call_and_transact({"from": MS}) + custom_token.functions.mint(SERVICE_DEPOSIT * 2).call_and_transact({"from": MS}) + custom_token.functions.approve(service_registry.address, SERVICE_DEPOSIT).call_and_transact( + {"from": MS} + ) + service_registry.functions.deposit(SERVICE_DEPOSIT).call_and_transact({"from": MS}) # open a channel (c1, c2) channel_identifier = create_channel(A, B)[0] @@ -367,6 +376,24 @@ def print_gas_user_deposit( print_gas(txn_hash, CONTRACT_USER_DEPOSIT + ".withdraw") +@pytest.fixture +def print_gas_service_registry( + get_accounts: Callable, custom_token: Contract, service_registry: Contract, print_gas: Callable +) -> None: + (A,) = get_accounts(1) + custom_token.functions.mint(SERVICE_DEPOSIT).call_and_transact({"from": A}) + custom_token.functions.approve(service_registry.address, SERVICE_DEPOSIT).call_and_transact( + {"from": A} + ) + + # happy path + deposit_tx = service_registry.functions.deposit(SERVICE_DEPOSIT).call_and_transact({"from": A}) + print_gas(deposit_tx, CONTRACT_SERVICE_REGISTRY + ".deposit") + url = "http://example.com" + set_url_tx = service_registry.functions.setURL(url).call_and_transact({"from": A}) + print_gas(set_url_tx, CONTRACT_SERVICE_REGISTRY + ".setURL") + + @pytest.fixture def print_gas_token(get_accounts: Callable, custom_token: Contract, print_gas: Callable) -> None: (A, B) = get_accounts(2) @@ -391,6 +418,7 @@ def print_gas_token(get_accounts: Callable, custom_token: Contract, print_gas: C "print_gas_channel_cycle", "print_gas_monitoring_service", "print_gas_one_to_n", + "print_gas_service_registry", "print_gas_user_deposit", "print_gas_token", ) diff --git a/raiden_contracts/tests/test_service_registry.py b/raiden_contracts/tests/test_service_registry.py index 6a9321533..9a7d1dcf0 100644 --- a/raiden_contracts/tests/test_service_registry.py +++ b/raiden_contracts/tests/test_service_registry.py @@ -2,49 +2,112 @@ import pytest from eth_tester.exceptions import TransactionFailed -from web3.contract import Contract +from web3 import Web3 +from web3.contract import Contract, get_event_data -from raiden_contracts.tests.utils.constants import CONTRACT_DEPLOYER_ADDRESS +from raiden_contracts.constants import CONTRACT_SERVICE_REGISTRY, EVENT_REGISTERED_SERVICE +from raiden_contracts.contract_manager import ContractManager, contracts_precompiled_path +from raiden_contracts.tests.utils.constants import ( + EMPTY_ADDRESS, + SECONDS_PER_DAY, + SERVICE_DEPOSIT, + UINT256_MAX, +) -def test_owner_of_service_registry(service_registry: Contract) -> None: - """ The owner of ServiceRegistry should be the deployer """ - assert service_registry.functions.owner().call() == CONTRACT_DEPLOYER_ADDRESS +def test_deposit_contract( + get_deposit_contract: Callable, custom_token: Contract, get_accounts: Callable +) -> None: + (A,) = get_accounts(1) + custom_token.functions.mint(100).call_and_transact({"from": A}) + depo = get_deposit_contract([custom_token.address, 0, A]) + custom_token.functions.transfer(depo.address, 100).call_and_transact({"from": A}) + assert custom_token.functions.balanceOf(A).call() == 0 + assert custom_token.functions.balanceOf(depo.address).call() == 100 + depo.functions.withdraw(A).call_and_transact({"from": A}) + assert custom_token.functions.balanceOf(A).call() == 100 + assert custom_token.functions.balanceOf(depo.address).call() == 0 + + +def test_deposit_contract_too_early_withdraw( + get_deposit_contract: Callable, custom_token: Contract, get_accounts: Callable +) -> None: + (A,) = get_accounts(1) + custom_token.functions.mint(100).call_and_transact({"from": A}) + depo = get_deposit_contract([custom_token.address, UINT256_MAX, A]) + custom_token.functions.transfer(depo.address, 100).call_and_transact({"from": A}) + assert custom_token.functions.balanceOf(A).call() == 0 + assert custom_token.functions.balanceOf(depo.address).call() == 100 + with pytest.raises(TransactionFailed): + depo.functions.withdraw(A).call_and_transact({"from": A}) + assert custom_token.functions.balanceOf(A).call() == 0 + assert custom_token.functions.balanceOf(depo.address).call() == 100 def test_deposit( service_registry: Contract, custom_token: Contract, get_accounts: Callable ) -> None: (A,) = get_accounts(1) - custom_token.functions.mint(10).call_and_transact({"from": A}) - custom_token.functions.approve(service_registry.address, 10).call_and_transact({"from": A}) + custom_token.functions.mint(SERVICE_DEPOSIT).call_and_transact({"from": A}) + custom_token.functions.approve(service_registry.address, SERVICE_DEPOSIT).call_and_transact( + {"from": A} + ) # happy path - service_registry.functions.deposit(10).call_and_transact({"from": A}) - assert service_registry.functions.deposits(A).call() == 10 - assert custom_token.functions.balanceOf(A).call() == 0 + old_balance = custom_token.functions.balanceOf(A).call() + old_price = service_registry.functions.current_price().call() + service_registry.functions.deposit(SERVICE_DEPOSIT).call_and_transact({"from": A}) + assert old_balance > custom_token.functions.balanceOf(A).call() > old_balance - old_price + assert service_registry.functions.current_price().call() > old_price + first_expiration = service_registry.functions.service_valid_till(A).call() # custom_token does not allow transfer of more tokens with pytest.raises(TransactionFailed): service_registry.functions.deposit(1).call({"from": A}) + # More minting and approving before extending the registration + custom_token.functions.mint(SERVICE_DEPOSIT).call_and_transact({"from": A}) + custom_token.functions.approve(service_registry.address, SERVICE_DEPOSIT).call_and_transact( + {"from": A} + ) + + # Extending the registration + service_registry.functions.deposit(SERVICE_DEPOSIT).call_and_transact({"from": A}) + second_expiration = service_registry.functions.service_valid_till(A).call() + assert second_expiration == first_expiration + 180 * SECONDS_PER_DAY + -def test_setURL(service_registry: Contract, get_accounts: Callable) -> None: +def test_setURL( + custom_token: Contract, service_registry: Contract, get_accounts: Callable, web3: Web3 +) -> None: (A,) = get_accounts(1) url1 = "http://example.com" url2 = "http://raiden.example.com" - # First setHost call, should add to `service_addresses` + custom_token.functions.mint(SERVICE_DEPOSIT).call_and_transact({"from": A}) + custom_token.functions.approve(service_registry.address, SERVICE_DEPOSIT).call_and_transact( + {"from": A} + ) + tx = service_registry.functions.deposit(SERVICE_DEPOSIT).call_and_transact({"from": A}) + tx_receipt = web3.eth.getTransactionReceipt(tx) + contract_manager = ContractManager(contracts_precompiled_path(version=None)) + event_abi = contract_manager.get_event_abi(CONTRACT_SERVICE_REGISTRY, EVENT_REGISTERED_SERVICE) + event_data = get_event_data(event_abi, tx_receipt["logs"][-1]) + assert event_data["args"]["service"] == A + assert event_data["args"]["deposit_contract"] != EMPTY_ADDRESS + service_registry.functions.setURL(url1).call_and_transact({"from": A}) assert service_registry.functions.urls(A).call() == url1 - assert service_registry.functions.service_addresses(0).call() == A - assert service_registry.functions.serviceCount().call() == 1 - with pytest.raises(TransactionFailed): - assert service_registry.functions.service_addresses(1).call() - # Setting the host for the second time must not add the service address a - # second time. service_registry.functions.setURL(url2).call_and_transact({"from": A}) assert service_registry.functions.urls(A).call() == url2 - assert service_registry.functions.service_addresses(0).call() == A - assert service_registry.functions.serviceCount().call() == 1 + + +def test_decayed_price(service_registry: Contract) -> None: + assert service_registry.functions.decayed_price(100000, 0).call() == 100000 + + # The minimum price is 1000 + assert service_registry.functions.decayed_price(100, 0).call() == 1000 + + # roughly 139 days till the price halves. + assert service_registry.functions.decayed_price(100000, 11990300).call() == 50000 diff --git a/raiden_contracts/tests/utils/constants.py b/raiden_contracts/tests/utils/constants.py index d1dc73bab..494586d50 100644 --- a/raiden_contracts/tests/utils/constants.py +++ b/raiden_contracts/tests/utils/constants.py @@ -17,6 +17,9 @@ FAUCET_ALLOWANCE = 100 * int(units["ether"]) CONTRACT_DEPLOYER_ADDRESS = FAUCET_ADDRESS NONEXISTENT_LOCKSROOT = b"\x00" * 32 +SECONDS_PER_DAY = 60 * 60 * 24 + +SERVICE_DEPOSIT = 5000 * (10 ** 18) class TestLockIndex(IntEnum): diff --git a/raiden_contracts/utils/versions.py b/raiden_contracts/utils/versions.py index 144d0c98d..5ca0531a3 100644 --- a/raiden_contracts/utils/versions.py +++ b/raiden_contracts/utils/versions.py @@ -33,3 +33,14 @@ def contracts_version_provides_services(version: Optional[str]) -> bool: if version == "0.8.0_unlimited": return True return compare(version, "0.8.0") >= 0 + + +def contracts_version_has_initial_service_deposit(version: Optional[str]) -> bool: + if version is None: + # contracts_versoin == None means the stock version in development. + return True + if version == "0.3._": + return False + if version == "0.8.0_unlimited": + return False + return compare(version, "0.18.0") > 0