More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,313 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Collect Bella | 21689902 | 3 days ago | IN | 0 ETH | 0.00238699 | ||||
Claim All Bella | 21689900 | 3 days ago | IN | 0 ETH | 0.00560775 | ||||
Withdraw | 21689897 | 3 days ago | IN | 0 ETH | 0.00312273 | ||||
Collect Bella | 21635708 | 11 days ago | IN | 0 ETH | 0.00018778 | ||||
Collect Bella | 21585817 | 18 days ago | IN | 0 ETH | 0.00032003 | ||||
Collect Bella | 21578815 | 19 days ago | IN | 0 ETH | 0.00027571 | ||||
Collect Bella | 21548535 | 23 days ago | IN | 0 ETH | 0.00039564 | ||||
Collect Bella | 21530549 | 25 days ago | IN | 0 ETH | 0.00273766 | ||||
Withdraw | 21473347 | 33 days ago | IN | 0 ETH | 0.00118207 | ||||
Collect Bella | 21473343 | 33 days ago | IN | 0 ETH | 0.0009282 | ||||
Collect Bella | 21472720 | 33 days ago | IN | 0 ETH | 0.00074652 | ||||
Collect Bella | 21469159 | 34 days ago | IN | 0 ETH | 0.00048089 | ||||
Collect Bella | 21446967 | 37 days ago | IN | 0 ETH | 0.00086618 | ||||
Collect Bella | 21423284 | 40 days ago | IN | 0 ETH | 0.00318535 | ||||
Claim All Bella | 21398112 | 44 days ago | IN | 0 ETH | 0.00169375 | ||||
Withdraw | 21370340 | 48 days ago | IN | 0 ETH | 0.00121151 | ||||
Claim All Bella | 21360146 | 49 days ago | IN | 0 ETH | 0.00200048 | ||||
Collect Bella | 21360132 | 49 days ago | IN | 0 ETH | 0.00076998 | ||||
Withdraw | 21360003 | 49 days ago | IN | 0 ETH | 0.00122996 | ||||
Withdraw | 21349433 | 51 days ago | IN | 0 ETH | 0.00109717 | ||||
Withdraw | 21343406 | 52 days ago | IN | 0 ETH | 0.00134307 | ||||
Claim All Bella | 21343066 | 52 days ago | IN | 0 ETH | 0.00269445 | ||||
Collect Bella | 21343051 | 52 days ago | IN | 0 ETH | 0.00099209 | ||||
Claim All Bella | 21342994 | 52 days ago | IN | 0 ETH | 0.0024312 | ||||
Collect Bella | 21325563 | 54 days ago | IN | 0 ETH | 0.00160983 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
21689902 | 3 days ago | 0 ETH | |||||
21689902 | 3 days ago | 0 ETH | |||||
21689900 | 3 days ago | 0 ETH | |||||
21689900 | 3 days ago | 0 ETH | |||||
21689897 | 3 days ago | 0 ETH | |||||
21635708 | 11 days ago | 0 ETH | |||||
21635708 | 11 days ago | 0 ETH | |||||
21585817 | 18 days ago | 0 ETH | |||||
21585817 | 18 days ago | 0 ETH | |||||
21578815 | 19 days ago | 0 ETH | |||||
21578815 | 19 days ago | 0 ETH | |||||
21548535 | 23 days ago | 0 ETH | |||||
21548535 | 23 days ago | 0 ETH | |||||
21530549 | 25 days ago | 0 ETH | |||||
21530549 | 25 days ago | 0 ETH | |||||
21473347 | 33 days ago | 0 ETH | |||||
21473343 | 33 days ago | 0 ETH | |||||
21473343 | 33 days ago | 0 ETH | |||||
21472720 | 33 days ago | 0 ETH | |||||
21472720 | 33 days ago | 0 ETH | |||||
21469159 | 34 days ago | 0 ETH | |||||
21469159 | 34 days ago | 0 ETH | |||||
21446967 | 37 days ago | 0 ETH | |||||
21446967 | 37 days ago | 0 ETH | |||||
21423284 | 40 days ago | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BellaStaking
Compiler Version
v0.5.15+commit.6a57276f
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.5.15; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "../libraries/Ownable.sol"; /** * @title BellaStaking * @dev stake btoken and get bella rewards, modified based on sushi swap's masterchef * delay rewards to get a boost: * dalay of: 0, 7, 15 and 30 days */ contract BellaStaking is Ownable, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; uint256 constant NUM_TYPES = 4; // Info of each user. struct UserInfo { uint256 amount; // How many btokens the user has provided. uint256 effectiveAmount; // amount*boost uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of BELLAs // entitled to a user but is pending to be distributed is: // // pending reward = (user.effectiveAmount * pool.accBellaPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws btokens to a pool. Here's what happens: // 1. The pool's `accBellaPerShare` (and `lastRewardTime`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` and `effectiveAmount` gets updated. // 4. User's `rewardDebt` gets updated. uint256 earnedBella; // unclaimed bella } // bella under claiming struct ClaimingBella { uint256 amount; uint256 unlockTime; } // Info of each pool. struct PoolInfo { IERC20 underlyingToken; // Address of underlying token. uint256 allocPoint; // How many allocation points assigned to this pool. uint256 lastRewardTime; // Last block number that BELLAs distribution occurs. uint256 accBellaPerShare; // Accumulated BELLAs per share, times 1e12. See below. uint256 totalEffectiveAmount; // Sum of user's amount*boost } IERC20 public bella; PoolInfo[] public poolInfo; // 7, 15, 30 days delay boost, 3 digit = from 100% to 199% mapping (uint256 => uint256[3]) public boostInfo; // Info of each user that stakes btokens. mapping (uint256 => mapping (address => UserInfo[NUM_TYPES])) public userInfos; // User's bella under claiming mapping (address => ClaimingBella[]) public claimingBellas; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The timestamp when BELLA mining starts. uint256 public startTime; // period to released currently locked bella rewards uint256 public currentUnlockCycle; // under current release cycle, the releasing speed per second uint256 public bellaPerSecond; // timestamp that current round of bella rewards ends uint256 public unlockEndTimestamp; 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); modifier validPool(uint256 _pid) { require(_pid < poolInfo.length, "invalid pool id"); _; } /** * @param _bella bella address * @param _startTime timestamp that starts reward distribution * @param governance governance address */ constructor( IERC20 _bella, uint256 _startTime, address governance ) public Ownable(governance) { bella = _bella; startTime = _startTime; } /** * @return number of all the pools */ function poolLength() public view returns (uint256) { return poolInfo.length; } /** * @dev Add a new underlying token to the pool. Can only be called by the governance. * delay rewards to get a boost: * dalay of: 0, 7, 15 and 30 days * @param _allocPoint weight of this pool * @param _underlyingToken underlying token address * @param boost boostInfo of this pool * @param _withUpdate if update all the pool informations */ function add(uint256 _allocPoint, IERC20 _underlyingToken, uint256[3] memory boost, bool _withUpdate) public onlyOwner { if (_withUpdate) { massUpdatePools(); } for (uint256 i=0; i<3; i++) { require((boost[i]>=100 && boost[i]<=200), "invalid boost"); } uint256 lastRewardTime = now > startTime ? now : startTime; totalAllocPoint = totalAllocPoint.add(_allocPoint); boostInfo[poolLength()] = boost; poolInfo.push(PoolInfo({ underlyingToken: _underlyingToken, allocPoint: _allocPoint, lastRewardTime: lastRewardTime, accBellaPerShare: 0, totalEffectiveAmount: 0 })); } /** * @dev Update the given pool's BELLA allocation point. Can only be called by the governance. * @param _pid id of the pool * @param _allocPoint weight of this pool */ function set(uint256 _pid, uint256 _allocPoint) public validPool(_pid) onlyOwner { massUpdatePools(); totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); poolInfo[_pid].allocPoint = _allocPoint; } /** * @dev we will lock bella tokens on the begining every releasing cycle * @param amount the amount of bella token to lock * @param nextUnlockCycle next reward releasing cycle, unit=day */ function lock(uint256 amount, uint256 nextUnlockCycle) external onlyOwner { massUpdatePools(); currentUnlockCycle = nextUnlockCycle * 1 days; unlockEndTimestamp = now.add(currentUnlockCycle); bellaPerSecond = bella.balanceOf(address(this)).add(amount).div(currentUnlockCycle); require( bella.transferFrom(msg.sender, address(this), amount), "Additional bella transfer failed" ); } /** * @dev user's total earned bella in all pools * @param _user user's address */ function earnedBellaAllPool(address _user) external view returns (uint256) { uint256 sum = 0; for (uint256 i = 0; i < poolInfo.length; i++) { sum = sum.add(earnedBellaAll(i, _user)); } return sum; } /** * @dev user's total earned bella in a specific pool * @param _pid id of the pool * @param _user user's address */ function earnedBellaAll(uint256 _pid, address _user) public view validPool(_pid) returns (uint256) { uint256 sum = 0; for (uint256 i = 0; i < NUM_TYPES; i++) { sum = sum.add(earnedBella(_pid, _user, i)); } return sum; } /** * @dev user's earned bella in a specific pool for a specific saving type * @param _pid id of the pool * @param _user user's address * @param savingType saving type */ function earnedBella(uint256 _pid, address _user, uint256 savingType) public view validPool(_pid) returns (uint256) { require(savingType < NUM_TYPES, "invalid savingType"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfos[_pid][_user][savingType]; uint256 accBellaPerShare = pool.accBellaPerShare; if (now > pool.lastRewardTime && pool.totalEffectiveAmount != 0 && pool.lastRewardTime != unlockEndTimestamp) { uint256 delta = now > unlockEndTimestamp ? unlockEndTimestamp.sub(pool.lastRewardTime) : now.sub(pool.lastRewardTime); uint256 bellaReward = bellaPerSecond.mul(delta).mul(pool.allocPoint).div(totalAllocPoint); accBellaPerShare = accBellaPerShare.add(bellaReward.mul(1e12).div(pool.totalEffectiveAmount)); } return user.effectiveAmount.mul(accBellaPerShare).div(1e12).sub(user.rewardDebt); } /** * @dev Update reward variables for all pools. Be careful of gas spending! */ function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } /** * @dev Update reward variables of the given pool to be up-to-date. * @param _pid id of the pool */ function updatePool(uint256 _pid) public validPool(_pid) { PoolInfo storage pool = poolInfo[_pid]; if (now <= pool.lastRewardTime || unlockEndTimestamp == pool.lastRewardTime) { return; } if (pool.totalEffectiveAmount == 0) { pool.lastRewardTime = now; return; } uint256 accBellaPerShare = pool.accBellaPerShare; // now > pool.lastRewardTime && pool.totalEffectiveAmount != 0 if (now > unlockEndTimestamp) { uint256 delta = unlockEndTimestamp.sub(pool.lastRewardTime); uint256 bellaReward = bellaPerSecond.mul(delta).mul(pool.allocPoint).div(totalAllocPoint); pool.accBellaPerShare = accBellaPerShare.add(bellaReward.mul(1e12).div(pool.totalEffectiveAmount)); pool.lastRewardTime = unlockEndTimestamp; } else { uint256 delta = now.sub(pool.lastRewardTime); uint256 bellaReward = bellaPerSecond.mul(delta).mul(pool.allocPoint).div(totalAllocPoint); pool.accBellaPerShare = accBellaPerShare.add(bellaReward.mul(1e12).div(pool.totalEffectiveAmount)); pool.lastRewardTime = now; } } /** * @dev Deposit underlying token for bella allocation * @param _pid id of the pool * @param _amount amount of underlying token to deposit * @param savingType saving type */ function deposit(uint256 _pid, uint256 _amount, uint256 savingType) public validPool(_pid) nonReentrant { require(savingType < NUM_TYPES, "invalid savingType"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfos[_pid][msg.sender][savingType]; updatePool(_pid); if (user.effectiveAmount > 0) { uint256 pending = user.effectiveAmount.mul(pool.accBellaPerShare).div(1e12).sub(user.rewardDebt); if(pending > 0) { user.earnedBella = user.earnedBella.add(pending); } } if(_amount > 0) { pool.underlyingToken.safeTransferFrom(address(msg.sender), address(this), _amount); user.amount = user.amount.add(_amount); uint256 effectiveAmount = toEffectiveAmount(_pid, _amount, savingType); user.effectiveAmount = user.effectiveAmount.add(effectiveAmount); pool.totalEffectiveAmount = pool.totalEffectiveAmount.add(effectiveAmount); } user.rewardDebt = user.effectiveAmount.mul(pool.accBellaPerShare).div(1e12); /// 初始的奖励为0 emit Deposit(msg.sender, _pid, _amount); } /** * @dev Withdraw underlying token * @param _pid id of the pool * @param _amount amount of underlying token to withdraw * @param savingType saving type */ function withdraw(uint256 _pid, uint256 _amount, uint256 savingType) public validPool(_pid) nonReentrant { require(savingType < NUM_TYPES, "invalid savingType"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfos[_pid][msg.sender][savingType]; require(user.amount >= _amount, "withdraw: not good"); updatePool(_pid); uint256 pending = user.effectiveAmount.mul(pool.accBellaPerShare).div(1e12).sub(user.rewardDebt); if(pending > 0) { user.earnedBella = user.earnedBella.add(pending); } if(_amount > 0) { user.amount = user.amount.sub(_amount); uint256 effectiveAmount = toEffectiveAmount(_pid, _amount, savingType); /// round errors? pool.totalEffectiveAmount = pool.totalEffectiveAmount.sub(effectiveAmount); user.effectiveAmount = toEffectiveAmount(_pid, user.amount, savingType); pool.underlyingToken.safeTransfer(address(msg.sender), _amount); } user.rewardDebt = user.effectiveAmount.mul(pool.accBellaPerShare).div(1e12); emit Withdraw(msg.sender, _pid, _amount); } /** * @dev Withdraw all underlying token in one pool * @param _pid id of the pool */ function withdrawAll(uint256 _pid) public validPool(_pid) { for (uint256 i=0; i<NUM_TYPES; i++) { uint256 amount = userInfos[_pid][msg.sender][i].amount; if (amount != 0) { withdraw(_pid, amount, i); } } } /** * @dev Withdraw without caring about rewards. EMERGENCY ONLY. * @param _pid id of the pool * @param savingType saving type */ function emergencyWithdraw(uint256 _pid, uint256 savingType) public validPool(_pid) nonReentrant { require(savingType < NUM_TYPES, "invalid savingType"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfos[_pid][msg.sender][savingType]; uint256 amount = user.amount; pool.totalEffectiveAmount = pool.totalEffectiveAmount.sub(user.effectiveAmount); user.amount = 0; user.effectiveAmount = 0; user.rewardDebt = 0; user.earnedBella = 0; pool.underlyingToken.safeTransfer(address(msg.sender), amount); emit EmergencyWithdraw(msg.sender, _pid, amount); } /** * @dev claim earned bella to collect for a specific saving type * @param _pid id of the pool * @param savingType saving type */ function claimBella(uint256 _pid, uint256 savingType) public { require(savingType < NUM_TYPES, "invalid savingType"); UserInfo storage user = userInfos[_pid][msg.sender][savingType]; updatePool(_pid); PoolInfo memory pool = poolInfo[_pid]; uint256 pending = user.effectiveAmount.mul(pool.accBellaPerShare).div(1e12).sub(user.rewardDebt); if(pending > 0) { user.earnedBella = user.earnedBella.add(pending); } user.rewardDebt = user.effectiveAmount.mul(pool.accBellaPerShare).div(1e12); uint256 delay = getDelayFromType(savingType); if (delay == 0) { uint256 amount = user.earnedBella; user.earnedBella = 0; safeBellaTransfer(msg.sender, amount); } else { uint256 amount = user.earnedBella; user.earnedBella = 0; ClaimingBella[] storage claimingBella = claimingBellas[msg.sender]; claimingBella.push(ClaimingBella({amount: amount, unlockTime: now.add(delay * 1 days)})); } } /** * @dev claim all earned bella to collect * @param _pid id of the pool */ function claimAllBella(uint256 _pid) public validPool(_pid) { for (uint256 i=0; i<NUM_TYPES; i++) { claimBella(_pid, i); } } /** * @dev collect claimed bella (instant and delayed) */ function collectBella() public { uint256 sum = 0; ClaimingBella[] storage claimingBella = claimingBellas[msg.sender]; for (uint256 i = 0; i < claimingBella.length; i++) { ClaimingBella storage claim = claimingBella[i]; if (claimingBella[i].amount !=0 && claimingBella[i].unlockTime <= now) { sum = sum.add(claim.amount); delete claimingBella[i]; } } safeBellaTransfer(msg.sender, sum); // clean array if len > 15 and have more than 4 zeros if (claimingBella.length > 15) { uint256 zeros = 0; for (uint256 i=0; i < claimingBella.length; i++) { if (claimingBella[i].amount == 0) { zeros++; } } if (zeros < 5) return; uint256 i = 0; while (i < claimingBella.length) { if (claimingBella[i].amount == 0) { claimingBella[i].amount = claimingBella[claimingBella.length-1].amount; claimingBella[i].unlockTime = claimingBella[claimingBella.length-1].unlockTime; claimingBella.pop(); } else { i++; } } } } /** * @dev Get user's total staked btoken in on pool * @param _pid id of the pool * @param user user address */ function getBtokenStaked(uint256 _pid, address user) external view validPool(_pid) returns (uint256) { uint256 sum = 0; for (uint256 i=0; i<NUM_TYPES; i++) { sum = sum.add(userInfos[_pid][user][i].amount); } return sum; } /** * @dev view function to see user's collectiable bella */ function collectiableBella() external view returns (uint256) { uint256 sum = 0; ClaimingBella[] memory claimingBella = claimingBellas[msg.sender]; for (uint256 i = 0; i < claimingBella.length; i++) { ClaimingBella memory claim = claimingBella[i]; if (claim.amount !=0 && claim.unlockTime <= now) { sum = sum.add(claim.amount); } } return sum; } /** * @dev view function to see user's delayed bella */ function delayedBella() external view returns (uint256) { uint256 sum = 0; ClaimingBella[] memory claimingBella = claimingBellas[msg.sender]; for (uint256 i = 0; i < claimingBella.length; i++) { ClaimingBella memory claim = claimingBella[i]; if (claim.amount !=0 && claim.unlockTime > now) { sum = sum.add(claim.amount); } } return sum; } /** * @dev view function to check boost*amount of each saving type * @param pid id of the pool * @param amount amount of underlying token * @param savingType saving type * @return boost*amount */ function toEffectiveAmount(uint256 pid, uint256 amount, uint256 savingType) internal view returns (uint256) { if (savingType == 0) { return amount; } else if (savingType == 1) { return amount * boostInfo[pid][0] / 100; } else if (savingType == 2) { return amount * boostInfo[pid][1] / 100; } else if (savingType == 3) { return amount * boostInfo[pid][2] / 100; } else { revert("toEffectiveAmount: invalid savingType"); } } /** * @dev pure function to check delay of each saving type * @param savingType saving type * @return delay of the input saving type */ function getDelayFromType(uint256 savingType) internal pure returns (uint256) { if (savingType == 0) { return 0; } else if (savingType == 1) { return 7; } else if (savingType == 2) { return 15; } else if (savingType == 3) { return 30; } else { revert("getDelayFromType: invalid savingType"); } } /** * @dev Safe bella transfer function, just in case if rounding error causes pool to not have enough BELLAs. * @param _to Target address to send bella * @param _amount Amount of bella to send */ function safeBellaTransfer(address _to, uint256 _amount) internal { uint256 bellaBal = bella.balanceOf(address(this)); if (_amount > bellaBal) { bella.transfer(_to, bellaBal); } else { bella.transfer(_to, _amount); } } }
pragma solidity ^0.5.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, 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) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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); }
pragma solidity ^0.5.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 ERC20;` 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)); } 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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "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"); } } }
pragma solidity ^0.5.5; /** * @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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @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]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
pragma solidity ^0.5.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. * * _Since v2.5.0:_ this module is now much more gas efficient, given net gas * metering changes introduced in the Istanbul hardfork. */ contract ReentrancyGuard { bool private _notEntered; constructor () internal { // Storing an initial non-zero value makes deployment a bit more // expensive, but in exchange the refund on every call to nonReentrant // will be lower in amount. Since refunds are capped to a percetange of // the total transaction's gas, it is best to keep them low in cases // like this one, to increase the likelihood of the full refund coming // into effect. _notEntered = true; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_notEntered, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _notEntered = false; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _notEntered = true; } }
pragma solidity 0.5.15; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the a * specified account. * @param initalOwner The address of the inital owner. */ constructor(address initalOwner) internal { _owner = initalOwner; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Only owner can call"); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. * @notice Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Owner should not be 0 address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [ ":@openzeppelin/=/home/ubuntu/flex-saving/node_modules/@openzeppelin/" ], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_bella","type":"address"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"address","name":"governance","type":"address"}],"payable":false,"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"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_underlyingToken","type":"address"},{"internalType":"uint256[3]","name":"boost","type":"uint256[3]"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bella","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bellaPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"boostInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"claimAllBella","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"savingType","type":"uint256"}],"name":"claimBella","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimingBellas","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"collectBella","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"collectiableBella","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentUnlockCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"delayedBella","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"savingType","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"savingType","type":"uint256"}],"name":"earnedBella","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"earnedBellaAll","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"earnedBellaAllPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"savingType","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"getBtokenStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"nextUnlockCycle","type":"uint256"}],"name":"lock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"massUpdatePools","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"underlyingToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accBellaPerShare","type":"uint256"},{"internalType":"uint256","name":"totalEffectiveAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"unlockEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userInfos","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"effectiveAmount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"earnedBella","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"savingType","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600060065534801561001557600080fd5b50604051612c0c380380612c0c8339818101604052606081101561003857600080fd5b5080516020820151604092830151600080546001600160a01b0319166001600160a01b038084169190911780835595519495939492938493911691907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506000805460ff60a01b1916600160a01b179055600180546001600160a01b039093166001600160a01b031990931692909217909155600755612b2a806100e26000396000f3fe608060405234801561001057600080fd5b50600436106101fa5760003560e01c80637223c8c91161011a5780639f0aab78116100ad578063bf7f33271161007c578063bf7f332714610592578063c200b4b01461059a578063d6935831146105a2578063f2fde38b146105aa578063fc7bfea8146105d0576101fa565b80639f0aab7814610518578063a41fe49f1461053b578063b7c3c8c314610564578063ba2c1f4f1461058a576101fa565b80638defa23a116100e95780638defa23a146104875780638f32d59b146104b357806394f2bd49146104cf578063958e2d31146104fb576101fa565b80637223c8c9146103d157806378e97925146104295780637aea9af6146104315780638da5cb5b14610463576101fa565b80631f276b6e1161019257806351eb05a61161016157806351eb05a614610381578063630b5ba11461039e5780636d2e8b13146103a6578063715018a6146103c9576101fa565b80631f276b6e146103315780633591f63b14610354578063364ef3cc1461035c5780635003a9a514610379576101fa565b806314ad6ba1116101ce57806314ad6ba1146102ac5780631526fe27146102b457806317caf6f1146103065780631ab06ee51461030e576101fa565b8062aeef8a146101ff578063081e3eda1461022a578063120205e1146102445780631338736f14610289575b600080fd5b6102286004803603606081101561021557600080fd5b5080359060208101359060400135610635565b005b6102326108f1565b60408051918252519081900360200190f35b6102706004803603604081101561025a57600080fd5b506001600160a01b0381351690602001356108f8565b6040805192835260208301919091528051918290030190f35b6102286004803603604081101561029f57600080fd5b5080359060200135610931565b610232610b16565b6102d1600480360360208110156102ca57600080fd5b5035610b1c565b604080516001600160a01b03909616865260208601949094528484019290925260608401526080830152519081900360a00190f35b610232610b64565b6102286004803603604081101561032457600080fd5b5080359060200135610b6a565b6102286004803603604081101561034757600080fd5b5080359060200135610c7c565b610228610e71565b6102286004803603602081101561037257600080fd5b5035611098565b610232611105565b6102286004803603602081101561039757600080fd5b503561110b565b6102286112c7565b610232600480360360408110156103bc57600080fd5b50803590602001356112e6565b610228611308565b610403600480360360608110156103e757600080fd5b508035906001600160a01b0360208201351690604001356113a1565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6102326113e7565b6102326004803603606081101561044757600080fd5b508035906001600160a01b0360208201351690604001356113ed565b61046b6115cc565b604080516001600160a01b039092168252519081900360200190f35b6102326004803603604081101561049d57600080fd5b50803590602001356001600160a01b03166115db565b6104bb61168b565b604080519115158252519081900360200190f35b610232600480360360408110156104e557600080fd5b50803590602001356001600160a01b031661169c565b6102286004803603602081101561051157600080fd5b503561171b565b6102286004803603604081101561052e57600080fd5b50803590602001356117b6565b6102286004803603606081101561055157600080fd5b50803590602081013590604001356119ba565b6102326004803603602081101561057a57600080fd5b50356001600160a01b0316611c99565b610232611cc8565b610232611cce565b610232611dba565b61046b611e9f565b610228600480360360208110156105c057600080fd5b50356001600160a01b0316611eae565b610228600480360360c08110156105e657600080fd5b60408051606081810183528435946001600160a01b0360208201351694810193909260a08401929091840190600390839083908082843760009201919091525091945050503515159050611f09565b6002548390811061067f576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b600054600160a01b900460ff166106dd576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff60a01b1916905560048210610734576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b60006002858154811061074357fe5b600091825260208083208884526004808352604080862033875290935291842060059093020193508590811061077557fe5b6004020190506107848661110b565b6001810154156107f95760006107d482600201546107c864e8d4a510006107bc8760030154876001015461216090919063ffffffff16565b9063ffffffff6121c216565b9063ffffffff61220416565b905080156107f75760038201546107f1908263ffffffff61224616565b60038301555b505b841561087657815461081c906001600160a01b031633308863ffffffff6122a016565b805461082e908663ffffffff61224616565b8155600061083d8787876122fa565b6001830154909150610855908263ffffffff61224616565b6001830155600483015461086f908263ffffffff61224616565b6004840155505b61089a64e8d4a510006107bc8460030154846001015461216090919063ffffffff16565b6002820155604080518681529051879133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350506000805460ff60a01b1916600160a01b17905550505050565b6002545b90565b6005602052816000526040600020818154811061091157fe5b600091825260209091206002909102018054600190910154909250905082565b61093961168b565b610980576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b6109886112c7565b62015180810260088190556109a490429063ffffffff61224616565b600a55600854600154604080516370a0823160e01b81523060048201529051610a3893926107bc9287926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610a0057600080fd5b505afa158015610a14573d6000803e3d6000fd5b505050506040513d6020811015610a2a57600080fd5b50519063ffffffff61224616565b600955600154604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a9557600080fd5b505af1158015610aa9573d6000803e3d6000fd5b505050506040513d6020811015610abf57600080fd5b5051610b12576040805162461bcd60e51b815260206004820181905260248201527f4164646974696f6e616c2062656c6c61207472616e73666572206661696c6564604482015290519081900360640190fd5b5050565b60095481565b60028181548110610b2957fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b60065481565b60025482908110610bb4576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b610bbc61168b565b610c03576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b610c0b6112c7565b610c4e82610c4260028681548110610c1f57fe5b90600052602060002090600502016001015460065461220490919063ffffffff16565b9063ffffffff61224616565b6006819055508160028481548110610c6257fe5b906000526020600020906005020160010181905550505050565b60025482908110610cc6576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b600054600160a01b900460ff16610d24576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff60a01b1916905560048210610d7b576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b600060028481548110610d8a57fe5b6000918252602080832087845260048083526040808620338752909352918420600590930201935085908110610dbc57fe5b600402019050600081600001549050610de68260010154846004015461220490919063ffffffff16565b60048401556000808355600183018190556002830181905560038301558254610e1f906001600160a01b0316338363ffffffff6123b616565b604080518281529051879133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350506000805460ff60a01b1916600160a01b17905550505050565b336000908152600560205260408120815b8154811015610f3a576000828281548110610e9957fe5b90600052602060002090600202019050828281548110610eb557fe5b906000526020600020906002020160000154600014158015610ef4575042838381548110610edf57fe5b90600052602060002090600202016001015411155b15610f31578054610f0c90859063ffffffff61224616565b9350828281548110610f1a57fe5b600091825260208220600290910201818155600101555b50600101610e82565b50610f453383612408565b8054600f1015610b12576000805b8254811015610f9157828181548110610f6857fe5b90600052602060002090600202016000015460001415610f89576001909101905b600101610f53565b506005811015610fa357505050611096565b60005b825481101561109157828181548110610fbb57fe5b9060005260206000209060020201600001546000141561108857825483906000198101908110610fe757fe5b90600052602060002090600202016000015483828154811061100557fe5b600091825260209091206002909102015582548390600019810190811061102857fe5b90600052602060002090600202016001015483828154811061104657fe5b9060005260206000209060020201600101819055508280548061106557fe5b60008281526020812060026000199093019283020181815560010155905561108c565b6001015b610fa6565b505050505b565b600254819081106110e2576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60005b6004811015611100576110f883826117b6565b6001016110e5565b505050565b600a5481565b60025481908110611155576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60006002838154811061116457fe5b9060005260206000209060050201905080600201544211158061118c57508060020154600a54145b156111975750610b12565b60048101546111ac5742600290910155610b12565b6003810154600a5442111561124f5760006111d68360020154600a5461220490919063ffffffff16565b905060006112096006546107bc86600101546111fd8660095461216090919063ffffffff16565b9063ffffffff61216016565b905061123b61122e85600401546107bc64e8d4a510008561216090919063ffffffff16565b849063ffffffff61224616565b60038501555050600a546002830155611091565b600061126883600201544261220490919063ffffffff16565b9050600061128f6006546107bc86600101546111fd8660095461216090919063ffffffff16565b90506112b461122e85600401546107bc64e8d4a510008561216090919063ffffffff16565b6003850155505042600283015550505050565b60025460005b81811015610b12576112de8161110b565b6001016112cd565b600360205281600052604060002081600381106112ff57fe5b01549150829050565b61131061168b565b611357576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600460205282600052604060002060205281600052604060002081600481106113c657fe5b60040201805460018201546002830154600390930154919550935090915084565b60075481565b6002546000908490811061143a576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60048310611484576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b60006002868154811061149357fe5b60009182526020808320898452600480835260408086206001600160a01b038c1687529093529184206005909302019350869081106114ce57fe5b6004020190506000826003015490508260020154421180156114f35750600483015415155b80156115055750600a54836002015414155b15611598576000600a54421161153057600284015461152b90429063ffffffff61220416565b611547565b6002840154600a546115479163ffffffff61220416565b9050600061156e6006546107bc87600101546111fd8660095461216090919063ffffffff16565b905061159361122e86600401546107bc64e8d4a510008561216090919063ffffffff16565b925050505b6115c082600201546107c864e8d4a510006107bc85876001015461216090919063ffffffff16565b98975050505050505050565b6000546001600160a01b031690565b60025460009083908110611628576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b6000805b60048110156116825760008681526004602081815260408084206001600160a01b038a168552909152909120611678918390811061166657fe5b6004020154839063ffffffff61224616565b915060010161162c565b50949350505050565b6000546001600160a01b0316331490565b600254600090839081106116e9576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b6000805b6004811015611682576117116117048787846113ed565b839063ffffffff61224616565b91506001016116ed565b60025481908110611765576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60005b60048110156111005760008381526004602081815260408084203385529091528220908390811061179557fe5b6004020154905080156117ad576117ad8482846119ba565b50600101611768565b60048110611800576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b60008281526004602081815260408084203385529091528220908390811061182457fe5b6004020190506118338361110b565b61183b6129b7565b6002848154811061184857fe5b600091825260208083206040805160a081018252600590940290910180546001600160a01b031684526001808201549385019390935260028082015492850192909252600381015460608501819052600490910154608085015290860154918601549294506118cb926107c89164e8d4a51000916107bc9163ffffffff61216016565b905080156118ee5760038301546118e8908263ffffffff61224616565b60038401555b61191264e8d4a510006107bc8460600151866001015461216090919063ffffffff16565b6002840155600061192285612598565b90508061194457600384018054600090915561193e3382612408565b506119b2565b6003840180546000918290553382526005602090815260409283902083518085019094528284529192829181016119864262015180880263ffffffff61224616565b905281546001818101845560009384526020938490208351600290930201918255929091015191015550505b505050505050565b60025483908110611a04576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b600054600160a01b900460ff16611a62576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff60a01b1916905560048210611ab9576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b600060028581548110611ac857fe5b6000918252602080832088845260048083526040808620338752909352918420600590930201935085908110611afa57fe5b6004020190508481600001541015611b4e576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b611b578661110b565b6000611b8582600201546107c864e8d4a510006107bc8760030154876001015461216090919063ffffffff16565b90508015611ba8576003820154611ba2908263ffffffff61224616565b60038301555b8515611c1d578154611bc0908763ffffffff61220416565b82556000611bcf8888886122fa565b6004850154909150611be7908263ffffffff61220416565b60048501558254611bfa908990886122fa565b60018401558354611c1b906001600160a01b0316338963ffffffff6123b616565b505b611c4164e8d4a510006107bc8560030154856001015461216090919063ffffffff16565b6002830155604080518781529051889133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350506000805460ff60a01b1916600160a01b1790555050505050565b600080805b600254811015611cbf57611cb5611704828661169c565b9150600101611c9e565b5090505b919050565b60085481565b33600090815260056020908152604080832080548251818502810185019093528083528493606093929190859084015b82821015611d4457838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611cfe565b509293506000925050505b8151811015611db257611d606129ef565b828281518110611d6c57fe5b602002602001015190508060000151600014158015611d8e5750428160200151115b15611da9578051611da690859063ffffffff61224616565b93505b50600101611d4f565b509091505090565b33600090815260056020908152604080832080548251818502810185019093528083528493606093929190859084015b82821015611e3057838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611dea565b509293506000925050505b8151811015611db257611e4c6129ef565b828281518110611e5857fe5b602002602001015190508060000151600014158015611e7b575042816020015111155b15611e96578051611e9390859063ffffffff61224616565b93505b50600101611e3b565b6001546001600160a01b031681565b611eb661168b565b611efd576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b611f0681612611565b50565b611f1161168b565b611f58576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b8015611f6657611f666112c7565b60005b6003811015611fed576064838260038110611f8057fe5b602002015110158015611fa4575060c8838260038110611f9c57fe5b602002015111155b611fe5576040805162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a5908189bdbdcdd609a1b604482015290519081900360640190fd5b600101611f69565b506000600754421161200157600754612003565b425b600654909150612019908663ffffffff61224616565b60065582600360006120296108f1565b81526020810191909152604001600020612044916003612a09565b506040805160a0810182526001600160a01b039586168152602081019687529081019182526000606082018181526080830182815260028054600181018255935292517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600590930292830180546001600160a01b031916919098161790965595517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf87015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad086015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad18501555050517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad290910155565b60008261216f575060006121bc565b8282028284828161217c57fe5b04146121b95760405162461bcd60e51b8152600401808060200182810382526021815260200180612a866021913960400191505060405180910390fd5b90505b92915050565b60006121b983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126c7565b60006121b983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612769565b6000828201838110156121b9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526110919085906127c3565b6000816123085750816123af565b81600114156123365760008481526003602052604081206064915b015484028161232e57fe5b0490506123af565b81600214156123575760008481526003602052604090206064906001612323565b81600314156123785760008481526003602052604090206064906002612323565b60405162461bcd60e51b8152600401808060200182810382526025815260200180612ad16025913960400191505060405180910390fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111009084906127c3565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561245357600080fd5b505afa158015612467573d6000803e3d6000fd5b505050506040513d602081101561247d57600080fd5b5051905080821115612511576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156124df57600080fd5b505af11580156124f3573d6000803e3d6000fd5b505050506040513d602081101561250957600080fd5b506111009050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561256757600080fd5b505af115801561257b573d6000803e3d6000fd5b505050506040513d602081101561259157600080fd5b5050505050565b6000816125a757506000611cc3565b81600114156125b857506007611cc3565b81600214156125c95750600f611cc3565b81600314156125da5750601e611cc3565b60405162461bcd60e51b8152600401808060200182810382526024815260200180612a626024913960400191505060405180910390fd5b6001600160a01b03811661266c576040805162461bcd60e51b815260206004820152601d60248201527f4f776e65722073686f756c64206e6f7420626520302061646472657373000000604482015290519081900360640190fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836127535760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612718578181015183820152602001612700565b50505050905090810190601f1680156127455780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161275f57fe5b0495945050505050565b600081848411156127bb5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612718578181015183820152602001612700565b505050900390565b6127d5826001600160a01b031661297b565b612826576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106128645780518252601f199092019160209182019101612845565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146128c6576040519150601f19603f3d011682016040523d82523d6000602084013e6128cb565b606091505b509150915081612922576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156110915780806020019051602081101561293e57600080fd5b50516110915760405162461bcd60e51b815260040180806020018281038252602a815260200180612aa7602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906129af57508115155b949350505050565b6040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b8260038101928215612a37579160200282015b82811115612a37578251825591602001919060010190612a1c565b50612a43929150612a47565b5090565b6108f591905b80821115612a435760008155600101612a4d56fe67657444656c617946726f6d547970653a20696e76616c696420736176696e6754797065536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564746f456666656374697665416d6f756e743a20696e76616c696420736176696e6754797065a265627a7a72315820d511b8bbd3047113655df49984b2582f985e33b3162a98e6ab2fc10e19317f6064736f6c634300050f0032000000000000000000000000a91ac63d040deb1b7a5e4d4134ad23eb0ba07e1400000000000000000000000000000000000000000000000000000000602127c000000000000000000000000010f919f874db00239a1f891d96279ff999514b82
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fa5760003560e01c80637223c8c91161011a5780639f0aab78116100ad578063bf7f33271161007c578063bf7f332714610592578063c200b4b01461059a578063d6935831146105a2578063f2fde38b146105aa578063fc7bfea8146105d0576101fa565b80639f0aab7814610518578063a41fe49f1461053b578063b7c3c8c314610564578063ba2c1f4f1461058a576101fa565b80638defa23a116100e95780638defa23a146104875780638f32d59b146104b357806394f2bd49146104cf578063958e2d31146104fb576101fa565b80637223c8c9146103d157806378e97925146104295780637aea9af6146104315780638da5cb5b14610463576101fa565b80631f276b6e1161019257806351eb05a61161016157806351eb05a614610381578063630b5ba11461039e5780636d2e8b13146103a6578063715018a6146103c9576101fa565b80631f276b6e146103315780633591f63b14610354578063364ef3cc1461035c5780635003a9a514610379576101fa565b806314ad6ba1116101ce57806314ad6ba1146102ac5780631526fe27146102b457806317caf6f1146103065780631ab06ee51461030e576101fa565b8062aeef8a146101ff578063081e3eda1461022a578063120205e1146102445780631338736f14610289575b600080fd5b6102286004803603606081101561021557600080fd5b5080359060208101359060400135610635565b005b6102326108f1565b60408051918252519081900360200190f35b6102706004803603604081101561025a57600080fd5b506001600160a01b0381351690602001356108f8565b6040805192835260208301919091528051918290030190f35b6102286004803603604081101561029f57600080fd5b5080359060200135610931565b610232610b16565b6102d1600480360360208110156102ca57600080fd5b5035610b1c565b604080516001600160a01b03909616865260208601949094528484019290925260608401526080830152519081900360a00190f35b610232610b64565b6102286004803603604081101561032457600080fd5b5080359060200135610b6a565b6102286004803603604081101561034757600080fd5b5080359060200135610c7c565b610228610e71565b6102286004803603602081101561037257600080fd5b5035611098565b610232611105565b6102286004803603602081101561039757600080fd5b503561110b565b6102286112c7565b610232600480360360408110156103bc57600080fd5b50803590602001356112e6565b610228611308565b610403600480360360608110156103e757600080fd5b508035906001600160a01b0360208201351690604001356113a1565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6102326113e7565b6102326004803603606081101561044757600080fd5b508035906001600160a01b0360208201351690604001356113ed565b61046b6115cc565b604080516001600160a01b039092168252519081900360200190f35b6102326004803603604081101561049d57600080fd5b50803590602001356001600160a01b03166115db565b6104bb61168b565b604080519115158252519081900360200190f35b610232600480360360408110156104e557600080fd5b50803590602001356001600160a01b031661169c565b6102286004803603602081101561051157600080fd5b503561171b565b6102286004803603604081101561052e57600080fd5b50803590602001356117b6565b6102286004803603606081101561055157600080fd5b50803590602081013590604001356119ba565b6102326004803603602081101561057a57600080fd5b50356001600160a01b0316611c99565b610232611cc8565b610232611cce565b610232611dba565b61046b611e9f565b610228600480360360208110156105c057600080fd5b50356001600160a01b0316611eae565b610228600480360360c08110156105e657600080fd5b60408051606081810183528435946001600160a01b0360208201351694810193909260a08401929091840190600390839083908082843760009201919091525091945050503515159050611f09565b6002548390811061067f576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b600054600160a01b900460ff166106dd576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff60a01b1916905560048210610734576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b60006002858154811061074357fe5b600091825260208083208884526004808352604080862033875290935291842060059093020193508590811061077557fe5b6004020190506107848661110b565b6001810154156107f95760006107d482600201546107c864e8d4a510006107bc8760030154876001015461216090919063ffffffff16565b9063ffffffff6121c216565b9063ffffffff61220416565b905080156107f75760038201546107f1908263ffffffff61224616565b60038301555b505b841561087657815461081c906001600160a01b031633308863ffffffff6122a016565b805461082e908663ffffffff61224616565b8155600061083d8787876122fa565b6001830154909150610855908263ffffffff61224616565b6001830155600483015461086f908263ffffffff61224616565b6004840155505b61089a64e8d4a510006107bc8460030154846001015461216090919063ffffffff16565b6002820155604080518681529051879133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350506000805460ff60a01b1916600160a01b17905550505050565b6002545b90565b6005602052816000526040600020818154811061091157fe5b600091825260209091206002909102018054600190910154909250905082565b61093961168b565b610980576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b6109886112c7565b62015180810260088190556109a490429063ffffffff61224616565b600a55600854600154604080516370a0823160e01b81523060048201529051610a3893926107bc9287926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610a0057600080fd5b505afa158015610a14573d6000803e3d6000fd5b505050506040513d6020811015610a2a57600080fd5b50519063ffffffff61224616565b600955600154604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a9557600080fd5b505af1158015610aa9573d6000803e3d6000fd5b505050506040513d6020811015610abf57600080fd5b5051610b12576040805162461bcd60e51b815260206004820181905260248201527f4164646974696f6e616c2062656c6c61207472616e73666572206661696c6564604482015290519081900360640190fd5b5050565b60095481565b60028181548110610b2957fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b60065481565b60025482908110610bb4576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b610bbc61168b565b610c03576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b610c0b6112c7565b610c4e82610c4260028681548110610c1f57fe5b90600052602060002090600502016001015460065461220490919063ffffffff16565b9063ffffffff61224616565b6006819055508160028481548110610c6257fe5b906000526020600020906005020160010181905550505050565b60025482908110610cc6576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b600054600160a01b900460ff16610d24576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff60a01b1916905560048210610d7b576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b600060028481548110610d8a57fe5b6000918252602080832087845260048083526040808620338752909352918420600590930201935085908110610dbc57fe5b600402019050600081600001549050610de68260010154846004015461220490919063ffffffff16565b60048401556000808355600183018190556002830181905560038301558254610e1f906001600160a01b0316338363ffffffff6123b616565b604080518281529051879133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350506000805460ff60a01b1916600160a01b17905550505050565b336000908152600560205260408120815b8154811015610f3a576000828281548110610e9957fe5b90600052602060002090600202019050828281548110610eb557fe5b906000526020600020906002020160000154600014158015610ef4575042838381548110610edf57fe5b90600052602060002090600202016001015411155b15610f31578054610f0c90859063ffffffff61224616565b9350828281548110610f1a57fe5b600091825260208220600290910201818155600101555b50600101610e82565b50610f453383612408565b8054600f1015610b12576000805b8254811015610f9157828181548110610f6857fe5b90600052602060002090600202016000015460001415610f89576001909101905b600101610f53565b506005811015610fa357505050611096565b60005b825481101561109157828181548110610fbb57fe5b9060005260206000209060020201600001546000141561108857825483906000198101908110610fe757fe5b90600052602060002090600202016000015483828154811061100557fe5b600091825260209091206002909102015582548390600019810190811061102857fe5b90600052602060002090600202016001015483828154811061104657fe5b9060005260206000209060020201600101819055508280548061106557fe5b60008281526020812060026000199093019283020181815560010155905561108c565b6001015b610fa6565b505050505b565b600254819081106110e2576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60005b6004811015611100576110f883826117b6565b6001016110e5565b505050565b600a5481565b60025481908110611155576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60006002838154811061116457fe5b9060005260206000209060050201905080600201544211158061118c57508060020154600a54145b156111975750610b12565b60048101546111ac5742600290910155610b12565b6003810154600a5442111561124f5760006111d68360020154600a5461220490919063ffffffff16565b905060006112096006546107bc86600101546111fd8660095461216090919063ffffffff16565b9063ffffffff61216016565b905061123b61122e85600401546107bc64e8d4a510008561216090919063ffffffff16565b849063ffffffff61224616565b60038501555050600a546002830155611091565b600061126883600201544261220490919063ffffffff16565b9050600061128f6006546107bc86600101546111fd8660095461216090919063ffffffff16565b90506112b461122e85600401546107bc64e8d4a510008561216090919063ffffffff16565b6003850155505042600283015550505050565b60025460005b81811015610b12576112de8161110b565b6001016112cd565b600360205281600052604060002081600381106112ff57fe5b01549150829050565b61131061168b565b611357576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600460205282600052604060002060205281600052604060002081600481106113c657fe5b60040201805460018201546002830154600390930154919550935090915084565b60075481565b6002546000908490811061143a576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60048310611484576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b60006002868154811061149357fe5b60009182526020808320898452600480835260408086206001600160a01b038c1687529093529184206005909302019350869081106114ce57fe5b6004020190506000826003015490508260020154421180156114f35750600483015415155b80156115055750600a54836002015414155b15611598576000600a54421161153057600284015461152b90429063ffffffff61220416565b611547565b6002840154600a546115479163ffffffff61220416565b9050600061156e6006546107bc87600101546111fd8660095461216090919063ffffffff16565b905061159361122e86600401546107bc64e8d4a510008561216090919063ffffffff16565b925050505b6115c082600201546107c864e8d4a510006107bc85876001015461216090919063ffffffff16565b98975050505050505050565b6000546001600160a01b031690565b60025460009083908110611628576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b6000805b60048110156116825760008681526004602081815260408084206001600160a01b038a168552909152909120611678918390811061166657fe5b6004020154839063ffffffff61224616565b915060010161162c565b50949350505050565b6000546001600160a01b0316331490565b600254600090839081106116e9576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b6000805b6004811015611682576117116117048787846113ed565b839063ffffffff61224616565b91506001016116ed565b60025481908110611765576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b60005b60048110156111005760008381526004602081815260408084203385529091528220908390811061179557fe5b6004020154905080156117ad576117ad8482846119ba565b50600101611768565b60048110611800576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b60008281526004602081815260408084203385529091528220908390811061182457fe5b6004020190506118338361110b565b61183b6129b7565b6002848154811061184857fe5b600091825260208083206040805160a081018252600590940290910180546001600160a01b031684526001808201549385019390935260028082015492850192909252600381015460608501819052600490910154608085015290860154918601549294506118cb926107c89164e8d4a51000916107bc9163ffffffff61216016565b905080156118ee5760038301546118e8908263ffffffff61224616565b60038401555b61191264e8d4a510006107bc8460600151866001015461216090919063ffffffff16565b6002840155600061192285612598565b90508061194457600384018054600090915561193e3382612408565b506119b2565b6003840180546000918290553382526005602090815260409283902083518085019094528284529192829181016119864262015180880263ffffffff61224616565b905281546001818101845560009384526020938490208351600290930201918255929091015191015550505b505050505050565b60025483908110611a04576040805162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c1bdbdb081a59608a1b604482015290519081900360640190fd5b600054600160a01b900460ff16611a62576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6000805460ff60a01b1916905560048210611ab9576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420736176696e675479706560701b604482015290519081900360640190fd5b600060028581548110611ac857fe5b6000918252602080832088845260048083526040808620338752909352918420600590930201935085908110611afa57fe5b6004020190508481600001541015611b4e576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b611b578661110b565b6000611b8582600201546107c864e8d4a510006107bc8760030154876001015461216090919063ffffffff16565b90508015611ba8576003820154611ba2908263ffffffff61224616565b60038301555b8515611c1d578154611bc0908763ffffffff61220416565b82556000611bcf8888886122fa565b6004850154909150611be7908263ffffffff61220416565b60048501558254611bfa908990886122fa565b60018401558354611c1b906001600160a01b0316338963ffffffff6123b616565b505b611c4164e8d4a510006107bc8560030154856001015461216090919063ffffffff16565b6002830155604080518781529051889133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a350506000805460ff60a01b1916600160a01b1790555050505050565b600080805b600254811015611cbf57611cb5611704828661169c565b9150600101611c9e565b5090505b919050565b60085481565b33600090815260056020908152604080832080548251818502810185019093528083528493606093929190859084015b82821015611d4457838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611cfe565b509293506000925050505b8151811015611db257611d606129ef565b828281518110611d6c57fe5b602002602001015190508060000151600014158015611d8e5750428160200151115b15611da9578051611da690859063ffffffff61224616565b93505b50600101611d4f565b509091505090565b33600090815260056020908152604080832080548251818502810185019093528083528493606093929190859084015b82821015611e3057838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190611dea565b509293506000925050505b8151811015611db257611e4c6129ef565b828281518110611e5857fe5b602002602001015190508060000151600014158015611e7b575042816020015111155b15611e96578051611e9390859063ffffffff61224616565b93505b50600101611e3b565b6001546001600160a01b031681565b611eb661168b565b611efd576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b611f0681612611565b50565b611f1161168b565b611f58576040805162461bcd60e51b815260206004820152601360248201527213db9b1e481bdddb995c8818d85b8818d85b1b606a1b604482015290519081900360640190fd5b8015611f6657611f666112c7565b60005b6003811015611fed576064838260038110611f8057fe5b602002015110158015611fa4575060c8838260038110611f9c57fe5b602002015111155b611fe5576040805162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a5908189bdbdcdd609a1b604482015290519081900360640190fd5b600101611f69565b506000600754421161200157600754612003565b425b600654909150612019908663ffffffff61224616565b60065582600360006120296108f1565b81526020810191909152604001600020612044916003612a09565b506040805160a0810182526001600160a01b039586168152602081019687529081019182526000606082018181526080830182815260028054600181018255935292517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600590930292830180546001600160a01b031916919098161790965595517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf87015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad086015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad18501555050517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad290910155565b60008261216f575060006121bc565b8282028284828161217c57fe5b04146121b95760405162461bcd60e51b8152600401808060200182810382526021815260200180612a866021913960400191505060405180910390fd5b90505b92915050565b60006121b983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126c7565b60006121b983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612769565b6000828201838110156121b9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526110919085906127c3565b6000816123085750816123af565b81600114156123365760008481526003602052604081206064915b015484028161232e57fe5b0490506123af565b81600214156123575760008481526003602052604090206064906001612323565b81600314156123785760008481526003602052604090206064906002612323565b60405162461bcd60e51b8152600401808060200182810382526025815260200180612ad16025913960400191505060405180910390fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111009084906127c3565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561245357600080fd5b505afa158015612467573d6000803e3d6000fd5b505050506040513d602081101561247d57600080fd5b5051905080821115612511576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156124df57600080fd5b505af11580156124f3573d6000803e3d6000fd5b505050506040513d602081101561250957600080fd5b506111009050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561256757600080fd5b505af115801561257b573d6000803e3d6000fd5b505050506040513d602081101561259157600080fd5b5050505050565b6000816125a757506000611cc3565b81600114156125b857506007611cc3565b81600214156125c95750600f611cc3565b81600314156125da5750601e611cc3565b60405162461bcd60e51b8152600401808060200182810382526024815260200180612a626024913960400191505060405180910390fd5b6001600160a01b03811661266c576040805162461bcd60e51b815260206004820152601d60248201527f4f776e65722073686f756c64206e6f7420626520302061646472657373000000604482015290519081900360640190fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836127535760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612718578181015183820152602001612700565b50505050905090810190601f1680156127455780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161275f57fe5b0495945050505050565b600081848411156127bb5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612718578181015183820152602001612700565b505050900390565b6127d5826001600160a01b031661297b565b612826576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106128645780518252601f199092019160209182019101612845565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146128c6576040519150601f19603f3d011682016040523d82523d6000602084013e6128cb565b606091505b509150915081612922576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156110915780806020019051602081101561293e57600080fd5b50516110915760405162461bcd60e51b815260040180806020018281038252602a815260200180612aa7602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906129af57508115155b949350505050565b6040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b8260038101928215612a37579160200282015b82811115612a37578251825591602001919060010190612a1c565b50612a43929150612a47565b5090565b6108f591905b80821115612a435760008155600101612a4d56fe67657444656c617946726f6d547970653a20696e76616c696420736176696e6754797065536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564746f456666656374697665416d6f756e743a20696e76616c696420736176696e6754797065a265627a7a72315820d511b8bbd3047113655df49984b2582f985e33b3162a98e6ab2fc10e19317f6064736f6c634300050f0032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a91ac63d040deb1b7a5e4d4134ad23eb0ba07e1400000000000000000000000000000000000000000000000000000000602127c000000000000000000000000010f919f874db00239a1f891d96279ff999514b82
-----Decoded View---------------
Arg [0] : _bella (address): 0xA91ac63D040dEB1b7A5E4d4134aD23eb0ba07e14
Arg [1] : _startTime (uint256): 1612785600
Arg [2] : governance (address): 0x10f919f874dB00239a1f891d96279Ff999514B82
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a91ac63d040deb1b7a5e4d4134ad23eb0ba07e14
Arg [1] : 00000000000000000000000000000000000000000000000000000000602127c0
Arg [2] : 00000000000000000000000010f919f874db00239a1f891d96279ff999514b82
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.608404 | 818,472.1432 | $497,961.73 |
Loading...
Loading
[ 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.