Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,210 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Register Account... | 21338436 | 71 days ago | IN | 0 ETH | 0.00168643 | ||||
Register Account... | 21241314 | 85 days ago | IN | 0 ETH | 0.00162914 | ||||
Register Account... | 21081756 | 107 days ago | IN | 0 ETH | 0.00059001 | ||||
Vote | 20947266 | 126 days ago | IN | 0 ETH | 0.00054956 | ||||
Register Account... | 20938627 | 127 days ago | IN | 0 ETH | 0.00050865 | ||||
Register Account... | 20937100 | 127 days ago | IN | 0 ETH | 0.00182914 | ||||
Vote | 20925449 | 129 days ago | IN | 0 ETH | 0.00094513 | ||||
Vote | 20881687 | 135 days ago | IN | 0 ETH | 0.00052925 | ||||
Register Account... | 20879955 | 135 days ago | IN | 0 ETH | 0.00268518 | ||||
Register Account... | 20874651 | 136 days ago | IN | 0 ETH | 0.00038284 | ||||
Register Account... | 20867534 | 137 days ago | IN | 0 ETH | 0.00034348 | ||||
Register Account... | 20826038 | 143 days ago | IN | 0 ETH | 0.00115276 | ||||
Register Account... | 20789178 | 148 days ago | IN | 0 ETH | 0.0003479 | ||||
Register Account... | 20786475 | 148 days ago | IN | 0 ETH | 0.00367428 | ||||
Register Account... | 20759573 | 152 days ago | IN | 0 ETH | 0.00043184 | ||||
Register Account... | 20731502 | 156 days ago | IN | 0 ETH | 0.00014872 | ||||
Register Account... | 20618786 | 171 days ago | IN | 0 ETH | 0.00006646 | ||||
Register Account... | 20611146 | 173 days ago | IN | 0 ETH | 0.00019278 | ||||
Register Account... | 20605892 | 173 days ago | IN | 0 ETH | 0.00006824 | ||||
Vote | 20582628 | 177 days ago | IN | 0 ETH | 0.0001184 | ||||
Register Account... | 20582614 | 177 days ago | IN | 0 ETH | 0.00009493 | ||||
Register Account... | 20574806 | 178 days ago | IN | 0 ETH | 0.00004779 | ||||
Register Account... | 20559449 | 180 days ago | IN | 0 ETH | 0.00006784 | ||||
Register Account... | 20557347 | 180 days ago | IN | 0 ETH | 0.00031331 | ||||
Register Account... | 20556229 | 180 days ago | IN | 0 ETH | 0.00009073 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
IncentiveVoting
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "DelegatedOps.sol"; import "SystemStart.sol"; import "ITokenLocker.sol"; /** @title Prisma Incentive Voting @notice Users with PRISMA balances locked in `TokenLocker` may register their lock weights in this contract, and use this weight to vote on where new PRISMA emissions will be released in the following week. Conceptually, incentive voting functions similarly to Curve's gauge weight voting. */ contract IncentiveVoting is DelegatedOps, SystemStart { uint256 public constant MAX_POINTS = 10000; // must be less than 2**16 or things will break uint256 public constant MAX_LOCK_WEEKS = 52; // must be the same as `MultiLocker` ITokenLocker public immutable tokenLocker; address public immutable vault; struct AccountData { // system week when the account's lock weights were registered // used to offset `weeksToUnlock` when calculating vote weight // as it decays over time uint16 week; // total registered vote weight, only recorded when frozen. // for unfrozen weight, recording the total is unnecessary because the // value decays. throughout the code, we check if frozenWeight > 0 as // a way to indicate if a lock is frozen. uint40 frozenWeight; uint16 points; uint8 lockLength; // length of weeksToUnlock and lockedAmounts uint16 voteLength; // length of activeVotes // array of [(receiver id, points), ... ] stored as uint16[2] for optimal packing uint16[2][MAX_POINTS] activeVotes; // arrays map to one another: lockedAmounts[0] unlocks in weeksToUnlock[0] weeks // values are sorted by time-to-unlock descending uint32[MAX_LOCK_WEEKS] lockedAmounts; uint8[MAX_LOCK_WEEKS] weeksToUnlock; } struct Vote { uint256 id; uint256 points; } struct LockData { uint256 amount; uint256 weeksToUnlock; } mapping(address => AccountData) accountLockData; uint256 public receiverCount; // id -> receiver data uint32[65535] public receiverDecayRate; uint16[65535] public receiverUpdatedWeek; // id -> week -> absolute vote weight uint40[65535][65535] receiverWeeklyWeights; // id -> week -> registered lock weight that is lost uint32[65535][65535] public receiverWeeklyUnlocks; uint32 public totalDecayRate; uint16 public totalUpdatedWeek; uint40[65535] totalWeeklyWeights; uint32[65535] public totalWeeklyUnlocks; // emitted each time an account's lock weight is registered event AccountWeightRegistered( address indexed account, uint256 indexed week, uint256 frozenBalance, ITokenLocker.LockData[] registeredLockData ); // emitted each time an account submits one or more new votes. only includes // vote points for the current call, for a complete list of an account's votes // you must join all instances of this event that fired more recently than the // latest `ClearedVotes` for the the same account. event NewVotes(address indexed account, uint256 indexed week, Vote[] newVotes, uint256 totalPointsUsed); // emitted each time the votes for `account` are cleared event ClearedVotes(address indexed account, uint256 indexed week); constructor(address _prismaCore, ITokenLocker _tokenLocker, address _vault) SystemStart(_prismaCore) { tokenLocker = _tokenLocker; vault = _vault; } function getAccountRegisteredLocks( address account ) external view returns (uint256 frozenWeight, LockData[] memory lockData) { return (accountLockData[account].frozenWeight, _getAccountLocks(account)); } function getAccountCurrentVotes(address account) public view returns (Vote[] memory votes) { votes = new Vote[](accountLockData[account].voteLength); uint16[2][MAX_POINTS] storage storedVotes = accountLockData[account].activeVotes; uint256 length = votes.length; for (uint256 i = 0; i < length; i++) { votes[i] = Vote({ id: storedVotes[i][0], points: storedVotes[i][1] }); } return votes; } function getReceiverWeight(uint256 idx) external view returns (uint256) { return getReceiverWeightAt(idx, getWeek()); } function getReceiverWeightAt(uint256 idx, uint256 week) public view returns (uint256) { if (idx >= receiverCount) return 0; uint256 rate = receiverDecayRate[idx]; uint256 updatedWeek = receiverUpdatedWeek[idx]; if (week <= updatedWeek) return receiverWeeklyWeights[idx][week]; uint256 weight = receiverWeeklyWeights[idx][updatedWeek]; if (weight == 0) return 0; while (updatedWeek < week) { updatedWeek++; weight -= rate; rate -= receiverWeeklyUnlocks[idx][updatedWeek]; } return weight; } function getTotalWeight() external view returns (uint256) { return getTotalWeightAt(getWeek()); } function getTotalWeightAt(uint256 week) public view returns (uint256) { uint256 rate = totalDecayRate; uint256 updatedWeek = totalUpdatedWeek; if (week <= updatedWeek) return totalWeeklyWeights[week]; uint256 weight = totalWeeklyWeights[updatedWeek]; if (weight == 0) return 0; while (updatedWeek < week) { updatedWeek++; weight -= rate; rate -= totalWeeklyUnlocks[updatedWeek]; } return weight; } function getReceiverWeightWrite(uint256 idx) public returns (uint256) { require(idx < receiverCount, "Invalid ID"); uint256 week = getWeek(); uint256 updatedWeek = receiverUpdatedWeek[idx]; uint256 weight = receiverWeeklyWeights[idx][updatedWeek]; if (weight == 0) { receiverUpdatedWeek[idx] = uint16(week); return 0; } uint256 rate = receiverDecayRate[idx]; while (updatedWeek < week) { updatedWeek++; weight -= rate; receiverWeeklyWeights[idx][updatedWeek] = uint40(weight); rate -= receiverWeeklyUnlocks[idx][updatedWeek]; } receiverDecayRate[idx] = uint32(rate); receiverUpdatedWeek[idx] = uint16(week); return weight; } function getTotalWeightWrite() public returns (uint256) { uint256 week = getWeek(); uint256 updatedWeek = totalUpdatedWeek; uint256 weight = totalWeeklyWeights[updatedWeek]; if (weight == 0) { totalUpdatedWeek = uint16(week); return 0; } uint256 rate = totalDecayRate; while (updatedWeek < week) { updatedWeek++; weight -= rate; totalWeeklyWeights[updatedWeek] = uint40(weight); rate -= totalWeeklyUnlocks[updatedWeek]; } totalDecayRate = uint32(rate); totalUpdatedWeek = uint16(week); return weight; } function getReceiverVotePct(uint256 id, uint256 week) external returns (uint256) { week -= 1; getReceiverWeightWrite(id); getTotalWeightWrite(); uint256 totalWeight = totalWeeklyWeights[week]; if (totalWeight == 0) return 0; return (1e18 * uint256(receiverWeeklyWeights[id][week])) / totalWeight; } function registerNewReceiver() external returns (uint256) { require(msg.sender == vault, "Not Treasury"); uint256 id = receiverCount; receiverUpdatedWeek[id] = uint16(getWeek()); receiverCount = id + 1; return id; } /** @notice Record the current lock weights for `account`, which can then be used to vote. @param minWeeks The minimum number of weeks-to-unlock to record weights for. The more active lock weeks that are registered, the more expensive it will be to vote. Accounts with many active locks may wish to skip smaller locks to reduce gas costs. */ function registerAccountWeight(address account, uint256 minWeeks) external callerOrDelegated(account) { AccountData storage accountData = accountLockData[account]; Vote[] memory existingVotes; // if account has an active vote, clear the recorded vote // weights prior to updating the registered account weights if (accountData.voteLength > 0) { existingVotes = getAccountCurrentVotes(account); _removeVoteWeights(account, existingVotes, accountData.frozenWeight); } // get updated account lock weights and store locally uint256 frozenWeight = _registerAccountWeight(account, minWeeks); // resubmit the account's active vote using the newly registered weights _addVoteWeights(account, existingVotes, frozenWeight); // do not call `_storeAccountVotes` because the vote is unchanged } /** @notice Record the current lock weights for `account` and submit new votes @dev New votes replace any prior active votes @param minWeeks Minimum number of weeks-to-unlock to record weights for @param votes Array of tuples of (recipient id, vote points) */ function registerAccountWeightAndVote( address account, uint256 minWeeks, Vote[] calldata votes ) external callerOrDelegated(account) { AccountData storage accountData = accountLockData[account]; // if account has an active vote, clear the recorded vote // weights prior to updating the registered account weights if (accountData.voteLength > 0) { _removeVoteWeights(account, getAccountCurrentVotes(account), accountData.frozenWeight); emit ClearedVotes(account, getWeek()); } // get updated account lock weights and store locally uint256 frozenWeight = _registerAccountWeight(account, minWeeks); // adjust vote weights based on the account's new vote _addVoteWeights(account, votes, frozenWeight); // store the new account votes _storeAccountVotes(account, accountData, votes, 0, 0); } /** @notice Vote for one or more recipients @dev * Each voter can vote with up to `MAX_POINTS` points * It is not required to use every point in a single call * Votes carry over week-to-week and decay at the same rate as lock weight * The total weight is NOT distributed porportionally based on the points used, an account must allocate all points in order to use it's full vote weight @param votes Array of tuples of (recipient id, vote points) @param clearPrevious if true, the voter's current votes are cleared prior to recording the new votes. If false, new votes are added in addition to previous votes. */ function vote(address account, Vote[] calldata votes, bool clearPrevious) external callerOrDelegated(account) { AccountData storage accountData = accountLockData[account]; uint256 frozenWeight = accountData.frozenWeight; require(frozenWeight > 0 || accountData.lockLength > 0, "No registered weight"); uint256 points; uint256 offset; // optionally clear previous votes if (clearPrevious) { _removeVoteWeights(account, getAccountCurrentVotes(account), frozenWeight); emit ClearedVotes(account, getWeek()); } else { points = accountData.points; offset = accountData.voteLength; } // adjust vote weights based on the new vote _addVoteWeights(account, votes, frozenWeight); // store the new account votes _storeAccountVotes(account, accountData, votes, points, offset); } /** @notice Remove all active votes for the caller */ function clearVote(address account) external callerOrDelegated(account) { AccountData storage accountData = accountLockData[account]; uint256 frozenWeight = accountData.frozenWeight; _removeVoteWeights(account, getAccountCurrentVotes(account), frozenWeight); accountData.voteLength = 0; accountData.points = 0; emit ClearedVotes(account, getWeek()); } /** @notice Clear registered weight and votes for `account` @dev Called by `tokenLocker` when an account performs an early withdrawal of locked tokens, to prevent a registered weight > actual lock weight */ function clearRegisteredWeight(address account) external returns (bool) { require( msg.sender == account || msg.sender == address(tokenLocker) || isApprovedDelegate[account][msg.sender], "Delegate not approved" ); AccountData storage accountData = accountLockData[account]; uint256 week = getWeek(); uint256 length = accountData.lockLength; uint256 frozenWeight = accountData.frozenWeight; if (length > 0 || frozenWeight > 0) { if (accountData.voteLength > 0) { _removeVoteWeights(account, getAccountCurrentVotes(account), frozenWeight); accountData.voteLength = 0; accountData.points = 0; emit ClearedVotes(account, week); } // lockLength and frozenWeight are never both > 0 if (length > 0) accountData.lockLength = 0; else accountData.frozenWeight = 0; emit AccountWeightRegistered(account, week, 0, new ITokenLocker.LockData[](0)); } return true; } /** @notice Set a frozen account weight as unfrozen @dev Callable only by the token locker. This prevents users from registering frozen locks, unfreezing, and having a larger registered vote weight than their actual lock weight. */ function unfreeze(address account, bool keepVote) external returns (bool) { require(msg.sender == address(tokenLocker)); AccountData storage accountData = accountLockData[account]; uint256 frozenWeight = accountData.frozenWeight; // if frozenWeight == 0, the account was not registered so nothing needed if (frozenWeight > 0) { // clear previous votes Vote[] memory existingVotes; if (accountData.voteLength > 0) { existingVotes = getAccountCurrentVotes(account); _removeVoteWeightsFrozen(existingVotes, frozenWeight); } uint256 week = getWeek(); accountData.week = uint16(week); accountData.frozenWeight = 0; uint amount = frozenWeight / MAX_LOCK_WEEKS; accountData.lockedAmounts[0] = uint32(amount); accountData.weeksToUnlock[0] = uint8(MAX_LOCK_WEEKS); accountData.lockLength = 1; // optionally resubmit previous votes if (existingVotes.length > 0) { if (keepVote) { _addVoteWeightsUnfrozen(account, existingVotes); } else { accountData.voteLength = 0; accountData.points = 0; emit ClearedVotes(account, week); } } ITokenLocker.LockData[] memory lockData = new ITokenLocker.LockData[](1); lockData[0] = ITokenLocker.LockData({ amount: amount, weeksToUnlock: MAX_LOCK_WEEKS }); emit AccountWeightRegistered(account, week, 0, lockData); } return true; } /** @dev Get the current registered lock weights for `account`, as an array of [(amount, weeks to unlock)] sorted by weeks-to-unlock descending. */ function _getAccountLocks(address account) internal view returns (LockData[] memory lockData) { AccountData storage accountData = accountLockData[account]; uint256 length = accountData.lockLength; uint256 systemWeek = getWeek(); uint256 accountWeek = accountData.frozenWeight > 0 ? systemWeek : accountData.week; uint8[MAX_LOCK_WEEKS] storage weeksToUnlock = accountData.weeksToUnlock; uint32[MAX_LOCK_WEEKS] storage amounts = accountData.lockedAmounts; lockData = new LockData[](length); uint256 idx; for (; idx < length; idx++) { uint256 unlockWeek = weeksToUnlock[idx] + accountWeek; if (unlockWeek <= systemWeek) { assembly { mstore(lockData, idx) } break; } uint256 remainingWeeks = unlockWeek - systemWeek; uint256 amount = amounts[idx]; lockData[idx] = LockData({ amount: amount, weeksToUnlock: remainingWeeks }); } return lockData; } function _registerAccountWeight(address account, uint256 minWeeks) internal returns (uint256) { AccountData storage accountData = accountLockData[account]; // get updated account lock weights and store locally (ITokenLocker.LockData[] memory lockData, uint256 frozen) = tokenLocker.getAccountActiveLocks( account, minWeeks ); uint256 length = lockData.length; if (frozen > 0) { frozen *= MAX_LOCK_WEEKS; accountData.frozenWeight = uint40(frozen); } else if (length > 0) { for (uint256 i = 0; i < length; i++) { uint256 amount = lockData[i].amount; uint256 weeksToUnlock = lockData[i].weeksToUnlock; accountData.lockedAmounts[i] = uint32(amount); accountData.weeksToUnlock[i] = uint8(weeksToUnlock); } } else { revert("No active locks"); } uint256 week = getWeek(); accountData.week = uint16(week); accountData.lockLength = uint8(length); emit AccountWeightRegistered(account, week, frozen, lockData); return frozen; } function _storeAccountVotes( address account, AccountData storage accountData, Vote[] calldata votes, uint256 points, uint256 offset ) internal { uint16[2][MAX_POINTS] storage storedVotes = accountData.activeVotes; uint256 length = votes.length; for (uint256 i = 0; i < length; i++) { storedVotes[offset + i] = [uint16(votes[i].id), uint16(votes[i].points)]; points += votes[i].points; } require(points <= MAX_POINTS, "Exceeded max vote points"); accountData.voteLength = uint16(offset + length); accountData.points = uint16(points); emit NewVotes(account, getWeek(), votes, points); } /** @dev Increases receiver and total weights, using a vote array and the registered weights of `msg.sender`. Account related values are not adjusted, they must be handled in the calling function. */ function _addVoteWeights(address account, Vote[] memory votes, uint256 frozenWeight) internal { if (votes.length > 0) { if (frozenWeight > 0) { _addVoteWeightsFrozen(votes, frozenWeight); } else { _addVoteWeightsUnfrozen(account, votes); } } } /** @dev Decreases receiver and total weights, using a vote array and the registered weights of `msg.sender`. Account related values are not adjusted, they must be handled in the calling function. */ function _removeVoteWeights(address account, Vote[] memory votes, uint256 frozenWeight) internal { if (votes.length > 0) { if (frozenWeight > 0) { _removeVoteWeightsFrozen(votes, frozenWeight); } else { _removeVoteWeightsUnfrozen(account, votes); } } } /** @dev Should not be called directly, use `_addVoteWeights` */ function _addVoteWeightsUnfrozen(address account, Vote[] memory votes) internal { LockData[] memory lockData = _getAccountLocks(account); uint256 lockLength = lockData.length; require(lockLength > 0, "Registered weight has expired"); uint256 totalWeight; uint256 totalDecay; uint256 systemWeek = getWeek(); uint256[MAX_LOCK_WEEKS + 1] memory weeklyUnlocks; for (uint256 i = 0; i < votes.length; i++) { uint256 id = votes[i].id; uint256 points = votes[i].points; uint256 weight = 0; uint256 decayRate = 0; for (uint256 x = 0; x < lockLength; x++) { uint256 weeksToUnlock = lockData[x].weeksToUnlock; uint256 amount = (lockData[x].amount * points) / MAX_POINTS; receiverWeeklyUnlocks[id][systemWeek + weeksToUnlock] += uint32(amount); weeklyUnlocks[weeksToUnlock] += uint32(amount); weight += amount * weeksToUnlock; decayRate += amount; } receiverWeeklyWeights[id][systemWeek] = uint40(getReceiverWeightWrite(id) + weight); receiverDecayRate[id] += uint32(decayRate); totalWeight += weight; totalDecay += decayRate; } for (uint256 i = 0; i < lockLength; i++) { uint256 weeksToUnlock = lockData[i].weeksToUnlock; totalWeeklyUnlocks[systemWeek + weeksToUnlock] += uint32(weeklyUnlocks[weeksToUnlock]); } totalWeeklyWeights[systemWeek] = uint40(getTotalWeightWrite() + totalWeight); totalDecayRate += uint32(totalDecay); } /** @dev Should not be called directly, use `_addVoteWeights` */ function _addVoteWeightsFrozen(Vote[] memory votes, uint256 frozenWeight) internal { uint256 systemWeek = getWeek(); uint256 totalWeight; uint256 length = votes.length; for (uint256 i = 0; i < length; i++) { uint256 id = votes[i].id; uint256 points = votes[i].points; uint256 weight = (frozenWeight * points) / MAX_POINTS; receiverWeeklyWeights[id][systemWeek] = uint40(getReceiverWeightWrite(id) + weight); totalWeight += weight; } totalWeeklyWeights[systemWeek] = uint40(getTotalWeightWrite() + totalWeight); } /** @dev Should not be called directly, use `_removeVoteWeights` */ function _removeVoteWeightsUnfrozen(address account, Vote[] memory votes) internal { LockData[] memory lockData = _getAccountLocks(account); uint256 lockLength = lockData.length; uint256 totalWeight; uint256 totalDecay; uint256 systemWeek = getWeek(); uint256[MAX_LOCK_WEEKS + 1] memory weeklyUnlocks; for (uint256 i = 0; i < votes.length; i++) { (uint256 id, uint256 points) = (votes[i].id, votes[i].points); uint256 weight = 0; uint256 decayRate = 0; for (uint256 x = 0; x < lockLength; x++) { uint256 weeksToUnlock = lockData[x].weeksToUnlock; uint256 amount = (lockData[x].amount * points) / MAX_POINTS; receiverWeeklyUnlocks[id][systemWeek + weeksToUnlock] -= uint32(amount); weeklyUnlocks[weeksToUnlock] += uint32(amount); weight += amount * weeksToUnlock; decayRate += amount; } receiverWeeklyWeights[id][systemWeek] = uint40(getReceiverWeightWrite(id) - weight); receiverDecayRate[id] -= uint32(decayRate); totalWeight += weight; totalDecay += decayRate; } for (uint256 i = 0; i < lockLength; i++) { uint256 weeksToUnlock = lockData[i].weeksToUnlock; totalWeeklyUnlocks[systemWeek + weeksToUnlock] -= uint32(weeklyUnlocks[weeksToUnlock]); } totalWeeklyWeights[systemWeek] = uint40(getTotalWeightWrite() - totalWeight); totalDecayRate -= uint32(totalDecay); } /** @dev Should not be called directly, use `_removeVoteWeights` */ function _removeVoteWeightsFrozen(Vote[] memory votes, uint256 frozenWeight) internal { uint256 systemWeek = getWeek(); uint256 totalWeight; uint256 length = votes.length; for (uint256 i = 0; i < length; i++) { (uint256 id, uint256 points) = (votes[i].id, votes[i].points); uint256 weight = (frozenWeight * points) / MAX_POINTS; receiverWeeklyWeights[id][systemWeek] = uint40(getReceiverWeightWrite(id) - weight); totalWeight += weight; } totalWeeklyWeights[systemWeek] = uint40(getTotalWeightWrite() - totalWeight); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; /** @title Prisma Delegated Operations @notice Allows delegation to specific contract functionality. Useful for creating wrapper contracts to bundle multiple interactions into a single call. Functions that supports delegation should include an `account` input allowing the delegated caller to indicate who they are calling on behalf of. In executing the call, all internal state updates should be applied for `account` and all value transfers should occur to or from the caller. For example: a delegated call to `openTrove` should transfer collateral from the caller, create the debt position for `account`, and send newly minted tokens to the caller. */ contract DelegatedOps { mapping(address owner => mapping(address caller => bool isApproved)) public isApprovedDelegate; modifier callerOrDelegated(address _account) { require(msg.sender == _account || isApprovedDelegate[_account][msg.sender], "Delegate not approved"); _; } function setDelegateApproval(address _delegate, bool _isApproved) external { isApprovedDelegate[msg.sender][_delegate] = _isApproved; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "IPrismaCore.sol"; /** @title Prisma System Start Time @dev Provides a unified `startTime` and `getWeek`, used for emissions. */ contract SystemStart { uint256 immutable startTime; constructor(address prismaCore) { startTime = IPrismaCore(prismaCore).startTime(); } function getWeek() public view returns (uint256 week) { return (block.timestamp - startTime) / 1 weeks; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IPrismaCore { event FeeReceiverSet(address feeReceiver); event GuardianSet(address guardian); event NewOwnerAccepted(address oldOwner, address owner); event NewOwnerCommitted(address owner, address pendingOwner, uint256 deadline); event NewOwnerRevoked(address owner, address revokedOwner); event Paused(); event PriceFeedSet(address priceFeed); event Unpaused(); function acceptTransferOwnership() external; function commitTransferOwnership(address newOwner) external; function revokeTransferOwnership() external; function setFeeReceiver(address _feeReceiver) external; function setGuardian(address _guardian) external; function setPaused(bool _paused) external; function setPriceFeed(address _priceFeed) external; function OWNERSHIP_TRANSFER_DELAY() external view returns (uint256); function feeReceiver() external view returns (address); function guardian() external view returns (address); function owner() external view returns (address); function ownershipTransferDeadline() external view returns (uint256); function paused() external view returns (bool); function pendingOwner() external view returns (address); function priceFeed() external view returns (address); function startTime() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITokenLocker { struct LockData { uint256 amount; uint256 weeksToUnlock; } struct ExtendLockData { uint256 amount; uint256 currentWeeks; uint256 newWeeks; } event LockCreated(address indexed account, uint256 amount, uint256 _weeks); event LockExtended(address indexed account, uint256 amount, uint256 _weeks, uint256 newWeeks); event LocksCreated(address indexed account, LockData[] newLocks); event LocksExtended(address indexed account, ExtendLockData[] locks); event LocksFrozen(address indexed account, uint256 amount); event LocksUnfrozen(address indexed account, uint256 amount); event LocksWithdrawn(address indexed account, uint256 withdrawn, uint256 penalty); function extendLock(uint256 _amount, uint256 _weeks, uint256 _newWeeks) external returns (bool); function extendMany(ExtendLockData[] calldata newExtendLocks) external returns (bool); function freeze() external; function getAccountWeightWrite(address account) external returns (uint256); function getTotalWeightWrite() external returns (uint256); function lock(address _account, uint256 _amount, uint256 _weeks) external returns (bool); function lockMany(address _account, LockData[] calldata newLocks) external returns (bool); function setPenaltyWithdrawalsEnabled(bool _enabled) external returns (bool); function unfreeze(bool keepIncentivesVote) external; function withdrawExpiredLocks(uint256 _weeks) external returns (bool); function withdrawWithPenalty(uint256 amountToWithdraw) external returns (uint256); function MAX_LOCK_WEEKS() external view returns (uint256); function PRISMA_CORE() external view returns (address); function getAccountActiveLocks( address account, uint256 minWeeks ) external view returns (LockData[] memory lockData, uint256 frozenAmount); function getAccountBalances(address account) external view returns (uint256 locked, uint256 unlocked); function getAccountWeight(address account) external view returns (uint256); function getAccountWeightAt(address account, uint256 week) external view returns (uint256); function getTotalWeight() external view returns (uint256); function getTotalWeightAt(uint256 week) external view returns (uint256); function getWeek() external view returns (uint256 week); function getWithdrawWithPenaltyAmounts( address account, uint256 amountToWithdraw ) external view returns (uint256 amountWithdrawn, uint256 penaltyAmountPaid); function guardian() external view returns (address); function incentiveVoter() external view returns (address); function lockToTokenRatio() external view returns (uint256); function lockToken() external view returns (address); function owner() external view returns (address); function penaltyWithdrawalsEnabled() external view returns (bool); function prismaCore() external view returns (address); function totalDecayRate() external view returns (uint32); function totalUpdatedWeek() external view returns (uint16); }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "IncentiveVoting.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_prismaCore","type":"address"},{"internalType":"contract ITokenLocker","name":"_tokenLocker","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"week","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"frozenBalance","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"weeksToUnlock","type":"uint256"}],"indexed":false,"internalType":"struct ITokenLocker.LockData[]","name":"registeredLockData","type":"tuple[]"}],"name":"AccountWeightRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"week","type":"uint256"}],"name":"ClearedVotes","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"week","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"indexed":false,"internalType":"struct IncentiveVoting.Vote[]","name":"newVotes","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"totalPointsUsed","type":"uint256"}],"name":"NewVotes","type":"event"},{"inputs":[],"name":"MAX_LOCK_WEEKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"clearRegisteredWeight","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"clearVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountCurrentVotes","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"internalType":"struct IncentiveVoting.Vote[]","name":"votes","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountRegisteredLocks","outputs":[{"internalType":"uint256","name":"frozenWeight","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"weeksToUnlock","type":"uint256"}],"internalType":"struct IncentiveVoting.LockData[]","name":"lockData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"week","type":"uint256"}],"name":"getReceiverVotePct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"getReceiverWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"uint256","name":"week","type":"uint256"}],"name":"getReceiverWeightAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"}],"name":"getReceiverWeightWrite","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"week","type":"uint256"}],"name":"getTotalWeightAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalWeightWrite","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getWeek","outputs":[{"internalType":"uint256","name":"week","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"isApprovedDelegate","outputs":[{"internalType":"bool","name":"isApproved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiverCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"receiverDecayRate","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"receiverUpdatedWeek","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"receiverWeeklyUnlocks","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"minWeeks","type":"uint256"}],"name":"registerAccountWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"minWeeks","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"internalType":"struct IncentiveVoting.Vote[]","name":"votes","type":"tuple[]"}],"name":"registerAccountWeightAndVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registerNewReceiver","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"},{"internalType":"bool","name":"_isApproved","type":"bool"}],"name":"setDelegateApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenLocker","outputs":[{"internalType":"contract ITokenLocker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDecayRate","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUpdatedWeek","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalWeeklyUnlocks","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"keepVote","type":"bool"}],"name":"unfreeze","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"internalType":"struct IncentiveVoting.Vote[]","name":"votes","type":"tuple[]"},{"internalType":"bool","name":"clearPrevious","type":"bool"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b50604051620032c5380380620032c58339810160408190526200003491620000d0565b82806001600160a01b03166378e979256040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000074573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009a919062000124565b608052506001600160a01b0391821660a0521660c052506200013e565b6001600160a01b0381168114620000cd57600080fd5b50565b600080600060608486031215620000e657600080fd5b8351620000f381620000b7565b60208501519093506200010681620000b7565b60408501519092506200011981620000b7565b809150509250925092565b6000602082840312156200013757600080fd5b5051919050565b60805160a05160c05161313b6200018a6000396000818161046f0152610c5401526000818161037f015281816106d101528181611049015261194301526000610fd9015261313b6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063983ef3ed11610104578063bafacab9116100a2578063ee10e19a11610071578063ee10e19a14610457578063fbfa77cf1461046a578063fef90a2b14610491578063ff4819e1146104b257600080fd5b8063bafacab9146103df578063c373cb40146103e7578063c3c854b614610400578063cd0ff58a1461044457600080fd5b80639e30c3ec116100de5780639e30c3ec1461035f578063a6de871614610367578063a80bf3e61461037a578063b52bbe48146103b957600080fd5b8063983ef3ed146103235780639a86107f1461032c5780639d1606981461033f57600080fd5b80634566a2681161017c5780636eff5fc71161014b5780636eff5fc7146102cd578063874d6d81146102e0578063879483ad146102e857806393101b411461031057600080fd5b80634566a2681461028a57806350735f6f146102925780635ae61f92146102a5578063664f0ea9146102ba57600080fd5b806325f87d23116101b857806325f87d23146102485780632d402f2c146102515780633149ca241461026457806334e2ad8a1461027757600080fd5b806306aba0e1146101df57806313d7e392146101fa5780631930e8251461020d575b600080fd5b6101e76104c5565b6040519081526020015b60405180910390f35b6101e7610208366004612ad3565b6104d7565b61023861021b366004612b11565b600060208181529281526040808220909352908152205460ff1681565b60405190151581526020016101f1565b6101e761271081565b61023861025f366004612b44565b6106b2565b6101e7610272366004612b66565b6108a4565b6101e7610285366004612ad3565b610b66565b6101e7610c47565b6101e76102a0366004612b66565b610d0a565b6102b86102b3366004612b44565b610e31565b005b6102b86102c8366004612b7f565b610ef9565b6101e76102db366004612b66565b610fc4565b6101e7610fce565b6102fb6102f6366004612b66565b611008565b60405163ffffffff90911681526020016101f1565b61023861031e366004612bb9565b61103c565b6101e760025481565b6102fb61033a366004612ad3565b61124e565b61035261034d366004612b44565b611299565b6040516101f19190612be3565b6101e76113cd565b6102b8610375366004612c86565b611559565b6103a17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f1565b6103cc6103c7366004612b66565b61170b565b60405161ffff90911681526020016101f1565b6101e7603481565b634aaae558546103cc90640100000000900461ffff1681565b6102b861040e366004612bb9565b336000908152602081815260408083206001600160a01b0395909516835293905291909120805460ff1916911515919091179055565b6102b8610452366004612ceb565b61173b565b6102fb610465366004612b66565b611889565b6103a17f000000000000000000000000000000000000000000000000000000000000000081565b6104a461049f366004612b44565b61189a565b6040516101f1929190612d45565b634aaae558546102fb9063ffffffff1681565b60006104d26102a0610fce565b905090565b600060025483106104ea575060006106ac565b600060038461ffff811061050057610500612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16905060006120038561ffff811061053b5761053b612da5565b601091828204019190066002029054906101000a900461ffff1661ffff1690508084116105bb576130038561ffff811061057757610577612da5565b612aab02018461ffff811061058e5761058e612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16925050506106ac565b60006130038661ffff81106105d2576105d2612da5565b612aab02018261ffff81106105e9576105e9612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff1690508060000361062357600093505050506106ac565b848210156106a7578161063581612dd1565b925061064390508382612dea565b9050632aab05588661ffff811061065c5761065c612da5565b61200002018261ffff811061067357610673612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16836106a09190612dea565b9250610623565b925050505b92915050565b6000336001600160a01b03831614806106f35750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b8061071f57506001600160a01b03821660009081526020818152604080832033845290915290205460ff165b6107445760405162461bcd60e51b815260040161073b90612dfd565b60405180910390fd5b6001600160a01b038216600090815260016020526040812090610765610fce565b8254909150600160481b810460ff169062010000900464ffffffffff16811515806107905750600081115b15610898578354600160501b900461ffff16156107ee576107ba866107b488611299565b836118de565b835464ffff00ffff60381b1916845560405183906001600160a01b038816906000805160206130e683398151915290600090a35b811561080457835460ff60481b19168455610813565b835466ffffffffff0000191684555b6040805160008082526020820190925284916001600160a01b038916917fc373662f5a11e3110db3b0ffb1dfe92f9654cd3e0ff75d9b7d89e128eb442bb8919081610880565b60408051808201909152600080825260208201528152602001906001900390816108595790505b5060405161088f929190612e91565b60405180910390a35b50600195945050505050565b600060025482106108e45760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b604482015260640161073b565b60006108ee610fce565b905060006120038461ffff811061090757610907612da5565b601091828204019190066002029054906101000a900461ffff1661ffff16905060006130038561ffff811061093e5761093e612da5565b612aab02018261ffff811061095557610955612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff169050806000036109ca57826120038661ffff811061099957610999612da5565b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555060009350505050919050565b600060038661ffff81106109e0576109e0612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1690505b83831015610ae15782610a1781612dd1565b9350610a2590508183612dea565b9150816130038761ffff8110610a3d57610a3d612da5565b612aab02018461ffff8110610a5457610a54612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff160217905550632aab05588661ffff8110610a9657610a96612da5565b61200002018361ffff8110610aad57610aad612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1681610ada9190612dea565b9050610a05565b8060038761ffff8110610af657610af6612da5565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550836120038761ffff8110610b3557610b35612da5565b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555081945050505050919050565b6000610b73600183612dea565b9150610b7e836108a4565b50610b876113cd565b506000634aaae5598361ffff8110610ba157610ba1612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16905080600003610bd95760009150506106ac565b806130038561ffff8110610bef57610bef612da5565b612aab02018461ffff8110610c0657610c06612da5565b600680820490920154610c359264ffffffffff600591909306026101000a900416670de0b6b3a7640000612eaa565b610c3f9190612ec1565b949350505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cb05760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420547265617375727960a01b604482015260640161073b565b600254610cbb610fce565b6120038261ffff8110610cd057610cd0612da5565b601091828204019190066002026101000a81548161ffff021916908361ffff160217905550806001610d029190612ee3565b600255919050565b634aaae5585460009063ffffffff811690640100000000900461ffff16808411610d7257634aaae5598461ffff8110610d4557610d45612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff1692505050919050565b6000634aaae5598261ffff8110610d8b57610d8b612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16905080600003610dc457506000949350505050565b84821015610c3f5781610dd681612dd1565b9250610de490508382612dea565b9050634aab10048261ffff8110610dfd57610dfd612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1683610e2a9190612dea565b9250610dc4565b80336001600160a01b0382161480610e6a57506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b610e865760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b0382166000908152600160205260409020805462010000900464ffffffffff16610eba846107b481611299565b815464ffff00ffff60381b19168255610ed1610fce565b6040516001600160a01b038616906000805160206130e683398151915290600090a350505050565b81336001600160a01b0382161480610f3257506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b610f4e5760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b03831660009081526001602052604090208054606090600160501b900461ffff1615610fa357610f8485611299565b8254909150610fa3908690839062010000900464ffffffffff166118de565b6000610faf8686611904565b9050610fbc868383611b94565b505050505050565b60006106ac826102085b600062093a80610ffe7f000000000000000000000000000000000000000000000000000000000000000042612dea565b6104d29190612ec1565b634aab10048161ffff811061101c57600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461107357600080fd5b6001600160a01b0383166000908152600160205260409020805462010000900464ffffffffff168015611243578154606090600160501b900461ffff16156110ca576110be86611299565b90506110ca8183611bb5565b60006110d4610fce565b845466ffffffffffffff191661ffff8216178555905060006110f7603485612ec1565b6127118601805463ffffffff191663ffffffff831617905561271886018054603460ff19909116179055855460ff60481b1916600160481b1786558351909150156111855786156111515761114c8884611d1d565b611185565b845464ffff00ffff60381b1916855560405182906001600160a01b038a16906000805160206130e683398151915290600090a35b604080516001808252818301909252600091816020015b604080518082019091526000808252602082015281526020019060019003908161119c57905050905060405180604001604052808381526020016034815250816000815181106111ee576111ee612da5565b602002602001018190525082896001600160a01b03167fc373662f5a11e3110db3b0ffb1dfe92f9654cd3e0ff75d9b7d89e128eb442bb8600084604051611236929190612e91565b60405180910390a3505050505b506001949350505050565b632aab05588261ffff811061126257600080fd5b61200002018161ffff811061127657600080fd5b60089182820401919006600402915091509054906101000a900463ffffffff1681565b6001600160a01b038116600090815260016020526040902054606090600160501b900461ffff1667ffffffffffffffff8111156112d8576112d8612e2c565b60405190808252806020026020018201604052801561131d57816020015b60408051808201909152600080825260208201528152602001906001900390816112f65790505b506001600160a01b0383166000908152600160208190526040822083519394500191905b818110156113c55760405180604001604052808483612710811061136757611367612da5565b015461ffff1681526020018483612710811061138557611385612da5565b015462010000900461ffff16905284518590839081106113a7576113a7612da5565b602002602001018190525080806113bd90612dd1565b915050611341565b505050919050565b6000806113d8610fce565b634aaae5585490915061ffff640100000000909104811690600090634aaae559908390811061140957611409612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16905080600003611464575050634aaae558805461ffff9092166401000000000265ffff000000001990921691909117905550600090565b634aaae5585463ffffffff165b83831015611521578261148381612dd1565b935061149190508183612dea565b915081634aaae5598461ffff81106114ab576114ab612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff160217905550634aab10048361ffff81106114ed576114ed612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff168161151a9190612dea565b9050611471565b634aaae558805461ffff9095166401000000000265ffffffffffff1990951663ffffffff909216919091179390931790925550919050565b83336001600160a01b038216148061159257506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b6115ae5760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b0385166000908152600160205260409020805462010000900464ffffffffff16801515806115ed57508154600160481b900460ff1615155b6116305760405162461bcd60e51b8152602060048201526014602482015273139bc81c9959da5cdd195c9959081dd95a59da1d60621b604482015260640161073b565b600080851561167b5761164c896116468b611299565b856118de565b611654610fce565b6040516001600160a01b038b16906000805160206130e683398151915290600090a3611695565b5050815461ffff600160381b8204811691600160501b9004165b6116f2898989808060200260200160405190810160405280939291908181526020016000905b828210156116e7576116d860408302860136819003810190612f50565b815260200190600101906116bb565b505050505085611b94565b61170089858a8a8686612189565b505050505050505050565b6120038161ffff811061171d57600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b83336001600160a01b038216148061177457506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b6117905760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b03851660009081526001602052604090208054600160501b900461ffff1615611806576117db866117c788611299565b835462010000900464ffffffffff166118de565b6117e3610fce565b6040516001600160a01b038816906000805160206130e683398151915290600090a35b60006118128787611904565b9050611871878686808060200260200160405190810160405280939291908181526020016000905b828210156118665761185760408302860136819003810190612f50565b8152602001906001019061183a565b505050505083611b94565b61188087838787600080612189565b50505050505050565b60038161ffff811061101c57600080fd5b6001600160a01b03811660009081526001602052604081205460609062010000900464ffffffffff166118cc84612345565b64ffffffffff90911694909350915050565b8151156118f55780156118fa576118f58282611bb5565b505050565b6118f583836124f4565b6001600160a01b0382811660008181526001602052604080822090516305ed16ed60e21b815260048101939093526024830185905290929091839182917f0000000000000000000000000000000000000000000000000000000000000000909116906317b45bb490604401600060405180830381865afa15801561198c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119b49190810190612f82565b8151919350915081156119ef576119cc603483612eaa565b845466ffffffffff000019166201000064ffffffffff8316021785559150611b10565b8015611ad65760005b81811015611ad0576000848281518110611a1457611a14612da5565b60200260200101516000015190506000858381518110611a3657611a36612da5565b60200260200101516020015190508187612711018460348110611a5b57611a5b612da5565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff1602179055508087612718018460348110611a9b57611a9b612da5565b602091828204019190066101000a81548160ff021916908360ff16021790555050508080611ac890612dd1565b9150506119f8565b50611b10565b60405162461bcd60e51b815260206004820152600f60248201526e4e6f20616374697665206c6f636b7360881b604482015260640161073b565b6000611b1a610fce565b855460ff8416600160481b0269ff00000000000000ffff1990911661ffff83161717865560405190915081906001600160a01b038a16907fc373662f5a11e3110db3b0ffb1dfe92f9654cd3e0ff75d9b7d89e128eb442bb890611b809087908990612e91565b60405180910390a350909695505050505050565b8151156118f5578015611bab576118f582826128e9565b6118f58383611d1d565b6000611bbf610fce565b8351909150600090815b81811015611cc057600080878381518110611be657611be6612da5565b602002602001015160000151888481518110611c0457611c04612da5565b6020026020010151602001519150915060006127108289611c259190612eaa565b611c2f9190612ec1565b905080611c3b846108a4565b611c459190612dea565b6130038461ffff8110611c5a57611c5a612da5565b612aab02018861ffff8110611c7157611c71612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055508086611ca89190612ee3565b95505050508080611cb890612dd1565b915050611bc9565b5081611cca6113cd565b611cd49190612dea565b634aaae5598461ffff8110611ceb57611ceb612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055505050505050565b6000611d2883612345565b805190915080611d7a5760405162461bcd60e51b815260206004820152601d60248201527f5265676973746572656420776569676874206861732065787069726564000000604482015260640161073b565b6000806000611d87610fce565b9050611d91612a09565b60005b8751811015612027576000888281518110611db157611db1612da5565b60200260200101516000015190506000898381518110611dd357611dd3612da5565b602002602001015160200151905060008060005b8a811015611f2e5760008c8281518110611e0357611e03612da5565b60200260200101516020015190506000612710868f8581518110611e2957611e29612da5565b602002602001015160000151611e3f9190612eaa565b611e499190612ec1565b905080632aab05588861ffff8110611e6357611e63612da5565b6120000201611e72848d612ee3565b61ffff8110611e8357611e83612da5565b600891828204019190066004028282829054906101000a900463ffffffff16611eac9190613054565b92506101000a81548163ffffffff021916908363ffffffff1602179055508063ffffffff16898360358110611ee357611ee3612da5565b60200201818151611ef49190612ee3565b905250611f018282612eaa565b611f0b9086612ee3565b9450611f178185612ee3565b935050508080611f2690612dd1565b915050611de7565b5081611f39856108a4565b611f439190612ee3565b6130038561ffff8110611f5857611f58612da5565b612aab02018861ffff8110611f6f57611f6f612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055508060038561ffff8110611faf57611faf612da5565b600891828204019190066004028282829054906101000a900463ffffffff16611fd89190613054565b92506101000a81548163ffffffff021916908363ffffffff16021790555081896120029190612ee3565b985061200e8189612ee3565b975050505050808061201f90612dd1565b915050611d94565b5060005b858110156120e757600087828151811061204757612047612da5565b602002602001015160200151905082816035811061206757612067612da5565b6020020151634aab100461207b8387612ee3565b61ffff811061208c5761208c612da5565b600891828204019190066004028282829054906101000a900463ffffffff166120b59190613054565b92506101000a81548163ffffffff021916908363ffffffff1602179055505080806120df90612dd1565b91505061202b565b50836120f16113cd565b6120fb9190612ee3565b634aaae5598361ffff811061211257612112612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff16021790555082634aaae55860008282829054906101000a900463ffffffff166121619190613054565b92506101000a81548163ffffffff021916908363ffffffff1602179055505050505050505050565b600185018360005b8181101561225c5760405180604001604052808888848181106121b6576121b6612da5565b9050604002016000013561ffff1661ffff1681526020018888848181106121df576121df612da5565b9050604002016020013561ffff1661ffff168152508382866122019190612ee3565b612710811061221257612212612da5565b612220929101906002612a28565b5086868281811061223357612233612da5565b90506040020160200135856122489190612ee3565b94508061225481612dd1565b915050612191565b506127108411156122af5760405162461bcd60e51b815260206004820152601860248201527f4578636565646564206d617820766f746520706f696e74730000000000000000604482015260640161073b565b6122b98184612ee3565b875464ffff00ffff60381b1916600160501b61ffff9283160268ffff00000000000000191617600160381b918616919091021787556122f6610fce565b886001600160a01b03167f027b95150a840915102d246f135fa783478df804caae0b9a4de2bdf1798b924788888860405161233393929190613078565b60405180910390a35050505050505050565b6001600160a01b03811660009081526001602052604081208054606092600160481b90910460ff1690612376610fce565b835490915060009062010000900464ffffffffff1661239a57835461ffff1661239c565b815b9050612718840161271185018467ffffffffffffffff8111156123c1576123c1612e2c565b60405190808252806020026020018201604052801561240657816020015b60408051808201909152600080825260208201528152602001906001900390816123df5790505b50965060005b858110156124e85760008484836034811061242957612429612da5565b6020810491909101546124489291601f166101000a900460ff16612ee3565b905085811161245a57818952506124e8565b60006124668783612dea565b9050600084846034811061247c5761247c612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1690506040518060400160405280828152602001838152508b85815181106124c7576124c7612da5565b602002602001018190525050505080806124e090612dd1565b91505061240c565b50505050505050919050565b60006124ff83612345565b805190915060008080612510610fce565b905061251a612a09565b60005b87518110156127af5760008089838151811061253b5761253b612da5565b6020026020010151600001518a848151811061255957612559612da5565b6020026020010151602001519150915060008060005b8a8110156126b65760008c828151811061258b5761258b612da5565b60200260200101516020015190506000612710868f85815181106125b1576125b1612da5565b6020026020010151600001516125c79190612eaa565b6125d19190612ec1565b905080632aab05588861ffff81106125eb576125eb612da5565b61200002016125fa848d612ee3565b61ffff811061260b5761260b612da5565b600891828204019190066004028282829054906101000a900463ffffffff1661263491906130c8565b92506101000a81548163ffffffff021916908363ffffffff1602179055508063ffffffff1689836035811061266b5761266b612da5565b6020020181815161267c9190612ee3565b9052506126898282612eaa565b6126939086612ee3565b945061269f8185612ee3565b9350505080806126ae90612dd1565b91505061256f565b50816126c1856108a4565b6126cb9190612dea565b6130038561ffff81106126e0576126e0612da5565b612aab02018861ffff81106126f7576126f7612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055508060038561ffff811061273757612737612da5565b600891828204019190066004028282829054906101000a900463ffffffff1661276091906130c8565b92506101000a81548163ffffffff021916908363ffffffff160217905550818961278a9190612ee3565b98506127968189612ee3565b97505050505080806127a790612dd1565b91505061251d565b5060005b8581101561286f5760008782815181106127cf576127cf612da5565b60200260200101516020015190508281603581106127ef576127ef612da5565b6020020151634aab10046128038387612ee3565b61ffff811061281457612814612da5565b600891828204019190066004028282829054906101000a900463ffffffff1661283d91906130c8565b92506101000a81548163ffffffff021916908363ffffffff16021790555050808061286790612dd1565b9150506127b3565b50836128796113cd565b6128839190612dea565b634aaae5598361ffff811061289a5761289a612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff16021790555082634aaae55860008282829054906101000a900463ffffffff1661216191906130c8565b60006128f3610fce565b8351909150600090815b818110156129f557600086828151811061291957612919612da5565b6020026020010151600001519050600087838151811061293b5761293b612da5565b60200260200101516020015190506000612710828961295a9190612eaa565b6129649190612ec1565b905080612970846108a4565b61297a9190612ee3565b6130038461ffff811061298f5761298f612da5565b612aab02018861ffff81106129a6576129a6612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff16021790555080866129dd9190612ee3565b955050505080806129ed90612dd1565b9150506128fd565b50816129ff6113cd565b611cd49190612ee3565b604051806106a001604052806035906020820280368337509192915050565b600183019183908215612aae5791602002820160005b83821115612a7e57835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302612a3e565b8015612aac5782816101000a81549061ffff0219169055600201602081600101049283019260010302612a7e565b505b50612aba929150612abe565b5090565b5b80821115612aba5760008155600101612abf565b60008060408385031215612ae657600080fd5b50508035926020909101359150565b80356001600160a01b0381168114612b0c57600080fd5b919050565b60008060408385031215612b2457600080fd5b612b2d83612af5565b9150612b3b60208401612af5565b90509250929050565b600060208284031215612b5657600080fd5b612b5f82612af5565b9392505050565b600060208284031215612b7857600080fd5b5035919050565b60008060408385031215612b9257600080fd5b612b9b83612af5565b946020939093013593505050565b80358015158114612b0c57600080fd5b60008060408385031215612bcc57600080fd5b612bd583612af5565b9150612b3b60208401612ba9565b602080825282518282018190526000919060409081850190868401855b82811015612c2d57612c1d84835180518252602090810151910152565b9284019290850190600101612c00565b5091979650505050505050565b60008083601f840112612c4c57600080fd5b50813567ffffffffffffffff811115612c6457600080fd5b6020830191508360208260061b8501011115612c7f57600080fd5b9250929050565b60008060008060608587031215612c9c57600080fd5b612ca585612af5565b9350602085013567ffffffffffffffff811115612cc157600080fd5b612ccd87828801612c3a565b9094509250612ce0905060408601612ba9565b905092959194509250565b60008060008060608587031215612d0157600080fd5b612d0a85612af5565b935060208501359250604085013567ffffffffffffffff811115612d2d57600080fd5b612d3987828801612c3a565b95989497509550505050565b6000604080830185845260208281860152818651808452606087019150828801935060005b81811015612d9757612d8783865180518252602090810151910152565b9383019391850191600101612d6a565b509098975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612de357612de3612dbb565b5060010190565b818103818111156106ac576106ac612dbb565b60208082526015908201527411195b1959d85d19481b9bdd08185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b600081518084526020808501945080840160005b83811015612e8657612e7387835180518252602090810151910152565b6040969096019590820190600101612e56565b509495945050505050565b828152604060208201526000610c3f6040830184612e42565b80820281158282048414176106ac576106ac612dbb565b600082612ede57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156106ac576106ac612dbb565b6040805190810167ffffffffffffffff81118282101715612f1957612f19612e2c565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612f4857612f48612e2c565b604052919050565b600060408284031215612f6257600080fd5b612f6a612ef6565b82358152602083013560208201528091505092915050565b6000806040808486031215612f9657600080fd5b835167ffffffffffffffff80821115612fae57600080fd5b818601915086601f830112612fc257600080fd5b8151602082821115612fd657612fd6612e2c565b612fe4818360051b01612f1f565b828152818101935060069290921b84018101918983111561300457600080fd5b938101935b828510156130445785858b0312156130215760008081fd5b613029612ef6565b85518152828601518382015284529385019392810192613009565b9701519698969750505050505050565b63ffffffff81811683821601908082111561307157613071612dbb565b5092915050565b60408082528181018490526000908560608401835b878110156130b3578235825260208084013590830152918301919083019060010161308d565b50809350505050826020830152949350505050565b63ffffffff82811682821603908082111561307157613071612dbb56fe04c7eb7e6d81de1f92d1790dec661c82610b206ba7e8efbe4b9e3e1c3573350ba26469706673582212208333a4de8760c268c6d6ed1cb2c9d21f7af9de8768b72a66b5cf55b4e0d7c36364736f6c634300081300330000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf80000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063983ef3ed11610104578063bafacab9116100a2578063ee10e19a11610071578063ee10e19a14610457578063fbfa77cf1461046a578063fef90a2b14610491578063ff4819e1146104b257600080fd5b8063bafacab9146103df578063c373cb40146103e7578063c3c854b614610400578063cd0ff58a1461044457600080fd5b80639e30c3ec116100de5780639e30c3ec1461035f578063a6de871614610367578063a80bf3e61461037a578063b52bbe48146103b957600080fd5b8063983ef3ed146103235780639a86107f1461032c5780639d1606981461033f57600080fd5b80634566a2681161017c5780636eff5fc71161014b5780636eff5fc7146102cd578063874d6d81146102e0578063879483ad146102e857806393101b411461031057600080fd5b80634566a2681461028a57806350735f6f146102925780635ae61f92146102a5578063664f0ea9146102ba57600080fd5b806325f87d23116101b857806325f87d23146102485780632d402f2c146102515780633149ca241461026457806334e2ad8a1461027757600080fd5b806306aba0e1146101df57806313d7e392146101fa5780631930e8251461020d575b600080fd5b6101e76104c5565b6040519081526020015b60405180910390f35b6101e7610208366004612ad3565b6104d7565b61023861021b366004612b11565b600060208181529281526040808220909352908152205460ff1681565b60405190151581526020016101f1565b6101e761271081565b61023861025f366004612b44565b6106b2565b6101e7610272366004612b66565b6108a4565b6101e7610285366004612ad3565b610b66565b6101e7610c47565b6101e76102a0366004612b66565b610d0a565b6102b86102b3366004612b44565b610e31565b005b6102b86102c8366004612b7f565b610ef9565b6101e76102db366004612b66565b610fc4565b6101e7610fce565b6102fb6102f6366004612b66565b611008565b60405163ffffffff90911681526020016101f1565b61023861031e366004612bb9565b61103c565b6101e760025481565b6102fb61033a366004612ad3565b61124e565b61035261034d366004612b44565b611299565b6040516101f19190612be3565b6101e76113cd565b6102b8610375366004612c86565b611559565b6103a17f0000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d81565b6040516001600160a01b0390911681526020016101f1565b6103cc6103c7366004612b66565b61170b565b60405161ffff90911681526020016101f1565b6101e7603481565b634aaae558546103cc90640100000000900461ffff1681565b6102b861040e366004612bb9565b336000908152602081815260408083206001600160a01b0395909516835293905291909120805460ff1916911515919091179055565b6102b8610452366004612ceb565b61173b565b6102fb610465366004612b66565b611889565b6103a17f00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c81565b6104a461049f366004612b44565b61189a565b6040516101f1929190612d45565b634aaae558546102fb9063ffffffff1681565b60006104d26102a0610fce565b905090565b600060025483106104ea575060006106ac565b600060038461ffff811061050057610500612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16905060006120038561ffff811061053b5761053b612da5565b601091828204019190066002029054906101000a900461ffff1661ffff1690508084116105bb576130038561ffff811061057757610577612da5565b612aab02018461ffff811061058e5761058e612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16925050506106ac565b60006130038661ffff81106105d2576105d2612da5565b612aab02018261ffff81106105e9576105e9612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff1690508060000361062357600093505050506106ac565b848210156106a7578161063581612dd1565b925061064390508382612dea565b9050632aab05588661ffff811061065c5761065c612da5565b61200002018261ffff811061067357610673612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16836106a09190612dea565b9250610623565b925050505b92915050565b6000336001600160a01b03831614806106f35750336001600160a01b037f0000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d16145b8061071f57506001600160a01b03821660009081526020818152604080832033845290915290205460ff165b6107445760405162461bcd60e51b815260040161073b90612dfd565b60405180910390fd5b6001600160a01b038216600090815260016020526040812090610765610fce565b8254909150600160481b810460ff169062010000900464ffffffffff16811515806107905750600081115b15610898578354600160501b900461ffff16156107ee576107ba866107b488611299565b836118de565b835464ffff00ffff60381b1916845560405183906001600160a01b038816906000805160206130e683398151915290600090a35b811561080457835460ff60481b19168455610813565b835466ffffffffff0000191684555b6040805160008082526020820190925284916001600160a01b038916917fc373662f5a11e3110db3b0ffb1dfe92f9654cd3e0ff75d9b7d89e128eb442bb8919081610880565b60408051808201909152600080825260208201528152602001906001900390816108595790505b5060405161088f929190612e91565b60405180910390a35b50600195945050505050565b600060025482106108e45760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b604482015260640161073b565b60006108ee610fce565b905060006120038461ffff811061090757610907612da5565b601091828204019190066002029054906101000a900461ffff1661ffff16905060006130038561ffff811061093e5761093e612da5565b612aab02018261ffff811061095557610955612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff169050806000036109ca57826120038661ffff811061099957610999612da5565b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555060009350505050919050565b600060038661ffff81106109e0576109e0612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1690505b83831015610ae15782610a1781612dd1565b9350610a2590508183612dea565b9150816130038761ffff8110610a3d57610a3d612da5565b612aab02018461ffff8110610a5457610a54612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff160217905550632aab05588661ffff8110610a9657610a96612da5565b61200002018361ffff8110610aad57610aad612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1681610ada9190612dea565b9050610a05565b8060038761ffff8110610af657610af6612da5565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550836120038761ffff8110610b3557610b35612da5565b601091828204019190066002026101000a81548161ffff021916908361ffff16021790555081945050505050919050565b6000610b73600183612dea565b9150610b7e836108a4565b50610b876113cd565b506000634aaae5598361ffff8110610ba157610ba1612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16905080600003610bd95760009150506106ac565b806130038561ffff8110610bef57610bef612da5565b612aab02018461ffff8110610c0657610c06612da5565b600680820490920154610c359264ffffffffff600591909306026101000a900416670de0b6b3a7640000612eaa565b610c3f9190612ec1565b949350505050565b6000336001600160a01b037f00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c1614610cb05760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420547265617375727960a01b604482015260640161073b565b600254610cbb610fce565b6120038261ffff8110610cd057610cd0612da5565b601091828204019190066002026101000a81548161ffff021916908361ffff160217905550806001610d029190612ee3565b600255919050565b634aaae5585460009063ffffffff811690640100000000900461ffff16808411610d7257634aaae5598461ffff8110610d4557610d45612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff1692505050919050565b6000634aaae5598261ffff8110610d8b57610d8b612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16905080600003610dc457506000949350505050565b84821015610c3f5781610dd681612dd1565b9250610de490508382612dea565b9050634aab10048261ffff8110610dfd57610dfd612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1683610e2a9190612dea565b9250610dc4565b80336001600160a01b0382161480610e6a57506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b610e865760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b0382166000908152600160205260409020805462010000900464ffffffffff16610eba846107b481611299565b815464ffff00ffff60381b19168255610ed1610fce565b6040516001600160a01b038616906000805160206130e683398151915290600090a350505050565b81336001600160a01b0382161480610f3257506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b610f4e5760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b03831660009081526001602052604090208054606090600160501b900461ffff1615610fa357610f8485611299565b8254909150610fa3908690839062010000900464ffffffffff166118de565b6000610faf8686611904565b9050610fbc868383611b94565b505050505050565b60006106ac826102085b600062093a80610ffe7f0000000000000000000000000000000000000000000000000000000064d4288042612dea565b6104d29190612ec1565b634aab10048161ffff811061101c57600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b6000336001600160a01b037f0000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d161461107357600080fd5b6001600160a01b0383166000908152600160205260409020805462010000900464ffffffffff168015611243578154606090600160501b900461ffff16156110ca576110be86611299565b90506110ca8183611bb5565b60006110d4610fce565b845466ffffffffffffff191661ffff8216178555905060006110f7603485612ec1565b6127118601805463ffffffff191663ffffffff831617905561271886018054603460ff19909116179055855460ff60481b1916600160481b1786558351909150156111855786156111515761114c8884611d1d565b611185565b845464ffff00ffff60381b1916855560405182906001600160a01b038a16906000805160206130e683398151915290600090a35b604080516001808252818301909252600091816020015b604080518082019091526000808252602082015281526020019060019003908161119c57905050905060405180604001604052808381526020016034815250816000815181106111ee576111ee612da5565b602002602001018190525082896001600160a01b03167fc373662f5a11e3110db3b0ffb1dfe92f9654cd3e0ff75d9b7d89e128eb442bb8600084604051611236929190612e91565b60405180910390a3505050505b506001949350505050565b632aab05588261ffff811061126257600080fd5b61200002018161ffff811061127657600080fd5b60089182820401919006600402915091509054906101000a900463ffffffff1681565b6001600160a01b038116600090815260016020526040902054606090600160501b900461ffff1667ffffffffffffffff8111156112d8576112d8612e2c565b60405190808252806020026020018201604052801561131d57816020015b60408051808201909152600080825260208201528152602001906001900390816112f65790505b506001600160a01b0383166000908152600160208190526040822083519394500191905b818110156113c55760405180604001604052808483612710811061136757611367612da5565b015461ffff1681526020018483612710811061138557611385612da5565b015462010000900461ffff16905284518590839081106113a7576113a7612da5565b602002602001018190525080806113bd90612dd1565b915050611341565b505050919050565b6000806113d8610fce565b634aaae5585490915061ffff640100000000909104811690600090634aaae559908390811061140957611409612da5565b600691828204019190066005029054906101000a900464ffffffffff1664ffffffffff16905080600003611464575050634aaae558805461ffff9092166401000000000265ffff000000001990921691909117905550600090565b634aaae5585463ffffffff165b83831015611521578261148381612dd1565b935061149190508183612dea565b915081634aaae5598461ffff81106114ab576114ab612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff160217905550634aab10048361ffff81106114ed576114ed612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff168161151a9190612dea565b9050611471565b634aaae558805461ffff9095166401000000000265ffffffffffff1990951663ffffffff909216919091179390931790925550919050565b83336001600160a01b038216148061159257506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b6115ae5760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b0385166000908152600160205260409020805462010000900464ffffffffff16801515806115ed57508154600160481b900460ff1615155b6116305760405162461bcd60e51b8152602060048201526014602482015273139bc81c9959da5cdd195c9959081dd95a59da1d60621b604482015260640161073b565b600080851561167b5761164c896116468b611299565b856118de565b611654610fce565b6040516001600160a01b038b16906000805160206130e683398151915290600090a3611695565b5050815461ffff600160381b8204811691600160501b9004165b6116f2898989808060200260200160405190810160405280939291908181526020016000905b828210156116e7576116d860408302860136819003810190612f50565b815260200190600101906116bb565b505050505085611b94565b61170089858a8a8686612189565b505050505050505050565b6120038161ffff811061171d57600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b83336001600160a01b038216148061177457506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b6117905760405162461bcd60e51b815260040161073b90612dfd565b6001600160a01b03851660009081526001602052604090208054600160501b900461ffff1615611806576117db866117c788611299565b835462010000900464ffffffffff166118de565b6117e3610fce565b6040516001600160a01b038816906000805160206130e683398151915290600090a35b60006118128787611904565b9050611871878686808060200260200160405190810160405280939291908181526020016000905b828210156118665761185760408302860136819003810190612f50565b8152602001906001019061183a565b505050505083611b94565b61188087838787600080612189565b50505050505050565b60038161ffff811061101c57600080fd5b6001600160a01b03811660009081526001602052604081205460609062010000900464ffffffffff166118cc84612345565b64ffffffffff90911694909350915050565b8151156118f55780156118fa576118f58282611bb5565b505050565b6118f583836124f4565b6001600160a01b0382811660008181526001602052604080822090516305ed16ed60e21b815260048101939093526024830185905290929091839182917f0000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d909116906317b45bb490604401600060405180830381865afa15801561198c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119b49190810190612f82565b8151919350915081156119ef576119cc603483612eaa565b845466ffffffffff000019166201000064ffffffffff8316021785559150611b10565b8015611ad65760005b81811015611ad0576000848281518110611a1457611a14612da5565b60200260200101516000015190506000858381518110611a3657611a36612da5565b60200260200101516020015190508187612711018460348110611a5b57611a5b612da5565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff1602179055508087612718018460348110611a9b57611a9b612da5565b602091828204019190066101000a81548160ff021916908360ff16021790555050508080611ac890612dd1565b9150506119f8565b50611b10565b60405162461bcd60e51b815260206004820152600f60248201526e4e6f20616374697665206c6f636b7360881b604482015260640161073b565b6000611b1a610fce565b855460ff8416600160481b0269ff00000000000000ffff1990911661ffff83161717865560405190915081906001600160a01b038a16907fc373662f5a11e3110db3b0ffb1dfe92f9654cd3e0ff75d9b7d89e128eb442bb890611b809087908990612e91565b60405180910390a350909695505050505050565b8151156118f5578015611bab576118f582826128e9565b6118f58383611d1d565b6000611bbf610fce565b8351909150600090815b81811015611cc057600080878381518110611be657611be6612da5565b602002602001015160000151888481518110611c0457611c04612da5565b6020026020010151602001519150915060006127108289611c259190612eaa565b611c2f9190612ec1565b905080611c3b846108a4565b611c459190612dea565b6130038461ffff8110611c5a57611c5a612da5565b612aab02018861ffff8110611c7157611c71612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055508086611ca89190612ee3565b95505050508080611cb890612dd1565b915050611bc9565b5081611cca6113cd565b611cd49190612dea565b634aaae5598461ffff8110611ceb57611ceb612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055505050505050565b6000611d2883612345565b805190915080611d7a5760405162461bcd60e51b815260206004820152601d60248201527f5265676973746572656420776569676874206861732065787069726564000000604482015260640161073b565b6000806000611d87610fce565b9050611d91612a09565b60005b8751811015612027576000888281518110611db157611db1612da5565b60200260200101516000015190506000898381518110611dd357611dd3612da5565b602002602001015160200151905060008060005b8a811015611f2e5760008c8281518110611e0357611e03612da5565b60200260200101516020015190506000612710868f8581518110611e2957611e29612da5565b602002602001015160000151611e3f9190612eaa565b611e499190612ec1565b905080632aab05588861ffff8110611e6357611e63612da5565b6120000201611e72848d612ee3565b61ffff8110611e8357611e83612da5565b600891828204019190066004028282829054906101000a900463ffffffff16611eac9190613054565b92506101000a81548163ffffffff021916908363ffffffff1602179055508063ffffffff16898360358110611ee357611ee3612da5565b60200201818151611ef49190612ee3565b905250611f018282612eaa565b611f0b9086612ee3565b9450611f178185612ee3565b935050508080611f2690612dd1565b915050611de7565b5081611f39856108a4565b611f439190612ee3565b6130038561ffff8110611f5857611f58612da5565b612aab02018861ffff8110611f6f57611f6f612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055508060038561ffff8110611faf57611faf612da5565b600891828204019190066004028282829054906101000a900463ffffffff16611fd89190613054565b92506101000a81548163ffffffff021916908363ffffffff16021790555081896120029190612ee3565b985061200e8189612ee3565b975050505050808061201f90612dd1565b915050611d94565b5060005b858110156120e757600087828151811061204757612047612da5565b602002602001015160200151905082816035811061206757612067612da5565b6020020151634aab100461207b8387612ee3565b61ffff811061208c5761208c612da5565b600891828204019190066004028282829054906101000a900463ffffffff166120b59190613054565b92506101000a81548163ffffffff021916908363ffffffff1602179055505080806120df90612dd1565b91505061202b565b50836120f16113cd565b6120fb9190612ee3565b634aaae5598361ffff811061211257612112612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff16021790555082634aaae55860008282829054906101000a900463ffffffff166121619190613054565b92506101000a81548163ffffffff021916908363ffffffff1602179055505050505050505050565b600185018360005b8181101561225c5760405180604001604052808888848181106121b6576121b6612da5565b9050604002016000013561ffff1661ffff1681526020018888848181106121df576121df612da5565b9050604002016020013561ffff1661ffff168152508382866122019190612ee3565b612710811061221257612212612da5565b612220929101906002612a28565b5086868281811061223357612233612da5565b90506040020160200135856122489190612ee3565b94508061225481612dd1565b915050612191565b506127108411156122af5760405162461bcd60e51b815260206004820152601860248201527f4578636565646564206d617820766f746520706f696e74730000000000000000604482015260640161073b565b6122b98184612ee3565b875464ffff00ffff60381b1916600160501b61ffff9283160268ffff00000000000000191617600160381b918616919091021787556122f6610fce565b886001600160a01b03167f027b95150a840915102d246f135fa783478df804caae0b9a4de2bdf1798b924788888860405161233393929190613078565b60405180910390a35050505050505050565b6001600160a01b03811660009081526001602052604081208054606092600160481b90910460ff1690612376610fce565b835490915060009062010000900464ffffffffff1661239a57835461ffff1661239c565b815b9050612718840161271185018467ffffffffffffffff8111156123c1576123c1612e2c565b60405190808252806020026020018201604052801561240657816020015b60408051808201909152600080825260208201528152602001906001900390816123df5790505b50965060005b858110156124e85760008484836034811061242957612429612da5565b6020810491909101546124489291601f166101000a900460ff16612ee3565b905085811161245a57818952506124e8565b60006124668783612dea565b9050600084846034811061247c5761247c612da5565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1690506040518060400160405280828152602001838152508b85815181106124c7576124c7612da5565b602002602001018190525050505080806124e090612dd1565b91505061240c565b50505050505050919050565b60006124ff83612345565b805190915060008080612510610fce565b905061251a612a09565b60005b87518110156127af5760008089838151811061253b5761253b612da5565b6020026020010151600001518a848151811061255957612559612da5565b6020026020010151602001519150915060008060005b8a8110156126b65760008c828151811061258b5761258b612da5565b60200260200101516020015190506000612710868f85815181106125b1576125b1612da5565b6020026020010151600001516125c79190612eaa565b6125d19190612ec1565b905080632aab05588861ffff81106125eb576125eb612da5565b61200002016125fa848d612ee3565b61ffff811061260b5761260b612da5565b600891828204019190066004028282829054906101000a900463ffffffff1661263491906130c8565b92506101000a81548163ffffffff021916908363ffffffff1602179055508063ffffffff1689836035811061266b5761266b612da5565b6020020181815161267c9190612ee3565b9052506126898282612eaa565b6126939086612ee3565b945061269f8185612ee3565b9350505080806126ae90612dd1565b91505061256f565b50816126c1856108a4565b6126cb9190612dea565b6130038561ffff81106126e0576126e0612da5565b612aab02018861ffff81106126f7576126f7612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff1602179055508060038561ffff811061273757612737612da5565b600891828204019190066004028282829054906101000a900463ffffffff1661276091906130c8565b92506101000a81548163ffffffff021916908363ffffffff160217905550818961278a9190612ee3565b98506127968189612ee3565b97505050505080806127a790612dd1565b91505061251d565b5060005b8581101561286f5760008782815181106127cf576127cf612da5565b60200260200101516020015190508281603581106127ef576127ef612da5565b6020020151634aab10046128038387612ee3565b61ffff811061281457612814612da5565b600891828204019190066004028282829054906101000a900463ffffffff1661283d91906130c8565b92506101000a81548163ffffffff021916908363ffffffff16021790555050808061286790612dd1565b9150506127b3565b50836128796113cd565b6128839190612dea565b634aaae5598361ffff811061289a5761289a612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff16021790555082634aaae55860008282829054906101000a900463ffffffff1661216191906130c8565b60006128f3610fce565b8351909150600090815b818110156129f557600086828151811061291957612919612da5565b6020026020010151600001519050600087838151811061293b5761293b612da5565b60200260200101516020015190506000612710828961295a9190612eaa565b6129649190612ec1565b905080612970846108a4565b61297a9190612ee3565b6130038461ffff811061298f5761298f612da5565b612aab02018861ffff81106129a6576129a6612da5565b600691828204019190066005026101000a81548164ffffffffff021916908364ffffffffff16021790555080866129dd9190612ee3565b955050505080806129ed90612dd1565b9150506128fd565b50816129ff6113cd565b611cd49190612ee3565b604051806106a001604052806035906020820280368337509192915050565b600183019183908215612aae5791602002820160005b83821115612a7e57835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302612a3e565b8015612aac5782816101000a81549061ffff0219169055600201602081600101049283019260010302612a7e565b505b50612aba929150612abe565b5090565b5b80821115612aba5760008155600101612abf565b60008060408385031215612ae657600080fd5b50508035926020909101359150565b80356001600160a01b0381168114612b0c57600080fd5b919050565b60008060408385031215612b2457600080fd5b612b2d83612af5565b9150612b3b60208401612af5565b90509250929050565b600060208284031215612b5657600080fd5b612b5f82612af5565b9392505050565b600060208284031215612b7857600080fd5b5035919050565b60008060408385031215612b9257600080fd5b612b9b83612af5565b946020939093013593505050565b80358015158114612b0c57600080fd5b60008060408385031215612bcc57600080fd5b612bd583612af5565b9150612b3b60208401612ba9565b602080825282518282018190526000919060409081850190868401855b82811015612c2d57612c1d84835180518252602090810151910152565b9284019290850190600101612c00565b5091979650505050505050565b60008083601f840112612c4c57600080fd5b50813567ffffffffffffffff811115612c6457600080fd5b6020830191508360208260061b8501011115612c7f57600080fd5b9250929050565b60008060008060608587031215612c9c57600080fd5b612ca585612af5565b9350602085013567ffffffffffffffff811115612cc157600080fd5b612ccd87828801612c3a565b9094509250612ce0905060408601612ba9565b905092959194509250565b60008060008060608587031215612d0157600080fd5b612d0a85612af5565b935060208501359250604085013567ffffffffffffffff811115612d2d57600080fd5b612d3987828801612c3a565b95989497509550505050565b6000604080830185845260208281860152818651808452606087019150828801935060005b81811015612d9757612d8783865180518252602090810151910152565b9383019391850191600101612d6a565b509098975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612de357612de3612dbb565b5060010190565b818103818111156106ac576106ac612dbb565b60208082526015908201527411195b1959d85d19481b9bdd08185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b600081518084526020808501945080840160005b83811015612e8657612e7387835180518252602090810151910152565b6040969096019590820190600101612e56565b509495945050505050565b828152604060208201526000610c3f6040830184612e42565b80820281158282048414176106ac576106ac612dbb565b600082612ede57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156106ac576106ac612dbb565b6040805190810167ffffffffffffffff81118282101715612f1957612f19612e2c565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612f4857612f48612e2c565b604052919050565b600060408284031215612f6257600080fd5b612f6a612ef6565b82358152602083013560208201528091505092915050565b6000806040808486031215612f9657600080fd5b835167ffffffffffffffff80821115612fae57600080fd5b818601915086601f830112612fc257600080fd5b8151602082821115612fd657612fd6612e2c565b612fe4818360051b01612f1f565b828152818101935060069290921b84018101918983111561300457600080fd5b938101935b828510156130445785858b0312156130215760008081fd5b613029612ef6565b85518152828601518382015284529385019392810192613009565b9701519698969750505050505050565b63ffffffff81811683821601908082111561307157613071612dbb565b5092915050565b60408082528181018490526000908560608401835b878110156130b3578235825260208084013590830152918301919083019060010161308d565b50809350505050826020830152949350505050565b63ffffffff82811682821603908082111561307157613071612dbb56fe04c7eb7e6d81de1f92d1790dec661c82610b206ba7e8efbe4b9e3e1c3573350ba26469706673582212208333a4de8760c268c6d6ed1cb2c9d21f7af9de8768b72a66b5cf55b4e0d7c36364736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf80000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c
-----Decoded View---------------
Arg [0] : _prismaCore (address): 0x5d17eA085F2FF5da3e6979D5d26F1dBaB664ccf8
Arg [1] : _tokenLocker (address): 0x3f78544364c3eCcDCe4d9C89a630AEa26122829d
Arg [2] : _vault (address): 0x06bDF212C290473dCACea9793890C5024c7Eb02c
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000005d17ea085f2ff5da3e6979d5d26f1dbab664ccf8
Arg [1] : 0000000000000000000000003f78544364c3eccdce4d9c89a630aea26122829d
Arg [2] : 00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.