Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
LauncherPlugin
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 333 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; import {ILauncherPlugin} from "./interfaces/ILauncherPlugin.sol"; import {Errors} from "contracts/libraries/Errors.sol"; import {IVoter} from "./interfaces/IVoter.sol"; /// @author ShadowDEX on Sonic /// @title LauncherPlugins contract for modular plug-n-play with memes /** * @dev There are two trusted roles in the LauncherPlugin system * Authority: Whitelisted external launchers, e.g. launchpads * Operator: Shadow operational multisig, or other timelocked/secure system * AccessHub: central authority management contract * These roles are to be managed securely, and with diligence to prevent abuse * However, the system already has checks in place to mitigate any possible abuse situations ahead of time */ contract LauncherPlugin is ILauncherPlugin { /// @inheritdoc ILauncherPlugin address public operator; /// @notice the voter contract IVoter public immutable voter; /// @inheritdoc ILauncherPlugin mapping(address pool => bool isEnabled) public launcherPluginEnabled; /// @inheritdoc ILauncherPlugin mapping(address pool => LauncherConfigs) public poolConfigs; /// @inheritdoc ILauncherPlugin mapping(address pool => address feeDist) public feeDistToPool; /// @inheritdoc ILauncherPlugin mapping(address who => bool authority) public authorityMap; /// @inheritdoc ILauncherPlugin mapping(address authority => string name) public nameOfAuthority; /// @inheritdoc ILauncherPlugin uint256 public constant DENOM = 1_000_000; modifier onlyAuthority() { /// @dev authority check of either the operator of authority in the mapping require(authorityMap[msg.sender] || msg.sender == IVoter(voter).accessHub(), Errors.NOT_AUTHORITY()); _; } modifier onlyOperator() { /// @dev redundant `operator` address put here as a safeguard for input errors on transferring roles require(msg.sender == IVoter(voter).accessHub() || msg.sender == operator, Errors.NOT_OPERATOR()); _; } constructor(address _voter, address _operator) { /// @dev initialize the voter voter = IVoter(_voter); /// @dev operator and team initially are the same operator = _operator; } /// @inheritdoc ILauncherPlugin function accessHub() external view returns (address) { return IVoter(voter).accessHub(); } /// @inheritdoc ILauncherPlugin /// @dev should be called by another contract with proper batching of function calls function setConfigs(address _pool, uint256 _take, address _recipient) external onlyAuthority { /// @dev ensure launcherPlugins are enabled require(launcherPluginEnabled[_pool], Errors.NOT_ENABLED(_pool)); /// @dev ensure the fee is <= 100% require(_take <= DENOM, Errors.INVALID_TAKE()); /// @dev store launcher configs in pool to struct mapping LauncherConfigs memory lc = LauncherConfigs(_take, _recipient); /// @dev store the pool configs in the mapping poolConfigs[_pool] = lc; /// @dev emit an event for configuration emit Configured(_pool, _take, _recipient); } /// @inheritdoc ILauncherPlugin /// @dev should be called by another contract with proper batching of function calls function enablePool(address _pool) external onlyAuthority { /// @dev require that the plugin is enabled require(!launcherPluginEnabled[_pool], Errors.ENABLED()); /// @dev fetch the feeDistributor address address _feeDist = voter.feeDistributorForGauge(voter.gaugeForPool(_pool)); /// @dev check that _feeDist is not the zero addresss require(_feeDist != address(0), Errors.NO_FEEDIST()); /// @dev set the feeDist for the pool feeDistToPool[_feeDist] = _pool; launcherPluginEnabled[_pool] = true; /// @dev emit with the name of the authority emit EnabledPool(_pool, nameOfAuthority[msg.sender]); } /// @inheritdoc ILauncherPlugin function migratePool(address _oldPool, address _newPool) external { /// @dev gate to accessHub and the current operator require(msg.sender == IVoter(voter).accessHub() || msg.sender == operator, Errors.NOT_AUTHORIZED(msg.sender)); require(launcherPluginEnabled[_oldPool], Errors.NOT_ENABLED(_oldPool)); launcherPluginEnabled[_newPool] = true; /// @dev fetch the feedists for each pool (address _feeDist, address _newFeeDist) = ( voter.feeDistributorForGauge(voter.gaugeForPool(_oldPool)), voter.feeDistributorForGauge(voter.gaugeForPool(_newPool)) ); /// @dev set the new pool's feedist feeDistToPool[_newFeeDist] = _newPool; /// @dev copy over the values poolConfigs[_newPool] = poolConfigs[_oldPool]; /// @dev delete old values delete poolConfigs[_oldPool]; /// @dev set to disabled launcherPluginEnabled[_oldPool] = false; /// @dev set the old fee dist to the new one as a safety measure feeDistToPool[_feeDist] = feeDistToPool[_newFeeDist]; emit MigratedPool(_oldPool, _newPool); } /// @inheritdoc ILauncherPlugin function disablePool(address _pool) external onlyOperator { /// @dev require the plugin is already enabled require(launcherPluginEnabled[_pool], Errors.NOT_ENABLED(_pool)); /// @dev wipe struct delete poolConfigs[_pool]; /// @dev wipe the mapping for feeDist to the pool, incase the feeDist is overwritten delete feeDistToPool[ voter.feeDistributorForGauge(voter.gaugeForPool(_pool)) ]; /// @dev set to disabled launcherPluginEnabled[_pool] = false; /// @dev emit an event emit DisabledPool(_pool); } /// @inheritdoc ILauncherPlugin function setOperator(address _newOperator) external onlyOperator { /// @dev ensure the new operator is not already the operator require(operator != _newOperator, Errors.ALREADY_OPERATOR()); /// @dev store the oldOperator to use in the event, for info purposes address oldOperator = operator; /// @dev set operator as the new operator operator = _newOperator; /// @dev emit operator change event emit NewOperator(oldOperator, operator); } /// @inheritdoc ILauncherPlugin function grantAuthority(address _newAuthority, string calldata _name) external onlyOperator { /// @dev ensure the proposed _newAuthority is not already one require(!authorityMap[_newAuthority], Errors.ALREADY_AUTHORITY()); /// @dev set the mapping to true authorityMap[_newAuthority] = true; /// @dev emit the new authority event emit NewAuthority(_newAuthority); /// @dev label the authority _labelAuthority(_newAuthority, _name); } /// @inheritdoc ILauncherPlugin function revokeAuthority(address _oldAuthority) external onlyOperator { /// @dev ensure _oldAuthority is already an authority require(authorityMap[_oldAuthority], Errors.NOT_AUTHORITY()); /// @dev set the mapping to false authorityMap[_oldAuthority] = false; /// @dev emit the remove authority event emit RemovedAuthority(_oldAuthority); } /// @inheritdoc ILauncherPlugin function label(address _authority, string calldata _label) external onlyOperator { _labelAuthority(_authority, _label); } /// @inheritdoc ILauncherPlugin function values(address _feeDist) external view returns (uint256 _take, address _recipient) { /// @dev fetch the poolConfigs from the mapping LauncherConfigs memory _tmp = poolConfigs[feeDistToPool[_feeDist]]; /// @dev return the existing values return (_tmp.launcherTake, _tmp.takeRecipient); } /// @dev internal function called on creation and manually function _labelAuthority(address _authority, string calldata _label) internal { /// @dev ensure they are an authority require(authorityMap[_authority], Errors.NOT_AUTHORITY()); /// @dev label the authority nameOfAuthority[_authority] = _label; /// @dev emit on label emit Labeled(_authority, _label); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; interface ILauncherPlugin { /// @dev struct that holds the configurations of each specific pool struct LauncherConfigs { uint256 launcherTake; address takeRecipient; } event NewOperator(address indexed _old, address indexed _new); event NewAuthority(address indexed _newAuthority); event RemovedAuthority(address indexed _previousAuthority); event EnabledPool(address indexed pool, string indexed _name); event DisabledPool(address indexed pool); event MigratedPool(address indexed oldPool, address indexed newPool); event Configured(address indexed pool, uint256 take, address indexed recipient); event Labeled(address indexed authority, string indexed label); /// @notice address of the accessHub function accessHub() external view returns (address _accessHub); /// @notice protocol operator address function operator() external view returns (address _operator); /// @notice the denominator constant function DENOM() external view returns (uint256 _denominator); /// @notice whether configs are enabled for a pool /// @param _pool address of the pool /// @return bool function launcherPluginEnabled(address _pool) external view returns (bool); /// @notice maps whether an address is an authority or not /// @param _who the address to check /// @return _is true or false function authorityMap(address _who) external view returns (bool _is); /// @notice allows migrating the parameters from one pool to the other /// @param _oldPool the current address of the pair /// @param _newPool the new pool's address function migratePool(address _oldPool, address _newPool) external; /// @notice fetch the launcher configs if any /// @param _pool address of the pool /// @return LauncherConfigs the configs function poolConfigs(address _pool) external view returns (uint256, address); /// @notice view functionality to see who is an authority function nameOfAuthority(address) external view returns (string memory); /// @notice returns the pool address for a feeDist /// @param _feeDist address of the feeDist /// @return _pool the pool address from the mapping function feeDistToPool(address _feeDist) external view returns (address _pool); /// @notice set launcher configurations for a pool /// @param _pool address of the pool /// @param _take the fee that goes to the designated recipient /// @param _recipient the address that receives the fees function setConfigs(address _pool, uint256 _take, address _recipient) external; /// @notice enables the pool for LauncherConfigs /// @param _pool address of the pool function enablePool(address _pool) external; /// @notice disables the pool for LauncherConfigs /// @dev clears mappings /// @param _pool address of the pool function disablePool(address _pool) external; /// @notice sets a new operator address /// @param _newOperator new operator address function setOperator(address _newOperator) external; /// @notice gives authority to a new contract/address /// @param _newAuthority the suggested new authority function grantAuthority(address _newAuthority, string calldata) external; /// @notice removes authority from a contract/address /// @param _oldAuthority the to-be-removed authority function revokeAuthority(address _oldAuthority) external; /// @notice labels an authority function label(address, string calldata) external; /// @notice returns the values for the launcherConfig of the specific feeDist /// @param _feeDist the address of the feeDist /// @return _launcherTake fee amount taken /// @return _recipient address that receives the fees function values(address _feeDist) external view returns (uint256 _launcherTake, address _recipient); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title Central Errors Library /// @notice Contains all custom errors used across the protocol /// @dev Centralized error definitions to prevent redundancy library Errors { /*////////////////////////////////////////////////////////////// VOTER ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when attempting to interact with an already active gauge /// @param gauge The address of the gauge error ACTIVE_GAUGE(address gauge); /// @notice Thrown when attempting to interact with an inactive gauge /// @param gauge The address of the gauge error GAUGE_INACTIVE(address gauge); /// @notice Thrown when attempting to whitelist an already whitelisted token /// @param token The address of the token error ALREADY_WHITELISTED(address token); /// @notice Thrown when caller is not authorized to perform an action /// @param caller The address of the unauthorized caller error NOT_AUTHORIZED(address caller); /// @notice Thrown when token is not whitelisted /// @param token The address of the non-whitelisted token error NOT_WHITELISTED(address token); /// @notice Thrown when both tokens in a pair are not whitelisted error BOTH_NOT_WHITELISTED(); /// @notice Thrown when address is not a valid pool /// @param pool The invalid pool address error NOT_POOL(address pool); /// @notice Thrown when pool is not seeded in PoolUpdater /// @param pool The invalid pool address error NOT_SEEDED(address pool); /// @notice Thrown when contract is not initialized error NOT_INIT(); /// @notice Thrown when array lengths don't match error LENGTH_MISMATCH(); /// @notice Thrown when pool doesn't have an associated gauge /// @param pool The address of the pool error NO_GAUGE(address pool); /// @notice Thrown when rewards are already distributed for a period /// @param gauge The gauge address /// @param period The distribution period error ALREADY_DISTRIBUTED(address gauge, uint256 period); /// @notice Thrown when attempting to vote with zero amount /// @param pool The pool address error ZERO_VOTE(address pool); /// @notice Thrown when ratio exceeds maximum allowed /// @param _xRatio The excessive ratio value error RATIO_TOO_HIGH(uint256 _xRatio); /// @notice Thrown when vote operation fails error VOTE_UNSUCCESSFUL(); /*////////////////////////////////////////////////////////////// GAUGE V3 ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when the pool already has a gauge /// @param pool The address of the pool error GAUGE_EXISTS(address pool); /// @notice Thrown when caller is not the voter /// @param caller The address of the invalid caller error NOT_VOTER(address caller); /// @notice Thrown when amount is not greater than zero /// @param amt The invalid amount error NOT_GT_ZERO(uint256 amt); /// @notice Thrown when attempting to claim future rewards error CANT_CLAIM_FUTURE(); /// @notice Throw when gauge can't determine if using secondsInRange from the pool is safe error NEED_TEAM_TO_UPDATE(); /*////////////////////////////////////////////////////////////// GAUGE ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when amount is zero error ZERO_AMOUNT(); /// @notice Thrown when stake notification fails error CANT_NOTIFY_STAKE(); /// @notice Thrown when reward amount is too high error REWARD_TOO_HIGH(); /// @notice Thrown when amount exceeds remaining balance /// @param amount The requested amount /// @param remaining The remaining balance error NOT_GREATER_THAN_REMAINING(uint256 amount, uint256 remaining); /// @notice Thrown when token operation fails /// @param token The address of the problematic token error TOKEN_ERROR(address token); /// @notice Thrown when an address is not an NfpManager error NOT_NFP_MANAGER(address nfpManager); /*////////////////////////////////////////////////////////////// FEE DISTRIBUTOR ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when period is not finalized /// @param period The unfinalized period error NOT_FINALIZED(uint256 period); /// @notice Thrown when the destination of a redirect is not a feeDistributor /// @param destination Destination of the redirect error NOT_FEE_DISTRIBUTOR(address destination); /// @notice Thrown when the destination of a redirect's pool/pair has completely different tokens error DIFFERENT_DESTINATION_TOKENS(); /*////////////////////////////////////////////////////////////// PAIR ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when ratio is unstable error UNSTABLE_RATIO(); /// @notice Thrown when safe transfer fails error SAFE_TRANSFER_FAILED(); /// @notice Thrown on arithmetic overflow error OVERFLOW(); /// @notice Thrown when skim operation is disabled error SKIM_DISABLED(); /// @notice Thrown when insufficient liquidity is minted error INSUFFICIENT_LIQUIDITY_MINTED(); /// @notice Thrown when insufficient liquidity is burned error INSUFFICIENT_LIQUIDITY_BURNED(); /// @notice Thrown when output amount is insufficient error INSUFFICIENT_OUTPUT_AMOUNT(); /// @notice Thrown when input amount is insufficient error INSUFFICIENT_INPUT_AMOUNT(); /// @notice Generic insufficient liquidity error error INSUFFICIENT_LIQUIDITY(); /// @notice Invalid transfer error error INVALID_TRANSFER(); /// @notice K value error in AMM error K(); /*////////////////////////////////////////////////////////////// PAIR FACTORY ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when fee is too high error FEE_TOO_HIGH(); /// @notice Thrown when fee is zero error ZERO_FEE(); /// @notice Thrown when token assortment is invalid error INVALID_ASSORTMENT(); /// @notice Thrown when address is zero error ZERO_ADDRESS(); /// @notice Thrown when pair already exists error PAIR_EXISTS(); /// @notice Thrown when fee split is invalid error INVALID_FEE_SPLIT(); /*////////////////////////////////////////////////////////////// FEE RECIPIENT FACTORY ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when treasury fee is invalid error INVALID_TREASURY_FEE(); /*////////////////////////////////////////////////////////////// ROUTER ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when deadline has expired error EXPIRED(); /// @notice Thrown when tokens are identical error IDENTICAL(); /// @notice Thrown when amount is insufficient error INSUFFICIENT_AMOUNT(); /// @notice Thrown when path is invalid error INVALID_PATH(); /// @notice Thrown when token B amount is insufficient error INSUFFICIENT_B_AMOUNT(); /// @notice Thrown when token A amount is insufficient error INSUFFICIENT_A_AMOUNT(); /// @notice Thrown when input amount is excessive error EXCESSIVE_INPUT_AMOUNT(); /// @notice Thrown when ETH transfer fails error ETH_TRANSFER_FAILED(); /// @notice Thrown when reserves are invalid error INVALID_RESERVES(); /*////////////////////////////////////////////////////////////// MINTER ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when epoch 0 has already started error STARTED(); /// @notice Thrown when emissions haven't started error EMISSIONS_NOT_STARTED(); /// @notice Thrown when deviation is too high error TOO_HIGH(); /// @notice Thrown when no value change detected error NO_CHANGE(); /// @notice Thrown when updating emissions in same period error SAME_PERIOD(); /// @notice Thrown when contract setup is invalid error INVALID_CONTRACT(); /// @notice Thrown when legacy factory doesn't have feeSplitWhenNoGauge on error FEE_SPLIT_WHEN_NO_GAUGE_IS_OFF(); /*////////////////////////////////////////////////////////////// ACCESS HUB ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when addresses are identical error SAME_ADDRESS(); /// @notice Thrown when caller is not timelock /// @param caller The invalid caller address error NOT_TIMELOCK(address caller); /// @notice Thrown when manual execution fails /// @param reason The failure reason error MANUAL_EXECUTION_FAILURE(bytes reason); /// @notice Thrown when kick operation is forbidden /// @param target The target address error KICK_FORBIDDEN(address target); /*////////////////////////////////////////////////////////////// VOTE MODULE ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when caller is not xShadow error NOT_XSHADOW(); /// @notice Thrown when cooldown period is still active error COOLDOWN_ACTIVE(); /// @notice Thrown when caller is not vote module error NOT_VOTEMODULE(); /// @notice Thrown when caller is unauthorized error UNAUTHORIZED(); /// @notice Thrown when caller is not access hub error NOT_ACCESSHUB(); /// @notice Thrown when address is invalid error INVALID_ADDRESS(); /*////////////////////////////////////////////////////////////// LAUNCHER PLUGIN ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when caller is not authority error NOT_AUTHORITY(); /// @notice Thrown when already an authority error ALREADY_AUTHORITY(); /// @notice Thrown when caller is not operator error NOT_OPERATOR(); /// @notice Thrown when already an operator error ALREADY_OPERATOR(); /// @notice Thrown when pool is not enabled /// @param pool The disabled pool address error NOT_ENABLED(address pool); /// @notice Thrown when fee distributor is missing error NO_FEEDIST(); /// @notice Thrown when already enabled error ENABLED(); /// @notice Thrown when take value is invalid error INVALID_TAKE(); /*////////////////////////////////////////////////////////////// X33 ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when value is zero error ZERO(); /// @notice Thrown when amount is insufficient error NOT_ENOUGH(); /// @notice Thrown when value doesn't conform to scale /// @param value The non-conforming value error NOT_CONFORMED_TO_SCALE(uint256 value); /// @notice Thrown when contract is locked error LOCKED(); /// @notice Thrown when rebase is in progress error REBASE_IN_PROGRESS(); /// @notice Thrown when aggregator reverts /// @param reason The revert reason error AGGREGATOR_REVERTED(bytes reason); /// @notice Thrown when output amount is too low /// @param amount The insufficient amount error AMOUNT_OUT_TOO_LOW(uint256 amount); /// @notice Thrown when aggregator is not whitelisted /// @param aggregator The non-whitelisted aggregator address error AGGREGATOR_NOT_WHITELISTED(address aggregator); /// @notice Thrown when token is forbidden /// @param token The forbidden token address error FORBIDDEN_TOKEN(address token); /*////////////////////////////////////////////////////////////// XSHADOW ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when caller is not minter error NOT_MINTER(); /// @notice Thrown when no vest exists error NO_VEST(); /// @notice Thrown when already exempt error ALREADY_EXEMPT(); /// @notice Thrown when not exempt error NOT_EXEMPT(); /// @notice Thrown when rescue operation is not allowed error CANT_RESCUE(); /// @notice Thrown when array lengths mismatch error ARRAY_LENGTHS(); /// @notice Thrown when vesting periods overlap error VEST_OVERLAP(); /*////////////////////////////////////////////////////////////// V3 FACTORY ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when tokens are identical error IDENTICAL_TOKENS(); /// @notice Thrown when fee is too large error FEE_TOO_LARGE(); /// @notice Address zero error error ADDRESS_ZERO(); /// @notice Fee zero error error F0(); /// @notice Thrown when value is out of bounds /// @param value The out of bounds value error OOB(uint8 value); /*////////////////////////////////////////////////////////////// POOL UPDATER ERRORS //////////////////////////////////////////////////////////////*/ /// @notice Thrown when seeding for a pool fails error TRANSFER_FROM_FOR_SEEDING_FAILED(address token, uint256 amount); /// @notice Thrown when seeding for a pool fails error SEEDING_FAILED(); /// @notice Thrown when updatePools is called too early error TOO_EARLY(); /// @notice Thrown when a callback is called when an update isn't running error NOT_RUNNING(); /// @notice Thrown when updatePools didn't perform any updates error NO_UPDATES(); }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; pragma abicoder v2; interface IVoter { event GaugeCreated(address indexed gauge, address creator, address feeDistributor, address indexed pool); event GaugeKilled(address indexed gauge); event GaugeRevived(address indexed gauge); event Voted(address indexed owner, uint256 weight, address indexed pool); event Abstained(address indexed owner, uint256 weight); event Deposit(address indexed lp, address indexed gauge, address indexed owner, uint256 amount); event Withdraw(address indexed lp, address indexed gauge, address indexed owner, uint256 amount); event NotifyReward(address indexed sender, address indexed reward, uint256 amount); event DistributeReward(address indexed sender, address indexed gauge, uint256 amount); event EmissionsRatio(address indexed caller, uint256 oldRatio, uint256 newRatio); event NewGovernor(address indexed sender, address indexed governor); event Whitelisted(address indexed whitelister, address indexed token); event WhitelistRevoked(address indexed forbidder, address indexed token, bool status); event MainTickSpacingChanged(address indexed token0, address indexed token1, int24 indexed newMainTickSpacing); event Poke(address indexed user); event EmissionsRedirected(address indexed sourceGauge, address indexed destinationGauge); struct InitializationParams { address shadow; address legacyFactory; address gauges; address feeDistributorFactory; address minter; address msig; address xShadow; address clFactory; address clGaugeFactory; address nfpManager; address feeRecipientFactory; address voteModule; address launcherPlugin; address poolUpdater; } function initialize(InitializationParams memory inputs) external; /// @notice denominator basis function BASIS() external view returns (uint256); /// @notice ratio of xShadow emissions globally function xRatio() external view returns (uint256); /// @notice xShadow contract address function xShadow() external view returns (address); /// @notice legacy factory address (uni-v2/stableswap) function legacyFactory() external view returns (address); /// @notice concentrated liquidity factory function clFactory() external view returns (address); /// @notice gauge factory for CL function clGaugeFactory() external view returns (address); /// @notice pool updater for CL function poolUpdater() external view returns (address); /// @notice legacy fee recipient factory function feeRecipientFactory() external view returns (address); /// @notice peripheral NFPManager contract function nfpManager() external view returns (address); /// @notice returns the address of the current governor /// @return _governor address of the governor function governor() external view returns (address _governor); /// @notice the address of the vote module /// @return _voteModule the vote module contract address function voteModule() external view returns (address _voteModule); /// @notice address of the central access Hub function accessHub() external view returns (address); /// @notice the address of the shadow launcher plugin to enable third party launchers /// @return _launcherPlugin the address of the plugin function launcherPlugin() external view returns (address _launcherPlugin); /// @notice distributes emissions from the minter to the voter /// @param amount the amount of tokens to notify function notifyRewardAmount(uint256 amount) external; /// @notice distributes the emissions for a specific gauge /// @param _gauge the gauge address function distribute(address _gauge) external; /// @notice returns the address of the gauge factory /// @param _gaugeFactory gauge factory address function gaugeFactory() external view returns (address _gaugeFactory); /// @notice returns the address of the feeDistributor factory /// @return _feeDistributorFactory feeDist factory address function feeDistributorFactory() external view returns (address _feeDistributorFactory); /// @notice returns the address of the minter contract /// @return _minter address of the minter function minter() external view returns (address _minter); /// @notice check if the gauge is active for governance use /// @param _gauge address of the gauge /// @return _trueOrFalse if the gauge is alive function isAlive(address _gauge) external view returns (bool _trueOrFalse); /// @notice allows the token to be paired with other whitelisted assets to participate in governance /// @param _token the address of the token function whitelist(address _token) external; /// @notice effectively disqualifies a token from governance /// @param _token the address of the token function revokeWhitelist(address _token) external; /// @notice returns if the address is a gauge /// @param gauge address of the gauge /// @return _trueOrFalse boolean if the address is a gauge function isGauge(address gauge) external view returns (bool _trueOrFalse); /// @notice disable a gauge from governance /// @param _gauge address of the gauge function killGauge(address _gauge) external; /// @notice re-activate a dead gauge /// @param _gauge address of the gauge function reviveGauge(address _gauge) external; /// @notice re-cast a tokenID's votes /// @param owner address of the owner function poke(address owner) external; /// @notice sets the main destinationGauge of a token pairing /// @param tokenA address of tokenA /// @param tokenB address of tokenB /// @param destinationGauge the main gauge to set to function redirectEmissions(address tokenA, address tokenB, address destinationGauge) external; /// @notice returns if the address is a fee distributor /// @param _feeDistributor address of the feeDist /// @return _trueOrFalse if the address is a fee distributor function isFeeDistributor(address _feeDistributor) external view returns (bool _trueOrFalse); /// @notice returns the address of the emission's token /// @return _shadow emissions token contract address function shadow() external view returns (address _shadow); /// @notice returns the address of the pool's gauge, if any /// @param _pool pool address /// @return _gauge gauge address function gaugeForPool(address _pool) external view returns (address _gauge); /// @notice returns the address of the pool's feeDistributor, if any /// @param _gauge address of the gauge /// @return _feeDistributor address of the pool's feedist function feeDistributorForGauge(address _gauge) external view returns (address _feeDistributor); /// @notice returns the gauge address of a CL pool /// @param tokenA address of token A in the pair /// @param tokenB address of token B in the pair /// @param tickSpacing tickspacing of the pool /// @return gauge address of the gauge function gaugeForClPool(address tokenA, address tokenB, int24 tickSpacing) external view returns (address gauge); /// @notice returns the array of all tickspacings for the tokenA/tokenB combination /// @param tokenA address of token A in the pair /// @param tokenB address of token B in the pair /// @return _ts array of all the tickspacings function tickSpacingsForPair(address tokenA, address tokenB) external view returns (int24[] memory _ts); /// @notice returns the destination of a gauge redirect /// @param gauge address of gauge function gaugeRedirect(address gauge) external view returns (address); /// @notice returns the block.timestamp divided by 1 week in seconds /// @return period the period used for gauges function getPeriod() external view returns (uint256 period); /// @notice cast a vote to direct emissions to gauges and earn incentives /// @param owner address of the owner /// @param _pools the list of pools to vote on /// @param _weights an arbitrary weight per pool which will be normalized to 100% regardless of numerical inputs function vote(address owner, address[] calldata _pools, uint256[] calldata _weights) external; /// @notice reset the vote of an address /// @param owner address of the owner function reset(address owner) external; /// @notice set the governor address /// @param _governor the new governor address function setGovernor(address _governor) external; /// @notice recover stuck emissions /// @param _gauge the gauge address /// @param _period the period function stuckEmissionsRecovery(address _gauge, uint256 _period) external; /// @notice creates a legacy gauge for the pool /// @param _pool pool's address /// @return _gauge address of the new gauge function createGauge(address _pool) external returns (address _gauge); /// @notice create a concentrated liquidity gauge /// @param tokenA the address of tokenA /// @param tokenB the address of tokenB /// @param tickSpacing the tickspacing of the pool /// @return _clGauge address of the new gauge function createCLGauge(address tokenA, address tokenB, int24 tickSpacing) external returns (address _clGauge); /// @notice claim concentrated liquidity gauge rewards for specific NFP token ids /// @param _gauges array of gauges /// @param _tokens two dimensional array for the tokens to claim /// @param _nfpTokenIds two dimensional array for the NFPs function claimClGaugeRewards( address[] calldata _gauges, address[][] calldata _tokens, uint256[][] calldata _nfpTokenIds ) external; /// @notice claim arbitrary rewards from specific feeDists /// @param owner address of the owner /// @param _feeDistributors address of the feeDists /// @param _tokens two dimensional array for the tokens to claim function claimIncentives(address owner, address[] calldata _feeDistributors, address[][] calldata _tokens) external; /// @notice claim arbitrary rewards from specific feeDists and break up legacy pairs /// @param owner address of the owner /// @param _feeDistributors address of the feeDists /// @param _tokens two dimensional array for the tokens to claim function claimLegacyIncentives(address owner, address[] calldata _feeDistributors, address[][] calldata _tokens) external; /// @notice claim arbitrary rewards from specific gauges /// @param _gauges address of the gauges /// @param _tokens two dimensional array for the tokens to claim function claimRewards(address[] calldata _gauges, address[][] calldata _tokens) external; /// @notice claim arbitrary rewards from specific legacy gauges, and exit to shadow /// @param _gauges address of the gauges /// @param _tokens two dimensional array for the tokens to claim function claimLegacyRewardsAndExit(address[] calldata _gauges, address[][] calldata _tokens) external; /// @notice claim arbitrary rewards from specific cl gauges, and exit to shadow /// @param _gauges address of the gauges /// @param _tokens two dimensional array for the tokens to claim /// @param _nfpTokenIds two dimensional array for the nfp to claim function claimClGaugeRewardsAndExit( address[] memory _gauges, address[][] memory _tokens, uint256[][] memory _nfpTokenIds ) external; /// @notice distribute emissions to a gauge for a specific period /// @param _gauge address of the gauge /// @param _period value of the period function distributeForPeriod(address _gauge, uint256 _period) external; /// @notice attempt distribution of emissions to all gauges function distributeAll() external; /// @notice distribute emissions to gauges by index /// @param startIndex start of the loop /// @param endIndex end of the loop function batchDistributeByIndex(uint256 startIndex, uint256 endIndex) external; /// @notice lets governance update lastDistro period for a gauge /// @dev should only be used if distribute() is running out of gas /// @dev gaugePeriodDistributed will stop double claiming /// @param _gauge gauge to update /// @param _period period to update to function updateLastDistro(address _gauge, uint256 _period) external; /// @notice returns the votes cast for a tokenID /// @param owner address of the owner /// @return votes an array of votes casted /// @return weights an array of the weights casted per pool function getVotes(address owner, uint256 period) external view returns (address[] memory votes, uint256[] memory weights); /// @notice returns an array of all the pools /// @return _pools the array of pools function getAllPools() external view returns (address[] memory _pools); /// @notice returns the length of pools function getPoolsLength() external view returns (uint256); /// @notice returns the pool at index function getPool(uint256 index) external view returns (address); /// @notice returns an array of all the gauges /// @return _gauges the array of gauges function getAllGauges() external view returns (address[] memory _gauges); /// @notice returns the length of gauges function getGaugesLength() external view returns (uint256); /// @notice returns the gauge at index function getGauge(uint256 index) external view returns (address); /// @notice returns an array of all the feeDists /// @return _feeDistributors the array of feeDists function getAllFeeDistributors() external view returns (address[] memory _feeDistributors); /// @notice sets the xShadowRatio default function setGlobalRatio(uint256 _xRatio) external; /// @notice whether the token is whitelisted in governance function isWhitelisted(address _token) external view returns (bool _tf); /// @notice function for removing malicious or stuffed tokens function removeFeeDistributorReward(address _feeDist, address _token) external; /// @notice returns the total votes for a pool in a specific period /// @param pool the pool address to check /// @param period the period to check /// @return votes the total votes for the pool in that period function poolTotalVotesPerPeriod(address pool, uint256 period) external view returns (uint256 votes); /// @notice returns the pool address for a given gauge /// @param gauge address of the gauge /// @return pool address of the pool function poolForGauge(address gauge) external view returns (address pool); /// @notice returns the pool address for a given feeDistributor /// @param feeDistributor address of the feeDistributor /// @return pool address of the pool function poolForFeeDistributor(address feeDistributor) external view returns (address pool); /// @notice returns the voting power used by a voter for a period /// @param user address of the user /// @param period the period to check function userVotingPowerPerPeriod(address user, uint256 period) external view returns (uint256 votingPower); /// @notice returns the total votes for a specific period /// @param period the period to check /// @return weight the total votes for that period function totalVotesPerPeriod(uint256 period) external view returns (uint256 weight); /// @notice returns the total rewards allocated for a specific period /// @param period the period to check /// @return amount the total rewards for that period function totalRewardPerPeriod(uint256 period) external view returns (uint256 amount); /// @notice returns the last distribution period for a gauge /// @param _gauge address of the gauge /// @return period the last period distributions occurred function lastDistro(address _gauge) external view returns (uint256 period); /// @notice returns if the gauge is a Cl gauge /// @param gauge the gauge to check function isClGauge(address gauge) external view returns (bool); /// @notice returns if the gauge is a legacy gauge /// @param gauge the gauge to check function isLegacyGauge(address gauge) external view returns (bool); /// @notice sets a new NFP manager function setNfpManager(address _nfpManager) external; }
{ "remappings": [ "@layerzerolabs/=node_modules/@layerzerolabs/", "@layerzerolabs/lz-evm-protocol-v2/=node_modules/@layerzerolabs/lz-evm-protocol-v2/", "@openzeppelin-contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.1.0/", "@openzeppelin-contracts/contracts/=dependencies/@openzeppelin-contracts-5.1.0/", "@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.1.0/", "erc4626-tests/=dependencies/erc4626-property-tests-1.0/", "forge-std/=dependencies/forge-std-1.9.4/src/", "permit2/=lib/permit2/", "@axelar-network/=node_modules/@axelar-network/", "@chainlink/=node_modules/@chainlink/", "@eth-optimism/=node_modules/@eth-optimism/", "@openzeppelin-3.4.2/=node_modules/@openzeppelin-3.4.2/", "@openzeppelin-contracts-5.1.0/=dependencies/@openzeppelin-contracts-5.1.0/", "@openzeppelin-contracts-upgradeable-5.1.0/=dependencies/@openzeppelin-contracts-upgradeable-5.1.0/", "@uniswap/=node_modules/@uniswap/", "base64-sol/=node_modules/base64-sol/", "erc4626-property-tests-1.0/=dependencies/erc4626-property-tests-1.0/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std-1.9.4/=dependencies/forge-std-1.9.4/src/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/", "solidity-bytes-utils/=node_modules/solidity-bytes-utils/", "solmate/=node_modules/solmate/" ], "optimizer": { "enabled": true, "runs": 333 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": { "contracts/libraries/VoterGovernanceActions.sol": { "VoterGovernanceActions": "0x07A1539155758C975a6099aBc15d1B66a227dBDB" }, "contracts/libraries/VoterRewardClaimers.sol": { "VoterRewardClaimers": "0x6D1E0D075A013bD5080Be66A717A322F39eACC87" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_voter","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ALREADY_AUTHORITY","type":"error"},{"inputs":[],"name":"ALREADY_OPERATOR","type":"error"},{"inputs":[],"name":"ENABLED","type":"error"},{"inputs":[],"name":"INVALID_TAKE","type":"error"},{"inputs":[],"name":"NOT_AUTHORITY","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NOT_AUTHORIZED","type":"error"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"NOT_ENABLED","type":"error"},{"inputs":[],"name":"NOT_OPERATOR","type":"error"},{"inputs":[],"name":"NO_FEEDIST","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"take","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"Configured","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"DisabledPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"string","name":"_name","type":"string"}],"name":"EnabledPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authority","type":"address"},{"indexed":true,"internalType":"string","name":"label","type":"string"}],"name":"Labeled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldPool","type":"address"},{"indexed":true,"internalType":"address","name":"newPool","type":"address"}],"name":"MigratedPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_newAuthority","type":"address"}],"name":"NewAuthority","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_old","type":"address"},{"indexed":true,"internalType":"address","name":"_new","type":"address"}],"name":"NewOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_previousAuthority","type":"address"}],"name":"RemovedAuthority","type":"event"},{"inputs":[],"name":"DENOM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessHub","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"authorityMap","outputs":[{"internalType":"bool","name":"authority","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"disablePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"name":"enablePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"feeDistToPool","outputs":[{"internalType":"address","name":"feeDist","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newAuthority","type":"address"},{"internalType":"string","name":"_name","type":"string"}],"name":"grantAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_authority","type":"address"},{"internalType":"string","name":"_label","type":"string"}],"name":"label","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"launcherPluginEnabled","outputs":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oldPool","type":"address"},{"internalType":"address","name":"_newPool","type":"address"}],"name":"migratePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"name":"nameOfAuthority","outputs":[{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"poolConfigs","outputs":[{"internalType":"uint256","name":"launcherTake","type":"uint256"},{"internalType":"address","name":"takeRecipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oldAuthority","type":"address"}],"name":"revokeAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"uint256","name":"_take","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"setConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOperator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeDist","type":"address"}],"name":"values","outputs":[{"internalType":"uint256","name":"_take","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"contract IVoter","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561000f575f5ffd5b5060405161197c38038061197c83398101604081905261002e91610070565b6001600160a01b039182166080525f80546001600160a01b031916919092161790556100a1565b80516001600160a01b038116811461006b575f5ffd5b919050565b5f5f60408385031215610081575f5ffd5b61008a83610055565b915061009860208401610055565b90509250929050565b6080516118686101145f395f818161021d01528181610364015281816104a901528181610617015281816107210152818161095501528181610ab301528181610bab01528181610d4d01528181610e8e01528181610f760152818161111c0152818161126d01526113b501526118685ff3fe608060405234801561000f575f5ffd5b5060043610610111575f3560e01c8063595aeb501161009e578063b3ab15fb1161006e578063b3ab15fb1461030e578063c657c71814610321578063d309dbc614610334578063dcaaa61b14610347578063e7589b391461035a575f5ffd5b8063595aeb50146102a65780635dbb6eb4146102b9578063772b7e97146102d95780638668a494146102ec575f5ffd5b80632aeb8f22116100e45780632aeb8f22146101f05780632cd21e001461020557806346c96aac1461021857806354fe9fd71461023f578063570ca73514610294575f5ffd5b80630792d5131461011557806316343da4146101665780631e8d2e4d1461017e57806322d65c3b146101be575b5f5ffd5b6101446101233660046114f9565b60026020525f9081526040902080546001909101546001600160a01b031682565b604080519283526001600160a01b039091166020830152015b60405180910390f35b610170620f424081565b60405190815260200161015d565b6101a661018c3660046114f9565b60036020525f90815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161015d565b6101e06101cc3660046114f9565b60046020525f908152604090205460ff1681565b604051901515815260200161015d565b6102036101fe3660046114f9565b610362565b005b61020361021336600461151b565b6104a7565b6101a67f000000000000000000000000000000000000000000000000000000000000000081565b61014461024d3660046114f9565b6001600160a01b039081165f908152600360209081526040808320548416835260028252918290208251808401909352805480845260019091015490931691018190529091565b5f546101a6906001600160a01b031681565b6102036102b43660046114f9565b6105fd565b6102cc6102c73660046114f9565b6108bc565b60405161015d919061159b565b6102036102e73660046115d0565b610953565b6101e06102fa3660046114f9565b60016020525f908152604090205460ff1681565b61020361031c3660046114f9565b610d4b565b61020361032f36600461151b565b610e8c565b610203610342366004611607565b610f5c565b6102036103553660046114f9565b61111a565b6101a66113b2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103be573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103e29190611646565b6001600160a01b0316336001600160a01b0316148061040a57505f546001600160a01b031633145b61042757604051630ce525af60e11b815260040160405180910390fd5b6001600160a01b0381165f9081526004602052604090205460ff1661045f5760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0381165f81815260046020526040808220805460ff19169055517fc59f9761f66797faf208a417f9fbf142783bcffcd831283a2ded97f1a676abb09190a250565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610503573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105279190611646565b6001600160a01b0316336001600160a01b0316148061054f57505f546001600160a01b031633145b61056c57604051630ce525af60e11b815260040160405180910390fd5b6001600160a01b0383165f9081526004602052604090205460ff16156105a55760405163bc626b6f60e01b815260040160405180910390fd5b6001600160a01b0383165f81815260046020526040808220805460ff19166001179055517f1a21cdb01b4a24f9795ddbd009ccbfea49adcea2f28c2606be806502192379e69190a26105f8838383611438565b505050565b335f9081526004602052604090205460ff16806106aa57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610671573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106959190611646565b6001600160a01b0316336001600160a01b0316145b6106c75760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0381165f9081526001602052604090205460ff1615610700576040516352f878d960e11b815260040160405180910390fd5b6040516302045be960e41b81526001600160a01b0382811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063f55858b0908290632045be9090602401602060405180830381865afa158015610770573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107949190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156107d6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fa9190611646565b90506001600160a01b0381166108235760405163324250e960e21b815260040160405180910390fd5b6001600160a01b038181165f90815260036020908152604080832080546001600160a01b03191694871694851790559282526001808252838320805460ff1916909117905533825260059052819020905161087e9190611699565b604051908190038120906001600160a01b038416907fec779a851842f582d1e28aca39c7057da0596cf816d0535bec1df1c0b59fdaf4905f90a35050565b60056020525f9081526040902080546108d490611661565b80601f016020809104026020016040519081016040528092919081815260200182805461090090611661565b801561094b5780601f106109225761010080835404028352916020019161094b565b820191905f5260205f20905b81548152906001019060200180831161092e57829003601f168201915b505050505081565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109af573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109d39190611646565b6001600160a01b0316336001600160a01b031614806109fb57505f546001600160a01b031633145b3390610a2b57604051632bc10c3360e01b81526001600160a01b0390911660048201526024015b60405180910390fd5b506001600160a01b0382165f90815260016020526040902054829060ff16610a72576040516303df80cf60e41b81526001600160a01b039091166004820152602401610a22565b506001600160a01b038181165f908152600160208190526040808320805460ff1916909217909155516302045be960e41b81528483166004820152909182917f00000000000000000000000000000000000000000000000000000000000000009091169063f55858b0908290632045be9090602401602060405180830381865afa158015610b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b269190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610b68573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b8c9190611646565b6040516302045be960e41b81526001600160a01b0385811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f55858b0908290632045be9090602401602060405180830381865afa158015610bf8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1c9190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610c5e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c829190611646565b6001600160a01b038082165f9081526003602081815260408084208054868c166001600160a01b0319918216811783558d881680885260028652848820828952858920815481556001828101805492820180548816938e1693909317909255838b52918a90558054851690558652848820805460ff1916905595909452905486891686528286208054909216961695909517909455925194965092945090927fa929e32c44fd4ebbb29a358c16e6cfb9b08d721f2a5e71126734a73a390e945c9190a350505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da7573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dcb9190611646565b6001600160a01b0316336001600160a01b03161480610df357505f546001600160a01b031633145b610e1057604051630ce525af60e11b815260040160405180910390fd5b5f546001600160a01b03808316911603610e3d5760405163f6bb643960e01b815260040160405180910390fd5b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917ff1e04d73c4304b5ff164f9d10c7473e2a1593b740674a6107975e2a7001c1e5c9190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ee8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f0c9190611646565b6001600160a01b0316336001600160a01b03161480610f3457505f546001600160a01b031633145b610f5157604051630ce525af60e11b815260040160405180910390fd5b6105f8838383611438565b335f9081526004602052604090205460ff168061100957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff49190611646565b6001600160a01b0316336001600160a01b0316145b6110265760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0383165f90815260016020526040902054839060ff1661106c576040516303df80cf60e41b81526001600160a01b039091166004820152602401610a22565b50620f42408211156110915760405163c65df89d60e01b815260040160405180910390fd5b6040805180820182528381526001600160a01b0383811660208084018281528884165f81815260028452879020865181559151600190920180546001600160a01b03191692909516919091179093559351868152929390927fef6b9552a5aee5bbfb0c617440309047e908953f5258b53d1078ffc0d6c884ab910160405180910390a350505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015611176573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061119a9190611646565b6001600160a01b0316336001600160a01b031614806111c257505f546001600160a01b031633145b6111df57604051630ce525af60e11b815260040160405180910390fd5b6001600160a01b0381165f90815260016020526040902054819060ff16611225576040516303df80cf60e41b81526001600160a01b039091166004820152602401610a22565b506001600160a01b038181165f8181526002602052604080822082815560010180546001600160a01b0319169055516302045be960e41b8152600481019290925260039290917f00000000000000000000000000000000000000000000000000000000000000009091169063f55858b0908290632045be9090602401602060405180830381865afa1580156112bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e09190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611322573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113469190611646565b6001600160a01b03908116825260208083019390935260409182015f90812080546001600160a01b03191690559084168082526001909352818120805460ff1916905590517fa41ee6d9177c663f26b51d8cc24e94c7331ffe79e49f760a14f15da1494ad1ca9190a250565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114339190611646565b905090565b6001600160a01b0383165f9081526004602052604090205460ff166114705760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0383165f908152600560205260409020611492828483611769565b5081816040516114a3929190611823565b604051908190038120906001600160a01b038516907f28849b480f55b807e483bef9ba16565e53abaef052ab27c5f964a320aabb9397905f90a3505050565b6001600160a01b03811681146114f6575f5ffd5b50565b5f60208284031215611509575f5ffd5b8135611514816114e2565b9392505050565b5f5f5f6040848603121561152d575f5ffd5b8335611538816114e2565b9250602084013567ffffffffffffffff811115611553575f5ffd5b8401601f81018613611563575f5ffd5b803567ffffffffffffffff811115611579575f5ffd5b86602082840101111561158a575f5ffd5b939660209190910195509293505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f604083850312156115e1575f5ffd5b82356115ec816114e2565b915060208301356115fc816114e2565b809150509250929050565b5f5f5f60608486031215611619575f5ffd5b8335611624816114e2565b925060208401359150604084013561163b816114e2565b809150509250925092565b5f60208284031215611656575f5ffd5b8151611514816114e2565b600181811c9082168061167557607f821691505b60208210810361169357634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f83546116a681611661565b6001821680156116bd57600181146116d2576116ff565b60ff19831686528115158202860193506116ff565b865f5260205f205f5b838110156116f7578154888201526001909101906020016116db565b505081860193505b509195945050505050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156105f857805f5260205f20601f840160051c810160208510156117435750805b601f840160051c820191505b81811015611762575f815560010161174f565b5050505050565b67ffffffffffffffff8311156117815761178161170a565b6117958361178f8354611661565b8361171e565b5f601f8411600181146117c6575f85156117af5750838201355b5f19600387901b1c1916600186901b178355611762565b5f83815260208120601f198716915b828110156117f557868501358255602094850194600190920191016117d5565b5086821015611811575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b818382375f910190815291905056fea26469706673582212204819972f8ce0993b9411f4c3a5ac33f666a6194c90f032defe46c4dba294488b64736f6c634300081c00330000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d000000000000000000000000cafc58de1e6a071790efbb6b83b35397023e1544
Deployed Bytecode
0x608060405234801561000f575f5ffd5b5060043610610111575f3560e01c8063595aeb501161009e578063b3ab15fb1161006e578063b3ab15fb1461030e578063c657c71814610321578063d309dbc614610334578063dcaaa61b14610347578063e7589b391461035a575f5ffd5b8063595aeb50146102a65780635dbb6eb4146102b9578063772b7e97146102d95780638668a494146102ec575f5ffd5b80632aeb8f22116100e45780632aeb8f22146101f05780632cd21e001461020557806346c96aac1461021857806354fe9fd71461023f578063570ca73514610294575f5ffd5b80630792d5131461011557806316343da4146101665780631e8d2e4d1461017e57806322d65c3b146101be575b5f5ffd5b6101446101233660046114f9565b60026020525f9081526040902080546001909101546001600160a01b031682565b604080519283526001600160a01b039091166020830152015b60405180910390f35b610170620f424081565b60405190815260200161015d565b6101a661018c3660046114f9565b60036020525f90815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161015d565b6101e06101cc3660046114f9565b60046020525f908152604090205460ff1681565b604051901515815260200161015d565b6102036101fe3660046114f9565b610362565b005b61020361021336600461151b565b6104a7565b6101a67f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d81565b61014461024d3660046114f9565b6001600160a01b039081165f908152600360209081526040808320548416835260028252918290208251808401909352805480845260019091015490931691018190529091565b5f546101a6906001600160a01b031681565b6102036102b43660046114f9565b6105fd565b6102cc6102c73660046114f9565b6108bc565b60405161015d919061159b565b6102036102e73660046115d0565b610953565b6101e06102fa3660046114f9565b60016020525f908152604090205460ff1681565b61020361031c3660046114f9565b610d4b565b61020361032f36600461151b565b610e8c565b610203610342366004611607565b610f5c565b6102036103553660046114f9565b61111a565b6101a66113b2565b7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103be573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103e29190611646565b6001600160a01b0316336001600160a01b0316148061040a57505f546001600160a01b031633145b61042757604051630ce525af60e11b815260040160405180910390fd5b6001600160a01b0381165f9081526004602052604090205460ff1661045f5760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0381165f81815260046020526040808220805460ff19169055517fc59f9761f66797faf208a417f9fbf142783bcffcd831283a2ded97f1a676abb09190a250565b7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610503573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105279190611646565b6001600160a01b0316336001600160a01b0316148061054f57505f546001600160a01b031633145b61056c57604051630ce525af60e11b815260040160405180910390fd5b6001600160a01b0383165f9081526004602052604090205460ff16156105a55760405163bc626b6f60e01b815260040160405180910390fd5b6001600160a01b0383165f81815260046020526040808220805460ff19166001179055517f1a21cdb01b4a24f9795ddbd009ccbfea49adcea2f28c2606be806502192379e69190a26105f8838383611438565b505050565b335f9081526004602052604090205460ff16806106aa57507f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610671573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106959190611646565b6001600160a01b0316336001600160a01b0316145b6106c75760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0381165f9081526001602052604090205460ff1615610700576040516352f878d960e11b815260040160405180910390fd5b6040516302045be960e41b81526001600160a01b0382811660048301525f917f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d9091169063f55858b0908290632045be9090602401602060405180830381865afa158015610770573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107949190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156107d6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fa9190611646565b90506001600160a01b0381166108235760405163324250e960e21b815260040160405180910390fd5b6001600160a01b038181165f90815260036020908152604080832080546001600160a01b03191694871694851790559282526001808252838320805460ff1916909117905533825260059052819020905161087e9190611699565b604051908190038120906001600160a01b038416907fec779a851842f582d1e28aca39c7057da0596cf816d0535bec1df1c0b59fdaf4905f90a35050565b60056020525f9081526040902080546108d490611661565b80601f016020809104026020016040519081016040528092919081815260200182805461090090611661565b801561094b5780601f106109225761010080835404028352916020019161094b565b820191905f5260205f20905b81548152906001019060200180831161092e57829003601f168201915b505050505081565b7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109af573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109d39190611646565b6001600160a01b0316336001600160a01b031614806109fb57505f546001600160a01b031633145b3390610a2b57604051632bc10c3360e01b81526001600160a01b0390911660048201526024015b60405180910390fd5b506001600160a01b0382165f90815260016020526040902054829060ff16610a72576040516303df80cf60e41b81526001600160a01b039091166004820152602401610a22565b506001600160a01b038181165f908152600160208190526040808320805460ff1916909217909155516302045be960e41b81528483166004820152909182917f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d9091169063f55858b0908290632045be9090602401602060405180830381865afa158015610b02573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b269190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610b68573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b8c9190611646565b6040516302045be960e41b81526001600160a01b0385811660048301527f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d169063f55858b0908290632045be9090602401602060405180830381865afa158015610bf8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1c9190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610c5e573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c829190611646565b6001600160a01b038082165f9081526003602081815260408084208054868c166001600160a01b0319918216811783558d881680885260028652848820828952858920815481556001828101805492820180548816938e1693909317909255838b52918a90558054851690558652848820805460ff1916905595909452905486891686528286208054909216961695909517909455925194965092945090927fa929e32c44fd4ebbb29a358c16e6cfb9b08d721f2a5e71126734a73a390e945c9190a350505050565b7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da7573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dcb9190611646565b6001600160a01b0316336001600160a01b03161480610df357505f546001600160a01b031633145b610e1057604051630ce525af60e11b815260040160405180910390fd5b5f546001600160a01b03808316911603610e3d5760405163f6bb643960e01b815260040160405180910390fd5b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917ff1e04d73c4304b5ff164f9d10c7473e2a1593b740674a6107975e2a7001c1e5c9190a35050565b7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ee8573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f0c9190611646565b6001600160a01b0316336001600160a01b03161480610f3457505f546001600160a01b031633145b610f5157604051630ce525af60e11b815260040160405180910390fd5b6105f8838383611438565b335f9081526004602052604090205460ff168061100957507f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ff49190611646565b6001600160a01b0316336001600160a01b0316145b6110265760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0383165f90815260016020526040902054839060ff1661106c576040516303df80cf60e41b81526001600160a01b039091166004820152602401610a22565b50620f42408211156110915760405163c65df89d60e01b815260040160405180910390fd5b6040805180820182528381526001600160a01b0383811660208084018281528884165f81815260028452879020865181559151600190920180546001600160a01b03191692909516919091179093559351868152929390927fef6b9552a5aee5bbfb0c617440309047e908953f5258b53d1078ffc0d6c884ab910160405180910390a350505050565b7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa158015611176573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061119a9190611646565b6001600160a01b0316336001600160a01b031614806111c257505f546001600160a01b031633145b6111df57604051630ce525af60e11b815260040160405180910390fd5b6001600160a01b0381165f90815260016020526040902054819060ff16611225576040516303df80cf60e41b81526001600160a01b039091166004820152602401610a22565b506001600160a01b038181165f8181526002602052604080822082815560010180546001600160a01b0319169055516302045be960e41b8152600481019290925260039290917f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d9091169063f55858b0908290632045be9090602401602060405180830381865afa1580156112bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e09190611646565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611322573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113469190611646565b6001600160a01b03908116825260208083019390935260409182015f90812080546001600160a01b03191690559084168082526001909352818120805460ff1916905590517fa41ee6d9177c663f26b51d8cc24e94c7331ffe79e49f760a14f15da1494ad1ca9190a250565b5f7f0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d6001600160a01b031663e7589b396040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114339190611646565b905090565b6001600160a01b0383165f9081526004602052604090205460ff166114705760405163c18fdad560e01b815260040160405180910390fd5b6001600160a01b0383165f908152600560205260409020611492828483611769565b5081816040516114a3929190611823565b604051908190038120906001600160a01b038516907f28849b480f55b807e483bef9ba16565e53abaef052ab27c5f964a320aabb9397905f90a3505050565b6001600160a01b03811681146114f6575f5ffd5b50565b5f60208284031215611509575f5ffd5b8135611514816114e2565b9392505050565b5f5f5f6040848603121561152d575f5ffd5b8335611538816114e2565b9250602084013567ffffffffffffffff811115611553575f5ffd5b8401601f81018613611563575f5ffd5b803567ffffffffffffffff811115611579575f5ffd5b86602082840101111561158a575f5ffd5b939660209190910195509293505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f604083850312156115e1575f5ffd5b82356115ec816114e2565b915060208301356115fc816114e2565b809150509250929050565b5f5f5f60608486031215611619575f5ffd5b8335611624816114e2565b925060208401359150604084013561163b816114e2565b809150509250925092565b5f60208284031215611656575f5ffd5b8151611514816114e2565b600181811c9082168061167557607f821691505b60208210810361169357634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f83546116a681611661565b6001821680156116bd57600181146116d2576116ff565b60ff19831686528115158202860193506116ff565b865f5260205f205f5b838110156116f7578154888201526001909101906020016116db565b505081860193505b509195945050505050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156105f857805f5260205f20601f840160051c810160208510156117435750805b601f840160051c820191505b81811015611762575f815560010161174f565b5050505050565b67ffffffffffffffff8311156117815761178161170a565b6117958361178f8354611661565b8361171e565b5f601f8411600181146117c6575f85156117af5750838201355b5f19600387901b1c1916600186901b178355611762565b5f83815260208120601f198716915b828110156117f557868501358255602094850194600190920191016117d5565b5086821015611811575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b818382375f910190815291905056fea26469706673582212204819972f8ce0993b9411f4c3a5ac33f666a6194c90f032defe46c4dba294488b64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d000000000000000000000000cafc58de1e6a071790efbb6b83b35397023e1544
-----Decoded View---------------
Arg [0] : _voter (address): 0x9F59398D0a397b2EEB8a6123a6c7295cB0b0062D
Arg [1] : _operator (address): 0xCAfc58De1E6A071790eFbB6B83b35397023E1544
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009f59398d0a397b2eeb8a6123a6c7295cb0b0062d
Arg [1] : 000000000000000000000000cafc58de1e6a071790efbb6b83b35397023e1544
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.