Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- GlobalFarm
- Optimization enabled
- true
- Compiler version
- v0.8.0+commit.c7dfd78e
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2024-09-26T15:31:56.198879Z
Constructor Arguments
0x0000000000000000000000009fae2529863bd691b4a7171bdfcf33c7ebb10a65
Arg [0] (address) : 0x9fae2529863bd691b4a7171bdfcf33c7ebb10a65
Contract source code
// SPDX-License-Identifier: No License (None) pragma solidity ^0.8.0; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". * * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/ownership/Ownable.sol * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the * build/artifacts folder) as well as the vanilla Ownable implementation from an openzeppelin version. */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(),"Not Owner"); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0),"Zero address not allowed"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IMintableToken { function mint(address _to, uint256 _amount) external; } interface ILocalFarm { function notifyRewardAmount(uint256 reward) external; } contract GlobalFarm is Ownable { struct LocalFarm { address farmAddress; uint256 multiplier; uint256 lastPayment; } IMintableToken public rewardsToken; // SOY token uint256 public tokensPerYear = 50 * 10**6 * 10**18; // 50M tokens uint256 public totalMultipliers; uint256 public paymentDelay = 1 days; // DEFAULTS_TO 1 days //LocalFarm[] public localFarms; // local farms list mapping(uint256 => LocalFarm) public localFarms; uint256 public lastAddedFarmIndex = 0; // Farm IDs will start from 1 mapping(address => uint256) public localFarmId; // locals farm address => id; localFarm at ID = 0 is considered non-existing mapping(address => uint256) public nextMint; // timestamp when token may be minted to local farm event AddLocalFarm(address _localFarm, uint32 _multiplier); event RemoveLocalFarm(address _localFarm); event ChangeMultiplier(address _localFarm, uint256 _oldMultiplier, uint256 _newMultiplier); event ChangeTokenPerYear(uint256 oldAmount, uint256 newAmount); constructor (address _rewardsToken) { rewardsToken = IMintableToken(_rewardsToken); } function next_payment() public view returns (uint256) { return (block.timestamp / paymentDelay) * paymentDelay + paymentDelay; } function rewardMintingAvailable(address _farm) public view returns (bool) { return localFarms[localFarmId[_farm]].lastPayment + paymentDelay < next_payment(); } function getAllocationX1000(address _farm) public view returns (uint256) { return 1000 * localFarms[localFarmId[_farm]].multiplier / totalMultipliers; } function getRewardPerSecond() public view returns (uint256) { // Solidity rounding is nasty return tokensPerYear / 365 days; } function getLocalFarmId(address _localFarmAddress) external view returns (uint256) { return localFarmId[_localFarmAddress]; } function getlastPayment(address _localFarmAddress) external view returns (uint256) { return localFarms[localFarmId[_localFarmAddress]].lastPayment; } function addLocalFarm(address _localFarmAddress, uint32 _multiplier) external onlyOwner { require(localFarmId[_localFarmAddress] == 0, "LocalFarm with this address already exists"); // Increment last index before adding a farm. // Farm with index = 0 is considered non-existing. lastAddedFarmIndex++; localFarms[lastAddedFarmIndex].farmAddress = _localFarmAddress; localFarms[lastAddedFarmIndex].multiplier = _multiplier; localFarms[lastAddedFarmIndex].lastPayment = next_payment() - paymentDelay; localFarmId[_localFarmAddress] = lastAddedFarmIndex; totalMultipliers += uint256(_multiplier); emit AddLocalFarm(_localFarmAddress, _multiplier); } /* function addLocalFarmAtID(address _localFarmAddress, uint256 _id, uint32 _multiplier) external onlyOwner { require(localFarmId[_localFarmAddress] == 0, "LocalFarm with this address already exists"); require(_id != 0, "LocalFarm at address 0 is considered non-existing by system"); require(_id < lastAddedFarmIndex, "Can not add farms ahead of autoincremented index"); // Increment last index before adding a farm. //localFarms.push(LocalFarm(_localFarm, _multiplier)); localFarms[_id].farmAddress = _localFarmAddress; localFarms[_id].multiplier = _multiplier; localFarmId[_localFarmAddress] = _id; totalMultipliers += uint256(_multiplier); emit AddLocalFarm(_localFarmAddress, _multiplier); } */ function farmExists(address _farmAddress) public view returns (bool _exists) { return (localFarmId[_farmAddress] != 0) && (localFarms[localFarmId[_farmAddress]].farmAddress != address(0)); } function removeLocalFarmByAddress(address _localFarmAddress) external onlyOwner { require (farmExists(_localFarmAddress), "LocalFarm with this address does not exist"); totalMultipliers = totalMultipliers - uint256(localFarms[localFarmId[_localFarmAddress]].multiplier); // update totalMultipliers //delete localFarmId[_localFarmAddress]; localFarms[localFarmId[_localFarmAddress]].farmAddress = address(0); localFarms[localFarmId[_localFarmAddress]].multiplier = 0; // Not critically important, can be removed for gas efficiency reasons. localFarms[localFarmId[_localFarmAddress]].lastPayment = 0; // Not critically important, can be removed for gas efficiency reasons. localFarmId[_localFarmAddress] = 0; emit RemoveLocalFarm(_localFarmAddress); } function changeMultiplier(address _localFarmAddress, uint32 _multiplier) external onlyOwner { require (farmExists(_localFarmAddress), "LocalFarm with this address does not exist"); uint256 oldMultiplier = localFarms[localFarmId[_localFarmAddress]].multiplier; totalMultipliers = totalMultipliers + uint256(_multiplier) - uint256(oldMultiplier); // update totalMultipliers localFarms[localFarmId[_localFarmAddress]].multiplier = _multiplier; emit ChangeMultiplier(_localFarmAddress, oldMultiplier, _multiplier); } function changeTokenPerYear(uint256 newAmount) external onlyOwner { uint256 oldAmount = tokensPerYear; tokensPerYear = newAmount; emit ChangeTokenPerYear(oldAmount, newAmount); } function mintFarmingReward(address _localFarmAddress) external { require (farmExists(_localFarmAddress), "LocalFarm with this address does not exist"); // Comparing against 0:00 UTC always // to enable withdrawals for full days only at any point within 24 hours of a day. if(localFarms[localFarmId[_localFarmAddress]].lastPayment + paymentDelay > next_payment()) { // Someone is requesting payment for a Local Farm that was paid recently. // Do nothing. return; } else { uint256 _reward = (next_payment() - localFarms[localFarmId[_localFarmAddress]].lastPayment) * getRewardPerSecond() * getAllocationX1000(_localFarmAddress) / 1000; localFarms[localFarmId[_localFarmAddress]].lastPayment = next_payment(); rewardsToken.mint(_localFarmAddress, _reward); ILocalFarm(_localFarmAddress).notifyRewardAmount(_reward); } } /* function mintFarmingReward(address _localFarmAddress, uint256 _period) external { require (farmExists(_localFarmAddress), "LocalFarm with this address does not exist"); require (_period > 0, "Cannot claim reward for a timeframe of 0 seconds"); } */ }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_rewardsToken","internalType":"address"}]},{"type":"event","name":"AddLocalFarm","inputs":[{"type":"address","name":"_localFarm","internalType":"address","indexed":false},{"type":"uint32","name":"_multiplier","internalType":"uint32","indexed":false}],"anonymous":false},{"type":"event","name":"ChangeMultiplier","inputs":[{"type":"address","name":"_localFarm","internalType":"address","indexed":false},{"type":"uint256","name":"_oldMultiplier","internalType":"uint256","indexed":false},{"type":"uint256","name":"_newMultiplier","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ChangeTokenPerYear","inputs":[{"type":"uint256","name":"oldAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"newAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RemoveLocalFarm","inputs":[{"type":"address","name":"_localFarm","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addLocalFarm","inputs":[{"type":"address","name":"_localFarmAddress","internalType":"address"},{"type":"uint32","name":"_multiplier","internalType":"uint32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeMultiplier","inputs":[{"type":"address","name":"_localFarmAddress","internalType":"address"},{"type":"uint32","name":"_multiplier","internalType":"uint32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeTokenPerYear","inputs":[{"type":"uint256","name":"newAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"_exists","internalType":"bool"}],"name":"farmExists","inputs":[{"type":"address","name":"_farmAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAllocationX1000","inputs":[{"type":"address","name":"_farm","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getLocalFarmId","inputs":[{"type":"address","name":"_localFarmAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRewardPerSecond","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getlastPayment","inputs":[{"type":"address","name":"_localFarmAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastAddedFarmIndex","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"localFarmId","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"farmAddress","internalType":"address"},{"type":"uint256","name":"multiplier","internalType":"uint256"},{"type":"uint256","name":"lastPayment","internalType":"uint256"}],"name":"localFarms","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mintFarmingReward","inputs":[{"type":"address","name":"_localFarmAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextMint","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"next_payment","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"paymentDelay","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeLocalFarmByAddress","inputs":[{"type":"address","name":"_localFarmAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"rewardMintingAvailable","inputs":[{"type":"address","name":"_farm","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMintableToken"}],"name":"rewardsToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokensPerYear","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalMultipliers","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
Contract Creation Code
0x60806040526a295be96e6406697200000060025562015180600455600060065534801561002b57600080fd5b50604051610faf380380610faf83398101604081905261004a916100b8565b600080546001600160a01b03191633178082556040516001600160a01b039190911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600180546001600160a01b0319166001600160a01b03929092169190911790556100e6565b6000602082840312156100c9578081fd5b81516001600160a01b03811681146100df578182fd5b9392505050565b610eba806100f56000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80639c4ee5b0116100c3578063da5b4ee71161007c578063da5b4ee71461029c578063e26eeff4146102a4578063eec8afed146102b7578063f2fde38b146102bf578063f9d30f18146102d2578063fb853d64146102e557610158565b80639c4ee5b01461023c578063a3a2cc0b1461025e578063b77f6b7514610271578063bab38e8514610284578063c2ab26511461028c578063d1af0c7d1461029457610158565b8063648a7e2011610115578063648a7e20146101de578063715018a6146101f15780637b31050a146101f95780638da2e2981461020c5780638da5cb5b1461021f5780638f32d59b1461023457610158565b8063127eaa231461015d5780633460c114146101725780633bb1f4291461019b5780634381feba146101b0578063445c92c5146101c35780634599fef6146101d6575b600080fd5b61017061016b366004610beb565b6102f8565b005b610185610180366004610bca565b610409565b6040516101929190610cd5565b60405180910390f35b6101a361045e565b6040516101929190610dce565b6101a36101be366004610bca565b610488565b6101856101d1366004610bca565b6104a3565b6101a36104ea565b6101706101ec366004610bca565b6104f0565b6101706106c3565b610170610207366004610c29565b610731565b61017061021a366004610beb565b61079b565b6102276108e0565b6040516101929190610c41565b6101856108ef565b61024f61024a366004610c29565b610900565b60405161019293929190610c6e565b6101a361026c366004610bca565b61092b565b6101a361027f366004610bca565b610956565b6101a3610968565b6101a361096e565b610227610974565b6101a3610983565b6101a36102b2366004610bca565b610997565b6101a36109dc565b6101706102cd366004610bca565b6109e2565b6101706102e0366004610bca565b610a0f565b6101a36102f3366004610bca565b610b20565b6103006108ef565b6103255760405162461bcd60e51b815260040161031c90610ce0565b60405180910390fd5b61032e82610409565b61034a5760405162461bcd60e51b815260040161031c90610d03565b6001600160a01b0382166000908152600760209081526040808320548352600590915290206001015460035481906103899063ffffffff851690610de5565b6103939190610e3c565b6003556001600160a01b038316600090815260076020908152604080832054835260059091529081902063ffffffff8416600190910155517ff73ac06bb532ce46127d55c58225dec0321642d3b5285f78433ad4b129807f37906103fc90859084908690610c8f565b60405180910390a1505050565b6001600160a01b0381166000908152600760205260408120541580159061045657506001600160a01b03828116600090815260076020908152604080832054835260059091529020541615155b90505b919050565b6004546000908061046f8142610dfd565b6104799190610e1d565b6104839190610de5565b905090565b6001600160a01b031660009081526007602052604090205490565b60006104ad61045e565b6004546001600160a01b038416600090815260076020908152604080832054835260059091529020600201546104e39190610de5565b1092915050565b60035481565b6104f981610409565b6105155760405162461bcd60e51b815260040161031c90610d03565b61051d61045e565b6004546001600160a01b038316600090815260076020908152604080832054835260059091529020600201546105539190610de5565b111561055e576106c0565b60006103e861056c83610997565b610574610983565b6001600160a01b038516600090815260076020908152604080832054835260059091529020600201546105a561045e565b6105af9190610e3c565b6105b99190610e1d565b6105c39190610e1d565b6105cd9190610dfd565b90506105d761045e565b6001600160a01b0380841660009081526007602090815260408083205483526005909152908190206002019290925560015491516340c10f1960e01b81529116906340c10f199061062e9085908590600401610c55565b600060405180830381600087803b15801561064857600080fd5b505af115801561065c573d6000803e3d6000fd5b5050604051633c6b16ab60e01b81526001600160a01b0385169250633c6b16ab915061068c908490600401610dce565b600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b50505050505b50565b6106cb6108ef565b6106e75760405162461bcd60e51b815260040161031c90610ce0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6107396108ef565b6107555760405162461bcd60e51b815260040161031c90610ce0565b60028054908290556040517f7618031d4bff7829e097a6e76a4ea1331cd89696514713b006c4c8561597d7f09061078f9083908590610dd7565b60405180910390a15050565b6107a36108ef565b6107bf5760405162461bcd60e51b815260040161031c90610ce0565b6001600160a01b038216600090815260076020526040902054156107f55760405162461bcd60e51b815260040161031c90610d84565b6006805490600061080583610e53565b90915550506006805460009081526005602052604080822080546001600160a01b0319166001600160a01b038716179055915481522063ffffffff82166001919091015560045461085461045e565b61085e9190610e3c565b6006805460009081526005602090815260408083206002019490945591546001600160a01b03861682526007909252918220556003805463ffffffff841692906108a9908490610de5565b90915550506040517faaacd0540c31f9f0aec0127cfdc1700764819cfa36904ed7d5076d0bc8b78f449061078f9084908490610cb6565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6005602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b6001600160a01b03166000908152600760209081526040808320548352600590915290206002015490565b60086020526000908152604090205481565b60025481565b60045481565b6001546001600160a01b031681565b60006301e133806002546104839190610dfd565b6003546001600160a01b038216600090815260076020908152604080832054835260059091528120600101549091906109d2906103e8610e1d565b6104569190610dfd565b60065481565b6109ea6108ef565b610a065760405162461bcd60e51b815260040161031c90610ce0565b6106c081610b32565b610a176108ef565b610a335760405162461bcd60e51b815260040161031c90610ce0565b610a3c81610409565b610a585760405162461bcd60e51b815260040161031c90610d03565b6001600160a01b03811660009081526007602090815260408083205483526005909152902060010154600354610a8e9190610e3c565b6003556001600160a01b0381166000818152600760208181526040808420805485526005835281852080546001600160a01b031916905580548552818520600101859055805485528185206002018590559484529190529155517fda3ef47b58ac910c1ab1f67d04217ec9bce1bf5c104bda6a98ea66e1b0ccdf5190610b15908390610c41565b60405180910390a150565b60076020526000908152604090205481565b6001600160a01b038116610b585760405162461bcd60e51b815260040161031c90610d4d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461045957600080fd5b600060208284031215610bdb578081fd5b610be482610bb3565b9392505050565b60008060408385031215610bfd578081fd5b610c0683610bb3565b9150602083013563ffffffff81168114610c1e578182fd5b809150509250929050565b600060208284031215610c3a578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b03939093168352602083019190915263ffffffff16604082015260600190565b6001600160a01b0392909216825263ffffffff16602082015260400190565b901515815260200190565b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b6020808252602a908201527f4c6f63616c4661726d20776974682074686973206164647265737320646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526018908201527f5a65726f2061646472657373206e6f7420616c6c6f7765640000000000000000604082015260600190565b6020808252602a908201527f4c6f63616c4661726d20776974682074686973206164647265737320616c72656040820152696164792065786973747360b01b606082015260800190565b90815260200190565b918252602082015260400190565b60008219821115610df857610df8610e6e565b500190565b600082610e1857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610e3757610e37610e6e565b500290565b600082821015610e4e57610e4e610e6e565b500390565b6000600019821415610e6757610e67610e6e565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122091c898c8262a914fc81209d61a4067558d748e0a7333134fb2e1bb6ca86c745164736f6c634300080000330000000000000000000000009fae2529863bd691b4a7171bdfcf33c7ebb10a65
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c80639c4ee5b0116100c3578063da5b4ee71161007c578063da5b4ee71461029c578063e26eeff4146102a4578063eec8afed146102b7578063f2fde38b146102bf578063f9d30f18146102d2578063fb853d64146102e557610158565b80639c4ee5b01461023c578063a3a2cc0b1461025e578063b77f6b7514610271578063bab38e8514610284578063c2ab26511461028c578063d1af0c7d1461029457610158565b8063648a7e2011610115578063648a7e20146101de578063715018a6146101f15780637b31050a146101f95780638da2e2981461020c5780638da5cb5b1461021f5780638f32d59b1461023457610158565b8063127eaa231461015d5780633460c114146101725780633bb1f4291461019b5780634381feba146101b0578063445c92c5146101c35780634599fef6146101d6575b600080fd5b61017061016b366004610beb565b6102f8565b005b610185610180366004610bca565b610409565b6040516101929190610cd5565b60405180910390f35b6101a361045e565b6040516101929190610dce565b6101a36101be366004610bca565b610488565b6101856101d1366004610bca565b6104a3565b6101a36104ea565b6101706101ec366004610bca565b6104f0565b6101706106c3565b610170610207366004610c29565b610731565b61017061021a366004610beb565b61079b565b6102276108e0565b6040516101929190610c41565b6101856108ef565b61024f61024a366004610c29565b610900565b60405161019293929190610c6e565b6101a361026c366004610bca565b61092b565b6101a361027f366004610bca565b610956565b6101a3610968565b6101a361096e565b610227610974565b6101a3610983565b6101a36102b2366004610bca565b610997565b6101a36109dc565b6101706102cd366004610bca565b6109e2565b6101706102e0366004610bca565b610a0f565b6101a36102f3366004610bca565b610b20565b6103006108ef565b6103255760405162461bcd60e51b815260040161031c90610ce0565b60405180910390fd5b61032e82610409565b61034a5760405162461bcd60e51b815260040161031c90610d03565b6001600160a01b0382166000908152600760209081526040808320548352600590915290206001015460035481906103899063ffffffff851690610de5565b6103939190610e3c565b6003556001600160a01b038316600090815260076020908152604080832054835260059091529081902063ffffffff8416600190910155517ff73ac06bb532ce46127d55c58225dec0321642d3b5285f78433ad4b129807f37906103fc90859084908690610c8f565b60405180910390a1505050565b6001600160a01b0381166000908152600760205260408120541580159061045657506001600160a01b03828116600090815260076020908152604080832054835260059091529020541615155b90505b919050565b6004546000908061046f8142610dfd565b6104799190610e1d565b6104839190610de5565b905090565b6001600160a01b031660009081526007602052604090205490565b60006104ad61045e565b6004546001600160a01b038416600090815260076020908152604080832054835260059091529020600201546104e39190610de5565b1092915050565b60035481565b6104f981610409565b6105155760405162461bcd60e51b815260040161031c90610d03565b61051d61045e565b6004546001600160a01b038316600090815260076020908152604080832054835260059091529020600201546105539190610de5565b111561055e576106c0565b60006103e861056c83610997565b610574610983565b6001600160a01b038516600090815260076020908152604080832054835260059091529020600201546105a561045e565b6105af9190610e3c565b6105b99190610e1d565b6105c39190610e1d565b6105cd9190610dfd565b90506105d761045e565b6001600160a01b0380841660009081526007602090815260408083205483526005909152908190206002019290925560015491516340c10f1960e01b81529116906340c10f199061062e9085908590600401610c55565b600060405180830381600087803b15801561064857600080fd5b505af115801561065c573d6000803e3d6000fd5b5050604051633c6b16ab60e01b81526001600160a01b0385169250633c6b16ab915061068c908490600401610dce565b600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b50505050505b50565b6106cb6108ef565b6106e75760405162461bcd60e51b815260040161031c90610ce0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6107396108ef565b6107555760405162461bcd60e51b815260040161031c90610ce0565b60028054908290556040517f7618031d4bff7829e097a6e76a4ea1331cd89696514713b006c4c8561597d7f09061078f9083908590610dd7565b60405180910390a15050565b6107a36108ef565b6107bf5760405162461bcd60e51b815260040161031c90610ce0565b6001600160a01b038216600090815260076020526040902054156107f55760405162461bcd60e51b815260040161031c90610d84565b6006805490600061080583610e53565b90915550506006805460009081526005602052604080822080546001600160a01b0319166001600160a01b038716179055915481522063ffffffff82166001919091015560045461085461045e565b61085e9190610e3c565b6006805460009081526005602090815260408083206002019490945591546001600160a01b03861682526007909252918220556003805463ffffffff841692906108a9908490610de5565b90915550506040517faaacd0540c31f9f0aec0127cfdc1700764819cfa36904ed7d5076d0bc8b78f449061078f9084908490610cb6565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6005602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b6001600160a01b03166000908152600760209081526040808320548352600590915290206002015490565b60086020526000908152604090205481565b60025481565b60045481565b6001546001600160a01b031681565b60006301e133806002546104839190610dfd565b6003546001600160a01b038216600090815260076020908152604080832054835260059091528120600101549091906109d2906103e8610e1d565b6104569190610dfd565b60065481565b6109ea6108ef565b610a065760405162461bcd60e51b815260040161031c90610ce0565b6106c081610b32565b610a176108ef565b610a335760405162461bcd60e51b815260040161031c90610ce0565b610a3c81610409565b610a585760405162461bcd60e51b815260040161031c90610d03565b6001600160a01b03811660009081526007602090815260408083205483526005909152902060010154600354610a8e9190610e3c565b6003556001600160a01b0381166000818152600760208181526040808420805485526005835281852080546001600160a01b031916905580548552818520600101859055805485528185206002018590559484529190529155517fda3ef47b58ac910c1ab1f67d04217ec9bce1bf5c104bda6a98ea66e1b0ccdf5190610b15908390610c41565b60405180910390a150565b60076020526000908152604090205481565b6001600160a01b038116610b585760405162461bcd60e51b815260040161031c90610d4d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461045957600080fd5b600060208284031215610bdb578081fd5b610be482610bb3565b9392505050565b60008060408385031215610bfd578081fd5b610c0683610bb3565b9150602083013563ffffffff81168114610c1e578182fd5b809150509250929050565b600060208284031215610c3a578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b03939093168352602083019190915263ffffffff16604082015260600190565b6001600160a01b0392909216825263ffffffff16602082015260400190565b901515815260200190565b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b6020808252602a908201527f4c6f63616c4661726d20776974682074686973206164647265737320646f6573604082015269081b9bdd08195e1a5cdd60b21b606082015260800190565b60208082526018908201527f5a65726f2061646472657373206e6f7420616c6c6f7765640000000000000000604082015260600190565b6020808252602a908201527f4c6f63616c4661726d20776974682074686973206164647265737320616c72656040820152696164792065786973747360b01b606082015260800190565b90815260200190565b918252602082015260400190565b60008219821115610df857610df8610e6e565b500190565b600082610e1857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610e3757610e37610e6e565b500290565b600082821015610e4e57610e4e610e6e565b500390565b6000600019821415610e6757610e67610e6e565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122091c898c8262a914fc81209d61a4067558d748e0a7333134fb2e1bb6ca86c745164736f6c63430008000033