{"constructor_args":null,"is_partially_verified":true,"is_changed_bytecode":false,"abi":[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"}],"name":"reclaimToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_contractAddr","type":"address"}],"name":"reclaimContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getController","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"amount","type":"uint256"},{"name":"h","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"burnFrom","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"},{"name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"mintTo","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"h","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"recover","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"destroy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ticker","outputs":[{"name":"","type":"bytes3"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"address_","type":"address"}],"name":"setController","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"reclaimEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"}],"name":"destroyAndSend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ticker","type":"bytes3"},{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"Controller","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}],"conflicting_implementations":null,"certified":false,"additional_sources":[],"is_verified_via_sourcify":false,"can_be_visualized_via_sol2uml":true,"evm_version":"default","language":"solidity","is_verified_via_eth_bytecode_db":true,"is_fully_verified":false,"license_type":"none","is_blueprint":false,"name":"GBP","creation_bytecode":"0x60806040523480156200001157600080fd5b50604080518082018252601381527f4d6f6e657269756d2047425020656d6f6e6579000000000000000000000000006020808301919091528251808401909352600483527f47425065000000000000000000000000000000000000000000000000000000009083015260008054600160a060020a03191633179055907f47425000000000000000000000000000000000000000000000000000000000003415620000ba57600080fd5b8251620000cf90600390602086019062000121565b508151620000e590600490602085019062000121565b506005805462ffffff19167d01000000000000000000000000000000000000000000000000000000000090920491909117905550620001c69050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016457805160ff191683800117855562000194565b8280016001018555821562000194579182015b828111156200019457825182559160200191906001019062000177565b50620001a2929150620001a6565b5090565b620001c391905b80821115620001a25760008155600101620001ad565b90565b6118ae80620001d66000396000f30060806040526004361061015e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461016d578063095ea7b3146101f757806317ffc3201461022f57806318160ddd1461025257806323b872dd146102795780632aed7f3f146102a35780633018205f146102c4578063313ce567146102f55780633823caec1461030a5780634000aea01461033d578063449a52f81461036e5780634e71e0c8146103925780636eb4c609146103a757806370a08231146103dd578063715018a6146103fe57806383197ef0146104135780638ba47bdd146104285780638da5cb5b1461047257806392eefe9b1461048757806395d89b41146104a85780639f727c27146104bd578063a9059cbb146104d2578063c0ee0b8a146104f6578063dd62ed3e14610527578063e30c39781461054e578063f2fde38b14610563578063f5074f4114610584575b34801561016a57600080fd5b50005b34801561017957600080fd5b506101826105a5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101bc5781810151838201526020016101a4565b50505050905090810190601f1680156101e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020357600080fd5b5061021b600160a060020a0360043516602435610633565b604080519115158252519081900360200190f35b34801561023b57600080fd5b50610250600160a060020a0360043516610721565b005b34801561025e57600080fd5b506102676107ed565b60408051918252519081900360200190f35b34801561028557600080fd5b5061021b600160a060020a036004358116906024351660443561087d565b3480156102af57600080fd5b50610250600160a060020a0360043516610977565b3480156102d057600080fd5b506102d9610a11565b60408051600160a060020a039092168252519081900360200190f35b34801561030157600080fd5b50610267610a20565b34801561031657600080fd5b5061021b600160a060020a036004351660243560443560ff6064351660843560a435610a7f565b34801561034957600080fd5b5061021b60048035600160a060020a0316906024803591604435918201910135610b90565b34801561037a57600080fd5b5061021b600160a060020a0360043516602435610d15565b34801561039e57600080fd5b50610250610e04565b3480156103b357600080fd5b50610267600160a060020a036004358116906024351660443560ff6064351660843560a435610e8c565b3480156103e957600080fd5b50610267600160a060020a0360043516610fa0565b34801561040a57600080fd5b5061025061103d565b34801561041f57600080fd5b506102506110a9565b34801561043457600080fd5b5061043d6110ce565b604080517fffffff00000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b34801561047e57600080fd5b506102d96110f4565b34801561049357600080fd5b50610250600160a060020a0360043516611103565b3480156104b457600080fd5b5061018261150c565b3480156104c957600080fd5b50610250611567565b3480156104de57600080fd5b5061021b600160a060020a03600435166024356115b9565b34801561050257600080fd5b5061025060048035600160a060020a03169060248035916044359182019101356116a7565b34801561053357600080fd5b50610267600160a060020a03600435811690602435166116ac565b34801561055a57600080fd5b506102d9611752565b34801561056f57600080fd5b50610250600160a060020a0360043516611761565b34801561059057600080fd5b50610250600160a060020a03600435166117a7565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561062b5780601f106106005761010080835404028352916020019161062b565b820191906000526020600020905b81548152906001019060200180831161060e57829003601f168201915b505050505081565b600254604080517f774d5409000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151600093929092169163774d54099160648082019260209290919082900301818787803b1580156106ab57600080fd5b505af11580156106bf573d6000803e3d6000fd5b505050506040513d60208110156106d557600080fd5b5051604080518481529051919250600160a060020a0385169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925919081900360200190a392915050565b60008054600160a060020a0316331461073957600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b505050506040513d60208110156107c457600080fd5b50516000549091506107e990600160a060020a0384811691168363ffffffff6117ca16565b5050565b600254604080517f18160ddd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a0316916318160ddd91600480830192602092919082900301818787803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b505050506040513d602081101561087657600080fd5b5051905090565b600254604080517fe974fee9000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a0386811660248301528581166044830152606482018590529151600093929092169163e974fee99160848082019260209290919082900301818787803b1580156108fd57600080fd5b505af1158015610911573d6000803e3d6000fd5b505050506040513d602081101561092757600080fd5b5051604080518481529051919250600160a060020a0380861692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a39392505050565b60008054600160a060020a0316331461098f57600080fd5b5060008054604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152905184939284169263f2fde38b926024808201939182900301818387803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b505050505050565b600254600160a060020a031690565b600254604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163313ce56791600480830192602092919082900301818787803b15801561084c57600080fd5b600254604080517f4eb00754000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038981166024830152604482018990526064820188905260ff8716608483015260a4820186905260c4820185905291516000939290921691634eb007549160e48082019260209290919082900301818787803b158015610b1557600080fd5b505af1158015610b29573d6000803e3d6000fd5b505050506040513d6020811015610b3f57600080fd5b5051604080518881529051919250600091600160a060020a038a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a39695505050505050565b6002546040517f9e7f43ca0000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03888116602485015260448401889052608060648501908152608485018790526000959190911693639e7f43ca93928a928a928a928a92909160a40184848082843782019150509650505050505050602060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050506040513d6020811015610c5b57600080fd5b5051604080518681529051919250600160a060020a0387169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a384600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16868686604051808481526020018060200182810382528484828181526020019250808284376040519201829003965090945050505050a3949350505050565b600254604080517f322ec0fb000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151600093929092169163322ec0fb9160648082019260209290919082900301818787803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506040513d6020811015610db757600080fd5b5051604080518481529051919250600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a392915050565b600154600160a060020a03163314610e1b57600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600254604080517f3cd1570f000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a03898116602483015288811660448301526064820188905260ff8716608483015260a4820186905260c4820185905291516000939290921691633cd1570f9160e48082019260209290919082900301818787803b158015610f2357600080fd5b505af1158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b5051604080518281529051919250600160a060020a0380891692908a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a39695505050505050565b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038481166004830152915160009392909216916370a082319160248082019260209290919082900301818787803b15801561100b57600080fd5b505af115801561101f573d6000803e3d6000fd5b505050506040513d602081101561103557600080fd5b505192915050565b600054600160a060020a0316331461105457600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146110c057600080fd5b600054600160a060020a0316ff5b6005547d0100000000000000000000000000000000000000000000000000000000000281565b600054600160a060020a031681565b600054600160a060020a0316331461111a57600080fd5b600160a060020a03811615156111b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f636f6e74726f6c6c657220616464726573732063616e6e6f742062652074686560448201527f206e756c6c206164647265737300000000000000000000000000000000000000606482015290519081900360840190fd5b600254600554604051600160a060020a038481169316917d010000000000000000000000000000000000000000000000000000000000027fffffff000000000000000000000000000000000000000000000000000000000016907f2ce3a3a1c097de2b147145a1e6f236b569e75e7310e3b0b436d5dea8f60e35dc90600090a46002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517e3074ff0000000000000000000000000000000000000000000000000000000081529051309390921691623074ff916004808201926020929091908290030181600087803b1580156112ba57600080fd5b505af11580156112ce573d6000803e3d6000fd5b505050506040513d60208110156112e457600080fd5b5051600160a060020a03161461138157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f636f6e74726f6c6c65722066726f6e74656e6420646f6573206e6f7420706f6960448201527f6e74206261636b00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600554600254604080517f8ba47bdd00000000000000000000000000000000000000000000000000000000815290517d0100000000000000000000000000000000000000000000000000000000009093027fffffff00000000000000000000000000000000000000000000000000000000001692600160a060020a0390921691638ba47bdd916004808201926020929091908290030181600087803b15801561142957600080fd5b505af115801561143d573d6000803e3d6000fd5b505050506040513d602081101561145357600080fd5b50517fffffff0000000000000000000000000000000000000000000000000000000000161461150957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f7469636b657220646f6573206e6f74206d6174636820636f6e74726f6c6c657260448201527f207469636b657400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561062b5780601f106106005761010080835404028352916020019161062b565b600054600160a060020a0316331461157e57600080fd5b60008054604051600160a060020a0390911691303180156108fc02929091818181858888f19350505050158015611509573d6000803e3d6000fd5b600254604080517fe174fd94000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151600093929092169163e174fd949160648082019260209290919082900301818787803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d602081101561165b57600080fd5b5051604080518481529051919250600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a392915050565b600080fd5b600254604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015284811660248301529151600093929092169163dd62ed3e9160448082019260209290919082900301818787803b15801561171f57600080fd5b505af1158015611733573d6000803e3d6000fd5b505050506040513d602081101561174957600080fd5b50519392505050565b600154600160a060020a031681565b600054600160a060020a0316331461177857600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031633146117be57600080fd5b80600160a060020a0316ff5b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561184657600080fd5b505af115801561185a573d6000803e3d6000fd5b505050506040513d602081101561187057600080fd5b5051151561187d57600080fd5b5050505600a165627a7a7230582091222dc8382b25bdfdbaf44efd7e168e2304a888123c88306d2e7d3b41e5314c0029","external_libraries":[],"proxy_type":null,"implementations":[],"verified_at":"2025-11-16T23:10:19.683871Z","is_verified_via_verifier_alliance":true,"compiler_version":"0.4.24+commit.e67f0147","decoded_constructor_args":null,"sourcify_repo_url":null,"optimization_runs":1000,"compiler_settings":{"optimizer":{"enabled":true,"runs":1000}},"is_verified":true,"verified_twin_address_hash":null,"optimization_enabled":true,"deployed_bytecode":"0x60806040526004361061015e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461016d578063095ea7b3146101f757806317ffc3201461022f57806318160ddd1461025257806323b872dd146102795780632aed7f3f146102a35780633018205f146102c4578063313ce567146102f55780633823caec1461030a5780634000aea01461033d578063449a52f81461036e5780634e71e0c8146103925780636eb4c609146103a757806370a08231146103dd578063715018a6146103fe57806383197ef0146104135780638ba47bdd146104285780638da5cb5b1461047257806392eefe9b1461048757806395d89b41146104a85780639f727c27146104bd578063a9059cbb146104d2578063c0ee0b8a146104f6578063dd62ed3e14610527578063e30c39781461054e578063f2fde38b14610563578063f5074f4114610584575b34801561016a57600080fd5b50005b34801561017957600080fd5b506101826105a5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101bc5781810151838201526020016101a4565b50505050905090810190601f1680156101e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020357600080fd5b5061021b600160a060020a0360043516602435610633565b604080519115158252519081900360200190f35b34801561023b57600080fd5b50610250600160a060020a0360043516610721565b005b34801561025e57600080fd5b506102676107ed565b60408051918252519081900360200190f35b34801561028557600080fd5b5061021b600160a060020a036004358116906024351660443561087d565b3480156102af57600080fd5b50610250600160a060020a0360043516610977565b3480156102d057600080fd5b506102d9610a11565b60408051600160a060020a039092168252519081900360200190f35b34801561030157600080fd5b50610267610a20565b34801561031657600080fd5b5061021b600160a060020a036004351660243560443560ff6064351660843560a435610a7f565b34801561034957600080fd5b5061021b60048035600160a060020a0316906024803591604435918201910135610b90565b34801561037a57600080fd5b5061021b600160a060020a0360043516602435610d15565b34801561039e57600080fd5b50610250610e04565b3480156103b357600080fd5b50610267600160a060020a036004358116906024351660443560ff6064351660843560a435610e8c565b3480156103e957600080fd5b50610267600160a060020a0360043516610fa0565b34801561040a57600080fd5b5061025061103d565b34801561041f57600080fd5b506102506110a9565b34801561043457600080fd5b5061043d6110ce565b604080517fffffff00000000000000000000000000000000000000000000000000000000009092168252519081900360200190f35b34801561047e57600080fd5b506102d96110f4565b34801561049357600080fd5b50610250600160a060020a0360043516611103565b3480156104b457600080fd5b5061018261150c565b3480156104c957600080fd5b50610250611567565b3480156104de57600080fd5b5061021b600160a060020a03600435166024356115b9565b34801561050257600080fd5b5061025060048035600160a060020a03169060248035916044359182019101356116a7565b34801561053357600080fd5b50610267600160a060020a03600435811690602435166116ac565b34801561055a57600080fd5b506102d9611752565b34801561056f57600080fd5b50610250600160a060020a0360043516611761565b34801561059057600080fd5b50610250600160a060020a03600435166117a7565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561062b5780601f106106005761010080835404028352916020019161062b565b820191906000526020600020905b81548152906001019060200180831161060e57829003601f168201915b505050505081565b600254604080517f774d5409000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151600093929092169163774d54099160648082019260209290919082900301818787803b1580156106ab57600080fd5b505af11580156106bf573d6000803e3d6000fd5b505050506040513d60208110156106d557600080fd5b5051604080518481529051919250600160a060020a0385169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925919081900360200190a392915050565b60008054600160a060020a0316331461073957600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b505050506040513d60208110156107c457600080fd5b50516000549091506107e990600160a060020a0384811691168363ffffffff6117ca16565b5050565b600254604080517f18160ddd0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a0316916318160ddd91600480830192602092919082900301818787803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b505050506040513d602081101561087657600080fd5b5051905090565b600254604080517fe974fee9000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a0386811660248301528581166044830152606482018590529151600093929092169163e974fee99160848082019260209290919082900301818787803b1580156108fd57600080fd5b505af1158015610911573d6000803e3d6000fd5b505050506040513d602081101561092757600080fd5b5051604080518481529051919250600160a060020a0380861692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a39392505050565b60008054600160a060020a0316331461098f57600080fd5b5060008054604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152905184939284169263f2fde38b926024808201939182900301818387803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b505050505050565b600254600160a060020a031690565b600254604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163313ce56791600480830192602092919082900301818787803b15801561084c57600080fd5b600254604080517f4eb00754000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038981166024830152604482018990526064820188905260ff8716608483015260a4820186905260c4820185905291516000939290921691634eb007549160e48082019260209290919082900301818787803b158015610b1557600080fd5b505af1158015610b29573d6000803e3d6000fd5b505050506040513d6020811015610b3f57600080fd5b5051604080518881529051919250600091600160a060020a038a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a39695505050505050565b6002546040517f9e7f43ca0000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03888116602485015260448401889052608060648501908152608485018790526000959190911693639e7f43ca93928a928a928a928a92909160a40184848082843782019150509650505050505050602060405180830381600087803b158015610c3157600080fd5b505af1158015610c45573d6000803e3d6000fd5b505050506040513d6020811015610c5b57600080fd5b5051604080518681529051919250600160a060020a0387169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a384600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16868686604051808481526020018060200182810382528484828181526020019250808284376040519201829003965090945050505050a3949350505050565b600254604080517f322ec0fb000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151600093929092169163322ec0fb9160648082019260209290919082900301818787803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506040513d6020811015610db757600080fd5b5051604080518481529051919250600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a392915050565b600154600160a060020a03163314610e1b57600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600254604080517f3cd1570f000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a03898116602483015288811660448301526064820188905260ff8716608483015260a4820186905260c4820185905291516000939290921691633cd1570f9160e48082019260209290919082900301818787803b158015610f2357600080fd5b505af1158015610f37573d6000803e3d6000fd5b505050506040513d6020811015610f4d57600080fd5b5051604080518281529051919250600160a060020a0380891692908a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a39695505050505050565b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038481166004830152915160009392909216916370a082319160248082019260209290919082900301818787803b15801561100b57600080fd5b505af115801561101f573d6000803e3d6000fd5b505050506040513d602081101561103557600080fd5b505192915050565b600054600160a060020a0316331461105457600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146110c057600080fd5b600054600160a060020a0316ff5b6005547d0100000000000000000000000000000000000000000000000000000000000281565b600054600160a060020a031681565b600054600160a060020a0316331461111a57600080fd5b600160a060020a03811615156111b757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f636f6e74726f6c6c657220616464726573732063616e6e6f742062652074686560448201527f206e756c6c206164647265737300000000000000000000000000000000000000606482015290519081900360840190fd5b600254600554604051600160a060020a038481169316917d010000000000000000000000000000000000000000000000000000000000027fffffff000000000000000000000000000000000000000000000000000000000016907f2ce3a3a1c097de2b147145a1e6f236b569e75e7310e3b0b436d5dea8f60e35dc90600090a46002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055604080517e3074ff0000000000000000000000000000000000000000000000000000000081529051309390921691623074ff916004808201926020929091908290030181600087803b1580156112ba57600080fd5b505af11580156112ce573d6000803e3d6000fd5b505050506040513d60208110156112e457600080fd5b5051600160a060020a03161461138157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f636f6e74726f6c6c65722066726f6e74656e6420646f6573206e6f7420706f6960448201527f6e74206261636b00000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600554600254604080517f8ba47bdd00000000000000000000000000000000000000000000000000000000815290517d0100000000000000000000000000000000000000000000000000000000009093027fffffff00000000000000000000000000000000000000000000000000000000001692600160a060020a0390921691638ba47bdd916004808201926020929091908290030181600087803b15801561142957600080fd5b505af115801561143d573d6000803e3d6000fd5b505050506040513d602081101561145357600080fd5b50517fffffff0000000000000000000000000000000000000000000000000000000000161461150957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f7469636b657220646f6573206e6f74206d6174636820636f6e74726f6c6c657260448201527f207469636b657400000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b50565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561062b5780601f106106005761010080835404028352916020019161062b565b600054600160a060020a0316331461157e57600080fd5b60008054604051600160a060020a0390911691303180156108fc02929091818181858888f19350505050158015611509573d6000803e3d6000fd5b600254604080517fe174fd94000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a038581166024830152604482018590529151600093929092169163e174fd949160648082019260209290919082900301818787803b15801561163157600080fd5b505af1158015611645573d6000803e3d6000fd5b505050506040513d602081101561165b57600080fd5b5051604080518481529051919250600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a392915050565b600080fd5b600254604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015284811660248301529151600093929092169163dd62ed3e9160448082019260209290919082900301818787803b15801561171f57600080fd5b505af1158015611733573d6000803e3d6000fd5b505050506040513d602081101561174957600080fd5b50519392505050565b600154600160a060020a031681565b600054600160a060020a0316331461177857600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a031633146117be57600080fd5b80600160a060020a0316ff5b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561184657600080fd5b505af115801561185a573d6000803e3d6000fd5b505050506040513d602081101561187057600080fd5b5051151561187d57600080fd5b5050505600a165627a7a7230582091222dc8382b25bdfdbaf44efd7e168e2304a888123c88306d2e7d3b41e5314c0029","source_code":"// File: openzeppelin-solidity/contracts/ownership/Ownable.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n/**\r\n * @title Ownable\r\n * @dev The Ownable contract has an owner address, and provides basic authorization control\r\n * functions, this simplifies the implementation of \"user permissions\".\r\n */\r\ncontract Ownable {\r\n  address public owner;\r\n\r\n\r\n  event OwnershipRenounced(address indexed previousOwner);\r\n  event OwnershipTransferred(\r\n    address indexed previousOwner,\r\n    address indexed newOwner\r\n  );\r\n\r\n\r\n  /**\r\n   * @dev The Ownable constructor sets the original `owner` of the contract to the sender\r\n   * account.\r\n   */\r\n  constructor() public {\r\n    owner = msg.sender;\r\n  }\r\n\r\n  /**\r\n   * @dev Throws if called by any account other than the owner.\r\n   */\r\n  modifier onlyOwner() {\r\n    require(msg.sender == owner);\r\n    _;\r\n  }\r\n\r\n  /**\r\n   * @dev Allows the current owner to relinquish control of the contract.\r\n   * @notice Renouncing to ownership will leave the contract without an owner.\r\n   * It will not be possible to call the functions with the `onlyOwner`\r\n   * modifier anymore.\r\n   */\r\n  function renounceOwnership() public onlyOwner {\r\n    emit OwnershipRenounced(owner);\r\n    owner = address(0);\r\n  }\r\n\r\n  /**\r\n   * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n   * @param _newOwner The address to transfer ownership to.\r\n   */\r\n  function transferOwnership(address _newOwner) public onlyOwner {\r\n    _transferOwnership(_newOwner);\r\n  }\r\n\r\n  /**\r\n   * @dev Transfers control of the contract to a newOwner.\r\n   * @param _newOwner The address to transfer ownership to.\r\n   */\r\n  function _transferOwnership(address _newOwner) internal {\r\n    require(_newOwner != address(0));\r\n    emit OwnershipTransferred(owner, _newOwner);\r\n    owner = _newOwner;\r\n  }\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/ownership/Claimable.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title Claimable\r\n * @dev Extension for the Ownable contract, where the ownership needs to be claimed.\r\n * This allows the new owner to accept the transfer.\r\n */\r\ncontract Claimable is Ownable {\r\n  address public pendingOwner;\r\n\r\n  /**\r\n   * @dev Modifier throws if called by any account other than the pendingOwner.\r\n   */\r\n  modifier onlyPendingOwner() {\r\n    require(msg.sender == pendingOwner);\r\n    _;\r\n  }\r\n\r\n  /**\r\n   * @dev Allows the current owner to set the pendingOwner address.\r\n   * @param newOwner The address to transfer ownership to.\r\n   */\r\n  function transferOwnership(address newOwner) public onlyOwner {\r\n    pendingOwner = newOwner;\r\n  }\r\n\r\n  /**\r\n   * @dev Allows the pendingOwner address to finalize the transfer.\r\n   */\r\n  function claimOwnership() public onlyPendingOwner {\r\n    emit OwnershipTransferred(owner, pendingOwner);\r\n    owner = pendingOwner;\r\n    pendingOwner = address(0);\r\n  }\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n/**\r\n * @title ERC20Basic\r\n * @dev Simpler version of ERC20 interface\r\n * See https://github.com/ethereum/EIPs/issues/179\r\n */\r\ncontract ERC20Basic {\r\n  function totalSupply() public view returns (uint256);\r\n  function balanceOf(address _who) public view returns (uint256);\r\n  function transfer(address _to, uint256 _value) public returns (bool);\r\n  event Transfer(address indexed from, address indexed to, uint256 value);\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title ERC20 interface\r\n * @dev see https://github.com/ethereum/EIPs/issues/20\r\n */\r\ncontract ERC20 is ERC20Basic {\r\n  function allowance(address _owner, address _spender)\r\n    public view returns (uint256);\r\n\r\n  function transferFrom(address _from, address _to, uint256 _value)\r\n    public returns (bool);\r\n\r\n  function approve(address _spender, uint256 _value) public returns (bool);\r\n  event Approval(\r\n    address indexed owner,\r\n    address indexed spender,\r\n    uint256 value\r\n  );\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\n/**\r\n * @title SafeERC20\r\n * @dev Wrappers around ERC20 operations that throw on failure.\r\n * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\r\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\r\n */\r\nlibrary SafeERC20 {\r\n  function safeTransfer(\r\n    ERC20Basic _token,\r\n    address _to,\r\n    uint256 _value\r\n  )\r\n    internal\r\n  {\r\n    require(_token.transfer(_to, _value));\r\n  }\r\n\r\n  function safeTransferFrom(\r\n    ERC20 _token,\r\n    address _from,\r\n    address _to,\r\n    uint256 _value\r\n  )\r\n    internal\r\n  {\r\n    require(_token.transferFrom(_from, _to, _value));\r\n  }\r\n\r\n  function safeApprove(\r\n    ERC20 _token,\r\n    address _spender,\r\n    uint256 _value\r\n  )\r\n    internal\r\n  {\r\n    require(_token.approve(_spender, _value));\r\n  }\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/ownership/CanReclaimToken.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @title Contracts that should be able to recover tokens\r\n * @author SylTi\r\n * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner.\r\n * This will prevent any accidental loss of tokens.\r\n */\r\ncontract CanReclaimToken is Ownable {\r\n  using SafeERC20 for ERC20Basic;\r\n\r\n  /**\r\n   * @dev Reclaim all ERC20Basic compatible tokens\r\n   * @param _token ERC20Basic The address of the token contract\r\n   */\r\n  function reclaimToken(ERC20Basic _token) external onlyOwner {\r\n    uint256 balance = _token.balanceOf(this);\r\n    _token.safeTransfer(owner, balance);\r\n  }\r\n\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/ownership/HasNoEther.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title Contracts that should not own Ether\r\n * @author Remco Bloemen <remco@2π.com>\r\n * @dev This tries to block incoming ether to prevent accidental loss of Ether. Should Ether end up\r\n * in the contract, it will allow the owner to reclaim this Ether.\r\n * @notice Ether can still be sent to this contract by:\r\n * calling functions labeled `payable`\r\n * `selfdestruct(contract_address)`\r\n * mining directly to the contract address\r\n */\r\ncontract HasNoEther is Ownable {\r\n\r\n  /**\r\n  * @dev Constructor that rejects incoming Ether\r\n  * The `payable` flag is added so we can access `msg.value` without compiler warning. If we\r\n  * leave out payable, then Solidity will allow inheriting contracts to implement a payable\r\n  * constructor. By doing it this way we prevent a payable constructor from working. Alternatively\r\n  * we could use assembly to access msg.value.\r\n  */\r\n  constructor() public payable {\r\n    require(msg.value == 0);\r\n  }\r\n\r\n  /**\r\n   * @dev Disallows direct send by setting a default function without the `payable` flag.\r\n   */\r\n  function() external {\r\n  }\r\n\r\n  /**\r\n   * @dev Transfer all Ether held by the contract to the owner.\r\n   */\r\n  function reclaimEther() external onlyOwner {\r\n    owner.transfer(address(this).balance);\r\n  }\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/ownership/HasNoTokens.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title Contracts that should not own Tokens\r\n * @author Remco Bloemen <remco@2π.com>\r\n * @dev This blocks incoming ERC223 tokens to prevent accidental loss of tokens.\r\n * Should tokens (any ERC20Basic compatible) end up in the contract, it allows the\r\n * owner to reclaim the tokens.\r\n */\r\ncontract HasNoTokens is CanReclaimToken {\r\n\r\n /**\r\n  * @dev Reject all ERC223 compatible tokens\r\n  * @param _from address The address that is transferring the tokens\r\n  * @param _value uint256 the amount of the specified token\r\n  * @param _data Bytes The data passed from the caller.\r\n  */\r\n  function tokenFallback(\r\n    address _from,\r\n    uint256 _value,\r\n    bytes _data\r\n  )\r\n    external\r\n    pure\r\n  {\r\n    _from;\r\n    _value;\r\n    _data;\r\n    revert();\r\n  }\r\n\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/ownership/HasNoContracts.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title Contracts that should not own Contracts\r\n * @author Remco Bloemen <remco@2π.com>\r\n * @dev Should contracts (anything Ownable) end up being owned by this contract, it allows the owner\r\n * of this contract to reclaim ownership of the contracts.\r\n */\r\ncontract HasNoContracts is Ownable {\r\n\r\n  /**\r\n   * @dev Reclaim ownership of Ownable contracts\r\n   * @param _contractAddr The address of the Ownable to be reclaimed.\r\n   */\r\n  function reclaimContract(address _contractAddr) external onlyOwner {\r\n    Ownable contractInst = Ownable(_contractAddr);\r\n    contractInst.transferOwnership(owner);\r\n  }\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/ownership/NoOwner.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @title Base contract for contracts that should not own things.\r\n * @author Remco Bloemen <remco@2π.com>\r\n * @dev Solves a class of errors where a contract accidentally becomes owner of Ether, Tokens or\r\n * Owned contracts. See respective base contracts for details.\r\n */\r\ncontract NoOwner is HasNoEther, HasNoTokens, HasNoContracts {\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/lifecycle/Destructible.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title Destructible\r\n * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner.\r\n */\r\ncontract Destructible is Ownable {\r\n  /**\r\n   * @dev Transfers the current balance to the owner and terminates the contract.\r\n   */\r\n  function destroy() public onlyOwner {\r\n    selfdestruct(owner);\r\n  }\r\n\r\n  function destroyAndSend(address _recipient) public onlyOwner {\r\n    selfdestruct(_recipient);\r\n  }\r\n}\r\n\r\n// File: contracts/IERC20.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n/**\r\n * @dev Interface of the ERC20 standard as defined in the EIP. Does not include\r\n * the optional functions; to access them see `ERC20Detailed`.\r\n */\r\ninterface IERC20 {\r\n    /**\r\n     * @dev Returns the amount of tokens in existence.\r\n     */\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Returns the amount of tokens owned by `account`.\r\n     */\r\n    function balanceOf(address account) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a `Transfer` event.\r\n     */\r\n    function transfer(address recipient, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Returns the remaining number of tokens that `spender` will be\r\n     * allowed to spend on behalf of `owner` through `transferFrom`. This is\r\n     * zero by default.\r\n     *\r\n     * This value changes when `approve` or `transferFrom` are called.\r\n     */\r\n    function allowance(address owner, address spender) external view returns (uint256);\r\n\r\n    /**\r\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * > Beware that changing an allowance with this method brings the risk\r\n     * that someone may use both the old and the new allowance by unfortunate\r\n     * transaction ordering. One possible solution to mitigate this race\r\n     * condition is to first reduce the spender's allowance to 0 and set the\r\n     * desired value afterwards:\r\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\r\n     *\r\n     * Emits an `Approval` event.\r\n     */\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\r\n     * allowance mechanism. `amount` is then deducted from the caller's\r\n     * allowance.\r\n     *\r\n     * Returns a boolean value indicating whether the operation succeeded.\r\n     *\r\n     * Emits a `Transfer` event.\r\n     */\r\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\r\n\r\n    /**\r\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\r\n     * another (`to`).\r\n     *\r\n     * Note that `value` may be zero.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    /**\r\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\r\n     * a call to `approve`. `value` is the new allowance.\r\n     */\r\n    event Approval(address indexed owner, address indexed spender, uint256 value);\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/math/SafeMath.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n/**\r\n * @title SafeMath\r\n * @dev Math operations with safety checks that throw on error\r\n */\r\nlibrary SafeMath {\r\n\r\n  /**\r\n  * @dev Multiplies two numbers, throws on overflow.\r\n  */\r\n  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\r\n    // Gas optimization: this is cheaper than asserting 'a' not being zero, but the\r\n    // benefit is lost if 'b' is also tested.\r\n    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522\r\n    if (_a == 0) {\r\n      return 0;\r\n    }\r\n\r\n    c = _a * _b;\r\n    assert(c / _a == _b);\r\n    return c;\r\n  }\r\n\r\n  /**\r\n  * @dev Integer division of two numbers, truncating the quotient.\r\n  */\r\n  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {\r\n    // assert(_b > 0); // Solidity automatically throws when dividing by 0\r\n    // uint256 c = _a / _b;\r\n    // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold\r\n    return _a / _b;\r\n  }\r\n\r\n  /**\r\n  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\r\n  */\r\n  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {\r\n    assert(_b <= _a);\r\n    return _a - _b;\r\n  }\r\n\r\n  /**\r\n  * @dev Adds two numbers, throws on overflow.\r\n  */\r\n  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {\r\n    c = _a + _b;\r\n    assert(c >= _a);\r\n    return c;\r\n  }\r\n}\r\n\r\n// File: contracts/TokenStorageLib.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n/** @title TokenStorageLib\r\n * @dev Implementation of an[external storage for tokens.\r\n */\r\nlibrary TokenStorageLib {\r\n\r\n    using SafeMath for uint;\r\n\r\n    struct TokenStorage {\r\n        mapping (address => uint) balances;\r\n        mapping (address => mapping (address => uint)) allowed;\r\n        uint totalSupply;\r\n    }\r\n\r\n    /**\r\n     * @dev Increases balance of an address.\r\n     * @param self Token storage to operate on.\r\n     * @param to Address to increase.\r\n     * @param amount Number of units to add.\r\n     */\r\n    function addBalance(TokenStorage storage self, address to, uint amount)\r\n        external\r\n    {\r\n        self.totalSupply = self.totalSupply.add(amount);\r\n        self.balances[to] = self.balances[to].add(amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Decreases balance of an address.\r\n     * @param self Token storage to operate on.\r\n     * @param from Address to decrease.\r\n     * @param amount Number of units to subtract.\r\n     */\r\n    function subBalance(TokenStorage storage self, address from, uint amount)\r\n        external\r\n    {\r\n        self.totalSupply = self.totalSupply.sub(amount);\r\n        self.balances[from] = self.balances[from].sub(amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Sets the allowance for a spender.\r\n     * @param self Token storage to operate on.\r\n     * @param owner Address of the owner of the tokens to spend.\r\n     * @param spender Address of the spender.\r\n     * @param amount Qunatity of allowance.\r\n     */\r\n    function setAllowed(TokenStorage storage self, address owner, address spender, uint amount)\r\n        external\r\n    {\r\n        self.allowed[owner][spender] = amount;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the supply of tokens.\r\n     * @param self Token storage to operate on.\r\n     * @return Total supply.\r\n     */\r\n    function getSupply(TokenStorage storage self)\r\n        external\r\n        view\r\n        returns (uint)\r\n    {\r\n        return self.totalSupply;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the balance of an address.\r\n     * @param self Token storage to operate on.\r\n     * @param who Address to lookup.\r\n     * @return Number of units.\r\n     */\r\n    function getBalance(TokenStorage storage self, address who)\r\n        external\r\n        view\r\n        returns (uint)\r\n    {\r\n        return self.balances[who];\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the allowance for a spender.\r\n     * @param self Token storage to operate on.\r\n     * @param owner Address of the owner of the tokens to spend.\r\n     * @param spender Address of the spender.\r\n     * @return Number of units.\r\n     */\r\n    function getAllowed(TokenStorage storage self, address owner, address spender)\r\n        external\r\n        view\r\n        returns (uint)\r\n    {\r\n        return self.allowed[owner][spender];\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/TokenStorage.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @title TokenStorage\r\n * @dev External storage for tokens.\r\n * The storage is implemented in a separate contract to maintain state\r\n * between token upgrades.\r\n */\r\ncontract TokenStorage is Claimable, CanReclaimToken, NoOwner {\r\n\r\n    using TokenStorageLib for TokenStorageLib.TokenStorage;\r\n\r\n    TokenStorageLib.TokenStorage internal tokenStorage;\r\n\r\n    /**\r\n     * @dev Increases balance of an address.\r\n     * @param to Address to increase.\r\n     * @param amount Number of units to add.\r\n     */\r\n    function addBalance(address to, uint amount) external onlyOwner {\r\n        tokenStorage.addBalance(to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Decreases balance of an address.\r\n     * @param from Address to decrease.\r\n     * @param amount Number of units to subtract.\r\n     */\r\n    function subBalance(address from, uint amount) external onlyOwner {\r\n        tokenStorage.subBalance(from, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Sets the allowance for a spender.\r\n     * @param owner Address of the owner of the tokens to spend.\r\n     * @param spender Address of the spender.\r\n     * @param amount Qunatity of allowance.\r\n     */\r\n    function setAllowed(address owner, address spender, uint amount) external onlyOwner {\r\n        tokenStorage.setAllowed(owner, spender, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the supply of tokens.\r\n     * @return Total supply.\r\n     */\r\n    function getSupply() external view returns (uint) {\r\n        return tokenStorage.getSupply();\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the balance of an address.\r\n     * @param who Address to lookup.\r\n     * @return Number of units.\r\n     */\r\n    function getBalance(address who) external view returns (uint) {\r\n        return tokenStorage.getBalance(who);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the allowance for a spender.\r\n     * @param owner Address of the owner of the tokens to spend.\r\n     * @param spender Address of the spender.\r\n     * @return Number of units.\r\n     */\r\n    function getAllowed(address owner, address spender)\r\n        external\r\n        view\r\n        returns (uint)\r\n    {\r\n        return tokenStorage.getAllowed(owner, spender);\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/ERC20Lib.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title ERC20Lib\r\n * @dev Standard ERC20 token functionality.\r\n * https://github.com/ethereum/EIPs/issues/20\r\n */\r\nlibrary ERC20Lib {\r\n\r\n    using SafeMath for uint;\r\n\r\n    /**\r\n     * @dev Transfers tokens [ERC20].\r\n     * @param db Token storage to operate on.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transfer(TokenStorage db, address caller, address to, uint amount)\r\n        external\r\n        returns (bool success)\r\n    {\r\n        db.subBalance(caller, amount);\r\n        db.addBalance(to, amount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens from a specific address [ERC20].\r\n     * The address owner has to approve the spender beforehand.\r\n     * @param db Token storage to operate on.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param from Address to debet the tokens from.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transferFrom(\r\n        TokenStorage db,\r\n        address caller,\r\n        address from,\r\n        address to,\r\n        uint amount\r\n    )\r\n        external\r\n        returns (bool success)\r\n    {\r\n        uint allowance = db.getAllowed(from, caller);\r\n        db.subBalance(from, amount);\r\n        db.addBalance(to, amount);\r\n        db.setAllowed(from, caller, allowance.sub(amount));\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Approves a spender [ERC20].\r\n     * Note that using the approve/transferFrom presents a possible\r\n     * security vulnerability described in:\r\n     * https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.quou09mcbpzw\r\n     * Use transferAndCall to mitigate.\r\n     * @param db Token storage to operate on.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param spender The address of the future spender.\r\n     * @param amount The allowance of the spender.\r\n     */\r\n    function approve(TokenStorage db, address caller, address spender, uint amount)\r\n        public\r\n        returns (bool success)\r\n    {\r\n        db.setAllowed(caller, spender, amount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the number tokens associated with an address.\r\n     * @param db Token storage to operate on.\r\n     * @param who Address to lookup.\r\n     * @return Balance of address.\r\n     */\r\n    function balanceOf(TokenStorage db, address who)\r\n        external\r\n        view\r\n        returns (uint balance)\r\n    {\r\n        return db.getBalance(who);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the allowance for a spender\r\n     * @param db Token storage to operate on.\r\n     * @param owner The address of the owner of the tokens.\r\n     * @param spender The address of the spender.\r\n     * @return Number of tokens the spender is allowed to spend.\r\n     */\r\n    function allowance(TokenStorage db, address owner, address spender)\r\n        external\r\n        view\r\n        returns (uint remaining)\r\n    {\r\n        return db.getAllowed(owner, spender);\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/MintableTokenLib.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n/**\r\n * @title Mintable token\r\n * @dev Simple ERC20 Token example, with mintable token creation\r\n * @dev Issue: * https://github.com/OpenZeppelin/openzeppelin-solidity/issues/120\r\n * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol\r\n */\r\n\r\nlibrary MintableTokenLib {\r\n\r\n    using SafeMath for uint;\r\n\r\n    /**\r\n     * @dev Mints new tokens.\r\n     * @param db Token storage to operate on.\r\n     * @param to The address that will recieve the minted tokens.\r\n     * @param amount The amount of tokens to mint.\r\n     */\r\n    function mint(\r\n        TokenStorage db,\r\n        address to,\r\n        uint amount\r\n    )\r\n        external\r\n        returns (bool)\r\n    {\r\n        db.addBalance(to, amount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Burns tokens.\r\n     * @param db Token storage to operate on.\r\n     * @param from The address holding tokens.\r\n     * @param amount The amount of tokens to burn.\r\n     */\r\n    function burn(\r\n        TokenStorage db,\r\n        address from,\r\n        uint amount\r\n    )\r\n        public\r\n        returns (bool)\r\n    {\r\n        db.subBalance(from, amount);\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @dev Burns tokens from a specific address.\r\n     * To burn the tokens the caller needs to provide a signature\r\n     * proving that the caller is authorized by the token owner to do so.\r\n     * @param db Token storage to operate on.\r\n     * @param from The address holding tokens.\r\n     * @param amount The amount of tokens to burn.\r\n     * @param h Hash which the token owner signed.\r\n     * @param v Signature component.\r\n     * @param r Signature component.\r\n     * @param s Sigature component.\r\n     */\r\n    function burn(\r\n        TokenStorage db,\r\n        address from,\r\n        uint amount,\r\n        bytes32 h,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    )\r\n        external\r\n        returns (bool)\r\n    {\r\n        require(\r\n            ecrecover(h, v, r, s) == from,\r\n            \"signature/hash does not match\"\r\n        );\r\n        return burn(db, from, amount);\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/IValidator.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n/**\r\n * @title IValidator\r\n * @dev Contracts implementing this interface validate token transfers.\r\n */\r\ninterface IValidator {\r\n\r\n    /**\r\n     * @dev Emitted when a validator makes a decision.\r\n     * @param from Sender address.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens.\r\n     * @param valid True if transfer approved, false if rejected.\r\n     */\r\n    event Decision(address indexed from, address indexed to, uint amount, bool valid);\r\n\r\n    /**\r\n     * @dev Validates token transfer.\r\n     * If the sender is on the blacklist the transfer is denied.\r\n     * @param from Sender address.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens.\r\n     */\r\n    function validate(address from, address to, uint amount) external returns (bool valid);\r\n\r\n}\r\n\r\n// File: contracts/SmartTokenLib.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n/**\r\n * @title SmartTokenLib\r\n * @dev This library provides functionality which is required from a regulatory perspective.\r\n */\r\nlibrary SmartTokenLib {\r\n\r\n    using ERC20Lib for TokenStorage;\r\n    using MintableTokenLib for TokenStorage;\r\n\r\n    struct SmartStorage {\r\n        IValidator validator;\r\n    }\r\n\r\n    /**\r\n     * @dev Emitted when the contract owner recovers tokens.\r\n     * @param from Sender address.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens.\r\n     */\r\n    event Recovered(address indexed from, address indexed to, uint amount);\r\n\r\n    /**\r\n     * @dev Emitted when updating the validator.\r\n     * @param old Address of the old validator.\r\n     * @param current Address of the new validator.\r\n     */\r\n    event Validator(address indexed old, address indexed current);\r\n\r\n    /**\r\n     * @dev Sets a new validator.\r\n     * @param self Smart storage to operate on.\r\n     * @param validator Address of validator.\r\n     */\r\n    function setValidator(SmartStorage storage self, address validator)\r\n        external\r\n    {\r\n        emit Validator(self.validator, validator);\r\n        self.validator = IValidator(validator);\r\n    }\r\n\r\n\r\n    /**\r\n     * @dev Approves or rejects a transfer request.\r\n     * The request is forwarded to a validator which implements\r\n     * the actual business logic.\r\n     * @param self Smart storage to operate on.\r\n     * @param from Sender address.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens.\r\n     */\r\n    function validate(SmartStorage storage self, address from, address to, uint amount)\r\n        external\r\n        returns (bool valid)\r\n    {\r\n        return self.validator.validate(from, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Recovers tokens from an address and reissues them to another address.\r\n     * In case a user loses its private key the tokens can be recovered by burning\r\n     * the tokens from that address and reissuing to a new address.\r\n     * To recover tokens the contract owner needs to provide a signature\r\n     * proving that the token owner has authorized the owner to do so.\r\n     * @param from Address to burn tokens from.\r\n     * @param to Address to mint tokens to.\r\n     * @param h Hash which the token owner signed.\r\n     * @param v Signature component.\r\n     * @param r Signature component.\r\n     * @param s Sigature component.\r\n     * @return Amount recovered.\r\n     */\r\n    function recover(\r\n        TokenStorage token,\r\n        address from,\r\n        address to,\r\n        bytes32 h,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    )\r\n        external\r\n        returns (uint)\r\n    {\r\n        require(\r\n            ecrecover(h, v, r, s) == from,\r\n            \"signature/hash does not recover from address\"\r\n        );\r\n        uint amount = token.balanceOf(from);\r\n        token.burn(from, amount);\r\n        token.mint(to, amount);\r\n        emit Recovered(from, to, amount);\r\n        return amount;\r\n    }\r\n\r\n    /**\r\n     * @dev Gets the current validator.\r\n     * @param self Smart storage to operate on.\r\n     * @return Address of validator.\r\n     */\r\n    function getValidator(SmartStorage storage self)\r\n        external\r\n        view\r\n        returns (address)\r\n    {\r\n        return address(self.validator);\r\n    }\r\n\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/lifecycle/Pausable.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n\r\n/**\r\n * @title Pausable\r\n * @dev Base contract which allows children to implement an emergency stop mechanism.\r\n */\r\ncontract Pausable is Ownable {\r\n  event Pause();\r\n  event Unpause();\r\n\r\n  bool public paused = false;\r\n\r\n\r\n  /**\r\n   * @dev Modifier to make a function callable only when the contract is not paused.\r\n   */\r\n  modifier whenNotPaused() {\r\n    require(!paused);\r\n    _;\r\n  }\r\n\r\n  /**\r\n   * @dev Modifier to make a function callable only when the contract is paused.\r\n   */\r\n  modifier whenPaused() {\r\n    require(paused);\r\n    _;\r\n  }\r\n\r\n  /**\r\n   * @dev called by the owner to pause, triggers stopped state\r\n   */\r\n  function pause() public onlyOwner whenNotPaused {\r\n    paused = true;\r\n    emit Pause();\r\n  }\r\n\r\n  /**\r\n   * @dev called by the owner to unpause, returns to normal state\r\n   */\r\n  function unpause() public onlyOwner whenPaused {\r\n    paused = false;\r\n    emit Unpause();\r\n  }\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/AddressUtils.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n/**\r\n * Utility library of inline functions on addresses\r\n */\r\nlibrary AddressUtils {\r\n\r\n  /**\r\n   * Returns whether the target address is a contract\r\n   * @dev This function will return false if invoked during the constructor of a contract,\r\n   * as the code is not actually created until after the constructor finishes.\r\n   * @param _addr address to check\r\n   * @return whether the target address is a contract\r\n   */\r\n  function isContract(address _addr) internal view returns (bool) {\r\n    uint256 size;\r\n    // XXX Currently there is no better way to check if there is a contract in an address\r\n    // than to check the size of the code at that address.\r\n    // See https://ethereum.stackexchange.com/a/14016/36603\r\n    // for more details about how this works.\r\n    // TODO Check this again before the Serenity release, because all addresses will be\r\n    // contracts then.\r\n    // solium-disable-next-line security/no-inline-assembly\r\n    assembly { size := extcodesize(_addr) }\r\n    return size > 0;\r\n  }\r\n\r\n}\r\n\r\n// File: contracts/IERC677Recipient.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n/**\r\n * @title IERC677Recipient\r\n * @dev Contracts implementing this interface can participate in [ERC677].\r\n */\r\ninterface IERC677Recipient {\r\n\r\n    /**\r\n     * @dev Receives notification from [ERC677] transferAndCall.\r\n     * @param from Sender address.\r\n     * @param amount Number of tokens.\r\n     * @param data Additional data.\r\n     */\r\n    function onTokenTransfer(address from, uint256 amount, bytes data) external returns (bool);\r\n\r\n}\r\n\r\n// File: contracts/ERC677Lib.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @title ERC677\r\n * @dev ERC677 token functionality.\r\n * https://github.com/ethereum/EIPs/issues/677\r\n */\r\nlibrary ERC677Lib {\r\n\r\n    using ERC20Lib for TokenStorage;\r\n    using AddressUtils for address;\r\n\r\n    /**\r\n     * @dev Transfers tokens and subsequently calls a method on the recipient [ERC677].\r\n     * If the recipient is a non-contract address this method behaves just like transfer.\r\n     * @notice db.transfer either returns true or reverts.\r\n     * @param db Token storage to operate on.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     * @param data Additional data passed to the recipient's tokenFallback method.\r\n     */\r\n    function transferAndCall(\r\n        TokenStorage db,\r\n        address caller,\r\n        address to,\r\n        uint256 amount,\r\n        bytes data\r\n    )\r\n        external\r\n        returns (bool)\r\n    {\r\n        require(\r\n            db.transfer(caller, to, amount), \r\n            \"unable to transfer\"\r\n        );\r\n        if (to.isContract()) {\r\n            IERC677Recipient recipient = IERC677Recipient(to);\r\n            require(\r\n                recipient.onTokenTransfer(caller, amount, data),\r\n                \"token handler returns false\"\r\n            );\r\n        }\r\n        return true;\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/StandardController.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @title StandardController\r\n * @dev This is the base contract which delegates token methods [ERC20 and ERC677]\r\n * to their respective library implementations.\r\n * The controller is primarily intended to be interacted with via a token frontend.\r\n */\r\ncontract StandardController is Pausable, Destructible, Claimable {\r\n\r\n    using ERC20Lib for TokenStorage;\r\n    using ERC677Lib for TokenStorage;\r\n\r\n    TokenStorage internal token;\r\n    address internal frontend;\r\n\r\n    string public name;\r\n    string public symbol;\r\n    uint public decimals = 18;\r\n\r\n    /**\r\n     * @dev Emitted when updating the frontend.\r\n     * @param old Address of the old frontend.\r\n     * @param current Address of the new frontend.\r\n     */\r\n    event Frontend(address indexed old, address indexed current);\r\n\r\n    /**\r\n     * @dev Emitted when updating the storage.\r\n     * @param old Address of the old storage.\r\n     * @param current Address of the new storage.\r\n     */\r\n    event Storage(address indexed old, address indexed current);\r\n\r\n    /**\r\n     * @dev Modifier which prevents the function from being called by unauthorized parties.\r\n     * The caller must either be the sender or the function must be\r\n     * called via the frontend, otherwise the call is reverted.\r\n     * @param caller The address of the passed-in caller. Used to preserve the original caller.\r\n     */\r\n    modifier guarded(address caller) {\r\n        require(\r\n            msg.sender == caller || msg.sender == frontend,\r\n            \"either caller must be sender or calling via frontend\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Contract constructor.\r\n     * @param storage_ Address of the token storage for the controller.\r\n     * @param initialSupply The amount of tokens to mint upon creation.\r\n     * @param frontend_ Address of the authorized frontend.\r\n     */\r\n    constructor(address storage_, uint initialSupply, address frontend_) public {\r\n        require(\r\n            storage_ == 0x0 || initialSupply == 0,\r\n            \"either a token storage must be initialized or no initial supply\"\r\n        );\r\n        if (storage_ == 0x0) {\r\n            token = new TokenStorage();\r\n            token.addBalance(msg.sender, initialSupply);\r\n        } else {\r\n            token = TokenStorage(storage_);\r\n        }\r\n        frontend = frontend_;\r\n    }\r\n\r\n    /**\r\n     * @dev Prevents tokens to be sent to well known blackholes by throwing on known blackholes.\r\n     * @param to The address of the intended recipient.\r\n     */\r\n    function avoidBlackholes(address to) internal view {\r\n        require(to != 0x0, \"must not send to 0x0\");\r\n        require(to != address(this), \"must not send to controller\");\r\n        require(to != address(token), \"must not send to token storage\");\r\n        require(to != frontend, \"must not send to frontend\");\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the current frontend.\r\n     * @return Address of the frontend.\r\n     */\r\n    function getFrontend() external view returns (address) {\r\n        return frontend;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the current storage.\r\n     * @return Address of the storage.\r\n     */\r\n    function getStorage() external view returns (address) {\r\n        return address(token);\r\n    }\r\n\r\n    /**\r\n     * @dev Sets a new frontend.\r\n     * @param frontend_ Address of the new frontend.\r\n     */\r\n    function setFrontend(address frontend_) public onlyOwner {\r\n        emit Frontend(frontend, frontend_);\r\n        frontend = frontend_;\r\n    }\r\n\r\n    /**\r\n     * @dev Sets a new storage.\r\n     * @param storage_ Address of the new storage.\r\n     */\r\n    function setStorage(address storage_) external onlyOwner {\r\n        emit Storage(address(token), storage_);\r\n        token = TokenStorage(storage_);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers the ownership of the storage.\r\n     * @param newOwner Address of the new storage owner.\r\n     */\r\n    function transferStorageOwnership(address newOwner) public onlyOwner {\r\n        token.transferOwnership(newOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Claims the ownership of the storage.\r\n     */\r\n    function claimStorageOwnership() public onlyOwner {\r\n        token.claimOwnership();\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens [ERC20].\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transfer_withCaller(address caller, address to, uint amount)\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool ok)\r\n    {\r\n        avoidBlackholes(to);\r\n        return token.transfer(caller, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens from a specific address [ERC20].\r\n     * The address owner has to approve the spender beforehand.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param from Address to debet the tokens from.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transferFrom_withCaller(address caller, address from, address to, uint amount)\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool ok)\r\n    {\r\n        avoidBlackholes(to);\r\n        return token.transferFrom(caller, from, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Approves a spender [ERC20].\r\n     * Note that using the approve/transferFrom presents a possible\r\n     * security vulnerability described in:\r\n     * https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.quou09mcbpzw\r\n     * Use transferAndCall to mitigate.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param spender The address of the future spender.\r\n     * @param amount The allowance of the spender.\r\n     */\r\n    function approve_withCaller(address caller, address spender, uint amount)\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool ok)\r\n    {\r\n        return token.approve(caller, spender, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens and subsequently calls a method on the recipient [ERC677].\r\n     * If the recipient is a non-contract address this method behaves just like transfer.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     * @param data Additional data passed to the recipient's tokenFallback method.\r\n     */\r\n    function transferAndCall_withCaller(\r\n        address caller,\r\n        address to,\r\n        uint256 amount,\r\n        bytes data\r\n    )\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool ok)\r\n    {\r\n        avoidBlackholes(to);\r\n        return token.transferAndCall(caller, to, amount, data);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the total supply.\r\n     * @return Number of tokens.\r\n     */\r\n    function totalSupply() external view returns (uint) {\r\n        return token.getSupply();\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the number tokens associated with an address.\r\n     * @param who Address to lookup.\r\n     * @return Balance of address.\r\n     */\r\n    function balanceOf(address who) external view returns (uint) {\r\n        return token.getBalance(who);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the allowance for a spender\r\n     * @param owner The address of the owner of the tokens.\r\n     * @param spender The address of the spender.\r\n     * @return Number of tokens the spender is allowed to spend.\r\n     */\r\n    function allowance(address owner, address spender) external view returns (uint) {\r\n        return token.allowance(owner, spender);\r\n    }\r\n\r\n}\r\n\r\n// File: openzeppelin-solidity/contracts/access/rbac/Roles.sol\r\n\r\npragma solidity ^0.4.24;\r\n\r\n\r\n/**\r\n * @title Roles\r\n * @author Francisco Giordano (@frangio)\r\n * @dev Library for managing addresses assigned to a Role.\r\n * See RBAC.sol for example usage.\r\n */\r\nlibrary Roles {\r\n  struct Role {\r\n    mapping (address => bool) bearer;\r\n  }\r\n\r\n  /**\r\n   * @dev give an address access to this role\r\n   */\r\n  function add(Role storage _role, address _addr)\r\n    internal\r\n  {\r\n    _role.bearer[_addr] = true;\r\n  }\r\n\r\n  /**\r\n   * @dev remove an address' access to this role\r\n   */\r\n  function remove(Role storage _role, address _addr)\r\n    internal\r\n  {\r\n    _role.bearer[_addr] = false;\r\n  }\r\n\r\n  /**\r\n   * @dev check if an address has this role\r\n   * // reverts\r\n   */\r\n  function check(Role storage _role, address _addr)\r\n    internal\r\n    view\r\n  {\r\n    require(has(_role, _addr));\r\n  }\r\n\r\n  /**\r\n   * @dev check if an address has this role\r\n   * @return bool\r\n   */\r\n  function has(Role storage _role, address _addr)\r\n    internal\r\n    view\r\n    returns (bool)\r\n  {\r\n    return _role.bearer[_addr];\r\n  }\r\n}\r\n\r\n// File: contracts/SystemRole.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n/**\r\n * @title SystemRole\r\n * @dev SystemRole accounts have been approved to perform operational actions (e.g. mint and burn).\r\n * @notice addSystemAccount and removeSystemAccount are unprotected by default, i.e. anyone can call them.\r\n * @notice Contracts inheriting SystemRole *should* authorize the caller by overriding them.\r\n */\r\ncontract SystemRole {\r\n\r\n    using Roles for Roles.Role;\r\n    Roles.Role private systemAccounts;\r\n\r\n    /**\r\n     * @dev Emitted when system account is added.\r\n     * @param account is a new system account.\r\n     */\r\n    event SystemAccountAdded(address indexed account);\r\n\r\n    /**\r\n     * @dev Emitted when system account is removed.\r\n     * @param account is the old system account.\r\n     */\r\n    event SystemAccountRemoved(address indexed account);\r\n\r\n    /**\r\n     * @dev Modifier which prevents non-system accounts from calling protected functions.\r\n     */\r\n    modifier onlySystemAccounts() {\r\n        require(isSystemAccount(msg.sender));\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Modifier which prevents non-system accounts from being passed to the guard.\r\n     * @param account The account to check.\r\n     */\r\n    modifier onlySystemAccount(address account) {\r\n        require(\r\n            isSystemAccount(account),\r\n            \"must be a system account\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev System Role constructor.\r\n     * @notice The contract is an abstract contract as a result of the internal modifier.\r\n     */\r\n    constructor() internal {}\r\n\r\n    /**\r\n     * @dev Checks whether an address is a system account.\r\n     * @param account the address to check.\r\n     * @return true if system account.\r\n     */\r\n    function isSystemAccount(address account) public view returns (bool) {\r\n        return systemAccounts.has(account);\r\n    }\r\n\r\n    /**\r\n     * @dev Assigns the system role to an account.\r\n     * @notice This method is unprotected and should be authorized in the child contract.\r\n     */\r\n    function addSystemAccount(address account) public {\r\n        systemAccounts.add(account);\r\n        emit SystemAccountAdded(account);\r\n    }\r\n\r\n    /**\r\n     * @dev Removes the system role from an account.\r\n     * @notice This method is unprotected and should be authorized in the child contract.\r\n     */\r\n    function removeSystemAccount(address account) public {\r\n        systemAccounts.remove(account);\r\n        emit SystemAccountRemoved(account);\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/MintableController.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n/**\r\n* @title MintableController\r\n* @dev This contracts implements functionality allowing for minting and burning of tokens.\r\n*/\r\ncontract MintableController is SystemRole, StandardController {\r\n\r\n    using MintableTokenLib for TokenStorage;\r\n\r\n    /**\r\n     * @dev Contract constructor.\r\n     * @param storage_ Address of the token storage for the controller.\r\n     * @param initialSupply The amount of tokens to mint upon creation.\r\n     * @param frontend_ Address of the authorized frontend.\r\n     */\r\n    constructor(address storage_, uint initialSupply, address frontend_)\r\n        public\r\n        StandardController(storage_, initialSupply, frontend_)\r\n    { }\r\n\r\n    /**\r\n     * @dev Assigns the system role to an account.\r\n     */\r\n    function addSystemAccount(address account) public onlyOwner {\r\n        super.addSystemAccount(account);\r\n    }\r\n\r\n    /**\r\n     * @dev Removes the system role from an account.\r\n     */\r\n    function removeSystemAccount(address account) public onlyOwner {\r\n        super.removeSystemAccount(account);\r\n    }\r\n\r\n    /**\r\n     * @dev Mints new tokens.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Address to credit the tokens.\r\n     * @param amount Number of tokens to mint.\r\n     */\r\n    function mintTo_withCaller(address caller, address to, uint amount)\r\n        public\r\n        guarded(caller)\r\n        onlySystemAccount(caller)\r\n        returns (bool)\r\n    {\r\n        avoidBlackholes(to);\r\n        return token.mint(to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Burns tokens from token owner.\r\n     * This removfes the burned tokens from circulation.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param from Address of the token owner.\r\n     * @param amount Number of tokens to burn.\r\n     * @param h Hash which the token owner signed.\r\n     * @param v Signature component.\r\n     * @param r Signature component.\r\n     * @param s Sigature component.\r\n     */\r\n    function burnFrom_withCaller(address caller, address from, uint amount, bytes32 h, uint8 v, bytes32 r, bytes32 s)\r\n        public\r\n        guarded(caller)\r\n        onlySystemAccount(caller)\r\n        returns (bool)\r\n    {\r\n        return token.burn(from, amount, h, v, r, s);\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/SmartController.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n/**\r\n * @title SmartController\r\n * @dev This contract adds \"smart\" functionality which is required from a regulatory perspective.\r\n */\r\ncontract SmartController is MintableController {\r\n\r\n    using SmartTokenLib for SmartTokenLib.SmartStorage;\r\n\r\n    SmartTokenLib.SmartStorage internal smartToken;\r\n\r\n    bytes3 public ticker;\r\n    uint constant public INITIAL_SUPPLY = 0;\r\n\r\n    /**\r\n     * @dev Contract constructor.\r\n     * @param storage_ Address of the token storage for the controller.\r\n     * @param validator Address of validator.\r\n     * @param ticker_ 3 letter currency ticker.\r\n     * @param frontend_ Address of the authorized frontend.\r\n     */\r\n    constructor(address storage_, address validator, bytes3 ticker_, address frontend_)\r\n        public\r\n        MintableController(storage_, INITIAL_SUPPLY, frontend_)\r\n    {\r\n        require(validator != 0x0, \"validator cannot be the null address\");\r\n        smartToken.setValidator(validator);\r\n        ticker = ticker_;\r\n    }\r\n\r\n    /**\r\n     * @dev Sets a new validator.\r\n     * @param validator Address of validator.\r\n     */\r\n    function setValidator(address validator) external onlySystemAccounts {\r\n        smartToken.setValidator(validator);\r\n    }\r\n\r\n    /**\r\n     * @dev Recovers tokens from an address and reissues them to another address.\r\n     * In case a user loses its private key the tokens can be recovered by burning\r\n     * the tokens from that address and reissuing to a new address.\r\n     * To recover tokens the contract owner needs to provide a signature\r\n     * proving that the token owner has authorized the owner to do so.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param from Address to burn tokens from.\r\n     * @param to Address to mint tokens to.\r\n     * @param h Hash which the token owner signed.\r\n     * @param v Signature component.\r\n     * @param r Signature component.\r\n     * @param s Sigature component.\r\n     * @return Amount recovered.\r\n     */\r\n    function recover_withCaller(address caller, address from, address to, bytes32 h, uint8 v, bytes32 r, bytes32 s)\r\n        external\r\n        guarded(caller)\r\n        onlySystemAccount(caller)\r\n        returns (uint)\r\n    {\r\n        avoidBlackholes(to);\r\n        return SmartTokenLib.recover(token, from, to, h, v, r, s);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens [ERC20].\r\n     * The caller, to address and amount are validated before executing method.\r\n     * Prior to transfering tokens the validator needs to approve.\r\n     * @notice Overrides method in a parent.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transfer_withCaller(address caller, address to, uint amount)\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool)\r\n    {\r\n        require(smartToken.validate(caller, to, amount), \"transfer request not valid\");\r\n        return super.transfer_withCaller(caller, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens from a specific address [ERC20].\r\n     * The address owner has to approve the spender beforehand.\r\n     * The from address, to address and amount are validated before executing method.\r\n     * @notice Overrides method in a parent.\r\n     * Prior to transfering tokens the validator needs to approve.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param from Address to debet the tokens from.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transferFrom_withCaller(address caller, address from, address to, uint amount)\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool)\r\n    {\r\n        require(smartToken.validate(from, to, amount), \"transferFrom request not valid\");\r\n        return super.transferFrom_withCaller(caller, from, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens and subsequently calls a method on the recipient [ERC677].\r\n     * If the recipient is a non-contract address this method behaves just like transfer.\r\n     * The caller, to address and amount are validated before executing method.\r\n     * @notice Overrides method in a parent.\r\n     * @param caller Address of the caller passed through the frontend.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     * @param data Additional data passed to the recipient's tokenFallback method.\r\n     */\r\n    function transferAndCall_withCaller(\r\n        address caller,\r\n        address to,\r\n        uint256 amount,\r\n        bytes data\r\n    )\r\n        public\r\n        guarded(caller)\r\n        whenNotPaused\r\n        returns (bool)\r\n    {\r\n        require(smartToken.validate(caller, to, amount), \"transferAndCall request not valid\");\r\n        return super.transferAndCall_withCaller(caller, to, amount, data);\r\n    }\r\n\r\n    /**\r\n     * @dev Gets the current validator.\r\n     * @return Address of validator.\r\n     */\r\n    function getValidator() external view returns (address) {\r\n        return smartToken.getValidator();\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/TokenFrontend.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * @title TokenFrontend\r\n * @dev This contract implements a token forwarder.\r\n * The token frontend is [ERC20 and ERC677] compliant and forwards\r\n * standard methods to a controller. The primary function is to allow\r\n * for a statically deployed contract for users to interact with while\r\n * simultaneously allow the controllers to be upgraded when bugs are\r\n * discovered or new functionality needs to be added.\r\n */\r\ncontract TokenFrontend is Destructible, Claimable, CanReclaimToken, NoOwner, IERC20 {\r\n\r\n    SmartController internal controller;\r\n\r\n    string public name;\r\n    string public symbol;\r\n    bytes3 public ticker;\r\n\r\n    /**\r\n     * @dev Emitted when tokens are transferred.\r\n     * @param from Sender address.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens transferred.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint amount);\r\n\r\n    /**\r\n     * @dev Emitted when tokens are transferred.\r\n     * @param from Sender address.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens transferred.\r\n     * @param data Additional data passed to the recipient's tokenFallback method.\r\n     */\r\n    event Transfer(address indexed from, address indexed to, uint amount, bytes data);\r\n\r\n    /**\r\n     * @dev Emitted when spender is granted an allowance.\r\n     * @param owner Address of the owner of the tokens to spend.\r\n     * @param spender The address of the future spender.\r\n     * @param amount The allowance of the spender.\r\n     */\r\n    event Approval(address indexed owner, address indexed spender, uint amount);\r\n\r\n    /**\r\n     * @dev Emitted when updating the controller.\r\n     * @param ticker Three letter ticker representing the currency.\r\n     * @param old Address of the old controller.\r\n     * @param current Address of the new controller.\r\n     */\r\n    event Controller(bytes3 indexed ticker, address indexed old, address indexed current);\r\n\r\n    /**\r\n     * @dev Contract constructor.\r\n     * @notice The contract is an abstract contract as a result of the internal modifier.\r\n     * @param name_ Token name.\r\n     * @param symbol_ Token symbol.\r\n     * @param ticker_ 3 letter currency ticker.\r\n     */\r\n    constructor(string name_, string symbol_, bytes3 ticker_) internal {\r\n        name = name_;\r\n        symbol = symbol_;\r\n        ticker = ticker_;\r\n    }\r\n\r\n    /**\r\n     * @dev Sets a new controller.\r\n     * @param address_ Address of the controller.\r\n     */\r\n    function setController(address address_) external onlyOwner {\r\n        require(address_ != 0x0, \"controller address cannot be the null address\");\r\n        emit Controller(ticker, controller, address_);\r\n        controller = SmartController(address_);\r\n        require(controller.getFrontend() == address(this), \"controller frontend does not point back\");\r\n        require(controller.ticker() == ticker, \"ticker does not match controller ticket\");\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens [ERC20].\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transfer(address to, uint amount) external returns (bool ok) {\r\n        ok = controller.transfer_withCaller(msg.sender, to, amount);\r\n        emit Transfer(msg.sender, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens from a specific address [ERC20].\r\n     * The address owner has to approve the spender beforehand.\r\n     * @param from Address to debet the tokens from.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     */\r\n    function transferFrom(address from, address to, uint amount) external returns (bool ok) {\r\n        ok = controller.transferFrom_withCaller(msg.sender, from, to, amount);\r\n        emit Transfer(from, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Approves a spender [ERC20].\r\n     * Note that using the approve/transferFrom presents a possible\r\n     * security vulnerability described in:\r\n     * https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.quou09mcbpzw\r\n     * Use transferAndCall to mitigate.\r\n     * @param spender The address of the future spender.\r\n     * @param amount The allowance of the spender.\r\n     */\r\n    function approve(address spender, uint amount) external returns (bool ok) {\r\n        ok = controller.approve_withCaller(msg.sender, spender, amount);\r\n        emit Approval(msg.sender, spender, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers tokens and subsequently calls a method on the recipient [ERC677].\r\n     * If the recipient is a non-contract address this method behaves just like transfer.\r\n     * @param to Recipient address.\r\n     * @param amount Number of tokens to transfer.\r\n     * @param data Additional data passed to the recipient's tokenFallback method.\r\n     */\r\n    function transferAndCall(address to, uint256 amount, bytes data)\r\n        external\r\n        returns (bool ok)\r\n    {\r\n        ok = controller.transferAndCall_withCaller(msg.sender, to, amount, data);\r\n        emit Transfer(msg.sender, to, amount);\r\n        emit Transfer(msg.sender, to, amount, data);\r\n    }\r\n\r\n    /**\r\n     * @dev Mints new tokens.\r\n     * @param to Address to credit the tokens.\r\n     * @param amount Number of tokens to mint.\r\n     */\r\n    function mintTo(address to, uint amount)\r\n        external\r\n        returns (bool ok)\r\n    {\r\n        ok = controller.mintTo_withCaller(msg.sender, to, amount);\r\n        emit Transfer(0x0, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Burns tokens from token owner.\r\n     * This removfes the burned tokens from circulation.\r\n     * @param from Address of the token owner.\r\n     * @param amount Number of tokens to burn.\r\n     * @param h Hash which the token owner signed.\r\n     * @param v Signature component.\r\n     * @param r Signature component.\r\n     * @param s Sigature component.\r\n     */\r\n    function burnFrom(address from, uint amount, bytes32 h, uint8 v, bytes32 r, bytes32 s)\r\n        external\r\n        returns (bool ok)\r\n    {\r\n        ok = controller.burnFrom_withCaller(msg.sender, from, amount, h, v, r, s);\r\n        emit Transfer(from, 0x0, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Recovers tokens from an address and reissues them to another address.\r\n     * In case a user loses its private key the tokens can be recovered by burning\r\n     * the tokens from that address and reissuing to a new address.\r\n     * To recover tokens the contract owner needs to provide a signature\r\n     * proving that the token owner has authorized the owner to do so.\r\n     * @param from Address to burn tokens from.\r\n     * @param to Address to mint tokens to.\r\n     * @param h Hash which the token owner signed.\r\n     * @param v Signature component.\r\n     * @param r Signature component.\r\n     * @param s Sigature component.\r\n     * @return Amount recovered.\r\n     */\r\n    function recover(address from, address to, bytes32 h, uint8 v, bytes32 r, bytes32 s)\r\n        external\r\n        returns (uint amount)\r\n    {\r\n        amount = controller.recover_withCaller(msg.sender, from, to, h ,v, r, s);\r\n        emit Transfer(from, to, amount);\r\n    }\r\n\r\n    /**\r\n     * @dev Gets the current controller.\r\n     * @return Address of the controller.\r\n     */\r\n    function getController() external view returns (address) {\r\n        return address(controller);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the total supply.\r\n     * @return Number of tokens.\r\n     */\r\n    function totalSupply() external view returns (uint) {\r\n        return controller.totalSupply();\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the number tokens associated with an address.\r\n     * @param who Address to lookup.\r\n     * @return Balance of address.\r\n     */\r\n    function balanceOf(address who) external view returns (uint) {\r\n        return controller.balanceOf(who);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the allowance for a spender\r\n     * @param owner The address of the owner of the tokens.\r\n     * @param spender The address of the spender.\r\n     * @return Number of tokens the spender is allowed to spend.\r\n     */\r\n    function allowance(address owner, address spender) external view returns (uint) {\r\n        return controller.allowance(owner, spender);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the number of decimals in one token.\r\n     * @return Number of decimals.\r\n     */\r\n    function decimals() external view returns (uint) {\r\n        return controller.decimals();\r\n    }\r\n\r\n}\r\n\r\n// File: contracts/GBP.sol\r\n\r\n/**\r\n * Copyright 2019 Monerium ehf.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\npragma solidity 0.4.24;\r\n\r\n\r\ncontract GBP is TokenFrontend {\r\n\r\n    constructor()\r\n        public\r\n        TokenFrontend(\"Monerium GBP emoney\", \"GBPe\", \"GBP\")\r\n    { }\r\n\r\n}","creation_status":"success","file_path":"GBP.sol"}