Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- MonetaryPolicy
- Optimization enabled
- false
- Compiler version
- v0.8.16+commit.07a7930e
- EVM Version
- default
- Verified at
- 2024-09-14T06:40:07.772888Z
Contract source code
// SPDX-License-Identifier: GPL-3.0-only // author: Upaut (CallistoDAO) pragma solidity ^0.8.16; contract MonetaryPolicy { uint256 public MinerReward; // Miner reward per block uint256 public TreasuryReward; // Treasury reward per block uint256 public StakeReward; // ColdStacking contract reward per block uint256 public ReserveReward; // Reserved, in case we need some additional reward type per block address public TreasuryAddress = 0x74682Fc32007aF0b6118F259cBe7bCCC21641600; // Treasury contract address address public StakeAddress = 0x08A7c8be47773546DC5E173d67B0c38AfFfa4b84; // ColdStaking contract address address public ReserveAddress = 0x0000000000000000000000000000000000000000; // Reserved address address public GovernanceDAO = 0x810059e1406dEDAFd1BdCa4E0137CbA306c0Ce36; // DAO vote address address public CallistoNetwork = 0xA9389DB4610175CaC4Fad32670A5189A89f874B5; // Second party(Dexaran) vote address uint256 public TimeVoice = 45 days; // time to wait for the second voter. After this period proposal will be accepted/declined based on the decision of the first voter. uint256 public TimeEnd = 60 days; // how long each proposal will be active struct Data { uint256 timeVoice; // deadline for the second voter. After this period vote will be accepted/declined based on the decision of the first voter. uint256 timeEnd; // deadline for this proposal bool governanceDAO; // DAO vote bool callistoNetwork; // Second party(Dexaran) vote } mapping(bytes32 => Data) public proposals; // temporary storage for active proposals indexed by hashes event Proposal(address indexed owner, bytes32 indexed hash, bool indexed voice); // new proposal event modifier onlyGovernanceDAO() { require(msg.sender == GovernanceDAO, "Only GovernanceDAO"); _; } modifier onlyTreasuryRecipients() { require((msg.sender == CallistoNetwork) || (msg.sender == GovernanceDAO), "Only treasury recipient"); _; } // sets rewards per block (all values must be updated in 1 TX) function setRewards(uint256 _minerReward, uint256 _treasuryReward, uint256 _stakeReward, uint256 _reserveReward, bool _voice) external onlyTreasuryRecipients { bytes4 _selector = this.setRewards.selector; bytes32 _hash = keccak256(abi.encodePacked(_selector, _minerReward, _treasuryReward, _stakeReward, _reserveReward)); // proposal hash if(_consensus(_hash, _voice)){ // proposal accepted MinerReward = _minerReward; TreasuryReward = _treasuryReward; StakeReward = _stakeReward; ReserveReward = _reserveReward; } emit Proposal(msg.sender, _hash, _voice); // proposal event for logging } // function sets new Treasury Address function setTreasuryAddress(address _treasuryAddress, bool _voice) external onlyTreasuryRecipients { bytes4 _selector = this.setTreasuryAddress.selector; bytes32 _hash = keccak256(abi.encodePacked(_selector, _treasuryAddress)); // proposal hash if(_consensus(_hash, _voice)){ // proposal accepted TreasuryAddress = _treasuryAddress; } emit Proposal(msg.sender, _hash, _voice); // proposal event for logging } // function sets new ColdStacking address function setStakeAddress(address _stakeAddress) external onlyGovernanceDAO { StakeAddress = _stakeAddress; } // function sets new "reserved for future" address function setReserveAddress(address _reserveAddress) external onlyGovernanceDAO { ReserveAddress = _reserveAddress; } // Updates time limits for future proposals function setPeriods(uint256 _timeVoice, uint256 _timeEnd, bool _voice) external onlyTreasuryRecipients { require((_timeVoice > 0) && (_timeEnd > _timeVoice)); bytes4 _selector = this.setPeriods.selector; bytes32 _hash = keccak256(abi.encodePacked(_selector, _timeVoice, _timeEnd)); // proposal hash if(_consensus(_hash, _voice)){ // proposal accepted TimeVoice = _timeVoice; TimeEnd = _timeEnd; } emit Proposal(msg.sender, _hash, _voice); // proposal event for logging } // Updates GovernanceDAO or Second party(Dexaran) owner address. Sender must be current owner and can change only it's own address function setNewOwners(address _newOwner) external onlyTreasuryRecipients { require((_newOwner != GovernanceDAO) && (_newOwner != CallistoNetwork)); (GovernanceDAO, CallistoNetwork) = msg.sender == GovernanceDAO ? (_newOwner, CallistoNetwork) : (GovernanceDAO, _newOwner); } // Updates GovernanceDAO or Second party(Dexaran) owner address. Owners can update address of each other if other party did not decline such proposal function resetOwner(address _owner, address _newOwner, bool _voice) external onlyTreasuryRecipients { require((_owner == GovernanceDAO) || (_owner == CallistoNetwork)); require((_newOwner != GovernanceDAO) && (_newOwner != CallistoNetwork)); bytes4 _selector = this.resetOwner.selector; bytes32 _hash = keccak256(abi.encodePacked(_selector, _owner, _newOwner)); // proposal hash if(_consensus(_hash, _voice)){ // proposal accepted (GovernanceDAO, CallistoNetwork) = _owner == GovernanceDAO ? (_newOwner, CallistoNetwork) : (GovernanceDAO, _newOwner); } emit Proposal(msg.sender, _hash, _voice); // proposal event for logging } // this function calculates consensus, returns true if proposal accepted function _consensus(bytes32 _hash, bool _voice) private returns (bool){ if (proposals[_hash].timeEnd < block.timestamp){ // proposal expired or never existed before, let's create it delete proposals[_hash]; if (!_voice) return (false); // do nothing if we are declining proposal proposals[_hash].timeVoice = block.timestamp + TimeVoice; // time limit for second voter proposals[_hash].timeEnd = block.timestamp + TimeEnd; // proposal time limit (proposals[_hash].governanceDAO, proposals[_hash].callistoNetwork) = msg.sender == GovernanceDAO ? (true, false) : (false, true); } else if (proposals[_hash].timeVoice < block.timestamp) { // time limit for second voter expired, first voter can accept proposal without second party delete proposals[_hash]; return (true); } else { // still waiting for second voter if (!_voice) { // proposal declined delete proposals[_hash]; } else { (proposals[_hash].governanceDAO, proposals[_hash].callistoNetwork) = msg.sender == GovernanceDAO ? (true, proposals[_hash].callistoNetwork) : (proposals[_hash].governanceDAO, true); // votes if ((proposals[_hash].governanceDAO) && (proposals[_hash].callistoNetwork)) { // proposal accepted by both parties delete proposals[_hash]; // clean up return (true); } } } return (false); } }
Contract ABI
[{"type":"event","name":"Proposal","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"bytes32","name":"hash","internalType":"bytes32","indexed":true},{"type":"bool","name":"voice","internalType":"bool","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CallistoNetwork","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"GovernanceDAO","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MinerReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ReserveAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ReserveReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"StakeAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"StakeReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TimeEnd","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TimeVoice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"TreasuryAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TreasuryReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"timeVoice","internalType":"uint256"},{"type":"uint256","name":"timeEnd","internalType":"uint256"},{"type":"bool","name":"governanceDAO","internalType":"bool"},{"type":"bool","name":"callistoNetwork","internalType":"bool"}],"name":"proposals","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"resetOwner","inputs":[{"type":"address","name":"_owner","internalType":"address"},{"type":"address","name":"_newOwner","internalType":"address"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNewOwners","inputs":[{"type":"address","name":"_newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPeriods","inputs":[{"type":"uint256","name":"_timeVoice","internalType":"uint256"},{"type":"uint256","name":"_timeEnd","internalType":"uint256"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setReserveAddress","inputs":[{"type":"address","name":"_reserveAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRewards","inputs":[{"type":"uint256","name":"_minerReward","internalType":"uint256"},{"type":"uint256","name":"_treasuryReward","internalType":"uint256"},{"type":"uint256","name":"_stakeReward","internalType":"uint256"},{"type":"uint256","name":"_reserveReward","internalType":"uint256"},{"type":"bool","name":"_voice","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStakeAddress","inputs":[{"type":"address","name":"_stakeAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTreasuryAddress","inputs":[{"type":"address","name":"_treasuryAddress","internalType":"address"},{"type":"bool","name":"_voice","internalType":"bool"}]}]
Contract Creation Code
0x60806040527374682fc32007af0b6118f259cbe7bccc21641600600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507308a7c8be47773546dc5e173d67b0c38afffa4b84600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073810059e1406dedafd1bdca4e0137cba306c0ce36600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073a9389db4610175cac4fad32670a5189a89f874b5600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550623b5380600955624f1a00600a553480156101b457600080fd5b50611cee806101c46000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80639aacfc75116100ad578063ad5caa6211610071578063ad5caa62146102d3578063ad91d540146102f1578063c4e986b21461030d578063d8716ad91461032b578063f6c5a2f71461034957610121565b80639aacfc75146102415780639ca85bf01461025f5780639d4346b31461027d578063a043fda314610299578063a5a2286b146102b557610121565b80633411f778116100f45780633411f778146101af5780633d3f915f146101cb57806345ce7db9146101e757806352bd9914146102055780635b5c251f1461022357610121565b806314673d311461012657806323471d1814610142578063267e1bb51461015e57806332ed5b121461017c575b600080fd5b610140600480360381019061013b91906116aa565b610367565b005b61015c600480360381019061015791906116aa565b61043b565b005b61016661050f565b60405161017391906116f0565b60405180910390f35b61019660048036038101906101919190611741565b610515565b6040516101a69493929190611789565b60405180910390f35b6101c960048036038101906101c49190611826565b61055f565b005b6101e560048036038101906101e09190611879565b610706565b005b6101ef610b19565b6040516101fc91906118db565b60405180910390f35b61020d610b3f565b60405161021a91906116f0565b60405180910390f35b61022b610b45565b60405161023891906118db565b60405180910390f35b610249610b6b565b60405161025691906116f0565b60405180910390f35b610267610b71565b60405161027491906118db565b60405180910390f35b610297600480360381019061029291906118f6565b610b97565b005b6102b360048036038101906102ae9190611971565b610d3a565b005b6102bd610ef9565b6040516102ca91906118db565b60405180910390f35b6102db610f1f565b6040516102e891906118db565b60405180910390f35b61030b600480360381019061030691906116aa565b610f45565b005b610315611210565b60405161032291906116f0565b60405180910390f35b610333611216565b60405161034091906116f0565b60405180910390f35b61035161121c565b60405161035e91906116f0565b60405180910390f35b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ee90611a0e565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c290611a0e565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60005481565b600b6020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900460ff16905084565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806106085750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063e90611a7a565b60405180910390fd5b60008311801561065657508282115b61065f57600080fd5b6000633411f77860e01b9050600081858560405160200161068293929190611b08565b6040516020818303038152906040528051906020012090506106a48184611222565b156106b8578460098190555083600a819055505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a45050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806107af5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6107ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e590611a7a565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806108975750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b6108a057600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561094c5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61095557600080fd5b6000633d3f915f60e01b9050600081858560405160200161097893929190611b8d565b60405160208183030381529060405280519060200120905061099a8184611222565b15610acb57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614610a1d57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610a42565b83600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b60076000600860008491906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508391906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a45050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c405750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7690611a7a565b60405180910390fd5b6000639d4346b360e01b905060008187878787604051602001610ca6959493929190611bca565b604051602081830303815290604052805190602001209050610cc88184611222565b15610cea57866000819055508560018190555084600281905550836003819055505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a450505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610de35750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1990611a7a565b60405180910390fd5b600063a043fda360e01b905060008184604051602001610e43929190611c29565b604051602081830303815290604052805190602001209050610e658184611222565b15610eac5783600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a450505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610fee5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61102d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102490611a7a565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156110d95750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6110e257600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116057600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681611185565b80600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b60076000600860008491906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508391906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60095481565b60015481565b60035481565b600042600b60008581526020019081526020016000206001015410156113b857600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff021916905550508161129e5760009050611641565b600954426112ac9190611c84565b600b600085815260200190815260200160002060000181905550600a54426112d49190611c84565b600b600085815260200190815260200160002060010181905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461134c5760006001611351565b600160005b600b60008681526020019081526020016000206002016000600b600088815260200190815260200160002060020160018491906101000a81548160ff0219169083151502179055508391906101000a81548160ff021916908315150217905550505061163c565b42600b600085815260200190815260200160002060000154101561142d57600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff0219169055505060019050611641565b8161148557600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff0219169055505061163b565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461150557600b600084815260200190815260200160002060020160009054906101000a900460ff16600161152c565b6001600b600085815260200190815260200160002060020160019054906101000a900460ff165b600b60008681526020019081526020016000206002016000600b600088815260200190815260200160002060020160018491906101000a81548160ff0219169083151502179055508391906101000a81548160ff0219169083151502179055505050600b600084815260200190815260200160002060020160009054906101000a900460ff1680156115de5750600b600084815260200190815260200160002060020160019054906101000a900460ff165b1561163a57600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff0219169055505060019050611641565b5b5b600090505b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006116778261164c565b9050919050565b6116878161166c565b811461169257600080fd5b50565b6000813590506116a48161167e565b92915050565b6000602082840312156116c0576116bf611647565b5b60006116ce84828501611695565b91505092915050565b6000819050919050565b6116ea816116d7565b82525050565b600060208201905061170560008301846116e1565b92915050565b6000819050919050565b61171e8161170b565b811461172957600080fd5b50565b60008135905061173b81611715565b92915050565b60006020828403121561175757611756611647565b5b60006117658482850161172c565b91505092915050565b60008115159050919050565b6117838161176e565b82525050565b600060808201905061179e60008301876116e1565b6117ab60208301866116e1565b6117b8604083018561177a565b6117c5606083018461177a565b95945050505050565b6117d7816116d7565b81146117e257600080fd5b50565b6000813590506117f4816117ce565b92915050565b6118038161176e565b811461180e57600080fd5b50565b600081359050611820816117fa565b92915050565b60008060006060848603121561183f5761183e611647565b5b600061184d868287016117e5565b935050602061185e868287016117e5565b925050604061186f86828701611811565b9150509250925092565b60008060006060848603121561189257611891611647565b5b60006118a086828701611695565b93505060206118b186828701611695565b92505060406118c286828701611811565b9150509250925092565b6118d58161166c565b82525050565b60006020820190506118f060008301846118cc565b92915050565b600080600080600060a0868803121561191257611911611647565b5b6000611920888289016117e5565b9550506020611931888289016117e5565b9450506040611942888289016117e5565b9350506060611953888289016117e5565b925050608061196488828901611811565b9150509295509295909350565b6000806040838503121561198857611987611647565b5b600061199685828601611695565b92505060206119a785828601611811565b9150509250929050565b600082825260208201905092915050565b7f4f6e6c7920476f7665726e616e636544414f0000000000000000000000000000600082015250565b60006119f86012836119b1565b9150611a03826119c2565b602082019050919050565b60006020820190508181036000830152611a27816119eb565b9050919050565b7f4f6e6c7920747265617375727920726563697069656e74000000000000000000600082015250565b6000611a646017836119b1565b9150611a6f82611a2e565b602082019050919050565b60006020820190508181036000830152611a9381611a57565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b611ae1611adc82611a9a565b611ac6565b82525050565b6000819050919050565b611b02611afd826116d7565b611ae7565b82525050565b6000611b148286611ad0565b600482019150611b248285611af1565b602082019150611b348284611af1565b602082019150819050949350505050565b60008160601b9050919050565b6000611b5d82611b45565b9050919050565b6000611b6f82611b52565b9050919050565b611b87611b828261166c565b611b64565b82525050565b6000611b998286611ad0565b600482019150611ba98285611b76565b601482019150611bb98284611b76565b601482019150819050949350505050565b6000611bd68288611ad0565b600482019150611be68287611af1565b602082019150611bf68286611af1565b602082019150611c068285611af1565b602082019150611c168284611af1565b6020820191508190509695505050505050565b6000611c358285611ad0565b600482019150611c458284611b76565b6014820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611c8f826116d7565b9150611c9a836116d7565b9250828201905080821115611cb257611cb1611c55565b5b9291505056fea26469706673582212201eabd38e733420cc8698ba66fabcc3aae953c7a764d3ba69b556e04c7cff9adc64736f6c63430008100033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80639aacfc75116100ad578063ad5caa6211610071578063ad5caa62146102d3578063ad91d540146102f1578063c4e986b21461030d578063d8716ad91461032b578063f6c5a2f71461034957610121565b80639aacfc75146102415780639ca85bf01461025f5780639d4346b31461027d578063a043fda314610299578063a5a2286b146102b557610121565b80633411f778116100f45780633411f778146101af5780633d3f915f146101cb57806345ce7db9146101e757806352bd9914146102055780635b5c251f1461022357610121565b806314673d311461012657806323471d1814610142578063267e1bb51461015e57806332ed5b121461017c575b600080fd5b610140600480360381019061013b91906116aa565b610367565b005b61015c600480360381019061015791906116aa565b61043b565b005b61016661050f565b60405161017391906116f0565b60405180910390f35b61019660048036038101906101919190611741565b610515565b6040516101a69493929190611789565b60405180910390f35b6101c960048036038101906101c49190611826565b61055f565b005b6101e560048036038101906101e09190611879565b610706565b005b6101ef610b19565b6040516101fc91906118db565b60405180910390f35b61020d610b3f565b60405161021a91906116f0565b60405180910390f35b61022b610b45565b60405161023891906118db565b60405180910390f35b610249610b6b565b60405161025691906116f0565b60405180910390f35b610267610b71565b60405161027491906118db565b60405180910390f35b610297600480360381019061029291906118f6565b610b97565b005b6102b360048036038101906102ae9190611971565b610d3a565b005b6102bd610ef9565b6040516102ca91906118db565b60405180910390f35b6102db610f1f565b6040516102e891906118db565b60405180910390f35b61030b600480360381019061030691906116aa565b610f45565b005b610315611210565b60405161032291906116f0565b60405180910390f35b610333611216565b60405161034091906116f0565b60405180910390f35b61035161121c565b60405161035e91906116f0565b60405180910390f35b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ee90611a0e565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c290611a0e565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60005481565b600b6020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16908060020160019054906101000a900460ff16905084565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806106085750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063e90611a7a565b60405180910390fd5b60008311801561065657508282115b61065f57600080fd5b6000633411f77860e01b9050600081858560405160200161068293929190611b08565b6040516020818303038152906040528051906020012090506106a48184611222565b156106b8578460098190555083600a819055505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a45050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806107af5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6107ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e590611a7a565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806108975750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b6108a057600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561094c5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61095557600080fd5b6000633d3f915f60e01b9050600081858560405160200161097893929190611b8d565b60405160208183030381529060405280519060200120905061099a8184611222565b15610acb57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614610a1d57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610a42565b83600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b60076000600860008491906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508391906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a45050505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c405750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7690611a7a565b60405180910390fd5b6000639d4346b360e01b905060008187878787604051602001610ca6959493929190611bca565b604051602081830303815290604052805190602001209050610cc88184611222565b15610cea57866000819055508560018190555084600281905550836003819055505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a450505050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610de35750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1990611a7a565b60405180910390fd5b600063a043fda360e01b905060008184604051602001610e43929190611c29565b604051602081830303815290604052805190602001209050610e658184611222565b15610eac5783600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b821515813373ffffffffffffffffffffffffffffffffffffffff167f159d2efd57404307b21eeffce76b42a2ac064dc31abfcf5390cb511ef9d0c1b260405160405180910390a450505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610fee5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61102d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102490611a7a565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156110d95750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6110e257600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116057600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681611185565b80600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b60076000600860008491906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508391906101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b60095481565b60015481565b60035481565b600042600b60008581526020019081526020016000206001015410156113b857600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff021916905550508161129e5760009050611641565b600954426112ac9190611c84565b600b600085815260200190815260200160002060000181905550600a54426112d49190611c84565b600b600085815260200190815260200160002060010181905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461134c5760006001611351565b600160005b600b60008681526020019081526020016000206002016000600b600088815260200190815260200160002060020160018491906101000a81548160ff0219169083151502179055508391906101000a81548160ff021916908315150217905550505061163c565b42600b600085815260200190815260200160002060000154101561142d57600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff0219169055505060019050611641565b8161148557600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff0219169055505061163b565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461150557600b600084815260200190815260200160002060020160009054906101000a900460ff16600161152c565b6001600b600085815260200190815260200160002060020160019054906101000a900460ff165b600b60008681526020019081526020016000206002016000600b600088815260200190815260200160002060020160018491906101000a81548160ff0219169083151502179055508391906101000a81548160ff0219169083151502179055505050600b600084815260200190815260200160002060020160009054906101000a900460ff1680156115de5750600b600084815260200190815260200160002060020160019054906101000a900460ff165b1561163a57600b600084815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff0219169055505060019050611641565b5b5b600090505b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006116778261164c565b9050919050565b6116878161166c565b811461169257600080fd5b50565b6000813590506116a48161167e565b92915050565b6000602082840312156116c0576116bf611647565b5b60006116ce84828501611695565b91505092915050565b6000819050919050565b6116ea816116d7565b82525050565b600060208201905061170560008301846116e1565b92915050565b6000819050919050565b61171e8161170b565b811461172957600080fd5b50565b60008135905061173b81611715565b92915050565b60006020828403121561175757611756611647565b5b60006117658482850161172c565b91505092915050565b60008115159050919050565b6117838161176e565b82525050565b600060808201905061179e60008301876116e1565b6117ab60208301866116e1565b6117b8604083018561177a565b6117c5606083018461177a565b95945050505050565b6117d7816116d7565b81146117e257600080fd5b50565b6000813590506117f4816117ce565b92915050565b6118038161176e565b811461180e57600080fd5b50565b600081359050611820816117fa565b92915050565b60008060006060848603121561183f5761183e611647565b5b600061184d868287016117e5565b935050602061185e868287016117e5565b925050604061186f86828701611811565b9150509250925092565b60008060006060848603121561189257611891611647565b5b60006118a086828701611695565b93505060206118b186828701611695565b92505060406118c286828701611811565b9150509250925092565b6118d58161166c565b82525050565b60006020820190506118f060008301846118cc565b92915050565b600080600080600060a0868803121561191257611911611647565b5b6000611920888289016117e5565b9550506020611931888289016117e5565b9450506040611942888289016117e5565b9350506060611953888289016117e5565b925050608061196488828901611811565b9150509295509295909350565b6000806040838503121561198857611987611647565b5b600061199685828601611695565b92505060206119a785828601611811565b9150509250929050565b600082825260208201905092915050565b7f4f6e6c7920476f7665726e616e636544414f0000000000000000000000000000600082015250565b60006119f86012836119b1565b9150611a03826119c2565b602082019050919050565b60006020820190508181036000830152611a27816119eb565b9050919050565b7f4f6e6c7920747265617375727920726563697069656e74000000000000000000600082015250565b6000611a646017836119b1565b9150611a6f82611a2e565b602082019050919050565b60006020820190508181036000830152611a9381611a57565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b611ae1611adc82611a9a565b611ac6565b82525050565b6000819050919050565b611b02611afd826116d7565b611ae7565b82525050565b6000611b148286611ad0565b600482019150611b248285611af1565b602082019150611b348284611af1565b602082019150819050949350505050565b60008160601b9050919050565b6000611b5d82611b45565b9050919050565b6000611b6f82611b52565b9050919050565b611b87611b828261166c565b611b64565b82525050565b6000611b998286611ad0565b600482019150611ba98285611b76565b601482019150611bb98284611b76565b601482019150819050949350505050565b6000611bd68288611ad0565b600482019150611be68287611af1565b602082019150611bf68286611af1565b602082019150611c068285611af1565b602082019150611c168284611af1565b6020820191508190509695505050505050565b6000611c358285611ad0565b600482019150611c458284611b76565b6014820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611c8f826116d7565b9150611c9a836116d7565b9250828201905080821115611cb257611cb1611c55565b5b9291505056fea26469706673582212201eabd38e733420cc8698ba66fabcc3aae953c7a764d3ba69b556e04c7cff9adc64736f6c63430008100033