Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 20531309 | 113 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract contains unverified libraries: PerlinNoise, Trig, BalanceLogicLibrary, DelegationLogicLibrary
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
FeesVotingReward
Compiler Version
v0.8.19+commit.7dd6d404
ZkSolc Version
v1.5.15
Optimization Enabled:
Yes with Mode 3
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;
import {VotingReward} from "./VotingReward.sol";
import {IVoter} from "../interfaces/IVoter.sol";
/// @notice Bribes pay out rewards for a given pool based on the votes that were received from the user (goes hand in hand with Voter.vote())
contract FeesVotingReward is VotingReward {
constructor(
address _forwarder,
address _voter,
address[] memory _rewards
) VotingReward(_forwarder, _voter, _rewards) {}
/// @inheritdoc VotingReward
function notifyRewardAmount(address token, uint256 amount) external override nonReentrant {
address sender = _msgSender();
if (IVoter(voter).gaugeToFees(sender) != address(this)) revert NotGauge();
if (!isReward[token]) revert InvalidReward();
_notifyRewardAmount(sender, token, amount);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IVoter {
error AlreadyVotedOrDeposited();
error DistributeWindow();
error FactoryPathNotApproved();
error GaugeAlreadyKilled();
error GaugeAlreadyRevived();
error GaugeExists();
error GaugeDoesNotExist(address _pool);
error GaugeNotAlive(address _gauge);
error InactiveManagedNFT();
error MaximumVotingNumberTooLow();
error NonZeroVotes();
error NotAPool();
error NotApprovedOrOwner();
error NotGovernor();
error NotEmergencyCouncil();
error NotMinter();
error NotWhitelistedNFT();
error NotWhitelistedToken();
error SameValue();
error SpecialVotingWindow();
error TooManyPools();
error UnequalLengths();
error ZeroBalance();
error ZeroAddress();
event GaugeCreated(
address indexed poolFactory,
address indexed votingRewardsFactory,
address indexed gaugeFactory,
address pool,
address bribeVotingReward,
address feeVotingReward,
address gauge,
address creator
);
event GaugeKilled(address indexed gauge);
event GaugeRevived(address indexed gauge);
event Voted(
address indexed voter,
address indexed pool,
uint256 indexed tokenId,
uint256 weight,
uint256 totalWeight,
uint256 timestamp
);
event Abstained(
address indexed voter,
address indexed pool,
uint256 indexed tokenId,
uint256 weight,
uint256 totalWeight,
uint256 timestamp
);
event NotifyReward(address indexed sender, address indexed reward, uint256 amount);
event DistributeReward(address indexed sender, address indexed gauge, uint256 amount);
event WhitelistToken(address indexed whitelister, address indexed token, bool indexed _bool);
event WhitelistNFT(address indexed whitelister, uint256 indexed tokenId, bool indexed _bool);
/// @notice Store trusted forwarder address to pass into factories
function forwarder() external view returns (address);
/// @notice The ve token that governs these contracts
function ve() external view returns (address);
/// @notice Factory registry for valid pool / gauge / rewards factories
function factoryRegistry() external view returns (address);
/// @notice Address of Minter.sol
function minter() external view returns (address);
/// @notice Standard OZ IGovernor using ve for vote weights.
function governor() external view returns (address);
/// @notice Custom Epoch Governor using ve for vote weights.
function epochGovernor() external view returns (address);
/// @notice credibly neutral party similar to Curve's Emergency DAO
function emergencyCouncil() external view returns (address);
/// @dev Total Voting Weights
function totalWeight() external view returns (uint256);
/// @dev Most number of pools one voter can vote for at once
function maxVotingNum() external view returns (uint256);
// mappings
/// @dev Pool => Gauge
function gauges(address pool) external view returns (address);
/// @dev Gauge => Pool
function poolForGauge(address gauge) external view returns (address);
/// @dev Gauge => Fees Voting Reward
function gaugeToFees(address gauge) external view returns (address);
/// @dev Gauge => Bribes Voting Reward
function gaugeToBribe(address gauge) external view returns (address);
/// @dev Pool => Weights
function weights(address pool) external view returns (uint256);
/// @dev NFT => Pool => Votes
function votes(uint256 tokenId, address pool) external view returns (uint256);
/// @dev NFT => Total voting weight of NFT
function usedWeights(uint256 tokenId) external view returns (uint256);
/// @dev Nft => Timestamp of last vote (ensures single vote per epoch)
function lastVoted(uint256 tokenId) external view returns (uint256);
/// @dev Address => Gauge
function isGauge(address) external view returns (bool);
/// @dev Token => Whitelisted status
function isWhitelistedToken(address token) external view returns (bool);
/// @dev TokenId => Whitelisted status
function isWhitelistedNFT(uint256 tokenId) external view returns (bool);
/// @dev Gauge => Liveness status
function isAlive(address gauge) external view returns (bool);
/// @dev Gauge => Amount claimable
function claimable(address gauge) external view returns (uint256);
/// @notice Number of pools with a Gauge
function length() external view returns (uint256);
/// @notice Called by Minter to distribute weekly emissions rewards for disbursement amongst gauges.
/// @dev Assumes totalWeight != 0 (Will never be zero as long as users are voting).
/// Throws if not called by minter.
/// @param _amount Amount of rewards to distribute.
function notifyRewardAmount(uint256 _amount) external;
/// @dev Utility to distribute to gauges of pools in range _start to _finish.
/// @param _start Starting index of gauges to distribute to.
/// @param _finish Ending index of gauges to distribute to.
function distribute(uint256 _start, uint256 _finish) external;
/// @dev Utility to distribute to gauges of pools in array.
/// @param _gauges Array of gauges to distribute to.
function distribute(address[] memory _gauges) external;
/// @notice Called by users to update voting balances in voting rewards contracts.
/// @param _tokenId Id of veNFT whose balance you wish to update.
function poke(uint256 _tokenId) external;
/// @notice Called by users to vote for pools. Votes distributed proportionally based on weights.
/// Can only vote or deposit into a managed NFT once per epoch.
/// Can only vote for gauges that have not been killed.
/// @dev Weights are distributed proportional to the sum of the weights in the array.
/// Throws if length of _poolVote and _weights do not match.
/// @param _tokenId Id of veNFT you are voting with.
/// @param _poolVote Array of pools you are voting for.
/// @param _weights Weights of pools.
function vote(uint256 _tokenId, address[] calldata _poolVote, uint256[] calldata _weights) external;
/// @notice Called by users to reset voting state. Required if you wish to make changes to
/// veNFT state (e.g. merge, split, deposit into managed etc).
/// Cannot reset in the same epoch that you voted in.
/// Can vote or deposit into a managed NFT again after reset.
/// @param _tokenId Id of veNFT you are reseting.
function reset(uint256 _tokenId) external;
/// @notice Called by users to deposit into a managed NFT.
/// Can only vote or deposit into a managed NFT once per epoch.
/// Note that NFTs deposited into a managed NFT will be re-locked
/// to the maximum lock time on withdrawal.
/// @dev Throws if not approved or owner.
/// Throws if managed NFT is inactive.
/// Throws if depositing within privileged window (one hour prior to epoch flip).
function depositManaged(uint256 _tokenId, uint256 _mTokenId) external;
/// @notice Called by users to withdraw from a managed NFT.
/// Cannot do it in the same epoch that you deposited into a managed NFT.
/// Can vote or deposit into a managed NFT again after withdrawing.
/// Note that the NFT withdrawn is re-locked to the maximum lock time.
function withdrawManaged(uint256 _tokenId) external;
/// @notice Claim emissions from gauges.
/// @param _gauges Array of gauges to collect emissions from.
function claimRewards(address[] memory _gauges) external;
/// @notice Claim bribes for a given NFT.
/// @dev Utility to help batch bribe claims.
/// @param _bribes Array of BribeVotingReward contracts to collect from.
/// @param _tokens Array of tokens that are used as bribes.
/// @param _tokenId Id of veNFT that you wish to claim bribes for.
function claimBribes(address[] memory _bribes, address[][] memory _tokens, uint256 _tokenId) external;
/// @notice Claim fees for a given NFT.
/// @dev Utility to help batch fee claims.
/// @param _fees Array of FeesVotingReward contracts to collect from.
/// @param _tokens Array of tokens that are used as fees.
/// @param _tokenId Id of veNFT that you wish to claim fees for.
function claimFees(address[] memory _fees, address[][] memory _tokens, uint256 _tokenId) external;
/// @notice Set new governor.
/// @dev Throws if not called by governor.
/// @param _governor .
function setGovernor(address _governor) external;
/// @notice Set new epoch based governor.
/// @dev Throws if not called by governor.
/// @param _epochGovernor .
function setEpochGovernor(address _epochGovernor) external;
/// @notice Set new emergency council.
/// @dev Throws if not called by emergency council.
/// @param _emergencyCouncil .
function setEmergencyCouncil(address _emergencyCouncil) external;
/// @notice Set maximum number of gauges that can be voted for.
/// @dev Throws if not called by governor.
/// Throws if _maxVotingNum is too low.
/// Throws if the values are the same.
/// @param _maxVotingNum .
function setMaxVotingNum(uint256 _maxVotingNum) external;
/// @notice Whitelist (or unwhitelist) token for use in bribes.
/// @dev Throws if not called by governor.
/// @param _token .
/// @param _bool .
function whitelistToken(address _token, bool _bool) external;
/// @notice Whitelist (or unwhitelist) token id for voting in last hour prior to epoch flip.
/// @dev Throws if not called by governor.
/// Throws if already whitelisted.
/// @param _tokenId .
/// @param _bool .
function whitelistNFT(uint256 _tokenId, bool _bool) external;
/// @notice Create a new gauge (unpermissioned).
/// @dev Governor can create a new gauge for a pool with any address.
/// @param _poolFactory .
/// @param _pool .
function createGauge(address _poolFactory, address _pool) external returns (address);
/// @notice Kills a gauge. The gauge will not receive any new emissions and cannot be deposited into.
/// Can still withdraw from gauge.
/// @dev Throws if not called by emergency council.
/// Throws if gauge already killed.
/// @param _gauge .
function killGauge(address _gauge) external;
/// @notice Revives a killed gauge. Gauge will can receive emissions and deposits again.
/// @dev Throws if not called by emergency council.
/// Throws if gauge is not killed.
/// @param _gauge .
function reviveGauge(address _gauge) external;
/// @dev Update claims to emissions for an array of gauges.
/// @param _gauges Array of gauges to update emissions for.
function updateFor(address[] memory _gauges) external;
/// @dev Update claims to emissions for gauges based on their pool id as stored in Voter.
/// @param _start Starting index of pools.
/// @param _end Ending index of pools.
function updateFor(uint256 _start, uint256 _end) external;
/// @dev Update claims to emissions for single gauge
/// @param _gauge .
function updateFor(address _gauge) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;
import {Reward} from "./Reward.sol";
import {IVotingEscrow} from "../interfaces/IVotingEscrow.sol";
/// @title Base voting reward contract for distribution of rewards by token id
/// on a weekly basis
abstract contract VotingReward is Reward {
constructor(address _forwarder, address _voter, address[] memory _rewards) Reward(_forwarder, _voter) {
uint256 _length = _rewards.length;
for (uint256 i; i < _length; i++) {
if (_rewards[i] != address(0)) {
isReward[_rewards[i]] = true;
rewards.push(_rewards[i]);
}
}
authorized = _voter;
}
/// @inheritdoc Reward
function getReward(uint256 tokenId, address[] memory tokens) external override nonReentrant {
address sender = _msgSender();
if (!IVotingEscrow(ve).isApprovedOrOwner(sender, tokenId) && sender != voter) revert NotAuthorized();
address _owner = IVotingEscrow(ve).ownerOf(tokenId);
_getReward(_owner, tokenId, tokens);
}
/// @inheritdoc Reward
function notifyRewardAmount(address token, uint256 amount) external virtual override {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC165, IERC721, IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {IERC6372} from "@openzeppelin/contracts/interfaces/IERC6372.sol";
import {IERC4906} from "@openzeppelin/contracts/interfaces/IERC4906.sol";
import {IVotes} from "../governance/IVotes.sol";
interface IVotingEscrow is IVotes, IERC4906, IERC6372, IERC721Metadata {
struct LockedBalance {
int128 amount;
uint256 end;
bool isPermanent;
}
struct UserPoint {
int128 bias;
int128 slope; // # -dweight / dt
uint256 ts;
uint256 blk; // block
uint256 permanent;
}
struct GlobalPoint {
int128 bias;
int128 slope; // # -dweight / dt
uint256 ts;
uint256 blk; // block
uint256 permanentLockBalance;
}
/// @notice A checkpoint for recorded delegated voting weights at a certain timestamp
struct Checkpoint {
uint256 fromTimestamp;
address owner;
uint256 delegatedBalance;
uint256 delegatee;
}
enum DepositType {
DEPOSIT_FOR_TYPE,
CREATE_LOCK_TYPE,
INCREASE_LOCK_AMOUNT,
INCREASE_UNLOCK_TIME
}
/// @dev Different types of veNFTs:
/// NORMAL - typical veNFT
/// LOCKED - veNFT which is locked into a MANAGED veNFT
/// MANAGED - veNFT which can accept the deposit of NORMAL veNFTs
enum EscrowType {
NORMAL,
LOCKED,
MANAGED
}
error AlreadyVoted();
error AmountTooBig();
error ERC721ReceiverRejectedTokens();
error ERC721TransferToNonERC721ReceiverImplementer();
error InvalidNonce();
error InvalidSignature();
error InvalidSignatureS();
error InvalidManagedNFTId();
error LockDurationNotInFuture();
error LockDurationTooLong();
error LockExpired();
error LockNotExpired();
error NoLockFound();
error NonExistentToken();
error NotApprovedOrOwner();
error NotDistributor();
error NotEmergencyCouncilOrGovernor();
error NotGovernor();
error NotGovernorOrManager();
error NotManagedNFT();
error NotManagedOrNormalNFT();
error NotLockedNFT();
error NotNormalNFT();
error NotPermanentLock();
error NotOwner();
error NotTeam();
error NotVoter();
error OwnershipChange();
error PermanentLock();
error SameAddress();
error SameNFT();
error SameState();
error SplitNoOwner();
error SplitNotAllowed();
error SignatureExpired();
error TooManyTokenIDs();
error ZeroAddress();
error ZeroAmount();
error ZeroBalance();
event Deposit(
address indexed provider,
uint256 indexed tokenId,
DepositType indexed depositType,
uint256 value,
uint256 locktime,
uint256 ts
);
event Withdraw(address indexed provider, uint256 indexed tokenId, uint256 value, uint256 ts);
event LockPermanent(address indexed _owner, uint256 indexed _tokenId, uint256 amount, uint256 _ts);
event UnlockPermanent(address indexed _owner, uint256 indexed _tokenId, uint256 amount, uint256 _ts);
event Supply(uint256 prevSupply, uint256 supply);
event Merge(
address indexed _sender,
uint256 indexed _from,
uint256 indexed _to,
uint256 _amountFrom,
uint256 _amountTo,
uint256 _amountFinal,
uint256 _locktime,
uint256 _ts
);
event Split(
uint256 indexed _from,
uint256 indexed _tokenId1,
uint256 indexed _tokenId2,
address _sender,
uint256 _splitAmount1,
uint256 _splitAmount2,
uint256 _locktime,
uint256 _ts
);
event CreateManaged(
address indexed _to,
uint256 indexed _mTokenId,
address indexed _from,
address _lockedManagedReward,
address _freeManagedReward
);
event DepositManaged(
address indexed _owner,
uint256 indexed _tokenId,
uint256 indexed _mTokenId,
uint256 _weight,
uint256 _ts
);
event WithdrawManaged(
address indexed _owner,
uint256 indexed _tokenId,
uint256 indexed _mTokenId,
uint256 _weight,
uint256 _ts
);
event SetAllowedManager(address indexed _allowedManager);
// State variables
/// @notice Address of Meta-tx Forwarder
function forwarder() external view returns (address);
/// @notice Address of FactoryRegistry.sol
function factoryRegistry() external view returns (address);
/// @notice Address of token (ABX) used to create a veNFT
function token() external view returns (address);
/// @notice Address of RewardsDistributor.sol
function distributor() external view returns (address);
/// @notice Address of Voter.sol
function voter() external view returns (address);
/// @notice Address of Protocol Team multisig
function team() external view returns (address);
/// @notice Address of art proxy used for on-chain art generation
function artProxy() external view returns (address);
/// @dev address which can create managed NFTs
function allowedManager() external view returns (address);
/// @dev Current count of token
function tokenId() external view returns (uint256);
/*///////////////////////////////////////////////////////////////
MANAGED NFT STORAGE
//////////////////////////////////////////////////////////////*/
/// @dev Mapping of token id to escrow type
/// Takes advantage of the fact default value is EscrowType.NORMAL
function escrowType(uint256 tokenId) external view returns (EscrowType);
/// @dev Mapping of token id to managed id
function idToManaged(uint256 tokenId) external view returns (uint256 managedTokenId);
/// @dev Mapping of user token id to managed token id to weight of token id
function weights(uint256 tokenId, uint256 managedTokenId) external view returns (uint256 weight);
/// @dev Mapping of managed id to deactivated state
function deactivated(uint256 tokenId) external view returns (bool inactive);
/// @dev Mapping from managed nft id to locked managed rewards
/// `token` denominated rewards (rebases/rewards) stored in locked managed rewards contract
/// to prevent co-mingling of assets
function managedToLocked(uint256 tokenId) external view returns (address);
/// @dev Mapping from managed nft id to free managed rewards contract
/// these rewards can be freely withdrawn by users
function managedToFree(uint256 tokenId) external view returns (address);
/*///////////////////////////////////////////////////////////////
MANAGED NFT LOGIC
//////////////////////////////////////////////////////////////*/
/// @notice Create managed NFT (a permanent lock) for use within ecosystem.
/// @dev Throws if address already owns a managed NFT.
/// @return _mTokenId managed token id.
function createManagedLockFor(address _to) external returns (uint256 _mTokenId);
/// @notice Delegates balance to managed nft
/// Note that NFTs deposited into a managed NFT will be re-locked
/// to the maximum lock time on withdrawal.
/// Permanent locks that are deposited will automatically unlock.
/// @dev Managed nft will remain max-locked as long as there is at least one
/// deposit or withdrawal per week.
/// Throws if deposit nft is managed.
/// Throws if recipient nft is not managed.
/// Throws if deposit nft is already locked.
/// Throws if not called by voter.
/// @param _tokenId tokenId of NFT being deposited
/// @param _mTokenId tokenId of managed NFT that will receive the deposit
function depositManaged(uint256 _tokenId, uint256 _mTokenId) external;
/// @notice Retrieves locked rewards and withdraws balance from managed nft.
/// Note that the NFT withdrawn is re-locked to the maximum lock time.
/// @dev Throws if NFT not locked.
/// Throws if not called by voter.
/// @param _tokenId tokenId of NFT being deposited.
function withdrawManaged(uint256 _tokenId) external;
/// @notice Permit one address to call createManagedLockFor() that is not Voter.governor()
function setAllowedManager(address _allowedManager) external;
/// @notice Set Managed NFT state. Inactive NFTs cannot be deposited into.
/// @param _mTokenId managed nft state to set
/// @param _state true => inactive, false => active
function setManagedState(uint256 _mTokenId, bool _state) external;
/*///////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function version() external view returns (string memory);
function decimals() external view returns (uint8);
function setTeam(address _team) external;
function setArtProxy(address _proxy) external;
/// @inheritdoc IERC721Metadata
function tokenURI(uint256 tokenId) external view returns (string memory);
/*//////////////////////////////////////////////////////////////
ERC721 BALANCE/OWNER STORAGE
//////////////////////////////////////////////////////////////*/
/// @dev Mapping from owner address to mapping of index to tokenId
function ownerToNFTokenIdList(address _owner, uint256 _index) external view returns (uint256 _tokenId);
/// @inheritdoc IERC721
function ownerOf(uint256 tokenId) external view returns (address owner);
/// @inheritdoc IERC721
function balanceOf(address owner) external view returns (uint256 balance);
/*//////////////////////////////////////////////////////////////
ERC721 APPROVAL STORAGE
//////////////////////////////////////////////////////////////*/
/// @inheritdoc IERC721
function getApproved(uint256 _tokenId) external view returns (address operator);
/// @inheritdoc IERC721
function isApprovedForAll(address owner, address operator) external view returns (bool);
/// @notice Check whether spender is owner or an approved user for a given veNFT
/// @param _spender .
/// @param _tokenId .
function isApprovedOrOwner(address _spender, uint256 _tokenId) external returns (bool);
/*//////////////////////////////////////////////////////////////
ERC721 LOGIC
//////////////////////////////////////////////////////////////*/
/// @inheritdoc IERC721
function approve(address to, uint256 tokenId) external;
/// @inheritdoc IERC721
function setApprovalForAll(address operator, bool approved) external;
/// @inheritdoc IERC721
function transferFrom(address from, address to, uint256 tokenId) external;
/// @inheritdoc IERC721
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/// @inheritdoc IERC721
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/*//////////////////////////////////////////////////////////////
ERC165 LOGIC
//////////////////////////////////////////////////////////////*/
/// @inheritdoc IERC165
function supportsInterface(bytes4 _interfaceID) external view returns (bool);
/*//////////////////////////////////////////////////////////////
ESCROW STORAGE
//////////////////////////////////////////////////////////////*/
/// @notice Total count of epochs witnessed since contract creation
function epoch() external view returns (uint256);
/// @notice Total amount of token() deposited
function supply() external view returns (uint256);
/// @notice Aggregate permanent locked balances
function permanentLockBalance() external view returns (uint256);
function userPointEpoch(uint256 _tokenId) external view returns (uint256 _epoch);
/// @notice time -> signed slope change
function slopeChanges(uint256 _timestamp) external view returns (int128);
/// @notice account -> can split
function canSplit(address _account) external view returns (bool);
/// @notice Global point history at a given index
function pointHistory(uint256 _loc) external view returns (GlobalPoint memory);
/// @notice Get the LockedBalance (amount, end) of a _tokenId
/// @param _tokenId .
/// @return LockedBalance of _tokenId
function locked(uint256 _tokenId) external view returns (LockedBalance memory);
/// @notice User -> UserPoint[userEpoch]
function userPointHistory(uint256 _tokenId, uint256 _loc) external view returns (UserPoint memory);
/*//////////////////////////////////////////////////////////////
ESCROW LOGIC
//////////////////////////////////////////////////////////////*/
/// @notice Record global data to checkpoint
function checkpoint() external;
/// @notice Deposit `_value` tokens for `_tokenId` and add to the lock
/// @dev Anyone (even a smart contract) can deposit for someone else, but
/// cannot extend their locktime and deposit for a brand new user
/// @param _tokenId lock NFT
/// @param _value Amount to add to user's lock
function depositFor(uint256 _tokenId, uint256 _value) external;
/// @notice Deposit `_value` tokens for `msg.sender` and lock for `_lockDuration`
/// @param _value Amount to deposit
/// @param _lockDuration Number of seconds to lock tokens for (rounded down to nearest week)
/// @return TokenId of created veNFT
function createLock(uint256 _value, uint256 _lockDuration) external returns (uint256);
/// @notice Deposit `_value` tokens for `_to` and lock for `_lockDuration`
/// @param _value Amount to deposit
/// @param _lockDuration Number of seconds to lock tokens for (rounded down to nearest week)
/// @param _to Address to deposit
/// @return TokenId of created veNFT
function createLockFor(uint256 _value, uint256 _lockDuration, address _to) external returns (uint256);
/// @notice Deposit `_value` additional tokens for `_tokenId` without modifying the unlock time
/// @param _value Amount of tokens to deposit and add to the lock
function increaseAmount(uint256 _tokenId, uint256 _value) external;
/// @notice Extend the unlock time for `_tokenId`
/// Cannot extend lock time of permanent locks
/// @param _lockDuration New number of seconds until tokens unlock
function increaseUnlockTime(uint256 _tokenId, uint256 _lockDuration) external;
/// @notice Withdraw all tokens for `_tokenId`
/// @dev Only possible if the lock is both expired and not permanent
/// This will burn the veNFT. Any rebases or rewards that are unclaimed
/// will no longer be claimable. Claim all rebases and rewards prior to calling this.
function withdraw(uint256 _tokenId) external;
/// @notice Merges `_from` into `_to`.
/// @dev Cannot merge `_from` locks that are permanent or have already voted this epoch.
/// Cannot merge `_to` locks that have already expired.
/// This will burn the veNFT. Any rebases or rewards that are unclaimed
/// will no longer be claimable. Claim all rebases and rewards prior to calling this.
/// @param _from VeNFT to merge from.
/// @param _to VeNFT to merge into.
function merge(uint256 _from, uint256 _to) external;
/// @notice Splits veNFT into two new veNFTS - one with oldLocked.amount - `_amount`, and the second with `_amount`
/// @dev This burns the tokenId of the target veNFT
/// Callable by approved or owner
/// If this is called by approved, approved will not have permissions to manipulate the newly created veNFTs
/// Returns the two new split veNFTs to owner
/// If `from` is permanent, will automatically dedelegate.
/// This will burn the veNFT. Any rebases or rewards that are unclaimed
/// will no longer be claimable. Claim all rebases and rewards prior to calling this.
/// @param _from VeNFT to split.
/// @param _amount Amount to split from veNFT.
/// @return _tokenId1 Return tokenId of veNFT with oldLocked.amount - `_amount`.
/// @return _tokenId2 Return tokenId of veNFT with `_amount`.
function split(uint256 _from, uint256 _amount) external returns (uint256 _tokenId1, uint256 _tokenId2);
/// @notice Toggle split for a specific address.
/// @dev Toggle split for address(0) to enable or disable for all.
/// @param _account Address to toggle split permissions
/// @param _bool True to allow, false to disallow
function toggleSplit(address _account, bool _bool) external;
/// @notice Permanently lock a veNFT. Voting power will be equal to
/// `LockedBalance.amount` with no decay. Required to delegate.
/// @dev Only callable by unlocked normal veNFTs.
/// @param _tokenId tokenId to lock.
function lockPermanent(uint256 _tokenId) external;
/// @notice Unlock a permanently locked veNFT. Voting power will decay.
/// Will automatically dedelegate if delegated.
/// @dev Only callable by permanently locked veNFTs.
/// Cannot unlock if already voted this epoch.
/// @param _tokenId tokenId to unlock.
function unlockPermanent(uint256 _tokenId) external;
/*///////////////////////////////////////////////////////////////
GAUGE VOTING STORAGE
//////////////////////////////////////////////////////////////*/
/// @notice Get the voting power for _tokenId at the current timestamp
/// @dev Returns 0 if called in the same block as a transfer.
/// @param _tokenId .
/// @return Voting power
function balanceOfNFT(uint256 _tokenId) external view returns (uint256);
/// @notice Get the voting power for _tokenId at a given timestamp
/// @param _tokenId .
/// @param _t Timestamp to query voting power
/// @return Voting power
function balanceOfNFTAt(uint256 _tokenId, uint256 _t) external view returns (uint256);
/// @notice Calculate total voting power at current timestamp
/// @return Total voting power at current timestamp
function totalSupply() external view returns (uint256);
/// @notice Calculate total voting power at a given timestamp
/// @param _t Timestamp to query total voting power
/// @return Total voting power at given timestamp
function totalSupplyAt(uint256 _t) external view returns (uint256);
/*///////////////////////////////////////////////////////////////
GAUGE VOTING LOGIC
//////////////////////////////////////////////////////////////*/
/// @notice See if a queried _tokenId has actively voted
/// @param _tokenId .
/// @return True if voted, else false
function voted(uint256 _tokenId) external view returns (bool);
/// @notice Set the global state voter and distributor
/// @dev This is only called once, at setup
function setVoterAndDistributor(address _voter, address _distributor) external;
/// @notice Set `voted` for _tokenId to true or false
/// @dev Only callable by voter
/// @param _tokenId .
/// @param _voted .
function voting(uint256 _tokenId, bool _voted) external;
/*///////////////////////////////////////////////////////////////
DAO VOTING STORAGE
//////////////////////////////////////////////////////////////*/
/// @notice The number of checkpoints for each tokenId
function numCheckpoints(uint256 tokenId) external view returns (uint48);
/// @notice A record of states for signing / validating signatures
function nonces(address account) external view returns (uint256);
/// @inheritdoc IVotes
function delegates(uint256 delegator) external view returns (uint256);
/// @notice A record of delegated token checkpoints for each account, by index
/// @param tokenId .
/// @param index .
/// @return Checkpoint
function checkpoints(uint256 tokenId, uint48 index) external view returns (Checkpoint memory);
/// @inheritdoc IVotes
function getPastVotes(address account, uint256 tokenId, uint256 timestamp) external view returns (uint256);
/// @inheritdoc IVotes
function getPastTotalSupply(uint256 timestamp) external view returns (uint256);
/*///////////////////////////////////////////////////////////////
DAO VOTING LOGIC
//////////////////////////////////////////////////////////////*/
/// @inheritdoc IVotes
function delegate(uint256 delegator, uint256 delegatee) external;
/// @inheritdoc IVotes
function delegateBySig(
uint256 delegator,
uint256 delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) external;
/*//////////////////////////////////////////////////////////////
ERC6372 LOGIC
//////////////////////////////////////////////////////////////*/
/// @inheritdoc IERC6372
function clock() external view returns (uint48);
/// @inheritdoc IERC6372
function CLOCK_MODE() external view returns (string memory);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IReward} from "../interfaces/IReward.sol";
import {IVoter} from "../interfaces/IVoter.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC2771Context} from "@openzeppelin/contracts/metatx/ERC2771Context.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {ProtocolTimeLibrary} from "../libraries/ProtocolTimeLibrary.sol";
/// @title Reward
/// @author velodrome.finance, @figs999, @pegahcarter
/// @notice Base reward contract for distribution of rewards
abstract contract Reward is IReward, ERC2771Context, ReentrancyGuard {
using SafeERC20 for IERC20;
/// @inheritdoc IReward
uint256 public constant DURATION = 7 days;
/// @inheritdoc IReward
address public immutable voter;
/// @inheritdoc IReward
address public immutable ve;
/// @inheritdoc IReward
address public authorized;
/// @inheritdoc IReward
uint256 public totalSupply;
/// @inheritdoc IReward
mapping(uint256 => uint256) public balanceOf;
/// @inheritdoc IReward
mapping(address => mapping(uint256 => uint256)) public tokenRewardsPerEpoch;
/// @inheritdoc IReward
mapping(address => mapping(uint256 => uint256)) public lastEarn;
address[] public rewards;
/// @inheritdoc IReward
mapping(address => bool) public isReward;
/// @notice A record of balance checkpoints for each account, by index
mapping(uint256 => mapping(uint256 => Checkpoint)) public checkpoints;
/// @inheritdoc IReward
mapping(uint256 => uint256) public numCheckpoints;
/// @notice A record of balance checkpoints for each token, by index
mapping(uint256 => SupplyCheckpoint) public supplyCheckpoints;
/// @inheritdoc IReward
uint256 public supplyNumCheckpoints;
constructor(address _forwarder, address _voter) ERC2771Context(_forwarder) {
voter = _voter;
ve = IVoter(_voter).ve();
}
/// @inheritdoc IReward
function getPriorBalanceIndex(uint256 tokenId, uint256 timestamp) public view returns (uint256) {
uint256 nCheckpoints = numCheckpoints[tokenId];
if (nCheckpoints == 0) {
return 0;
}
// First check most recent balance
if (checkpoints[tokenId][nCheckpoints - 1].timestamp <= timestamp) {
return (nCheckpoints - 1);
}
// Next check implicit zero balance
if (checkpoints[tokenId][0].timestamp > timestamp) {
return 0;
}
uint256 lower = 0;
uint256 upper = nCheckpoints - 1;
while (upper > lower) {
uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
Checkpoint memory cp = checkpoints[tokenId][center];
if (cp.timestamp == timestamp) {
return center;
} else if (cp.timestamp < timestamp) {
lower = center;
} else {
upper = center - 1;
}
}
return lower;
}
/// @inheritdoc IReward
function getPriorSupplyIndex(uint256 timestamp) public view returns (uint256) {
uint256 nCheckpoints = supplyNumCheckpoints;
if (nCheckpoints == 0) {
return 0;
}
// First check most recent balance
if (supplyCheckpoints[nCheckpoints - 1].timestamp <= timestamp) {
return (nCheckpoints - 1);
}
// Next check implicit zero balance
if (supplyCheckpoints[0].timestamp > timestamp) {
return 0;
}
uint256 lower = 0;
uint256 upper = nCheckpoints - 1;
while (upper > lower) {
uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
SupplyCheckpoint memory cp = supplyCheckpoints[center];
if (cp.timestamp == timestamp) {
return center;
} else if (cp.timestamp < timestamp) {
lower = center;
} else {
upper = center - 1;
}
}
return lower;
}
function _writeCheckpoint(uint256 tokenId, uint256 balance) internal {
uint256 _nCheckPoints = numCheckpoints[tokenId];
uint256 _timestamp = block.timestamp;
if (
_nCheckPoints > 0 &&
ProtocolTimeLibrary.epochStart(checkpoints[tokenId][_nCheckPoints - 1].timestamp) ==
ProtocolTimeLibrary.epochStart(_timestamp)
) {
checkpoints[tokenId][_nCheckPoints - 1] = Checkpoint(_timestamp, balance);
} else {
checkpoints[tokenId][_nCheckPoints] = Checkpoint(_timestamp, balance);
numCheckpoints[tokenId] = _nCheckPoints + 1;
}
}
function _writeSupplyCheckpoint() internal {
uint256 _nCheckPoints = supplyNumCheckpoints;
uint256 _timestamp = block.timestamp;
if (
_nCheckPoints > 0 &&
ProtocolTimeLibrary.epochStart(supplyCheckpoints[_nCheckPoints - 1].timestamp) ==
ProtocolTimeLibrary.epochStart(_timestamp)
) {
supplyCheckpoints[_nCheckPoints - 1] = SupplyCheckpoint(_timestamp, totalSupply);
} else {
supplyCheckpoints[_nCheckPoints] = SupplyCheckpoint(_timestamp, totalSupply);
supplyNumCheckpoints = _nCheckPoints + 1;
}
}
/// @inheritdoc IReward
function rewardsListLength() external view returns (uint256) {
return rewards.length;
}
/// @inheritdoc IReward
function earned(address token, uint256 tokenId) public view returns (uint256) {
if (numCheckpoints[tokenId] == 0) {
return 0;
}
uint256 reward = 0;
uint256 _supply = 1;
uint256 _currTs = ProtocolTimeLibrary.epochStart(lastEarn[token][tokenId]); // take epoch last claimed in as starting point
uint256 _index = getPriorBalanceIndex(tokenId, _currTs);
Checkpoint memory cp0 = checkpoints[tokenId][_index];
// accounts for case where lastEarn is before first checkpoint
_currTs = Math.max(_currTs, ProtocolTimeLibrary.epochStart(cp0.timestamp));
// get epochs between current epoch and first checkpoint in same epoch as last claim
uint256 numEpochs = (ProtocolTimeLibrary.epochStart(block.timestamp) - _currTs) / DURATION;
if (numEpochs > 0) {
for (uint256 i = 0; i < numEpochs; i++) {
// get index of last checkpoint in this epoch
_index = getPriorBalanceIndex(tokenId, _currTs + DURATION - 1);
// get checkpoint in this epoch
cp0 = checkpoints[tokenId][_index];
// get supply of last checkpoint in this epoch
_supply = Math.max(supplyCheckpoints[getPriorSupplyIndex(_currTs + DURATION - 1)].supply, 1);
reward += (cp0.balanceOf * tokenRewardsPerEpoch[token][_currTs]) / _supply;
_currTs += DURATION;
}
}
return reward;
}
/// @inheritdoc IReward
function _deposit(uint256 amount, uint256 tokenId) external {
address sender = _msgSender();
if (sender != authorized) revert NotAuthorized();
totalSupply += amount;
balanceOf[tokenId] += amount;
_writeCheckpoint(tokenId, balanceOf[tokenId]);
_writeSupplyCheckpoint();
emit Deposit(sender, tokenId, amount);
}
/// @inheritdoc IReward
function _withdraw(uint256 amount, uint256 tokenId) external {
address sender = _msgSender();
if (sender != authorized) revert NotAuthorized();
totalSupply -= amount;
balanceOf[tokenId] -= amount;
_writeCheckpoint(tokenId, balanceOf[tokenId]);
_writeSupplyCheckpoint();
emit Withdraw(sender, tokenId, amount);
}
/// @inheritdoc IReward
function getReward(uint256 tokenId, address[] memory tokens) external virtual nonReentrant {}
/// @dev used with all getReward implementations
function _getReward(address recipient, uint256 tokenId, address[] memory tokens) internal {
uint256 _length = tokens.length;
for (uint256 i = 0; i < _length; i++) {
uint256 _reward = earned(tokens[i], tokenId);
lastEarn[tokens[i]][tokenId] = block.timestamp;
if (_reward > 0) IERC20(tokens[i]).safeTransfer(recipient, _reward);
emit ClaimRewards(recipient, tokens[i], _reward);
}
}
/// @inheritdoc IReward
function notifyRewardAmount(address token, uint256 amount) external virtual nonReentrant {}
/// @dev used within all notifyRewardAmount implementations
function _notifyRewardAmount(address sender, address token, uint256 amount) internal {
if (amount == 0) revert ZeroAmount();
IERC20(token).safeTransferFrom(sender, address(this), amount);
uint256 epochStart = ProtocolTimeLibrary.epochStart(block.timestamp);
tokenRewardsPerEpoch[token][epochStart] += amount;
emit NotifyReward(sender, token, epochStart, amount);
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
/// Modified IVotes interface for tokenId based voting
interface IVotes {
/**
* @dev Emitted when an account changes their delegate.
*/
event DelegateChanged(address indexed delegator, uint256 indexed fromDelegate, uint256 indexed toDelegate);
/**
* @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.
*/
event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);
/**
* @dev Returns the amount of votes that `tokenId` had at a specific moment in the past.
* If the account passed in is not the owner, returns 0.
*/
function getPastVotes(address account, uint256 tokenId, uint256 timepoint) external view returns (uint256);
/**
* @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is
* configured to use block numbers, this will return the value the end of the corresponding block.
*
* NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
* Votes that have not been delegated are still part of total supply, even though they would not participate in a
* vote.
*/
function getPastTotalSupply(uint256 timepoint) external view returns (uint256);
/**
* @dev Returns the delegate that `tokenId` has chosen. Can never be equal to the delegator's `tokenId`.
* Returns 0 if not delegated.
*/
function delegates(uint256 tokenId) external view returns (uint256);
/**
* @dev Delegates votes from the sender to `delegatee`.
*/
function delegate(uint256 delegator, uint256 delegatee) external;
/**
* @dev Delegates votes from `delegator` to `delegatee`. Signer must own `delegator`.
*/
function delegateBySig(
uint256 delegator,
uint256 delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;
library ProtocolTimeLibrary {
uint256 internal constant WEEK = 7 days;
/// @dev Returns start of epoch based on current timestamp
function epochStart(uint256 timestamp) internal pure returns (uint256) {
unchecked {
return timestamp - (timestamp % WEEK);
}
}
/// @dev Returns start of next epoch / end of current epoch
function epochNext(uint256 timestamp) internal pure returns (uint256) {
unchecked {
return timestamp - (timestamp % WEEK) + WEEK;
}
}
/// @dev Returns start of voting window
function epochVoteStart(uint256 timestamp) internal pure returns (uint256) {
unchecked {
return timestamp - (timestamp % WEEK) + 1 hours;
}
}
/// @dev Returns end of voting window / beginning of unrestricted voting window
function epochVoteEnd(uint256 timestamp) internal pure returns (uint256) {
unchecked {
return timestamp - (timestamp % WEEK) + WEEK - 1 hours;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IReward {
error InvalidReward();
error NotAuthorized();
error NotGauge();
error NotEscrowToken();
error NotSingleToken();
error NotVotingEscrow();
error NotWhitelisted();
error ZeroAmount();
event Deposit(address indexed from, uint256 indexed tokenId, uint256 amount);
event Withdraw(address indexed from, uint256 indexed tokenId, uint256 amount);
event NotifyReward(address indexed from, address indexed reward, uint256 indexed epoch, uint256 amount);
event ClaimRewards(address indexed from, address indexed reward, uint256 amount);
/// @notice A checkpoint for marking balance
struct Checkpoint {
uint256 timestamp;
uint256 balanceOf;
}
/// @notice A checkpoint for marking supply
struct SupplyCheckpoint {
uint256 timestamp;
uint256 supply;
}
/// @notice Epoch duration constant (7 days)
function DURATION() external view returns (uint256);
/// @notice Address of Voter.sol
function voter() external view returns (address);
/// @notice Address of VotingEscrow.sol
function ve() external view returns (address);
/// @dev Address which has permission to externally call _deposit() & _withdraw()
function authorized() external view returns (address);
/// @notice Total amount currently deposited via _deposit()
function totalSupply() external view returns (uint256);
/// @notice Current amount deposited by tokenId
function balanceOf(uint256 tokenId) external view returns (uint256);
/// @notice Amount of tokens to reward depositors for a given epoch
/// @param token Address of token to reward
/// @param epochStart Startime of rewards epoch
/// @return Amount of token
function tokenRewardsPerEpoch(address token, uint256 epochStart) external view returns (uint256);
/// @notice Most recent timestamp a veNFT has claimed their rewards
/// @param token Address of token rewarded
/// @param tokenId veNFT unique identifier
/// @return Timestamp
function lastEarn(address token, uint256 tokenId) external view returns (uint256);
/// @notice True if a token is or has been an active reward token, else false
function isReward(address token) external view returns (bool);
/// @notice The number of checkpoints for each tokenId deposited
function numCheckpoints(uint256 tokenId) external view returns (uint256);
/// @notice The total number of checkpoints
function supplyNumCheckpoints() external view returns (uint256);
/// @notice Deposit an amount into the rewards contract to earn future rewards associated to a veNFT
/// @dev Internal notation used as only callable internally by `authorized`.
/// @param amount Amount deposited for the veNFT
/// @param tokenId Unique identifier of the veNFT
function _deposit(uint256 amount, uint256 tokenId) external;
/// @notice Withdraw an amount from the rewards contract associated to a veNFT
/// @dev Internal notation used as only callable internally by `authorized`.
/// @param amount Amount deposited for the veNFT
/// @param tokenId Unique identifier of the veNFT
function _withdraw(uint256 amount, uint256 tokenId) external;
/// @notice Claim the rewards earned by a veNFT staker
/// @param tokenId Unique identifier of the veNFT
/// @param tokens Array of tokens to claim rewards of
function getReward(uint256 tokenId, address[] memory tokens) external;
/// @notice Add rewards for stakers to earn
/// @param token Address of token to reward
/// @param amount Amount of token to transfer to rewards
function notifyRewardAmount(address token, uint256 amount) external;
/// @notice Determine the prior balance for an account as of a block number
/// @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
/// @param tokenId The token of the NFT to check
/// @param timestamp The timestamp to get the balance at
/// @return The balance the account had as of the given block
function getPriorBalanceIndex(uint256 tokenId, uint256 timestamp) external view returns (uint256);
/// @notice Determine the prior index of supply staked by of a timestamp
/// @dev Timestamp must be <= current timestamp
/// @param timestamp The timestamp to get the index at
/// @return Index of supply checkpoint
function getPriorSupplyIndex(uint256 timestamp) external view returns (uint256);
/// @notice Get number of rewards tokens
function rewardsListLength() external view returns (uint256);
/// @notice Calculate how much in rewards are earned for a specific token and veNFT
/// @param token Address of token to fetch rewards of
/// @param tokenId Unique identifier of the veNFT
/// @return Amount of token earned in rewards
function earned(address token, uint256 tokenId) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol)
pragma solidity ^0.8.0;
interface IERC6372 {
/**
* @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
*/
function clock() external view returns (uint48);
/**
* @dev Description of the clock
*/
// solhint-disable-next-line func-name-mixedcase
function CLOCK_MODE() external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4906.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
import "./IERC721.sol";
/// @title EIP-721 Metadata Update Extension
interface IERC4906 is IERC165, IERC721 {
/// @dev This event emits when the metadata of a token is changed.
/// So that the third-party platforms such as NFT market could
/// timely update the images and related attributes of the NFT.
event MetadataUpdate(uint256 _tokenId);
/// @dev This event emits when the metadata of a range of tokens is changed.
/// So that the third-party platforms such as NFT market could
/// timely update the images and related attributes of the NFTs.
event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (metatx/ERC2771Context.sol)
pragma solidity ^0.8.9;
import "../utils/Context.sol";
/**
* @dev Context variant with ERC2771 support.
*
* WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption.
* Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender}
* recovery.
*/
abstract contract ERC2771Context is Context {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable _trustedForwarder;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(address trustedForwarder) {
_trustedForwarder = trustedForwarder;
}
function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
return forwarder == _trustedForwarder;
}
function _msgSender() internal view virtual override returns (address) {
uint256 calldataLength = msg.data.length;
uint256 contextSuffixLength = _contextSuffixLength();
if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) {
return address(bytes20(msg.data[calldataLength - contextSuffixLength:]));
} else {
return super._msgSender();
}
}
function _msgData() internal view virtual override returns (bytes calldata) {
uint256 calldataLength = msg.data.length;
uint256 contextSuffixLength = _contextSuffixLength();
if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) {
return msg.data[:calldataLength - contextSuffixLength];
} else {
return super._msgData();
}
}
/**
* @dev ERC-2771 specifies the context as being a single address (20 bytes).
*/
function _contextSuffixLength() internal view virtual override returns (uint256) {
return 20;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) pragma solidity ^0.8.0; import "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"mode": "3",
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi"
]
}
},
"detectMissingLibraries": false,
"forceEVMLA": false,
"enableEraVMExtensions": false,
"codegen": "yul",
"libraries": {
"contracts/art/PerlinNoise.sol": {
"PerlinNoise": "0xe8caD66674a4D8B94f6756DD7378eA2e9cb4C366"
},
"contracts/art/Trig.sol": {
"Trig": "0xBf5feaAa29e0e3c9bB2d1cCD76181b7918ea6A84"
},
"contracts/libraries/BalanceLogicLibrary.sol": {
"BalanceLogicLibrary": "0x57E1EAb6C7d00ff892fAb952deF9349cE94f0E5F"
},
"contracts/libraries/DelegationLogicLibrary.sol": {
"DelegationLogicLibrary": "0xf567e0fDCaA7899712A888375D4220723CA3bE01"
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"},{"internalType":"address","name":"_voter","type":"address"},{"internalType":"address[]","name":"_rewards","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidReward","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotEscrowToken","type":"error"},{"inputs":[],"name":"NotGauge","type":"error"},{"inputs":[],"name":"NotSingleToken","type":"error"},{"inputs":[],"name":"NotVotingEscrow","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NotifyReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"_deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"_withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"authorized","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"checkpoints","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"balanceOf","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getPriorBalanceIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getPriorSupplyIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastEarn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"numCheckpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsListLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supplyCheckpoints","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyNumCheckpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenRewardsPerEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0000000000000000000000003f91b806f1968fca85c08a7ee9a7262d7207a9c1000000000000000000000000c0f53703e9f4b79fa2fb09a2aeba487fa97729c9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000020000000000000000000000003439153eb7af838ad19d56e1571fbd09333c28090000000000000000000000009ebe3a824ca958e4b3da772d2065518f009cba62
Deployed Bytecode
0x00020000000000020010000000000002000000000801034f00010000000103550000006001100270000003410010019d000003410110019700000001002001900000004f0000c13d0000008002000039000000400020043f000000040010008c000000770000413d000000000208043b000000e0022002700000034e0020009c000000790000a13d0000034f0020009c000000990000213d000003570020009c000000bd0000213d0000035b0020009c0000010d0000613d0000035c0020009c000001190000613d0000035d0020009c000000770000c13d0000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000002401800370000000000101043b000900000001001d0000000401800370000000000101043b000a00000001001d0000036e0100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d0000000002000031000000000101043b00000344031001970000000001000411000000000031004b0000003f0000c13d000000140220008c0000003f0000413d0000000101200367000000000101043b00000060011002700000000102000039000000000202041a00000344042001970000034401100197000000000041004b000003e10000c13d0000000201000039000000000201041a0000000a0220006c000003610000813d0000038401000041000000000010043f0000001101000039000000040010043f000003740100004100000d0300010430000000e003000039000000400030043f0000000002000416000000000002004b000000770000c13d0000001f021000390000034202200197000000e002200039000000400020043f0000001f0410018f0000034305100198000000e002500039000000610000613d000000000608034f000000006706043c0000000003730436000000000023004b0000005d0000c13d000000000004004b0000006e0000613d000000000358034f0000000304400210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000320435000000600010008c000000770000413d000000e00200043d000003440020009c000000770000213d000001000300043d000400000003001d000003440030009c000000f10000a13d000000000100001900000d03000104300000035e0020009c000000af0000a13d0000035f0020009c000000e20000213d000003630020009c0000021f0000613d000003640020009c000001e70000613d000003650020009c000000770000c13d0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b000003440010009c000000770000213d000000000010043f0000000701000039000000200010043f000000400200003900000000010000190d010cc40000040f000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f000003890100004100000d020001042e000003500020009c000000c80000213d000003540020009c000001230000613d000003550020009c000001280000613d000003560020009c000000770000c13d0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b0000000602000039000000000302041a000000000031004b000000770000813d000000000020043f000003880110009a000000bb0000013d000003660020009c000001020000a13d000003670020009c000001400000613d000003680020009c0000014b0000613d000003690020009c000000770000c13d0000000001000416000000000001004b000000770000c13d0000000101000039000000000101041a0000022c0000013d000003580020009c000001580000613d000003590020009c000001640000613d0000035a0020009c000000770000c13d0000000001000416000000000001004b000000770000c13d00000006010000390000023d0000013d000003510020009c0000017d0000613d000003520020009c000001a30000613d000003530020009c000000770000c13d0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b000000000010043f0000000a01000039000000200010043f000000400200003900000000010000190d010cc40000040f0000000102100039000000000202041a000000000101041a000000800010043f000000a00020043f0000036c0100004100000d020001042e000003600020009c000002300000613d000003610020009c000002040000613d000003620020009c000000770000c13d0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b0d0107880000040f0000015d0000013d000001200300043d000003450030009c000000770000213d000000e001100039000000ff04300039000000000014004b000000770000813d000000e0043000390000000004040433000003460040009c000002410000413d0000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d03000104300000036a0020009c000001e20000613d0000036b0020009c000000770000c13d0000000001000416000000000001004b000000770000c13d0000038e01000041000000800010043f000003890100004100000d020001042e0000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000000401800370000000000101043b000003440010009c000000770000213d000000000010043f0000000401000039000001330000013d0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b000000000010043f0000000301000039000002390000013d0000000001000416000000000001004b000000770000c13d0000000b010000390000023d0000013d0000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000000401800370000000000101043b000003440010009c000000770000213d000000000010043f0000000501000039000000200010043f00000040020000390000000001000019000a0000000803530d010cc40000040f0000000a0200035f0000002402200370000000000202043b000000000020043f000000200010043f000000000100001900000040020000390000023c0000013d0000000001000416000000000001004b000000770000c13d0000000001000412001000000001001d000f00400000003d000080050100003900000044030000390000000004000415000000100440008a000002290000013d0000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000000401800370000000000101043b000003440010009c000000770000213d0000002402800370000000000202043b0d0107f20000040f0000015d0000013d0000000002000416000000000002004b000000770000c13d0d0106d70000040f0d0106e30000040f000000400200043d0000000000120435000003410020009c0000034102008041000000400120021000000393011001c700000d020001042e0000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000000401800370000000000101043b000a00000001001d000003440010009c000000770000213d0000002401800370000000000201043b000000000100041a000000020010008c000002bc0000c13d0000037b01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f0000038601000041000000c40010043f000003920100004100000d03000104300000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000002401800370000000000101043b000900000001001d0000000401800370000000000101043b000a00000001001d0000036e0100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d0000000002000031000000000101043b00000344031001970000000001000411000000000031004b000003970000c13d000000140220008c0000000a03000029000003980000413d0000000101200367000000000101043b0000006001100270000003980000013d0000000002000416000000000002004b000000770000c13d000000440010008c000000770000413d0000000402800370000000000202043b000800000002001d0000002402800370000000000202043b000003450020009c000000770000213d0000002303200039000000000013004b000000770000813d0000000403200039000000000338034f000000000403043b000003450040009c000000fc0000213d00000005034002100000003f0530003900000347055001970000036d0050009c000000fc0000213d0000008005500039000000400050043f000000800040043f00000024022000390000000003320019000000000013004b000000770000213d000000000004004b000001ce0000613d000000a001000039000000000428034f000000000404043b000003440040009c000000770000213d00000000014104360000002002200039000000000032004b000001c60000413d000000000100041a000000020010008c000003f50000c13d000000400100043d00000044021000390000038603000041000000000032043500000024021000390000001f0300003900000000003204350000037b020000410000000000210435000000040210003900000020030000390000000000320435000003410010009c0000034101008041000000400110021000000383011001c700000d03000104300000000001000416000000000001004b000000770000c13d00000002010000390000023d0000013d0000000002000416000000000002004b000000770000c13d0d0106d70000040f000a00000002001d000000000010043f0000000801000039000000200010043f000000400200003900000000010000190d010cc40000040f0000000a02000029000000000020043f000000200010043f000000000100001900000040020000390d010cc40000040f000000000201041a0000000101100039000000000101041a000000400300043d000000200430003900000000001404350000000000230435000003410030009c0000034103008041000000400130021000000395011001c700000d020001042e0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b000a00000001001d000003440010009c000000770000213d0000000001000412000c00000001001d000b00000000003d0000800501000039000000440300003900000000040004150000000c0440008a00000005044002100000036e020000410d010cd90000040f00000344011001970000000a0010006b00000000010000390000000101006039000000800010043f000003890100004100000d020001042e0000000001000416000000000001004b000000770000c13d0000000001000412000e00000001001d000d00200000003d0000800501000039000000440300003900000000040004150000000e0440008a00000005044002100000036e020000410d010cd90000040f0000034401100197000000800010043f000003890100004100000d020001042e0000000002000416000000000002004b000000770000c13d000000240010008c000000770000413d0000000401800370000000000101043b000000000010043f0000000901000039000000200010043f000000400200003900000000010000190d010cc40000040f000000000101041a000000800010043f000003890100004100000d020001042e00000005054002100000003f065000390000034706600197000000400700043d0000000006670019000900000007001d000000000076004b00000000070000390000000107004039000003450060009c000000fc0000213d0000000100700190000000fc0000c13d000000400060043f00000009060000290000000006460436000600000006001d00000100033000390000000005530019000000000015004b000000770000213d000000000004004b0000025f0000613d00000006010000290000000034030434000003440040009c000000770000213d0000000001410436000000000053004b000002590000413d000000800020043f0000000101000039000000000010041b0000000402000029000000a00020043f0000034801000041000000400300043d000a00000003001d0000000000130435000003410030009c0000034101000041000000000103401900000040011002100000000003000414000003410030009c0000034103008041000000c003300210000000000113019f00000349011001c70d010cfc0000040f0000000a0b00002900000060031002700000034103300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000002830000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b0000027f0000c13d000000000006004b000002900000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000003430000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000003450010009c000000fc0000213d0000000100200190000000fc0000c13d000000400010043f000000200030008c000000770000413d00000000010b0433000003440010009c000000770000213d000000c00010043f00000009020000290000000002020433000500000002001d000000000002004b000005ae0000c13d0000000104000039000000000204041a0000034c0220019700000004022001af000000000024041b000000800200043d000001400000044300000160002004430000002002000039000000a00300043d0000018000200443000001a0003004430000004003000039000001c000300443000001e0001004430000010000200443000000030100003900000120001004430000034d0100004100000d020001042e000900000002001d0000000201000039000000000010041b0000036e0100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d0000000002000031000000000101043b00000344031001970000000001000411000000000031004b000002d80000c13d000000140220008c000002d80000413d0000000101200367000000000101043b0000006001100270000000400300043d0000038a0200004100000000002304350000034402100197000800000003001d0000000401300039000700000002001d00000000002104350000036e01000041000000000010044300000000010004120000000400100443000000200100003900000024001004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d000000000201043b0000000801000029000003410010009c000003410100804100000040011002100000000003000414000003410030009c0000034103008041000000c003300210000000000113019f00000374011001c700000344022001970d010cfc0000040f00000060031002700000034103300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000080b00002900000000057b00190000030c0000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000003080000c13d000000000006004b000003190000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000003e90000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000003450010009c000000fc0000213d0000000100200190000000fc0000c13d000000400010043f000000200030008c000000770000413d00000000020b0433000800000002001d000003440020009c000000770000213d0000000002000410000000080020006b000006150000c13d0000000a01000029000000000010043f0000000701000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000400200043d000000000101043b000000000101041a000000ff00100190000006190000c13d00000391010000410000061c0000013d0000001f0530018f0000034306300198000000400200043d00000000046200190000034e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000034a0000c13d000000000005004b0000035b0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000003410020009c00000341020080410000004002200210000000000112019f00000d0300010430000800000004001d000000000021041b0000000901000029000000000010043f0000000301000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b000000000201041a0000000a0220006c000000490000413d000000000021041b0000000901000029000000000010043f0000000301000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b000000000201041a00000009010000290d010a790000040f0d010b540000040f000000400100043d0000000a020000290000000000210435000003410010009c000003410100804100000040011002100000000002000414000003410020009c0000034102008041000000c002200210000000000112019f0000034b011001c70000800d0200003900000003030000390000039404000041000003da0000013d0000000a030000290000000102000039000000000202041a00000344022001970000034401100197000000000021004b000003e10000c13d000800000002001d0000000201000039000000000201041a000000000032001a000000490000413d0000000002320019000000000021041b0000000901000029000000000010043f0000000301000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b000000000201041a0000000a03000029000000000032001a000000490000413d0000000002320019000000000021041b0000000901000029000000000010043f0000000301000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b000000000201041a00000009010000290d010a790000040f0d010b540000040f000000400100043d0000000a020000290000000000210435000003410010009c000003410100804100000040011002100000000002000414000003410020009c0000034102008041000000c002200210000000000112019f0000034b011001c70000800d0200003900000003030000390000038704000041000000080500002900000009060000290d010cf70000040f0000000100200190000000770000613d000000000100001900000d020001042e000000400100043d00000372020000410000000000210435000003410010009c0000034101008041000000400110021000000349011001c700000d03000104300000001f0530018f0000034306300198000000400200043d00000000046200190000034e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000003f00000c13d0000034e0000013d0000000201000039000000000010041b0000036e0100004100000000001004430000000001000412000000040010044300000024000004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d0000000002000031000000000101043b00000344011001970000000003000411000a00000003001d000000000013004b000004110000c13d000000140120008c000004110000413d0000000101100367000000000101043b000a0060001002780000036e01000041000000000010044300000000010004120000000400100443000000400100003900000024001004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d000000000201043b000000400400043d000900000004001d000000240140003900000008030000290000000000310435000003700100004100000000001404350000000a0100002900000344031001970000000401400039000700000003001d0000000000310435000003410040009c0000034101000041000000000104401900000040011002100000000003000414000003410030009c0000034103008041000000c003300210000000000113019f00000371011001c70000034402200197000a00000002001d0d010cf70000040f00000060031002700000034103300197000000200030008c000000200400003900000000040340190000001f0640018f0000002007400190000000090b00002900000009057000290000044a0000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000004460000c13d000000000006004b000004570000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000005f70000613d0000001f01400039000000600110018f0000000002b10019000000000012004b00000000010000390000000101004039000600000002001d000003450020009c000000fc0000213d0000000100100190000000fc0000c13d0000000601000029000000400010043f000000200030008c000000770000413d00000000010b0433000000010010008c000000770000213d000000000001004b000004820000c13d0000036e01000041000000000010044300000000010004120000000400100443000000200100003900000024001004430000000001000414000003410010009c0000034101008041000000c0011002100000036f011001c700008005020000390d010cfc0000040f00000001002001900000067f0000613d000000400200043d000600000002001d000000000101043b0000034401100197000000070010006b0000068c0000c13d00000373010000410000000603000029000600000003001d0000000000130435000000040130003900000008020000290000000000210435000003410030009c0000034101000041000000000103401900000040011002100000000002000414000003410020009c0000034102008041000000c002200210000000000112019f00000374011001c70000000a020000290d010cfc0000040f00000060031002700000034103300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000605700029000004a40000613d000000000801034f0000000609000029000000008a08043c0000000009a90436000000000059004b000004a00000c13d000000000006004b000004b10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000006800000613d0000001f01400039000000600210018f0000000601200029000000000021004b00000000020000390000000102004039000003450010009c000000fc0000213d0000000100200190000000fc0000c13d000000400010043f000000200030008c000000770000413d00000006010000290000000001010433000500000001001d000003440010009c000000770000213d000000800100043d000400000001001d000000000001004b0000067b0000613d000a00000000001d000000800100043d0000000a0010006c000005f10000a13d0000000a01000029000a00000001001d0000000501100210000000a001100039000900000001001d0000000001010433000003440110019700000008020000290d0107f20000040f0000000902000029000700000001001d000000800100043d0000000a0010006c000005f10000a13d00000000010204330000034401100197000000000010043f0000000501000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b0000000802000029000000000020043f000000200010043f000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f00000001002001900000067f0000613d000000000101043b000600000001001d0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b0000000602000029000000000021041b000000070000006b0000000903000029000005900000613d000000800100043d0000000a0010006c000005f10000a13d0000000003030433000000400100043d000000440210003900000007040000290000000000420435000000200610003900000377040000410000000000460435000000240410003900000005050000290000000000540435000000440400003900000000004104350000036d0010009c000000fc0000213d0000008005100039000000400050043f000003780050009c000000fc0000213d0000034402300197000000c003100039000000400030043f00000020030000390000000000350435000000a0041000390000037903000041000300000004001d0000000000340435000003410060009c000003410600804100000040036002100000000001010433000003410010009c00000341010080410000006001100210000000000131019f0000000003000414000003410030009c0000034103008041000000c003300210000000000131019f000600000002001d000200000005001d0d010cf70000040f000000600310027000000341033001980000008009000039000000600a000039000005620000613d0000001f0430003900000342044001970000003f044000390000037a04400197000000400a00043d00000000044a00190000000000a4004b00000000050000390000000105004039000003450040009c000000fc0000213d0000000100500190000000fc0000c13d000000400040043f00000000093a043600000343053001980000000004590019000005550000613d000000000601034f0000000007090019000000006806043c0000000007870436000000000047004b000005510000c13d0000001f03300190000005620000613d000000000151034f0000000303300210000000000504043300000000053501cf000000000535022f000000000101043b0000010003300089000000000131022f00000000013101cf000000000151019f0000000000140435000000000400041500000000010a043300000001002001900000068f0000613d000000000001004b0000000903000029000005800000c13d000100000004001d00020000000a001d000300000009001d0000037c010000410000000000100443000000060100002900000004001004430000000001000414000003410010009c0000034101008041000000c0011002100000037d011001c700008002020000390d010cfc0000040f00000001002001900000067f0000613d000000000101043b000000000001004b00000009030000290000000309000029000000020a0000290000000104000029000006d00000613d00000000010004150000000001140049000000000100000200000000010a0433000000000001004b000005900000613d0000037e0010009c000000770000213d000000200010008c000000770000413d0000000001090433000000010010008c000000770000213d000000000001004b0000000903000029000006b40000613d000000800100043d0000000a0010006c000005f10000a13d0000000002030433000000400100043d00000007030000290000000000310435000003410010009c000003410100804100000040011002100000000003000414000003410030009c0000034103008041000000c003300210000000000131019f0000034b011001c700000344062001970000800d020000390000000303000039000003850400004100000005050000290d010cf70000040f0000000100200190000000770000613d0000000a020000290000000102200039000a00000002001d000000040020006c000004ca0000413d0000067b0000013d0000000003000019000005b30000013d0000000103300039000000050030006c000006170000813d00000009010000290000000001010433000000000031004b000005f10000a13d0000000501300210000000060210002900000000010204330000034401100198000005b00000613d000800000002001d000a00000003001d000000000010043f0000000701000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b000000000201041a000003960220019700000001022001bf000000000021041b000000090100002900000000010104330000000a0010006c000005f10000a13d0000000602000039000000000302041a000003450030009c000000fc0000213d00000008010000290000000001010433000700000001001d000800000003001d0000000101300039000000000012041b000000000020043f0000000001000414000003410010009c0000034101008041000000c0011002100000034b011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d00000007020000290000034402200197000000000101043b0000000801100029000000000301041a0000034c03300197000000000223019f000000000021041b0000000a03000029000005b00000013d0000038401000041000000000010043f0000003201000039000000040010043f000003740100004100000d03000104300000001f0530018f0000034306300198000000400200043d0000000004620019000006020000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000005fe0000c13d000000000005004b0000060f0000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001300210000003410020009c00000341020080410000004002200210000000000121019f00000d03000104300000038b02000041000003e30000013d000000c00100043d000002a80000013d000000090000006b000006220000c13d00000390010000410000000000120435000003410020009c0000034102008041000000400120021000000349011001c700000d030001043000000020012000390000038c030000410000000000310435000000640120003900000009030000290000000000310435000000440120003900000008030000290000000000310435000000240120003900000007030000290000000000310435000000640100003900000000001204350000038d0020009c000000fc0000213d000000a001200039000000400010043f0000000a010000290d010bf20000040f000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f00000001002001900000067f0000613d000000000101043b000800000001001d0000000a01000029000000000010043f0000000401000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d00000008030000290000038e2030012a0000000002230049000000000101043b000800000002001d000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000000770000613d000000000101043b000000000201041a000000090020002a000000490000413d00000009030000290000000002320019000000000021041b000000400100043d0000000000310435000003410010009c000003410100804100000040011002100000000002000414000003410020009c0000034102008041000000c002200210000000000112019f0000034b011001c70000800d0200003900000004030000390000038f0400004100000007050000290000000a0600002900000008070000290d010cf70000040f0000000100200190000000770000613d0000000101000039000000000010041b000000000100001900000d020001042e000000000001042f0000001f0530018f0000034306300198000000400200043d00000000046200190000034e0000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000006870000c13d0000034e0000013d000003720100004100000006020000290000061c0000013d000000000001004b000006c80000c13d000000400100043d0000037b02000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000002004b0000000307000029000006a70000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000024004b000006a00000413d0000001f042000390000039704400197000000000232001900000000000204350000004402400039000003410020009c00000341020080410000006002200210000003410010009c00000341010080410000004001100210000000000112019f00000d0300010430000000400100043d00000064021000390000037f03000041000000000032043500000044021000390000038003000041000000000032043500000024021000390000002a0300003900000000003204350000037b020000410000000000210435000000040210003900000020030000390000000000320435000003410010009c0000034101008041000000400110021000000381011001c700000d0300010430000003410090009c00000341090080410000004002900210000003410010009c00000341010080410000006001100210000000000121019f00000d0300010430000000400100043d00000044021000390000038203000041000000000032043500000024021000390000001d03000039000001d70000013d0000037e0010009c000006e10000213d000000430010008c000006e10000a13d00000001020003670000000401200370000000000101043b0000002402200370000000000202043b000000000001042d000000000100001900000d03000104300005000000000002000300000002001d000200000001001d000000000010043f0000000901000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f00000001002001900000077a0000613d000000000101043b000000000101041a000000000001004b000007740000613d000500000001001d0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f00000001002001900000077a0000613d000000000101043b0000000502000029000000010220008a000400000002001d000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f00000001002001900000077a0000613d000000000101043b000000000101041a000000030010006c000007760000a13d0000000201000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f00000001002001900000077a0000613d000000000101043b000000000000043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f00000001002001900000077a0000613d000000000101043b000000000101041a000000030010006c000007740000213d0000000403000029000000000003004b0000000001000019000007730000613d000080100200003900000000010000190000073e0000013d000000050100002900000004030000290000801002000039000000000013004b000007730000a13d000100000001001d00000000011300490000000101100270000400000003001d00050000001300530000077c0000413d0000000201000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f00000001002001900000077a0000613d000000000101043b0000000502000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f00000001002001900000077a0000613d000000400200043d000003980020009c000007820000813d000000000101043b0000004003200039000000400030043f000000000301041a00000000023204360000000101100039000000000101041a0000000000120435000000030030006c000007780000613d000007390000413d000000050000006b0000077c0000613d00008010020000390000000501000029000000010310008a0000000101000029000000000013004b0000073e0000213d000000000001042d0000000001000019000000000001042d0000000401000029000000000001042d0000000501000029000000000001042d000000000100001900000d03000104300000038401000041000000000010043f0000001101000039000000040010043f000003740100004100000d03000104300000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d03000104300004000000000002000200000001001d0000000b01000039000000000101041a000000000001004b000007e00000613d000000010110008a000300000001001d000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000007ea0000613d000000000101043b000000000101041a000000020010006c000007e20000a13d000000000000043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000007ea0000613d000000000101043b000000000101041a000000020010006c000007e00000213d0000000302000029000000000002004b0000000001000019000007df0000613d0000000001000019000007b70000013d0000000302000029000000000012004b000007df0000a13d000100000001001d00000000011200490000000101100270000300000002001d000000000112004b000007e40000413d000400000001001d000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000100200190000007ea0000613d000000400200043d000003980020009c000007ec0000813d000000000101043b0000004003200039000000400030043f000000000301041a00000000023204360000000101100039000000000101041a0000000000120435000000020030006c0000000401000029000007df0000613d000007b40000413d000000000001004b000007e40000613d000000010210008a0000000101000029000000000012004b000007b70000213d000000000001042d0000000001000019000000000001042d0000000301000029000000000001042d0000038401000041000000000010043f0000001101000039000000040010043f000003740100004100000d0300010430000000000100001900000d03000104300000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d0300010430000c000000000002000c00000001001d000900000002001d000000000020043f0000000901000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000101041a000000000001004b000008fa0000613d0000000c010000290000034401100197000200000001001d000000000010043f0000000501000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000902000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000101041a000c00000001001d0000000901000029000000000010043f0000000901000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000c040000290000038e3040012a000000010020019000000a6a0000613d0007000000340051000000000101043b000000000201041a000000000002004b0000000801000039000008b60000613d000c00000002001d000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000c02000029000000010220008a000a00000002001d000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000101041a000000070010006c000008b80000a13d0000000901000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000000043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000a03000029000000000003004b000008b60000613d000000000101041a000000070010006c0000000001000019000008bb0000213d00008010020000390000000001000019000008800000013d0000000c010000290000000a030000290000801002000039000000000013004b000008bb0000a13d000b00000001001d00000000011300490000000101100270000a00000003001d000c00000013005300000a6c0000413d0000000901000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000400200043d000003980020009c00000a720000813d000000000101043b0000004003200039000000400030043f000000000301041a00000000023204360000000101100039000000000101041a0000000000120435000000070030006c000008ba0000613d0000087b0000413d0000000c0000006b00000a6c0000613d00008010020000390000000c01000029000000010310008a0000000b01000029000000000013004b000008800000213d000008bb0000013d0000000001000019000008bb0000013d0000000a01000029000008bb0000013d0000000c01000029000b00000001001d0000000901000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000b02000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000400200043d000003780020009c00000a720000213d000000000101043b0000004003200039000000400030043f000000000301041a000c00000003001d00000000023204360000000101100039000000000101041a0000000000120435000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f0000000c040000290000038e3040012a0000000003340049000000070030006b00000000040300190000000704002029000000010020019000000a780000613d000000000101043b0000038e2010012a0000000001210049000000000141004b00000a6c0000413d0000038e0010009c000008fd0000813d000600000000001d0000000601000029000000000001042d00000000030400190001038e0010013200008010020000390000000004000019000600000000001d000400000004001d000700000003001d00050399003000a400000a6c0000813d00000007010000290000039b0310009a000b00000003001d000000050030006c00000a6c0000213d0000000901000029000000000010043f0000000901000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000101041a000000000001004b000009980000613d000c00000001001d0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000c02000029000000010220008a000800000002001d000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000101041a0000000b0010006c0000099b0000a13d0000000901000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000000043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000803000029000000000003004b000009980000613d000000000101041a0000000b0010006c000000000100001900008010020000390000099f0000213d0000000001000019000009620000013d0000000c010000290000000803000029000000000013004b0000099f0000a13d000a00000001001d00000000011300490000000101100270000800000003001d000c00000013005300000a6c0000413d0000000901000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000400200043d000003780020009c00000a720000213d000000000101043b0000004003200039000000400030043f000000000301041a00000000023204360000000101100039000000000101041a00000000001204350000000b0030006c00008010020000390000099e0000613d0000095e0000413d0000000c0000006b00000a6c0000613d0000000c01000029000000010310008a0000000a01000029000000000013004b000009620000213d0000099f0000013d000000000100001900008010020000390000099f0000013d000000080100002900008010020000390000099f0000013d0000000c01000029000a00000001001d0000000901000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000a02000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000400200043d000003780020009c00000a720000213d000000000101043b0000004003200039000000400030043f000000000301041a00000000023204360000000101100039000000000101041a000300000002001d00000000001204350000000b01000039000000000101041a000000000001004b000080100200003900000a1c0000613d000000010110008a000a00000001001d000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000101041a0000000b0010006c00000a1e0000a13d000000000000043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b0000000a03000029000000000003004b00000a660000613d000000000101041a0000000b0010006c0000000001000019000080100200003900000a200000213d0000000001000019000009f30000013d0000000a03000029000000000013004b00000a200000a13d000800000001001d00000000011300490000000101100270000a00000003001d000000000113004b00000a6c0000413d000c00000001001d000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d000000400200043d000003780020009c00000a720000213d000000000101043b0000004003200039000000400030043f000000000301041a00000000023204360000000101100039000000000101041a00000000001204350000000b0030006c000080100200003900000a640000613d0000000c01000029000009f00000413d000000000001004b00000a6c0000613d000000010310008a0000000801000029000000000013004b000009f30000213d00000a200000013d000000000100001900000a200000013d0000000a010000290000801002000039000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c70d010cfc0000040f000000010020019000000a6a0000613d00000003020000290000000002020433000b00000002001d000000000101043b0000000101100039000000000101041a000c00000001001d0000000201000029000000000010043f0000000401000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f0000000c03000029000000010030008c000000010300a039000c00000003001d000000010020019000000a6a0000613d000000000101043b0000000702000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000a6a0000613d000000000101043b000000000401041a0000000b0300002900000000013400a9000000000003004b000080100200003900000a5a0000613d00000000033100d9000000000034004b00000a6c0000c13d0000000c011000fa000000060010002a00000a6c0000413d000600060010002d00000004040000290000000104400039000000010040006c0000000503000029000009020000413d00000a680000013d0000000c0100002900000a200000013d000000000100001900000a1f0000013d0000000601000029000000000001042d000000000100001900000d03000104300000038401000041000000000010043f0000001101000039000000040010043f000003740100004100000d03000104300000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d0300010430000000000001042f0005000000000002000200000002001d000400000001001d000000000010043f0000000901000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d000000000101043b000000000101041a000500000001001d000000000001004b00000af70000613d0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d000000000101043b0000000502000029000000010220008a000100000002001d000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d000000000101043b000000000101041a000300000001001d000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f000000010020019000000b470000613d00000003030000290000038e2030012a0000000002230049000000000101043b0000038e3010012a0000000001310049000000000012004b00000af70000c13d000000400100043d000003780010009c00000b480000213d000500000001001d0000004001100039000000400010043f000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f000000010020019000000b470000613d000000000101043b000000050200002900000000021204360000000201000029000300000002001d00000000001204350000000401000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d000000000101043b0000000102000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d00000005020000290000000002020433000000000101043b000000000021041b000000010110003900000003020000290000000002020433000000000021041b000000000001042d000000400100043d000003980010009c00000b480000813d000300000001001d0000004001100039000000400010043f000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f000000010020019000000b470000613d000000000101043b000000030200002900000000021204360000000201000029000100000002001d00000000001204350000000401000029000000000010043f0000000801000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d000000000101043b0000000502000029000000000020043f000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d00000003020000290000000002020433000000000101043b000000000021041b000000010110003900000001020000290000000002020433000000000021041b0000000501000029000000010010003a00000b4e0000413d0000000401000029000000000010043f0000000901000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000b450000613d00000005020000290000000102200039000000000101043b000000000021041b000000000001042d000000000100001900000d0300010430000000000001042f0000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d03000104300000038401000041000000000010043f0000001101000039000000040010043f000003740100004100000d030001043000040000000000020000000b01000039000000000101041a000000000001004b000400000001001d00000bae0000613d000000010210008a000200000002001d000000000020043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000be40000613d000000000101043b000000000101041a000300000001001d000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f000000010020019000000be30000613d00000003030000290000038e2030012a0000000002230049000000000101043b0000038e3010012a0000000001310049000000000012004b00000bae0000c13d000000400200043d000003780020009c00000be60000213d0000000201000039000000000101041a000300000001001d000400000002001d0000004001200039000000400010043f000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f000000010020019000000be30000613d000000000101043b00000004020000290000000001120436000100000001001d000000030200002900000000002104350000000201000029000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000be40000613d00000004020000290000000002020433000000000101043b000000000021041b000000010110003900000001020000290000000002020433000000000021041b000000000001042d000000400200043d000003980020009c00000be60000813d0000000201000039000000000101041a000200000001001d000300000002001d0000004001200039000000400010043f000003750100004100000000001004430000000001000414000003410010009c0000034101008041000000c00110021000000376011001c70000800b020000390d010cfc0000040f000000010020019000000be30000613d000000000101043b00000003020000290000000001120436000100000001001d000000020200002900000000002104350000000401000029000000000010043f0000000a01000039000000200010043f0000000001000414000003410010009c0000034101008041000000c0011002100000034a011001c700008010020000390d010cfc0000040f000000010020019000000be40000613d00000003020000290000000002020433000000000101043b000000000021041b000000010110003900000001020000290000000002020433000000000021041b0000000401000029000000010110003a00000bec0000613d0000000b02000039000000000012041b000000000001042d000000000001042f000000000100001900000d03000104300000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d03000104300000038401000041000000000010043f0000001101000039000000040010043f000003740100004100000d03000104300004000000000002000000400300043d000003980030009c00000c680000813d00000344041001970000004001300039000000400010043f0000002001000039000200000003001d00000000031304360000037901000041000300000003001d00000000001304350000002001200039000003410010009c000003410100804100000040011002100000000002020433000003410020009c00000341020080410000006002200210000000000112019f0000000002000414000003410020009c0000034102008041000000c002200210000000000121019f000400000004001d00000000020400190d010cf70000040f0000006003100270000003410330019800000c3a0000613d0000001f0430003900000342044001970000003f044000390000037a04400197000000400a00043d00000000044a00190000000000a4004b00000000050000390000000105004039000003450040009c00000c680000213d000000010050019000000c680000c13d000000400040043f0000001f0430018f00000000093a04360000034305300198000000000359001900000c2c0000613d000000000601034f0000000007090019000000006806043c0000000007870436000000000037004b00000c280000c13d000000000004004b00000c3c0000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000013043500000c3c0000013d000000600a0000390000008009000039000000000300041500000000010a0433000000010020019000000c700000613d000000000001004b00000c580000c13d000100000003001d00020000000a001d000300000009001d0000037c010000410000000000100443000000040100002900000004001004430000000001000414000003410010009c0000034101008041000000c0011002100000037d011001c700008002020000390d010cfc0000040f000000010020019000000cb10000613d000000000101043b000000000001004b0000000309000029000000020a000029000000010300002900000cb20000613d00000000010004150000000001130049000000000100000200000000010a0433000000000001004b00000c670000613d0000037e0010009c00000c6e0000213d0000001f0010008c00000c6e0000a13d0000000001090433000000010010008c00000c6e0000213d000000000001004b00000c950000613d000000000001042d0000038401000041000000000010043f0000004101000039000000040010043f000003740100004100000d0300010430000000000100001900000d0300010430000000000001004b00000ca90000c13d000000400100043d0000037b02000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000002004b000000030700002900000c880000613d000000000400001900000000054300190000000006470019000000000606043300000000006504350000002004400039000000000024004b00000c810000413d0000001f042000390000039704400197000000000223001900000000000204350000004402400039000003410020009c00000341020080410000006002200210000003410010009c00000341010080410000004001100210000000000112019f00000d0300010430000000400100043d00000064021000390000037f03000041000000000032043500000044021000390000038003000041000000000032043500000024021000390000002a0300003900000000003204350000037b020000410000000000210435000000040210003900000020030000390000000000320435000003410010009c0000034101008041000000400110021000000381011001c700000d0300010430000003410090009c00000341090080410000004002900210000003410010009c00000341010080410000006001100210000000000121019f00000d0300010430000000000001042f000000400100043d00000044021000390000038203000041000000000032043500000024021000390000001d0300003900000000003204350000037b020000410000000000210435000000040210003900000020030000390000000000320435000003410010009c0000034101008041000000400110021000000383011001c700000d0300010430000000000001042f000003410010009c00000341010080410000004001100210000003410020009c00000341020080410000006002200210000000000112019f0000000002000414000003410020009c0000034102008041000000c002200210000000000112019f0000039c011001c700008010020000390d010cfc0000040f000000010020019000000cd70000613d000000000101043b000000000001042d000000000100001900000d030001043000000000050100190000000000200443000000050030008c00000ce70000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000031004b00000cdf0000413d000003410030009c000003410300804100000060013002100000000002000414000003410020009c0000034102008041000000c002200210000000000112019f0000039d011001c700000000020500190d010cfc0000040f000000010020019000000cf60000613d000000000101043b000000000001042d000000000001042f00000cfa002104210000000102000039000000000001042d0000000002000019000000000001042d00000cff002104230000000102000039000000000001042d0000000002000019000000000001042d00000d010000043200000d020001042e00000d030001043000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000003fffffffffffffffe01f85071600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000092777b2800000000000000000000000000000000000000000000000000000000e8111a1100000000000000000000000000000000000000000000000000000000f320772200000000000000000000000000000000000000000000000000000000f320772300000000000000000000000000000000000000000000000000000000f5f8d36500000000000000000000000000000000000000000000000000000000f7412baf00000000000000000000000000000000000000000000000000000000e8111a1200000000000000000000000000000000000000000000000000000000f25e55a500000000000000000000000000000000000000000000000000000000f301af4200000000000000000000000000000000000000000000000000000000a28d4c9b00000000000000000000000000000000000000000000000000000000a28d4c9c00000000000000000000000000000000000000000000000000000000b66503cf00000000000000000000000000000000000000000000000000000000e68863960000000000000000000000000000000000000000000000000000000092777b29000000000000000000000000000000000000000000000000000000009cc7f708000000000000000000000000000000000000000000000000000000009e2bf22c0000000000000000000000000000000000000000000000000000000046c96aab0000000000000000000000000000000000000000000000000000000050589792000000000000000000000000000000000000000000000000000000005058979300000000000000000000000000000000000000000000000000000000572b6c050000000000000000000000000000000000000000000000000000000076f4be360000000000000000000000000000000000000000000000000000000046c96aac0000000000000000000000000000000000000000000000000000000049dcc204000000000000000000000000000000000000000000000000000000004d5ce038000000000000000000000000000000000000000000000000000000001f850715000000000000000000000000000000000000000000000000000000001f850716000000000000000000000000000000000000000000000000000000003e491d4700000000000000000000000000000000000000000000000000000000456cb7c60000000000000000000000000000000000000000000000000000000018160ddd000000000000000000000000000000000000000000000000000000001be052890000000000000000000000000000000000000040000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000430c2081000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000ea8e4eb5000000000000000000000000000000000000000000000000000000006352211e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656400000000000000000000000000000000000000000000000000000003ffffffe008c379a0000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e0000000000000000000000000000000000000084000000000000000000000000416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000000000000000000000000000000000000000000640000000000000000000000004e487b71000000000000000000000000000000000000000000000000000000009aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc95265656e7472616e637947756172643a207265656e7472616e742063616c6c0090890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1509addddcec1d7ba6ad726df49aeea3e93fb0c1037d551236841a60c0c883f2c10000000000000000000000000000000000000020000000800000000000000000c4f081650000000000000000000000000000000000000000000000000000000008c736c20000000000000000000000000000000000000000000000000000000023b872dd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff5f0000000000000000000000000000000000000000000000000000000000093a8052977ea98a2220a03ee9ba5cb003ada08d394ea10155483c95dc2dc77a7eb24b1f2a20050000000000000000000000000000000000000000000000000000000028829e820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000008000000000000000000000000000000000000000000000000000000020000000000000000000000000f279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5680000000000000000000000000000000000000040000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffffc0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6c580fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6c57ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6c58102000000000000000000000000000000000000000000000000000000000000000200000200000000000000000000000000000000000000000000000000000000000000000000000000a264697066735822122053790090643240e95cdc38ac3f48819b91a0543419d4104e2b550bac36e824b864736f6c6378247a6b736f6c633a312e352e31353b736f6c633a302e382e31393b6c6c766d3a312e302e320055
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c0f53703e9f4b79fa2fb09a2aeba487fa97729c9000000000000000000000000c0f53703e9f4b79fa2fb09a2aeba487fa97729c9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000020000000000000000000000003439153eb7af838ad19d56e1571fbd09333c28090000000000000000000000009ebe3a824ca958e4b3da772d2065518f009cba62
-----Decoded View---------------
Arg [0] : _forwarder (address): 0xC0F53703e9f4b79fA2FB09a2aeBA487FA97729c9
Arg [1] : _voter (address): 0xC0F53703e9f4b79fA2FB09a2aeBA487FA97729c9
Arg [2] : _rewards (address[]): 0x3439153EB7AF838Ad19d56E1571FBD09333C2809,0x9eBe3A824Ca958e4b3Da772D2065518F009CBa62
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000c0f53703e9f4b79fa2fb09a2aeba487fa97729c9
Arg [1] : 000000000000000000000000c0f53703e9f4b79fa2fb09a2aeba487fa97729c9
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [4] : 0000000000000000000000003439153eb7af838ad19d56e1571fbd09333c2809
Arg [5] : 0000000000000000000000009ebe3a824ca958e4b3da772d2065518f009cba62
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.