More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,207 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Excess ... | 21023589 | 80 days ago | IN | 0 ETH | 0.00048533 | ||||
Withdraw | 14738140 | 978 days ago | IN | 0 ETH | 0.00160149 | ||||
Deposit | 14738138 | 978 days ago | IN | 0 ETH | 0.00212457 | ||||
Withdraw | 13873838 | 1113 days ago | IN | 0 ETH | 0.00441455 | ||||
Withdraw | 13664859 | 1146 days ago | IN | 0 ETH | 0.01577751 | ||||
Withdraw | 13487723 | 1173 days ago | IN | 0 ETH | 0.01749529 | ||||
Withdraw | 13476794 | 1175 days ago | IN | 0 ETH | 0.00592509 | ||||
Withdraw | 13434847 | 1182 days ago | IN | 0 ETH | 0.00562543 | ||||
Withdraw | 13434731 | 1182 days ago | IN | 0 ETH | 0.00759072 | ||||
Withdraw | 13431159 | 1182 days ago | IN | 0 ETH | 0.00868915 | ||||
Withdraw | 13403225 | 1187 days ago | IN | 0 ETH | 0.00707961 | ||||
Withdraw | 13403217 | 1187 days ago | IN | 0 ETH | 0.00637932 | ||||
Deposit | 13403145 | 1187 days ago | IN | 0 ETH | 0.00477293 | ||||
Deposit | 13403138 | 1187 days ago | IN | 0 ETH | 0.00609111 | ||||
Withdraw | 13386863 | 1189 days ago | IN | 0 ETH | 0.00653935 | ||||
Withdraw | 13376492 | 1191 days ago | IN | 0 ETH | 0.00867412 | ||||
Withdraw | 13376473 | 1191 days ago | IN | 0 ETH | 0.01272967 | ||||
Withdraw | 13336813 | 1197 days ago | IN | 0 ETH | 0.00752608 | ||||
Withdraw | 13319295 | 1200 days ago | IN | 0 ETH | 0.00658789 | ||||
Emergency Withdr... | 13297714 | 1203 days ago | IN | 0 ETH | 0.00178498 | ||||
Withdraw | 13297536 | 1203 days ago | IN | 0 ETH | 0.00332435 | ||||
Withdraw | 13297422 | 1203 days ago | IN | 0 ETH | 0.00302754 | ||||
Withdraw | 13280985 | 1206 days ago | IN | 0 ETH | 0.00356485 | ||||
Deposit | 13280880 | 1206 days ago | IN | 0 ETH | 0.00448927 | ||||
Withdraw | 13269562 | 1208 days ago | IN | 0 ETH | 0.0058264 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12433834 | 1337 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
ElysianFields
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import './Aureus.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/EnumerableSet.sol'; import '@openzeppelin/contracts/math/SafeMath.sol'; import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; contract ElysianFields is Ownable { using SafeMath for uint256; using SafeERC20 for Aureus; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // amount of LP tokens provided by the user uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of AURs // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRwdPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accRwdPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } struct PoolInfo { IERC20 lpToken; // address of the LP token contract uint256 allocPoint; // Allocation points for said pool. AURs to be distributed to pool participants per block uint256 lastRewardBlock; // Last block number that AURs distribution occurs. uint256 accRwdPerShare; // Accumulated AUR rewards per share, times 1e18 } constructor( address _owner, string memory _name, string memory _symbol, uint256 _cap, uint256 _amountForPool, address _rewardReceiver ) { transferOwnership(_owner); deployAureus(_name, _symbol, _cap, _amountForPool, _rewardReceiver); } // The Reward token Aureus public rwdToken; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation points in all pools. uint256 public totalAllocPoints = 0; // Reward tokens per block to be distributed uint256 public rwdPerBlock; // The block number when RWD mining starts uint256 public startBlock; // The ending block of the current program - rwdPerBlock will be set to 0 after block number is reached uint256 public endBlock; // The timeout expressed in block, after which owner can withdraw excess amount uint256 public claimTimeout; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); /** @dev Deploys a new RewardToken contract. Callable only by Owner. Mints the cap amount and transfers it to this contract * @param _name - Pass a name for the token * @param _symbol - Pass a symbol for the token * @param _cap - set a cap on how many ERC20 reward tokens can be minted * @param _amountForPool - a portion of the ERC20 reward token is transferred to owner to create a new pool on a DEX * @param _rewardReceiver - receiver of the portion of ERC20 reward token */ function deployAureus( string memory _name, string memory _symbol, uint256 _cap, uint256 _amountForPool, address _rewardReceiver ) internal { rwdToken = new Aureus(_name, _symbol, _cap); rwdToken.safeTransfer(_rewardReceiver, _amountForPool); } /** @dev - A function to add a pool or multiple pools to the contract * @param _allocPoints - An array of the allocation points for each pool that will be added * @param _lpTokens - An array of each LP token for which a pool is created */ function add(uint256[] calldata _allocPoints, IERC20[] calldata _lpTokens) external onlyOwner { require( address(rwdToken) != address(0), 'A reward token has not been deployed' ); require( _allocPoints.length == _lpTokens.length, 'Arrays length doesnt match' ); massUpdatePools(); uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; uint256 tempTotalAllocPoints = totalAllocPoints; for (uint256 j = 0; j < _lpTokens.length; j++) { tempTotalAllocPoints = tempTotalAllocPoints.add(_allocPoints[j]); poolInfo.push( PoolInfo({ lpToken: _lpTokens[j], allocPoint: _allocPoints[j], lastRewardBlock: lastRewardBlock, accRwdPerShare: 0 }) ); } totalAllocPoints = tempTotalAllocPoints; } /** @dev - Updates the allocationPoints for an array of pools * @param _pids - An array of pool ids which will be updated * @param _allocPoints - An array of allocationPoints for each pool that will be updated */ function set(uint256[] calldata _pids, uint256[] calldata _allocPoints) external onlyOwner { require(_pids.length == _allocPoints.length, 'Arrays length doesnt match'); massUpdatePools(); uint256 tempTotalAllocPoints = totalAllocPoints; for (uint256 j = 0; j < _pids.length; j++) { poolInfo[_pids[j]].allocPoint = _allocPoints[j]; tempTotalAllocPoints = tempTotalAllocPoints .sub(poolInfo[_pids[j]].allocPoint) .add(_allocPoints[j]); } totalAllocPoints = tempTotalAllocPoints; } /** @dev Allows the owner to set the parameters for a new upcomming farming program * @param _startBlock - the starting block when the farming program will start * @param _endBlock - the block on which the farming program will end * @param _rwdPerBlock - updates the rwdPerBlock variable for the new farming program * @param _ownerWithdrawBlockTimeout - The added timeout after a program finishes after which the excess ERC20 tokens stored can be withdrawn by the owner */ function setProgramParameters( uint256 _startBlock, uint256 _endBlock, uint256 _rwdPerBlock, uint256 _ownerWithdrawBlockTimeout ) external onlyOwner { require( startBlock == 0, 'The start block of a program has already been set' ); require(poolInfo.length > 0, 'No pools added'); require( _startBlock > block.number, 'The start block passed is before the current block number' ); require( _endBlock > _startBlock, 'The end block passed should be bigger than _startBlock' ); require(_rwdPerBlock != 0, 'The reward per block can not be set to 0'); require( _ownerWithdrawBlockTimeout > 0, 'Claim timeout can not be set to 0' ); require( rwdToken.balanceOf(address(this)) >= _rwdPerBlock.mul(_endBlock - _startBlock), 'Smart contract has not enough balance in rewards token' ); startBlock = _startBlock; endBlock = _endBlock; rwdPerBlock = _rwdPerBlock; claimTimeout = endBlock.add(_ownerWithdrawBlockTimeout); } /** @dev Allows the owner to withdraw any excess ERC20 tokens stored in the contract * @param _receiver - The receiving address for the ERC20 tokens */ function withdrawExcessRwd(address _receiver) external onlyOwner { require( block.number > claimTimeout, 'The current farming program has not finished' ); uint256 amount = rwdToken.balanceOf(address(this)); rwdToken.safeTransfer(_receiver, amount); } /** @dev - A function to be called when depositing LP tokens to a certain pool * @param _pid - The pool id to which the user wants to deposit LP tokens * @param _amount - The amount of LP tokens to be deposited * emit - Emits the Deposit event */ function deposit(uint256 _pid, uint256 _amount) external { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accRwdPerShare).div(1e18).sub(user.rewardDebt); safeRewardTransfer(msg.sender, pending); } pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount); user.amount = user.amount.add(_amount); user.rewardDebt = user.amount.mul(pool.accRwdPerShare).div(1e18); emit Deposit(msg.sender, _pid, _amount); } /** @dev - A function which is called to withdraw LP tokens from a pool * @param _pid - The pool id from which to withdraw the deposited LP tokens * @param _amount - The amount of LP tokens to withdraw * emits - Withdraw event is emited */ function withdraw(uint256 _pid, uint256 _amount) external { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, 'withdraw: not good'); updatePool(_pid); uint256 pending = user.amount.mul(pool.accRwdPerShare).div(1e18).sub(user.rewardDebt); safeRewardTransfer(msg.sender, pending); user.amount = user.amount.sub(_amount); user.rewardDebt = user.amount.mul(pool.accRwdPerShare).div(1e18); pool.lpToken.safeTransfer(address(msg.sender), _amount); emit Withdraw(msg.sender, _pid, _amount); } /** @dev - A function to withdraw any outstanding LP tokens of a user without withdrawing ERC20 reward tokens * @param _pid - The pool id on which to perform emergency withdraw */ function emergencyWithdraw(uint256 _pid) external { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; pool.lpToken.safeTransfer(address(msg.sender), user.amount); emit EmergencyWithdraw(msg.sender, _pid, user.amount); user.amount = 0; user.rewardDebt = 0; } /** @dev - Calculates the pending ERC20 reward tokens the user can claim * @param _pid - The pool id * @param _user - The address of the user * return - the pending ERC20 reward tokens to be claimed */ function pendingRwd(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accRwdPerShare = pool.accRwdPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); uint256 rwdReward = multiplier.mul(rwdPerBlock).mul(pool.allocPoint).div(totalAllocPoints); accRwdPerShare = accRwdPerShare.add(rwdReward.mul(1e18).div(lpSupply)); } return user.amount.mul(accRwdPerShare).div(1e18).sub(user.rewardDebt); } /** @dev Checks the poolInfo struct lenght * return the number of active pools */ function poolLength() external view returns (uint256) { return poolInfo.length; } /** @dev - Updates the variables of each pool in the array */ function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } /** @dev - Updates the pool variables to be up to date * @param _pid - The ID of the pool to be updated */ function updatePool(uint256 _pid) public { require( block.number >= startBlock, 'The farming program has not yet started!' ); PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0) { pool.lastRewardBlock = block.number; return; } uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number); uint256 rwdReward = multiplier.mul(rwdPerBlock).mul(pool.allocPoint).div(totalAllocPoints); pool.accRwdPerShare = pool.accRwdPerShare.add( rwdReward.mul(1e18).div(lpSupply) ); pool.lastRewardBlock = block.number < endBlock ? block.number : endBlock; } /** @dev - Calculates and returns reward multiplier over the given _from to _to block. * @param _from - Should be a block number * @param _to - Should be a block number */ function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { if (_to <= endBlock) { return _to.sub(_from); } else if (_from >= endBlock) { return (_to.sub(_from)).mul(0); } else { return endBlock.sub(_from); } } /** @dev - A function used for safeTransfer of ERC20 tokens to the user * @param _to - The address to which the ERC20 tokens should be transferred * @param _amount - The amount to be transferred */ function safeRewardTransfer(address _to, uint256 _amount) internal { uint256 rwdTokenBal = rwdToken.balanceOf(address(this)); if (_amount > rwdTokenBal) { rwdToken.transfer(_to, rwdTokenBal); } else { rwdToken.transfer(_to, _amount); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import '@openzeppelin/contracts/token/ERC20/ERC20Capped.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; contract Aureus is ERC20Capped, Ownable { /** @dev - The constructor creates the ERC20 token and mints the cap amount * @param _name - The name of the ERC20 token that is deployed * @param _symbol - The symbol which will be used to distinguish the ERC20 token * @param _cap - The cap amount which can be minted of the ERC20 token */ constructor( string memory _name, string memory _symbol, uint256 _cap ) ERC20(_name, _symbol) ERC20Capped(_cap) { ERC20._mint(msg.sender, _cap); } /** @dev - A burn function to be called for the ERC20 token from another contract/user * @param _amount - The amount of ERC20 tokens to be burned */ function burn(uint256 _amount) external { _burn(msg.sender, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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) { // 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) { 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) { 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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); 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) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @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. 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) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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) { 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) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ERC20.sol"; /** * @dev Extension of {ERC20} that adds a cap to the supply of tokens. */ abstract contract ERC20Capped is ERC20 { using SafeMath for uint256; uint256 private _cap; /** * @dev Sets the value of the `cap`. This value is immutable, it can only be * set once during construction. */ constructor (uint256 cap_) internal { require(cap_ > 0, "ERC20Capped: cap is 0"); _cap = cap_; } /** * @dev Returns the cap on the token's total supply. */ function cap() public view virtual returns (uint256) { return _cap; } /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - minted tokens must not cause the total supply to go over the cap. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); if (from == address(0)) { // When minting tokens require(totalSupply().add(amount) <= cap(), "ERC20Capped: cap exceeded"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_cap","type":"uint256"},{"internalType":"uint256","name":"_amountForPool","type":"uint256"},{"internalType":"address","name":"_rewardReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"_lpTokens","type":"address[]"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTimeout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRwd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRwdPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rwdPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rwdToken","outputs":[{"internalType":"contract Aureus","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"},{"internalType":"uint256","name":"_rwdPerBlock","type":"uint256"},{"internalType":"uint256","name":"_ownerWithdrawBlockTimeout","type":"uint256"}],"name":"setProgramParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"withdrawExcessRwd","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006004553480156200001657600080fd5b5060405162003c8d38038062003c8d833981810160405260c08110156200003c57600080fd5b8151602083018051604051929492938301929190846401000000008211156200006457600080fd5b9083019060208201858111156200007a57600080fd5b82516401000000008111828201881017156200009557600080fd5b82525081516020918201929091019080838360005b83811015620000c4578181015183820152602001620000aa565b50505050905090810190601f168015620000f25780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011657600080fd5b9083019060208201858111156200012c57600080fd5b82516401000000008111828201881017156200014757600080fd5b82525081516020918201929091019080838360005b83811015620001765781810151838201526020016200015c565b50505050905090810190601f168015620001a45780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060909201519093509091506000620001cb6200022a565b600080546001600160a01b0319166001600160a01b03831690811782556040519293509160008051602062003c43833981519152908290a3506200020f866200022e565b6200021e858585858562000338565b505050505050620007eb565b3390565b620002386200022a565b6001600160a01b03166200024b62000483565b6001600160a01b031614620002a7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116620002ee5760405162461bcd60e51b815260040180806020018281038252602681526020018062003bf76026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602062003c4383398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b8484846040516200034990620007dd565b60408101829052606080825284519082015283518190602080830191608084019188019080838360005b838110156200038d57818101518382015260200162000373565b50505050905090810190601f168015620003bb5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015620003f0578181015183820152602001620003d6565b50505050905090810190601f1680156200041e5780820380516001836020036101000a031916815260200191505b5095505050505050604051809103906000f08015801562000443573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b0392831617908190556200047c9116828462000492602090811b6200156317901c565b5050505050565b6000546001600160a01b031690565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663a9059cbb60e01b17909152620004ea918591620004ef16565b505050565b60006200054b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620005ab60201b620015ba179092919060201c565b805190915015620004ea578080602001905160208110156200056c57600080fd5b5051620004ea5760405162461bcd60e51b815260040180806020018281038252602a81526020018062003c63602a913960400191505060405180910390fd5b6060620005bc8484600085620005c6565b90505b9392505050565b606082471015620006095760405162461bcd60e51b815260040180806020018281038252602681526020018062003c1d6026913960400191505060405180910390fd5b62000614856200072d565b62000666576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310620006a65780518252601f19909201916020918201910162000685565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146200070a576040519150601f19603f3d011682016040523d82523d6000602084013e6200070f565b606091505b5090925090506200072282828662000733565b979650505050505050565b3b151590565b6060831562000744575081620005bf565b825115620007555782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620007a157818101518382015260200162000787565b50505050905090810190601f168015620007cf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b61158f806200266883390190565b611e6d80620007fb6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063b16049a21161007c578063b16049a2146103c0578063bb366bf21461047e578063e2bbb158146104ad578063f214b712146104d0578063f2fde38b146104fc578063f61a7ff0146105225761014d565b8063715018a6146102665780637d787a241461026e5780638da5cb5b146102925780638dbb1e3a1461029a57806393f1a40b146102bd578063abc7c069146103025761014d565b8063441a3e7011610115578063441a3e70146101d157806348cd4cb1146101f657806351eb05a6146101fe5780635312ea8e1461021b578063630b5ba1146102385780637064f130146102405761014d565b8063081e3eda14610152578063083c63231461016c5780630e1da6c3146101745780631526fe271461017c5780631fa36cbe146101c9575b600080fd5b61015a61052a565b60408051918252519081900360200190f35b61015a610530565b61015a610536565b6101996004803603602081101561019257600080fd5b503561053c565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b61015a610580565b6101f4600480360360408110156101e757600080fd5b5080359060200135610586565b005b61015a6106df565b6101f46004803603602081101561021457600080fd5b50356106e5565b6101f46004803603602081101561023157600080fd5b503561086b565b6101f4610906565b6101f46004803603602081101561025657600080fd5b50356001600160a01b0316610929565b6101f4610a5c565b610276610b08565b604080516001600160a01b039092168252519081900360200190f35b610276610b17565b61015a600480360360408110156102b057600080fd5b5080359060200135610b26565b6102e9600480360360408110156102d357600080fd5b50803590602001356001600160a01b0316610b6d565b6040805192835260208301919091528051918290030190f35b6101f46004803603604081101561031857600080fd5b810190602081018135600160201b81111561033257600080fd5b82018360208201111561034457600080fd5b803590602001918460208302840111600160201b8311171561036557600080fd5b919390929091602081019035600160201b81111561038257600080fd5b82018360208201111561039457600080fd5b803590602001918460208302840111600160201b831117156103b557600080fd5b509092509050610b91565b6101f4600480360360408110156103d657600080fd5b810190602081018135600160201b8111156103f057600080fd5b82018360208201111561040257600080fd5b803590602001918460208302840111600160201b8311171561042357600080fd5b919390929091602081019035600160201b81111561044057600080fd5b82018360208201111561045257600080fd5b803590602001918460208302840111600160201b8311171561047357600080fd5b509092509050610d17565b6101f46004803603608081101561049457600080fd5b5080359060208101359060408101359060600135610f2c565b6101f4600480360360408110156104c357600080fd5b50803590602001356111eb565b61015a600480360360408110156104e657600080fd5b50803590602001356001600160a01b03166112f6565b6101f46004803603602081101561051257600080fd5b50356001600160a01b031661145b565b61015a61155d565b60025490565b60075481565b60085481565b6002818154811061054c57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60045481565b60006002838154811061059557fe5b600091825260208083208684526003825260408085203386529092529220805460049092029092019250831115610608576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b610611846106e5565b600061064e8260010154610648670de0b6b3a7640000610642876003015487600001546115d390919063ffffffff16565b9061162c565b90611693565b905061065a33826116f0565b81546106669085611693565b808355600384015461068691670de0b6b3a76400009161064291906115d3565b600183015582546106a1906001600160a01b03163386611563565b604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065481565b6006544310156107265760405162461bcd60e51b8152600401808060200182810382526028815260200180611db06028913960400191505060405180910390fd5b60006002828154811061073557fe5b90600052602060002090600402019050806002015443116107565750610868565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d60208110156107ca57600080fd5b50519050806107e0575043600290910155610868565b60006107f0836002015443610b26565b9050600061081d6004546106428660010154610817600554876115d390919063ffffffff16565b906115d3565b90506108436108388461064284670de0b6b3a76400006115d3565b600386015490611880565b600385015560075443106108595760075461085b565b435b8460020181905550505050505b50565b60006002828154811061087a57fe5b600091825260208083208584526003825260408085203380875293529093208054600490930290930180549094506108bf926001600160a01b03919091169190611563565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b60025460005b818110156109255761091d816106e5565b60010161090c565b5050565b6109316118da565b6001600160a01b0316610942610b17565b6001600160a01b03161461098b576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b60085443116109cb5760405162461bcd60e51b815260040180806020018281038252602c815260200180611cd1602c913960400191505060405180910390fd5b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d6020811015610a4057600080fd5b5051600154909150610925906001600160a01b03168383611563565b610a646118da565b6001600160a01b0316610a75610b17565b6001600160a01b031614610abe576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b6000546001600160a01b031690565b60006007548211610b4257610b3b8284611693565b9050610b67565b6007548310610b5a57610b3b60006108178486611693565b600754610b3b9084611693565b92915050565b60036020908152600092835260408084209091529082529020805460019091015482565b610b996118da565b6001600160a01b0316610baa610b17565b6001600160a01b031614610bf3576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b828114610c47576040805162461bcd60e51b815260206004820152601a60248201527f417272617973206c656e67746820646f65736e74206d61746368000000000000604482015290519081900360640190fd5b610c4f610906565b60045460005b84811015610d0d57838382818110610c6957fe5b905060200201356002878784818110610c7e57fe5b9050602002013581548110610c8f57fe5b906000526020600020906004020160010181905550610d03848483818110610cb357fe5b90506020020135610cfd6002898986818110610ccb57fe5b9050602002013581548110610cdc57fe5b9060005260206000209060040201600101548561169390919063ffffffff16565b90611880565b9150600101610c55565b5060045550505050565b610d1f6118da565b6001600160a01b0316610d30610b17565b6001600160a01b031614610d79576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b6001546001600160a01b0316610dc05760405162461bcd60e51b8152600401808060200182810382526024815260200180611d4b6024913960400191505060405180910390fd5b828114610e14576040805162461bcd60e51b815260206004820152601a60248201527f417272617973206c656e67746820646f65736e74206d61746368000000000000604482015290519081900360640190fd5b610e1c610906565b60006006544311610e2f57600654610e31565b435b60045490915060005b83811015610f2157610e67878783818110610e5157fe5b905060200201358361188090919063ffffffff16565b915060026040518060800160405280878785818110610e8257fe5b905060200201356001600160a01b03166001600160a01b03168152602001898985818110610eac57fe5b602090810292909201358352508181018790526000604092830181905284546001808201875595825290829020845160049092020180546001600160a01b0319166001600160a01b03909216919091178155908301518185015590820151600282015560609091015160039091015501610e3a565b506004555050505050565b610f346118da565b6001600160a01b0316610f45610b17565b6001600160a01b031614610f8e576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b60065415610fcd5760405162461bcd60e51b8152600401808060200182810382526031815260200180611c416031913960400191505060405180910390fd5b600254611012576040805162461bcd60e51b815260206004820152600e60248201526d139bc81c1bdbdb1cc8185919195960921b604482015290519081900360640190fd5b4384116110505760405162461bcd60e51b8152600401808060200182810382526039815260200180611c986039913960400191505060405180910390fd5b83831161108e5760405162461bcd60e51b8152600401808060200182810382526036815260200180611c0b6036913960400191505060405180910390fd5b816110ca5760405162461bcd60e51b8152600401808060200182810382526028815260200180611d236028913960400191505060405180910390fd5b600081116111095760405162461bcd60e51b8152600401808060200182810382526021815260200180611bea6021913960400191505060405180910390fd5b611115828585036115d3565b600154604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d602081101561118a57600080fd5b505110156111c95760405162461bcd60e51b8152600401808060200182810382526036815260200180611e026036913960400191505060405180910390fd5b6006849055600783905560058290556111e28382611880565b60085550505050565b6000600283815481106111fa57fe5b6000918252602080832086845260038252604080852033865290925292206004909102909101915061122b846106e5565b8054156112715760006112638260010154610648670de0b6b3a7640000610642876003015487600001546115d390919063ffffffff16565b905061126f33826116f0565b505b8154611288906001600160a01b03163330866118de565b80546112949084611880565b80825560038301546112b491670de0b6b3a76400009161064291906115d3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6000806002848154811061130657fe5b60009182526020808320878452600380835260408086206001600160a01b03808b168852908552818720600496870290940192830154835483516370a0823160e01b8152309881019890985292519398509396939593949116926370a082319260248083019392829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d60208110156113ab57600080fd5b50516002850154909150431180156113c257508015155b156114255760006113d7856002015443610b26565b905060006113fe6004546106428860010154610817600554876115d390919063ffffffff16565b90506114206114198461064284670de0b6b3a76400006115d3565b8590611880565b935050505b6114508360010154610648670de0b6b3a76400006106428688600001546115d390919063ffffffff16565b979650505050505050565b6114636118da565b6001600160a01b0316611474610b17565b6001600160a01b0316146114bd576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b6001600160a01b0381166115025760405162461bcd60e51b8152600401808060200182810382526026815260200180611c726026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526115b590849061193e565b505050565b60606115c984846000856119ef565b90505b9392505050565b6000826115e257506000610b67565b828202828482816115ef57fe5b04146115cc5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d6f6021913960400191505060405180910390fd5b6000808211611682576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161168b57fe5b049392505050565b6000828211156116ea576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561173b57600080fd5b505afa15801561174f573d6000803e3d6000fd5b505050506040513d602081101561176557600080fd5b50519050808211156117f9576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156117c757600080fd5b505af11580156117db573d6000803e3d6000fd5b505050506040513d60208110156117f157600080fd5b506115b59050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561184f57600080fd5b505af1158015611863573d6000803e3d6000fd5b505050506040513d602081101561187957600080fd5b5050505050565b6000828201838110156115cc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261193890859061193e565b50505050565b6000611993826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115ba9092919063ffffffff16565b8051909150156115b5578080602001905160208110156119b257600080fd5b50516115b55760405162461bcd60e51b815260040180806020018281038252602a815260200180611dd8602a913960400191505060405180910390fd5b606082471015611a305760405162461bcd60e51b8152600401808060200182810382526026815260200180611cfd6026913960400191505060405180910390fd5b611a3985611b3f565b611a8a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611ac85780518252601f199092019160209182019101611aa9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611b2a576040519150601f19603f3d011682016040523d82523d6000602084013e611b2f565b606091505b5091509150611450828286611b45565b3b151590565b60608315611b545750816115cc565b825115611b645782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611bae578181015183820152602001611b96565b50505050905090810190601f168015611bdb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe436c61696d2074696d656f75742063616e206e6f742062652073657420746f203054686520656e6420626c6f636b207061737365642073686f756c6420626520626967676572207468616e205f7374617274426c6f636b54686520737461727420626c6f636b206f6620612070726f6772616d2068617320616c7265616479206265656e207365744f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737354686520737461727420626c6f636b20706173736564206973206265666f7265207468652063757272656e7420626c6f636b206e756d6265725468652063757272656e74206661726d696e672070726f6772616d20686173206e6f742066696e6973686564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c546865207265776172642070657220626c6f636b2063616e206e6f742062652073657420746f2030412072657761726420746f6b656e20686173206e6f74206265656e206465706c6f796564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572546865206661726d696e672070726f6772616d20686173206e6f74207965742073746172746564215361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564536d61727420636f6e747261637420686173206e6f7420656e6f7567682062616c616e636520696e207265776172647320746f6b656ea2646970667358221220b7223db57cd575ad4d9366576aed3a1a42dd97b253ca6cd7df5299303a02d32c64736f6c6343000706003360806040523480156200001157600080fd5b506040516200158f3803806200158f833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b50604052602090810151855190935083925085918591620001c09160039190850190620004e4565b508051620001d6906004906020840190620004e4565b50506005805460ff19166012179055508062000239576040805162461bcd60e51b815260206004820152601560248201527f45524332304361707065643a2063617020697320300000000000000000000000604482015290519081900360640190fd5b600655600062000248620002b6565b600780546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620002ad3382620002ba60201b620008381760201c565b50505062000590565b3390565b6001600160a01b03821662000316576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6200032460008383620003c9565b62000340816002546200047660201b620009281790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620003739183906200092862000476821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b620003e18383836200047160201b620009891760201c565b6001600160a01b0383166200047157620003fa620004d8565b6200041d8262000409620004de565b6200047660201b620009281790919060201c565b111562000471576040805162461bcd60e51b815260206004820152601960248201527f45524332304361707065643a2063617020657863656564656400000000000000604482015290519081900360640190fd5b505050565b600082820183811015620004d1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60065490565b60025490565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200051c576000855562000567565b82601f106200053757805160ff191683800117855562000567565b8280016001018555821562000567579182015b82811115620005675782518255916020019190600101906200054a565b506200057592915062000579565b5090565b5b808211156200057557600081556001016200057a565b610fef80620005a06000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146102dd578063a9059cbb14610309578063dd62ed3e14610335578063f2fde38b1461036357610100565b806370a0823114610283578063715018a6146102a95780638da5cb5b146102b157806395d89b41146102d557610100565b8063313ce567116100d3578063313ce56714610212578063355274ea14610230578063395093511461023857806342966c681461026457610100565b806306fdde0314610105578063095ea7b31461018257806318160ddd146101c257806323b872dd146101dc575b600080fd5b61010d610389565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b03813516906020013561041f565b604080519115158252519081900360200190f35b6101ca61043c565b60408051918252519081900360200190f35b6101ae600480360360608110156101f257600080fd5b506001600160a01b03813581169160208101359091169060400135610442565b61021a6104c9565b6040805160ff9092168252519081900360200190f35b6101ca6104d2565b6101ae6004803603604081101561024e57600080fd5b506001600160a01b0381351690602001356104d8565b6102816004803603602081101561027a57600080fd5b5035610526565b005b6101ca6004803603602081101561029957600080fd5b50356001600160a01b0316610533565b61028161054e565b6102b961060c565b604080516001600160a01b039092168252519081900360200190f35b61010d61061b565b6101ae600480360360408110156102f357600080fd5b506001600160a01b03813516906020013561067c565b6101ae6004803603604081101561031f57600080fd5b506001600160a01b0381351690602001356106e4565b6101ca6004803603604081101561034b57600080fd5b506001600160a01b03813581169160200135166106f8565b6102816004803603602081101561037957600080fd5b50356001600160a01b0316610723565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104155780601f106103ea57610100808354040283529160200191610415565b820191906000526020600020905b8154815290600101906020018083116103f857829003601f168201915b5050505050905090565b600061043361042c61098e565b8484610992565b50600192915050565b60025490565b600061044f848484610a7e565b6104bf8461045b61098e565b6104ba85604051806060016040528060288152602001610f03602891396001600160a01b038a1660009081526001602052604081209061049961098e565b6001600160a01b031681526020810191909152604001600020549190610bd9565b610992565b5060019392505050565b60055460ff1690565b60065490565b60006104336104e561098e565b846104ba85600160006104f661098e565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610928565b6105303382610c70565b50565b6001600160a01b031660009081526020819052604090205490565b61055661098e565b6001600160a01b031661056761060c565b6001600160a01b0316146105c2576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600780546001600160a01b0319169055565b6007546001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104155780601f106103ea57610100808354040283529160200191610415565b600061043361068961098e565b846104ba85604051806060016040528060258152602001610f9560259139600160006106b361098e565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610bd9565b60006104336106f161098e565b8484610a7e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61072b61098e565b6001600160a01b031661073c61060c565b6001600160a01b031614610797576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166107dc5760405162461bcd60e51b8152600401808060200182810382526026815260200180610e956026913960400191505060405180910390fd5b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038216610893576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61089f60008383610d6c565b6002546108ac9082610928565b6002556001600160a01b0382166000908152602081905260409020546108d29082610928565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082820183811015610982576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b505050565b3390565b6001600160a01b0383166109d75760405162461bcd60e51b8152600401808060200182810382526024815260200180610f716024913960400191505060405180910390fd5b6001600160a01b038216610a1c5760405162461bcd60e51b8152600401808060200182810382526022815260200180610ebb6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610ac35760405162461bcd60e51b8152600401808060200182810382526025815260200180610f4c6025913960400191505060405180910390fd5b6001600160a01b038216610b085760405162461bcd60e51b8152600401808060200182810382526023815260200180610e506023913960400191505060405180910390fd5b610b13838383610d6c565b610b5081604051806060016040528060268152602001610edd602691396001600160a01b0386166000908152602081905260409020549190610bd9565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610b7f9082610928565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610c685760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c2d578181015183820152602001610c15565b50505050905090810190601f168015610c5a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b038216610cb55760405162461bcd60e51b8152600401808060200182810382526021815260200180610f2b6021913960400191505060405180910390fd5b610cc182600083610d6c565b610cfe81604051806060016040528060228152602001610e73602291396001600160a01b0385166000908152602081905260409020549190610bd9565b6001600160a01b038316600090815260208190526040902055600254610d249082610df2565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b610d77838383610989565b6001600160a01b03831661098957610d8d6104d2565b610d9f82610d9961043c565b90610928565b1115610989576040805162461bcd60e51b815260206004820152601960248201527f45524332304361707065643a2063617020657863656564656400000000000000604482015290519081900360640190fd5b600082821115610e49576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d5f4036e90b941b68eb7a41f7a81ef274f3413a66433cbfdc37744ade32968b764736f6c634300070600334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e7700000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e770000000000000000000000000000000000000000000000000000000000000006417572657573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084155522d30383139000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063b16049a21161007c578063b16049a2146103c0578063bb366bf21461047e578063e2bbb158146104ad578063f214b712146104d0578063f2fde38b146104fc578063f61a7ff0146105225761014d565b8063715018a6146102665780637d787a241461026e5780638da5cb5b146102925780638dbb1e3a1461029a57806393f1a40b146102bd578063abc7c069146103025761014d565b8063441a3e7011610115578063441a3e70146101d157806348cd4cb1146101f657806351eb05a6146101fe5780635312ea8e1461021b578063630b5ba1146102385780637064f130146102405761014d565b8063081e3eda14610152578063083c63231461016c5780630e1da6c3146101745780631526fe271461017c5780631fa36cbe146101c9575b600080fd5b61015a61052a565b60408051918252519081900360200190f35b61015a610530565b61015a610536565b6101996004803603602081101561019257600080fd5b503561053c565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b61015a610580565b6101f4600480360360408110156101e757600080fd5b5080359060200135610586565b005b61015a6106df565b6101f46004803603602081101561021457600080fd5b50356106e5565b6101f46004803603602081101561023157600080fd5b503561086b565b6101f4610906565b6101f46004803603602081101561025657600080fd5b50356001600160a01b0316610929565b6101f4610a5c565b610276610b08565b604080516001600160a01b039092168252519081900360200190f35b610276610b17565b61015a600480360360408110156102b057600080fd5b5080359060200135610b26565b6102e9600480360360408110156102d357600080fd5b50803590602001356001600160a01b0316610b6d565b6040805192835260208301919091528051918290030190f35b6101f46004803603604081101561031857600080fd5b810190602081018135600160201b81111561033257600080fd5b82018360208201111561034457600080fd5b803590602001918460208302840111600160201b8311171561036557600080fd5b919390929091602081019035600160201b81111561038257600080fd5b82018360208201111561039457600080fd5b803590602001918460208302840111600160201b831117156103b557600080fd5b509092509050610b91565b6101f4600480360360408110156103d657600080fd5b810190602081018135600160201b8111156103f057600080fd5b82018360208201111561040257600080fd5b803590602001918460208302840111600160201b8311171561042357600080fd5b919390929091602081019035600160201b81111561044057600080fd5b82018360208201111561045257600080fd5b803590602001918460208302840111600160201b8311171561047357600080fd5b509092509050610d17565b6101f46004803603608081101561049457600080fd5b5080359060208101359060408101359060600135610f2c565b6101f4600480360360408110156104c357600080fd5b50803590602001356111eb565b61015a600480360360408110156104e657600080fd5b50803590602001356001600160a01b03166112f6565b6101f46004803603602081101561051257600080fd5b50356001600160a01b031661145b565b61015a61155d565b60025490565b60075481565b60085481565b6002818154811061054c57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60045481565b60006002838154811061059557fe5b600091825260208083208684526003825260408085203386529092529220805460049092029092019250831115610608576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b610611846106e5565b600061064e8260010154610648670de0b6b3a7640000610642876003015487600001546115d390919063ffffffff16565b9061162c565b90611693565b905061065a33826116f0565b81546106669085611693565b808355600384015461068691670de0b6b3a76400009161064291906115d3565b600183015582546106a1906001600160a01b03163386611563565b604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60065481565b6006544310156107265760405162461bcd60e51b8152600401808060200182810382526028815260200180611db06028913960400191505060405180910390fd5b60006002828154811061073557fe5b90600052602060002090600402019050806002015443116107565750610868565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107a057600080fd5b505afa1580156107b4573d6000803e3d6000fd5b505050506040513d60208110156107ca57600080fd5b50519050806107e0575043600290910155610868565b60006107f0836002015443610b26565b9050600061081d6004546106428660010154610817600554876115d390919063ffffffff16565b906115d3565b90506108436108388461064284670de0b6b3a76400006115d3565b600386015490611880565b600385015560075443106108595760075461085b565b435b8460020181905550505050505b50565b60006002828154811061087a57fe5b600091825260208083208584526003825260408085203380875293529093208054600490930290930180549094506108bf926001600160a01b03919091169190611563565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b60025460005b818110156109255761091d816106e5565b60010161090c565b5050565b6109316118da565b6001600160a01b0316610942610b17565b6001600160a01b03161461098b576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b60085443116109cb5760405162461bcd60e51b815260040180806020018281038252602c815260200180611cd1602c913960400191505060405180910390fd5b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d6020811015610a4057600080fd5b5051600154909150610925906001600160a01b03168383611563565b610a646118da565b6001600160a01b0316610a75610b17565b6001600160a01b031614610abe576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b6000546001600160a01b031690565b60006007548211610b4257610b3b8284611693565b9050610b67565b6007548310610b5a57610b3b60006108178486611693565b600754610b3b9084611693565b92915050565b60036020908152600092835260408084209091529082529020805460019091015482565b610b996118da565b6001600160a01b0316610baa610b17565b6001600160a01b031614610bf3576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b828114610c47576040805162461bcd60e51b815260206004820152601a60248201527f417272617973206c656e67746820646f65736e74206d61746368000000000000604482015290519081900360640190fd5b610c4f610906565b60045460005b84811015610d0d57838382818110610c6957fe5b905060200201356002878784818110610c7e57fe5b9050602002013581548110610c8f57fe5b906000526020600020906004020160010181905550610d03848483818110610cb357fe5b90506020020135610cfd6002898986818110610ccb57fe5b9050602002013581548110610cdc57fe5b9060005260206000209060040201600101548561169390919063ffffffff16565b90611880565b9150600101610c55565b5060045550505050565b610d1f6118da565b6001600160a01b0316610d30610b17565b6001600160a01b031614610d79576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b6001546001600160a01b0316610dc05760405162461bcd60e51b8152600401808060200182810382526024815260200180611d4b6024913960400191505060405180910390fd5b828114610e14576040805162461bcd60e51b815260206004820152601a60248201527f417272617973206c656e67746820646f65736e74206d61746368000000000000604482015290519081900360640190fd5b610e1c610906565b60006006544311610e2f57600654610e31565b435b60045490915060005b83811015610f2157610e67878783818110610e5157fe5b905060200201358361188090919063ffffffff16565b915060026040518060800160405280878785818110610e8257fe5b905060200201356001600160a01b03166001600160a01b03168152602001898985818110610eac57fe5b602090810292909201358352508181018790526000604092830181905284546001808201875595825290829020845160049092020180546001600160a01b0319166001600160a01b03909216919091178155908301518185015590820151600282015560609091015160039091015501610e3a565b506004555050505050565b610f346118da565b6001600160a01b0316610f45610b17565b6001600160a01b031614610f8e576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b60065415610fcd5760405162461bcd60e51b8152600401808060200182810382526031815260200180611c416031913960400191505060405180910390fd5b600254611012576040805162461bcd60e51b815260206004820152600e60248201526d139bc81c1bdbdb1cc8185919195960921b604482015290519081900360640190fd5b4384116110505760405162461bcd60e51b8152600401808060200182810382526039815260200180611c986039913960400191505060405180910390fd5b83831161108e5760405162461bcd60e51b8152600401808060200182810382526036815260200180611c0b6036913960400191505060405180910390fd5b816110ca5760405162461bcd60e51b8152600401808060200182810382526028815260200180611d236028913960400191505060405180910390fd5b600081116111095760405162461bcd60e51b8152600401808060200182810382526021815260200180611bea6021913960400191505060405180910390fd5b611115828585036115d3565b600154604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d602081101561118a57600080fd5b505110156111c95760405162461bcd60e51b8152600401808060200182810382526036815260200180611e026036913960400191505060405180910390fd5b6006849055600783905560058290556111e28382611880565b60085550505050565b6000600283815481106111fa57fe5b6000918252602080832086845260038252604080852033865290925292206004909102909101915061122b846106e5565b8054156112715760006112638260010154610648670de0b6b3a7640000610642876003015487600001546115d390919063ffffffff16565b905061126f33826116f0565b505b8154611288906001600160a01b03163330866118de565b80546112949084611880565b80825560038301546112b491670de0b6b3a76400009161064291906115d3565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6000806002848154811061130657fe5b60009182526020808320878452600380835260408086206001600160a01b03808b168852908552818720600496870290940192830154835483516370a0823160e01b8152309881019890985292519398509396939593949116926370a082319260248083019392829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d60208110156113ab57600080fd5b50516002850154909150431180156113c257508015155b156114255760006113d7856002015443610b26565b905060006113fe6004546106428860010154610817600554876115d390919063ffffffff16565b90506114206114198461064284670de0b6b3a76400006115d3565b8590611880565b935050505b6114508360010154610648670de0b6b3a76400006106428688600001546115d390919063ffffffff16565b979650505050505050565b6114636118da565b6001600160a01b0316611474610b17565b6001600160a01b0316146114bd576040805162461bcd60e51b81526020600482018190526024820152600080516020611d90833981519152604482015290519081900360640190fd5b6001600160a01b0381166115025760405162461bcd60e51b8152600401808060200182810382526026815260200180611c726026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526115b590849061193e565b505050565b60606115c984846000856119ef565b90505b9392505050565b6000826115e257506000610b67565b828202828482816115ef57fe5b04146115cc5760405162461bcd60e51b8152600401808060200182810382526021815260200180611d6f6021913960400191505060405180910390fd5b6000808211611682576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161168b57fe5b049392505050565b6000828211156116ea576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561173b57600080fd5b505afa15801561174f573d6000803e3d6000fd5b505050506040513d602081101561176557600080fd5b50519050808211156117f9576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156117c757600080fd5b505af11580156117db573d6000803e3d6000fd5b505050506040513d60208110156117f157600080fd5b506115b59050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561184f57600080fd5b505af1158015611863573d6000803e3d6000fd5b505050506040513d602081101561187957600080fd5b5050505050565b6000828201838110156115cc576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261193890859061193e565b50505050565b6000611993826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115ba9092919063ffffffff16565b8051909150156115b5578080602001905160208110156119b257600080fd5b50516115b55760405162461bcd60e51b815260040180806020018281038252602a815260200180611dd8602a913960400191505060405180910390fd5b606082471015611a305760405162461bcd60e51b8152600401808060200182810382526026815260200180611cfd6026913960400191505060405180910390fd5b611a3985611b3f565b611a8a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611ac85780518252601f199092019160209182019101611aa9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611b2a576040519150601f19603f3d011682016040523d82523d6000602084013e611b2f565b606091505b5091509150611450828286611b45565b3b151590565b60608315611b545750816115cc565b825115611b645782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611bae578181015183820152602001611b96565b50505050905090810190601f168015611bdb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe436c61696d2074696d656f75742063616e206e6f742062652073657420746f203054686520656e6420626c6f636b207061737365642073686f756c6420626520626967676572207468616e205f7374617274426c6f636b54686520737461727420626c6f636b206f6620612070726f6772616d2068617320616c7265616479206265656e207365744f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737354686520737461727420626c6f636b20706173736564206973206265666f7265207468652063757272656e7420626c6f636b206e756d6265725468652063757272656e74206661726d696e672070726f6772616d20686173206e6f742066696e6973686564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c546865207265776172642070657220626c6f636b2063616e206e6f742062652073657420746f2030412072657761726420746f6b656e20686173206e6f74206265656e206465706c6f796564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572546865206661726d696e672070726f6772616d20686173206e6f74207965742073746172746564215361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564536d61727420636f6e747261637420686173206e6f7420656e6f7567682062616c616e636520696e207265776172647320746f6b656ea2646970667358221220b7223db57cd575ad4d9366576aed3a1a42dd97b253ca6cd7df5299303a02d32c64736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e7700000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e770000000000000000000000000000000000000000000000000000000000000006417572657573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084155522d30383139000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0x685723B9dC89BDF28BA5F98F9A8c0aC899bD6E77
Arg [1] : _name (string): Aureus
Arg [2] : _symbol (string): AUR-0819
Arg [3] : _cap (uint256): 100000000000000000000
Arg [4] : _amountForPool (uint256): 1000000000000000000
Arg [5] : _rewardReceiver (address): 0x685723B9dC89BDF28BA5F98F9A8c0aC899bD6E77
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e77
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [4] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [5] : 000000000000000000000000685723b9dc89bdf28ba5f98f9a8c0ac899bd6e77
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 4175726575730000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [9] : 4155522d30383139000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.