Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- FundingContract
- Optimization enabled
- true
- Compiler version
- v0.8.22+commit.4fc1097e
- Optimization runs
- 200
- EVM Version
- paris
- Verified at
- 2025-01-22T11:29:40.661363Z
Constructor Arguments
0x000000000000000000000000c835d379ff49f6032b8087e629c33dbb2d39aa3b
Arg [0] (<b>address</b>) : <a href="{#{address_path(@conn, :show, @address)}}">0xc835d379ff49f6032b8087e629c33dbb2d39aa3b</a>
Contract source code
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: @openzeppelin/contracts/utils/math/SafeMath.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File: nvm-funding_postaudit.sol pragma solidity ^0.8.22; contract FundingContract is ReentrancyGuard, Ownable { using SafeMath for uint256; struct Beneficiary { uint256 totalAllotment; uint256 unlockedAmount; uint256 lastClaimBlock; uint256 unlockInterval; // in blocks string label; } uint256 public blockTime = 5; // 5 seconds per block mapping(address => Beneficiary) public beneficiaries; address[] public beneficiaryList; uint256 public contractBalance; bool public isPaused; event FundsAdded(uint256 amount); event FundsWithdrawn(uint256 amount); event BeneficiaryAdded(address indexed beneficiary, uint256 amount, uint256 unlockInterval, string label); event FundsClaimed(address indexed beneficiary, uint256 amount); event Paused(); event Unpaused(); modifier onlyWhenNotPaused() { require(!isPaused, "Contract is paused"); _; } constructor(address initialOwner) Ownable(initialOwner) { isPaused = false; } // Function to pause the contract function pause() external onlyOwner { isPaused = true; emit Paused(); } // Function to unpause the contract function unpause() external onlyOwner { isPaused = false; emit Unpaused(); } // Add funds to the contract function addFunds() external payable onlyOwner { require(msg.value > 0, "No funds added"); contractBalance = contractBalance.add(msg.value); emit FundsAdded(msg.value); } // Add or update a beneficiary's allotment function allotFunds( address _beneficiary, uint256 _amount, string memory _unlockInterval, string memory _label ) external onlyOwner onlyWhenNotPaused { require(_beneficiary != address(0), "Invalid address"); require(_amount > 0, "Amount must be greater than zero"); uint256 unlockIntervalBlocks = calculateUnlockInterval(_unlockInterval); Beneficiary storage beneficiary = beneficiaries[_beneficiary]; if (beneficiary.totalAllotment == 0) { beneficiaryList.push(_beneficiary); } beneficiary.totalAllotment = _amount; beneficiary.unlockedAmount = 0; beneficiary.lastClaimBlock = block.number; beneficiary.unlockInterval = unlockIntervalBlocks; beneficiary.label = _label; emit BeneficiaryAdded(_beneficiary, _amount, unlockIntervalBlocks, _label); } function calculateUnlockInterval(string memory _unlockInterval) internal view returns (uint256) { if (keccak256(bytes(_unlockInterval)) == keccak256(bytes("monthly"))) { return (30 * 24 * 60 * 60) / blockTime; } else if (keccak256(bytes(_unlockInterval)) == keccak256(bytes("quarterly"))) { return (90 * 24 * 60 * 60) / blockTime; } else if (keccak256(bytes(_unlockInterval)) == keccak256(bytes("half-yearly"))) { return (180 * 24 * 60 * 60) / blockTime; } else if (keccak256(bytes(_unlockInterval)) == keccak256(bytes("yearly"))) { return (365 * 24 * 60 * 60) / blockTime; } else { revert("Invalid unlock interval"); } } // Claim funds function claim() external nonReentrant onlyWhenNotPaused { Beneficiary storage beneficiary = beneficiaries[msg.sender]; require(beneficiary.totalAllotment > 0, "No allotment found"); uint256 blocksSinceLastClaim = block.number.sub(beneficiary.lastClaimBlock); require(blocksSinceLastClaim >= beneficiary.unlockInterval, "Claim period not reached"); uint256 claimableIntervals = blocksSinceLastClaim.div(beneficiary.unlockInterval); uint256 claimableAmount = beneficiary.totalAllotment .div(365 * 24 * 60 * 60 / blockTime / beneficiary.unlockInterval) .mul(claimableIntervals); if (claimableAmount.add(beneficiary.unlockedAmount) > beneficiary.totalAllotment) { claimableAmount = beneficiary.totalAllotment.sub(beneficiary.unlockedAmount); } require(claimableAmount > 0, "No funds to claim"); require(claimableAmount <= address(this).balance, "Insufficient contract balance"); beneficiary.unlockedAmount = beneficiary.unlockedAmount.add(claimableAmount); beneficiary.lastClaimBlock = beneficiary.lastClaimBlock.add(claimableIntervals.mul(beneficiary.unlockInterval)); payable(msg.sender).transfer(claimableAmount); emit FundsClaimed(msg.sender, claimableAmount); } // View all beneficiaries function getAllBeneficiaries() external view returns (address[] memory) { return beneficiaryList; } // View details of a specific beneficiary function getBeneficiaryDetails(address _beneficiary) external view returns (Beneficiary memory) { return beneficiaries[_beneficiary]; } // Withdraw excess funds from the contract function withdrawFunds(uint256 _amount) external onlyOwner { require(_amount <= address(this).balance, "Insufficient balance"); contractBalance = contractBalance.sub(_amount); payable(owner()).transfer(_amount); emit FundsWithdrawn(_amount); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"initialOwner","internalType":"address"}]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"BeneficiaryAdded","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"unlockInterval","internalType":"uint256","indexed":false},{"type":"string","name":"label","internalType":"string","indexed":false}],"anonymous":false},{"type":"event","name":"FundsAdded","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FundsClaimed","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FundsWithdrawn","inputs":[{"type":"uint256","name":"amount","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":"Paused","inputs":[],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[],"anonymous":false},{"type":"function","stateMutability":"payable","outputs":[],"name":"addFunds","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"allotFunds","inputs":[{"type":"address","name":"_beneficiary","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"string","name":"_unlockInterval","internalType":"string"},{"type":"string","name":"_label","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"totalAllotment","internalType":"uint256"},{"type":"uint256","name":"unlockedAmount","internalType":"uint256"},{"type":"uint256","name":"lastClaimBlock","internalType":"uint256"},{"type":"uint256","name":"unlockInterval","internalType":"uint256"},{"type":"string","name":"label","internalType":"string"}],"name":"beneficiaries","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"beneficiaryList","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"blockTime","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"contractBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getAllBeneficiaries","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct FundingContract.Beneficiary","components":[{"type":"uint256","name":"totalAllotment","internalType":"uint256"},{"type":"uint256","name":"unlockedAmount","internalType":"uint256"},{"type":"uint256","name":"lastClaimBlock","internalType":"uint256"},{"type":"uint256","name":"unlockInterval","internalType":"uint256"},{"type":"string","name":"label","internalType":"string"}]}],"name":"getBeneficiaryDetails","inputs":[{"type":"address","name":"_beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPaused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawFunds","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
Contract Creation Code
0x6080604052600560025534801561001557600080fd5b506040516114c23803806114c2833981016040819052610034916100d4565b6001600055806001600160a01b03811661006857604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61007181610082565b50506006805460ff19169055610104565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156100e657600080fd5b81516001600160a01b03811681146100fd57600080fd5b9392505050565b6113af806101136000396000f3fe6080604052600436106100f35760003560e01c8063715018a61161008a5780639e761bbb116100595780639e761bbb14610283578063a26759cb146102a3578063b187bd26146102ab578063f2fde38b146102d557600080fd5b8063715018a6146102115780638456cb59146102265780638b7afe2e1461023b5780638da5cb5b1461025157600080fd5b80633f4ba83a116100c65780633f4ba83a1461019657806348b15166146101ab5780634c3d4f1b146101cf5780634e71d92d146101fc57600080fd5b806301567739146100f857806314b55b5214610132578063155dd5ee146101545780632f14bae814610174575b600080fd5b34801561010457600080fd5b50610118610113366004610f28565b6102f5565b604051610129959493929190610f89565b60405180910390f35b34801561013e57600080fd5b5061015261014d366004611062565b6103b3565b005b34801561016057600080fd5b5061015261016f3660046110e0565b61058e565b34801561018057600080fd5b5061018961065e565b60405161012991906110f9565b3480156101a257600080fd5b506101526106c0565b3480156101b757600080fd5b506101c160025481565b604051908152602001610129565b3480156101db57600080fd5b506101ef6101ea366004610f28565b6106fd565b6040516101299190611146565b34801561020857600080fd5b50610152610820565b34801561021d57600080fd5b50610152610af2565b34801561023257600080fd5b50610152610b04565b34801561024757600080fd5b506101c160055481565b34801561025d57600080fd5b506001546001600160a01b03165b6040516001600160a01b039091168152602001610129565b34801561028f57600080fd5b5061026b61029e3660046110e0565b610b44565b610152610b6e565b3480156102b757600080fd5b506006546102c59060ff1681565b6040519015158152602001610129565b3480156102e157600080fd5b506101526102f0366004610f28565b610bfc565b600360205280600052604060002060009150905080600001549080600101549080600201549080600301549080600401805461033090611191565b80601f016020809104026020016040519081016040528092919081815260200182805461035c90611191565b80156103a95780601f1061037e576101008083540402835291602001916103a9565b820191906000526020600020905b81548152906001019060200180831161038c57829003601f168201915b5050505050905085565b6103bb610c3a565b60065460ff16156104085760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064015b60405180910390fd5b6001600160a01b0384166104505760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016103ff565b600083116104a05760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f60448201526064016103ff565b60006104ab83610c67565b6001600160a01b0386166000908152600360205260408120805492935091900361051b57600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0388161790555b848155600060018201554360028201556003810182905560048101610540848261121c565b50856001600160a01b03167f5367c35a8cbf1024f689c3420f598ba2b53a4d0a1ba202a4a9b1173ef01f835686848660405161057e939291906112dc565b60405180910390a2505050505050565b610596610c3a565b478111156105dd5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b60448201526064016103ff565b6005546105ea9082610e2f565b6005556001546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610627573d6000803e3d6000fd5b506040518181527f4a37b25aab49761ecf63117fe82b98d750917451133cf797507bc9fb5b96044a9060200160405180910390a150565b606060048054806020026020016040519081016040528092919081815260200182805480156106b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610698575b5050505050905090565b6106c8610c3a565b6006805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61072f6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b60036000836001600160a01b03166001600160a01b031681526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201805461079790611191565b80601f01602080910402602001604051908101604052809291908181526020018280546107c390611191565b80156108105780601f106107e557610100808354040283529160200191610810565b820191906000526020600020905b8154815290600101906020018083116107f357829003601f168201915b5050505050815250509050919050565b610828610e42565b60065460ff16156108705760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064016103ff565b33600090815260036020526040902080546108c25760405162461bcd60e51b8152602060048201526012602482015271139bc8185b1b1bdd1b595b9d08199bdd5b9960721b60448201526064016103ff565b60006108db826002015443610e2f90919063ffffffff16565b905081600301548110156109315760405162461bcd60e51b815260206004820152601860248201527f436c61696d20706572696f64206e6f742072656163686564000000000000000060448201526064016103ff565b600061094a836003015483610e9b90919063ffffffff16565b905060006109848261097e86600301546002546301e1338061096c919061131a565b610976919061131a565b875490610e9b565b90610ea7565b845460018601549192509061099a908390610eb3565b11156109b357600184015484546109b091610e2f565b90505b600081116109f75760405162461bcd60e51b81526020600482015260116024820152704e6f2066756e647320746f20636c61696d60781b60448201526064016103ff565b47811115610a475760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420636f6e74726163742062616c616e636500000060448201526064016103ff565b6001840154610a569082610eb3565b60018501556003840154610a7a90610a6f908490610ea7565b600286015490610eb3565b6002850155604051339082156108fc029083906000818181858888f19350505050158015610aac573d6000803e3d6000fd5b5060405181815233907fa65a8b4f7f65a1063243d7f7e9e4da00ff767599acf21549ef2548a45d1695ae9060200160405180910390a250505050610af06001600055565b565b610afa610c3a565b610af06000610ebf565b610b0c610c3a565b6006805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b60048181548110610b5457600080fd5b6000918252602090912001546001600160a01b0316905081565b610b76610c3a565b60003411610bb75760405162461bcd60e51b815260206004820152600e60248201526d139bc8199d5b991cc8185919195960921b60448201526064016103ff565b600554610bc49034610eb3565b6005556040513481527fd30fc8a1b5907be76206421a3040262f1f6aed0d418c05312ef5ff8de0c9ae4c9060200160405180910390a1565b610c04610c3a565b6001600160a01b038116610c2e57604051631e4fbdf760e01b8152600060048201526024016103ff565b610c3781610ebf565b50565b6001546001600160a01b03163314610af05760405163118cdaa760e01b81523360048201526024016103ff565b6040805180820190915260078152666d6f6e74686c7960c81b6020918201528151908201206000907fbc653c95ba6ab0e1ef2c238d03b66718c3dadf383ac23d2821c24ea540886de801610ccb57600254610cc59062278d0061131a565b92915050565b604080518082019091526009815268717561727465726c7960b81b6020918201528251908301207fb99532807eda912da02940857de7093eee3ddee12d0360df0af333bb5a9bcf7d01610d2857600254610cc5906276a70061131a565b60408051808201909152600b81526a68616c662d796561726c7960a81b6020918201528251908301207fb2ecc0bf796e2da563ff374d3c28c76c064e72b80624d134e39e10eed9625f1601610d8757600254610cc59062ed4e0061131a565b604080518082019091526006815265796561726c7960d01b6020918201528251908301207f9a121b243c6becf8570e4498f5b5b66f2ca2f469fd618c1bc6a022a965722bf501610de257600254610cc5906301e1338061131a565b60405162461bcd60e51b815260206004820152601760248201527f496e76616c696420756e6c6f636b20696e74657276616c00000000000000000060448201526064016103ff565b919050565b6000610e3b828461133c565b9392505050565b600260005403610e945760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103ff565b6002600055565b6000610e3b828461131a565b6000610e3b828461134f565b6000610e3b8284611366565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80356001600160a01b0381168114610e2a57600080fd5b600060208284031215610f3a57600080fd5b610e3b82610f11565b6000815180845260005b81811015610f6957602081850181015186830182015201610f4d565b506000602082860101526020601f19601f83011685010191505092915050565b85815284602082015283604082015282606082015260a060808201526000610fb460a0830184610f43565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610fe657600080fd5b813567ffffffffffffffff8082111561100157611001610fbf565b604051601f8301601f19908116603f0116810190828211818310171561102957611029610fbf565b8160405283815286602085880101111561104257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561107857600080fd5b61108185610f11565b935060208501359250604085013567ffffffffffffffff808211156110a557600080fd5b6110b188838901610fd5565b935060608701359150808211156110c757600080fd5b506110d487828801610fd5565b91505092959194509250565b6000602082840312156110f257600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561113a5783516001600160a01b031683529284019291840191600101611115565b50909695505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160a08084015261118960c0840182610f43565b949350505050565b600181811c908216806111a557607f821691505b6020821081036111c557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115611217576000816000526020600020601f850160051c810160208610156111f45750805b601f850160051c820191505b8181101561121357828155600101611200565b5050505b505050565b815167ffffffffffffffff81111561123657611236610fbf565b61124a816112448454611191565b846111cb565b602080601f83116001811461127f57600084156112675750858301515b600019600386901b1c1916600185901b178555611213565b600085815260208120601f198616915b828110156112ae5788860151825594840194600190910190840161128f565b50858210156112cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8381528260208201526060604082015260006112fb6060830184610f43565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60008261133757634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610cc557610cc5611304565b8082028115828204841417610cc557610cc5611304565b80820180821115610cc557610cc561130456fea264697066735822122045f4b9069712d44479bdc4e41a955bfd4ecd3fbb44970fce5844501799d508b464736f6c63430008160033000000000000000000000000c835d379ff49f6032b8087e629c33dbb2d39aa3b
Deployed ByteCode
0x6080604052600436106100f35760003560e01c8063715018a61161008a5780639e761bbb116100595780639e761bbb14610283578063a26759cb146102a3578063b187bd26146102ab578063f2fde38b146102d557600080fd5b8063715018a6146102115780638456cb59146102265780638b7afe2e1461023b5780638da5cb5b1461025157600080fd5b80633f4ba83a116100c65780633f4ba83a1461019657806348b15166146101ab5780634c3d4f1b146101cf5780634e71d92d146101fc57600080fd5b806301567739146100f857806314b55b5214610132578063155dd5ee146101545780632f14bae814610174575b600080fd5b34801561010457600080fd5b50610118610113366004610f28565b6102f5565b604051610129959493929190610f89565b60405180910390f35b34801561013e57600080fd5b5061015261014d366004611062565b6103b3565b005b34801561016057600080fd5b5061015261016f3660046110e0565b61058e565b34801561018057600080fd5b5061018961065e565b60405161012991906110f9565b3480156101a257600080fd5b506101526106c0565b3480156101b757600080fd5b506101c160025481565b604051908152602001610129565b3480156101db57600080fd5b506101ef6101ea366004610f28565b6106fd565b6040516101299190611146565b34801561020857600080fd5b50610152610820565b34801561021d57600080fd5b50610152610af2565b34801561023257600080fd5b50610152610b04565b34801561024757600080fd5b506101c160055481565b34801561025d57600080fd5b506001546001600160a01b03165b6040516001600160a01b039091168152602001610129565b34801561028f57600080fd5b5061026b61029e3660046110e0565b610b44565b610152610b6e565b3480156102b757600080fd5b506006546102c59060ff1681565b6040519015158152602001610129565b3480156102e157600080fd5b506101526102f0366004610f28565b610bfc565b600360205280600052604060002060009150905080600001549080600101549080600201549080600301549080600401805461033090611191565b80601f016020809104026020016040519081016040528092919081815260200182805461035c90611191565b80156103a95780601f1061037e576101008083540402835291602001916103a9565b820191906000526020600020905b81548152906001019060200180831161038c57829003601f168201915b5050505050905085565b6103bb610c3a565b60065460ff16156104085760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064015b60405180910390fd5b6001600160a01b0384166104505760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016103ff565b600083116104a05760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f60448201526064016103ff565b60006104ab83610c67565b6001600160a01b0386166000908152600360205260408120805492935091900361051b57600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0388161790555b848155600060018201554360028201556003810182905560048101610540848261121c565b50856001600160a01b03167f5367c35a8cbf1024f689c3420f598ba2b53a4d0a1ba202a4a9b1173ef01f835686848660405161057e939291906112dc565b60405180910390a2505050505050565b610596610c3a565b478111156105dd5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b60448201526064016103ff565b6005546105ea9082610e2f565b6005556001546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610627573d6000803e3d6000fd5b506040518181527f4a37b25aab49761ecf63117fe82b98d750917451133cf797507bc9fb5b96044a9060200160405180910390a150565b606060048054806020026020016040519081016040528092919081815260200182805480156106b657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610698575b5050505050905090565b6106c8610c3a565b6006805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61072f6040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b60036000836001600160a01b03166001600160a01b031681526020019081526020016000206040518060a00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201805461079790611191565b80601f01602080910402602001604051908101604052809291908181526020018280546107c390611191565b80156108105780601f106107e557610100808354040283529160200191610810565b820191906000526020600020905b8154815290600101906020018083116107f357829003601f168201915b5050505050815250509050919050565b610828610e42565b60065460ff16156108705760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b60448201526064016103ff565b33600090815260036020526040902080546108c25760405162461bcd60e51b8152602060048201526012602482015271139bc8185b1b1bdd1b595b9d08199bdd5b9960721b60448201526064016103ff565b60006108db826002015443610e2f90919063ffffffff16565b905081600301548110156109315760405162461bcd60e51b815260206004820152601860248201527f436c61696d20706572696f64206e6f742072656163686564000000000000000060448201526064016103ff565b600061094a836003015483610e9b90919063ffffffff16565b905060006109848261097e86600301546002546301e1338061096c919061131a565b610976919061131a565b875490610e9b565b90610ea7565b845460018601549192509061099a908390610eb3565b11156109b357600184015484546109b091610e2f565b90505b600081116109f75760405162461bcd60e51b81526020600482015260116024820152704e6f2066756e647320746f20636c61696d60781b60448201526064016103ff565b47811115610a475760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420636f6e74726163742062616c616e636500000060448201526064016103ff565b6001840154610a569082610eb3565b60018501556003840154610a7a90610a6f908490610ea7565b600286015490610eb3565b6002850155604051339082156108fc029083906000818181858888f19350505050158015610aac573d6000803e3d6000fd5b5060405181815233907fa65a8b4f7f65a1063243d7f7e9e4da00ff767599acf21549ef2548a45d1695ae9060200160405180910390a250505050610af06001600055565b565b610afa610c3a565b610af06000610ebf565b610b0c610c3a565b6006805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b60048181548110610b5457600080fd5b6000918252602090912001546001600160a01b0316905081565b610b76610c3a565b60003411610bb75760405162461bcd60e51b815260206004820152600e60248201526d139bc8199d5b991cc8185919195960921b60448201526064016103ff565b600554610bc49034610eb3565b6005556040513481527fd30fc8a1b5907be76206421a3040262f1f6aed0d418c05312ef5ff8de0c9ae4c9060200160405180910390a1565b610c04610c3a565b6001600160a01b038116610c2e57604051631e4fbdf760e01b8152600060048201526024016103ff565b610c3781610ebf565b50565b6001546001600160a01b03163314610af05760405163118cdaa760e01b81523360048201526024016103ff565b6040805180820190915260078152666d6f6e74686c7960c81b6020918201528151908201206000907fbc653c95ba6ab0e1ef2c238d03b66718c3dadf383ac23d2821c24ea540886de801610ccb57600254610cc59062278d0061131a565b92915050565b604080518082019091526009815268717561727465726c7960b81b6020918201528251908301207fb99532807eda912da02940857de7093eee3ddee12d0360df0af333bb5a9bcf7d01610d2857600254610cc5906276a70061131a565b60408051808201909152600b81526a68616c662d796561726c7960a81b6020918201528251908301207fb2ecc0bf796e2da563ff374d3c28c76c064e72b80624d134e39e10eed9625f1601610d8757600254610cc59062ed4e0061131a565b604080518082019091526006815265796561726c7960d01b6020918201528251908301207f9a121b243c6becf8570e4498f5b5b66f2ca2f469fd618c1bc6a022a965722bf501610de257600254610cc5906301e1338061131a565b60405162461bcd60e51b815260206004820152601760248201527f496e76616c696420756e6c6f636b20696e74657276616c00000000000000000060448201526064016103ff565b919050565b6000610e3b828461133c565b9392505050565b600260005403610e945760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103ff565b6002600055565b6000610e3b828461131a565b6000610e3b828461134f565b6000610e3b8284611366565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80356001600160a01b0381168114610e2a57600080fd5b600060208284031215610f3a57600080fd5b610e3b82610f11565b6000815180845260005b81811015610f6957602081850181015186830182015201610f4d565b506000602082860101526020601f19601f83011685010191505092915050565b85815284602082015283604082015282606082015260a060808201526000610fb460a0830184610f43565b979650505050505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610fe657600080fd5b813567ffffffffffffffff8082111561100157611001610fbf565b604051601f8301601f19908116603f0116810190828211818310171561102957611029610fbf565b8160405283815286602085880101111561104257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806080858703121561107857600080fd5b61108185610f11565b935060208501359250604085013567ffffffffffffffff808211156110a557600080fd5b6110b188838901610fd5565b935060608701359150808211156110c757600080fd5b506110d487828801610fd5565b91505092959194509250565b6000602082840312156110f257600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561113a5783516001600160a01b031683529284019291840191600101611115565b50909695505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160a08084015261118960c0840182610f43565b949350505050565b600181811c908216806111a557607f821691505b6020821081036111c557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115611217576000816000526020600020601f850160051c810160208610156111f45750805b601f850160051c820191505b8181101561121357828155600101611200565b5050505b505050565b815167ffffffffffffffff81111561123657611236610fbf565b61124a816112448454611191565b846111cb565b602080601f83116001811461127f57600084156112675750858301515b600019600386901b1c1916600185901b178555611213565b600085815260208120601f198616915b828110156112ae5788860151825594840194600190910190840161128f565b50858210156112cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8381528260208201526060604082015260006112fb6060830184610f43565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60008261133757634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610cc557610cc5611304565b8082028115828204841417610cc557610cc5611304565b80820180821115610cc557610cc561130456fea264697066735822122045f4b9069712d44479bdc4e41a955bfd4ecd3fbb44970fce5844501799d508b464736f6c63430008160033