Source Code
Latest 19 from a total of 19 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Exchange And Dep... | 20604481 | 558 days ago | IN | 0 ETH | 0.0004172 | ||||
| Exchange And Dep... | 20604462 | 558 days ago | IN | 0 ETH | 0.00044133 | ||||
| Exchange And Dep... | 18662933 | 830 days ago | IN | 0.001 ETH | 0.00850011 | ||||
| Exchange And Dep... | 18330262 | 876 days ago | IN | 0 ETH | 0.00434898 | ||||
| Exchange And Dep... | 18298318 | 881 days ago | IN | 0 ETH | 0.00292792 | ||||
| Exchange And Dep... | 18287935 | 882 days ago | IN | 0 ETH | 0.0027697 | ||||
| Exchange And Dep... | 18286429 | 882 days ago | IN | 0 ETH | 0.00480398 | ||||
| Exchange And Dep... | 18278311 | 883 days ago | IN | 0 ETH | 0.00514945 | ||||
| Exchange And Dep... | 18203338 | 894 days ago | IN | 0 ETH | 0.00349071 | ||||
| Exchange And Dep... | 18185018 | 897 days ago | IN | 0 ETH | 0.00513816 | ||||
| Exchange And Dep... | 17885797 | 938 days ago | IN | 0.5 ETH | 0.00978492 | ||||
| Exchange And Dep... | 17870074 | 941 days ago | IN | 0.04 ETH | 0.00779264 | ||||
| Exchange And Dep... | 17840439 | 945 days ago | IN | 0.4 ETH | 0.00532292 | ||||
| Exchange And Dep... | 17835663 | 945 days ago | IN | 0 ETH | 0.00860102 | ||||
| Exchange And Dep... | 17835655 | 945 days ago | IN | 0 ETH | 0.02271396 | ||||
| Transfer Governa... | 17835236 | 946 days ago | IN | 0 ETH | 0.00123423 | ||||
| Exchange And Dep... | 17827126 | 947 days ago | IN | 0 ETH | 0.00760561 | ||||
| Exchange And Dep... | 17820499 | 948 days ago | IN | 0 ETH | 0.0072543 | ||||
| Exchange And Dep... | 17820296 | 948 days ago | IN | 0.001 ETH | 0.00487319 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
UnkMavZapper
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {MavDepositor} from "./MavDepositor.sol";
import {BaseRewardPool} from "./BaseRewardPool.sol";
import {SafeERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
contract UnkMavZapper {
using SafeERC20 for IERC20;
address internal constant _ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
address internal constant _MAV = 0x7448c7456a97769F6cD04F1E83A4a23cCdC46aBD;
/// @notice AugustusSwapper contract address.
address public constant AUGUSTUS =
0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57;
/// @notice 1nch Router v5 contract address.
address public constant INCH_ROUTER =
0x1111111254EEB25477B68fb85Ed929f73A960582;
/// @notice LiFi Diamond contract address.
address public constant LIFI_DIAMOND =
0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE;
/// @notice Paraswap Token pull contract address.
address public constant TOKEN_TRANSFER_PROXY =
0x216B4B4Ba9F3e719726886d34a177484278Bfcae;
address public constant UNK_MAV =
0x04506DDDBF689714487f91Ae1397047169afcF34;
error SWAP_FAILED();
error ONLY_GOVERNANCE();
error INVALID_AGGREGATOR();
error unkMAV_ALREADY_INITIATED();
address public governance;
address public mavDepositor;
constructor(address _mavDepositor) {
governance = msg.sender;
mavDepositor = _mavDepositor;
}
/// @notice Checks if the aggregator is valid.
modifier onlyValidAggregator(address aggregator) {
if (
aggregator != AUGUSTUS &&
aggregator != INCH_ROUTER &&
aggregator != LIFI_DIAMOND
) {
revert INVALID_AGGREGATOR();
}
_;
}
function exchangeAndLockFor(
address aggregator,
address srcToken,
uint256 underlyingAmount,
bytes memory callData,
bool stake
) external payable onlyValidAggregator(aggregator) {
uint256 amount = underlyingAmount;
if (srcToken != _ETH) {
IERC20(srcToken).safeTransferFrom(
msg.sender,
address(this),
amount
);
}
amount = _exchange(srcToken, UNK_MAV, callData, amount, aggregator);
if (stake) {
address stakingContract = MavDepositor(mavDepositor)
.stakingContract();
BaseRewardPool(stakingContract).stakeFor(msg.sender, amount);
} else {
IERC20(UNK_MAV).safeTransfer(msg.sender, amount);
}
}
function exchangeAndDepositFor(
address aggregator,
address srcToken,
uint256 underlyingAmount,
bytes memory callData,
bool lock,
bool stake
) external payable onlyValidAggregator(aggregator) {
uint256 amount = underlyingAmount;
if (srcToken != _ETH) {
IERC20(srcToken).safeTransferFrom(
msg.sender,
address(this),
amount
);
}
if (srcToken != _MAV) {
amount = _exchange(srcToken, _MAV, callData, amount, aggregator);
}
IERC20(_MAV).approve(mavDepositor, amount);
MavDepositor(mavDepositor).depositFor(msg.sender, amount, lock, stake);
}
function _exchange(
address srcToken,
address destToken,
bytes memory callData,
uint256 underlyingAmount,
address aggregator
) internal returns (uint256) {
uint256 amount = underlyingAmount;
bool success;
if (srcToken == _ETH) {
(success, ) = aggregator.call{value: amount}(callData);
} else {
IERC20(srcToken).safeApprove(
aggregator == AUGUSTUS ? TOKEN_TRANSFER_PROXY : aggregator,
0
);
IERC20(srcToken).safeApprove(
aggregator == AUGUSTUS ? TOKEN_TRANSFER_PROXY : aggregator,
underlyingAmount
);
(success, ) = aggregator.call(callData);
}
if (!success) revert SWAP_FAILED();
return IERC20(destToken).balanceOf(address(this));
}
function transferGovernance(address _governance) external {
if (msg.sender != governance) revert ONLY_GOVERNANCE();
governance = _governance;
}
function setDepositor(address _depositor) external {
if (msg.sender != governance) revert ONLY_GOVERNANCE();
mavDepositor = _depositor;
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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
pragma solidity 0.8.17;
import {IStakerProxy} from "./interfaces/IStakerProxy.sol";
import {ITokenMinter} from "./interfaces/ITokenMinter.sol";
import {IRewards} from "./interfaces/IRewards.sol";
import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "lib/openzeppelin-contracts/contracts/utils/Address.sol";
import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol";
/**
* @title MavDepositor
* @author ConvexFinance
* @notice This is the entry point for Mav > veMav wrapping. It accepts Mav, sends to 'staker'
* for depositing into Mav VotingEscrow, and then mints unkMAV at 1:1 via the 'minter' minus
* the lockIncentive (initially 0.1%) which is used to basically compensate users who call the `lock` function on Maverick
* system (larger depositors would likely want to lock).
*/
contract MavDepositor {
using SafeERC20 for IERC20;
using Address for address;
address public immutable mavToken;
address public votingEscrow;
uint256 private constant MAXTIME = 4 * 365 days;
uint256 private constant WEEK = 7 days;
uint256 public lockIncentive = 0; //incentive to users who spend gas to lock mavToken
uint256 public constant FEE_DENOMINATOR = 10000;
address public feeManager;
address public daoOperator;
address public immutable staker;
address public immutable minter;
address public stakingContract;
uint256 public incentiveMav = 0;
bool public cooldown;
/************/
/** Errors **/
/************/
/// @notice Throws if caller is not the FEE MANAGER
error FEE_MANAGER();
/// @notice Throws if caller is not DAO OPERATOR
error DAO_OPERATOR();
/// @notice Throws if coolDown
error COOLDOWN();
/*****************/
/*** MODIFIERS ***/
/*****************/
modifier onlyFeeManager() {
if (msg.sender != feeManager) revert FEE_MANAGER();
_;
}
modifier onlyDaoOperator() {
if (msg.sender != daoOperator) revert DAO_OPERATOR();
_;
}
/**
* @param _staker UNK VoterProxy
* @param _minter Mav token
* @param _mavToken mavToken for veMav deposits
*/
constructor(
address _staker,
address _minter,
address _mavToken,
address _daoOperator,
address _votingEscrow
) {
staker = _staker;
minter = _minter;
mavToken = _mavToken;
feeManager = msg.sender;
daoOperator = _daoOperator;
votingEscrow = _votingEscrow;
}
function setFeeManager(address _feeManager) external onlyFeeManager {
feeManager = _feeManager;
}
function setDaoOperator(address _daoOperator) external onlyDaoOperator {
daoOperator = _daoOperator;
}
function setFees(uint256 _lockIncentive) external onlyFeeManager {
if (_lockIncentive >= 0 && _lockIncentive <= 30) {
lockIncentive = _lockIncentive;
}
}
function setCooldown(bool _cooldown) external onlyDaoOperator {
cooldown = _cooldown;
}
function setStakingContract(
address _stakingContract
) external onlyDaoOperator {
stakingContract = _stakingContract;
IERC20(minter).approve(_stakingContract, type(uint256).max);
}
/**
* @notice Called once to deposit the balance of MAV in this contract to the VotingEscrow
*/
function initialLock() external onlyFeeManager {
if (cooldown) revert COOLDOWN();
uint256 veMav = IERC20(votingEscrow).balanceOf(staker);
if (veMav == 0) {
//release old lock if exists
IStakerProxy(staker).unlock(staker);
//create new lock
uint256 mavBalanceStaker = IERC20(mavToken).balanceOf(staker);
if (mavBalanceStaker == 0) {
return;
}
IStakerProxy(staker).initiateLock(mavBalanceStaker, MAXTIME);
}
}
//lock mav
function _lockMaverick(uint256 lockCallerAmount) internal {
if (cooldown) {
return;
}
uint256 mavBalance = IERC20(mavToken).balanceOf(address(this));
if (mavBalance > 0) {
IERC20(mavToken).safeTransfer(staker, mavBalance);
}
mavBalance += lockCallerAmount;
//increase amount and duration
IStakerProxy(staker).extendLock(mavBalance, MAXTIME);
}
/**
* @notice Deposit mavToken for unkMav
* @dev Can lock immediately or defer locking to someone else by paying a fee.
* while users can choose to lock or defer, this is mostly in place so that
* the unlock reward contract isnt costly to claim rewards.
* @param _amount Units of MAV to deposit
* @param _lock Lock now? or pay ~0.1% to the locker
* @param _stake Stake the wrapper tokens into staking contract
*/
function _depositFor(
address to,
uint256 _amount,
bool _lock,
bool _stake
) internal {
if (cooldown) revert COOLDOWN();
IERC20(mavToken).safeTransferFrom(
msg.sender,
_lock ? staker : address(this),
_amount
);
if (_lock) {
_lockMaverick(_amount);
if (incentiveMav > 0) {
//add the incentive tokens here so they can be staked together
_amount = _amount + incentiveMav;
incentiveMav = 0;
}
} else {
//defer lock cost to another user
uint256 callIncentive = (_amount * lockIncentive) / FEE_DENOMINATOR;
_amount = _amount - callIncentive;
//add to a pool for lock caller
incentiveMav = incentiveMav + callIncentive;
}
if (!_stake) {
//mint for to
ITokenMinter(minter).mint(to, _amount);
} else {
//mint here
ITokenMinter(minter).mint(address(this), _amount);
IRewards(stakingContract).stakeFor(to, _amount);
}
}
/**
* @notice Locks the balance of MAV, and gives out an incentive to the caller
*/
function lockMaverick() external {
if (cooldown) revert COOLDOWN();
_lockMaverick(0);
//mint incentives
if (incentiveMav > 0) {
ITokenMinter(minter).mint(msg.sender, incentiveMav);
incentiveMav = 0;
}
}
/**
* @notice Deposit mavToken for unkMav on behalf of another user
* @dev See depositFor(address, uint256, bool, address)
*/
function deposit(uint256 _amount, bool _lock, bool _stake) external {
_depositFor(msg.sender, _amount, _lock, _stake);
}
/**
*
* @param to Address of the receiver of the deposit
* @param _amount MAV amount to deposit
* @param _lock Lock now? or pay ~0.1% to the locker
* @param _stake Stake the wrapper tokens into staking contract
*/
function depositFor(
address to,
uint256 _amount,
bool _lock,
bool _stake
) external {
_depositFor(to, _amount, _lock, _stake);
}
function depositAll(bool _lock, bool _stake) external {
uint256 mavAmount = IERC20(mavToken).balanceOf(msg.sender);
_depositFor(msg.sender, mavAmount, _lock, _stake);
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
/**
*Submitted for verification at Etherscan.io on 2020-07-17
*/
/*
____ __ __ __ _
/ __/__ __ ___ / /_ / / ___ / /_ (_)__ __
_\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
/___/
* Synthetix: BaseRewardPool.sol
*
* Docs: https://docs.synthetix.io/
*
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
import {IRewards} from "./interfaces/IRewards.sol";
import {IDeposit} from "./interfaces/IDeposit.sol";
import {MathUtil} from "./interfaces/MathUtil.sol";
import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {Address} from "lib/openzeppelin-contracts/contracts/utils/Address.sol";
import {SafeERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol";
/**
* @title BaseRewardPool
* @author Synthetix -> ConvexFinance
* @notice Unipool rewards contract that is re-deployed from rFactory for each staking pool.
* @dev Changes made here by ConvexFinance are to do with the delayed reward allocation. Curve is queued for
* rewards and the distribution only begins once the new rewards are sufficiently large, or the epoch
* has ended. Additionally, enables hooks for `extraRewards` that can be enabled at any point to
* distribute a child reward token (i.e. a secondary one from Curve, or a seperate one).
*/
contract BaseRewardPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public immutable rewardToken;
IERC20 public immutable stakingToken;
uint256 public constant duration = 1;
address public operator;
address public rewardManager;
uint256 public immutable pid;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
uint256 public queuedRewards = 0;
uint256 public currentRewards = 0;
uint256 public historicalRewards = 0;
uint256 public constant newRewardRatio = 830;
uint256 private _totalSupply;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
mapping(address => uint256) private _balances;
address[] public extraRewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
event TransferReward(address indexed from, address indexed to, uint256 value);
/**
* @dev This is called directly from RewardFactory
* @param pid_ Effectively the pool identifier - used in the Booster
* @param stakingToken_ Pool LP token
* @param rewardToken_ Tenet
* @param operator_ Booster
* @param rewardManager_ RewardFactory
*/
constructor(
uint256 pid_,
address stakingToken_,
address rewardToken_,
address operator_,
address rewardManager_
) {
pid = pid_;
stakingToken = IERC20(stakingToken_);
rewardToken = IERC20(rewardToken_);
operator = operator_;
rewardManager = rewardManager_;
}
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
}
function extraRewardsLength() external view returns (uint256) {
return extraRewards.length;
}
function setOperator(address _operator) external {
require(msg.sender == operator, "!authorized");
operator = _operator;
}
function setRewardManager(address _rewardManager) external {
require(msg.sender == operator, "!authorized");
rewardManager = _rewardManager;
}
function addExtraReward(address _reward) external returns(bool){
require(msg.sender == rewardManager, "!authorized");
require(_reward != address(0),"!reward setting");
if(extraRewards.length >= 12){
return false;
}
extraRewards.push(_reward);
return true;
}
function clearExtraRewards() external{
require(msg.sender == rewardManager, "!authorized");
delete extraRewards;
}
modifier updateReward(address account) {
rewardPerTokenStored = _rewardPerToken();
lastUpdateTime = lastTimeRewardApplicable();
if (account != address(0)) {
rewards[account] = _earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
function lastTimeRewardApplicable() public view returns (uint256) {
return MathUtil.min(block.timestamp, periodFinish);
}
function rewardPerToken() external view returns (uint256){
return _rewardPerToken();
}
function _rewardPerToken() internal view returns (uint256) {
if (totalSupply() == 0) {
return rewardPerTokenStored;
}
return
rewardPerTokenStored.add(
lastTimeRewardApplicable()
.sub(lastUpdateTime)
.mul(rewardRate)
.mul(1e18)
.div(totalSupply())
);
}
function earned(address account) external view returns (uint256){
return _earned(account);
}
function _earned(address account) internal view returns (uint256) {
return
balanceOf(account)
.mul(_rewardPerToken().sub(userRewardPerTokenPaid[account]))
.div(1e18)
.add(rewards[account]);
}
function stake(uint256 _amount)
external
returns(bool)
{
return _stake(_amount);
}
function _stake(uint256 _amount)
internal
returns(bool)
{
_processStake(_amount, msg.sender);
stakingToken.safeTransferFrom(msg.sender, address(this), _amount);
emit Staked(msg.sender, _amount);
return true;
}
function stakeAll() external returns(bool){
uint256 balance = stakingToken.balanceOf(msg.sender);
_stake(balance);
return true;
}
function stakeFor(address _for, uint256 _amount)
external
returns(bool)
{
return _stakeFor(_for, _amount);
}
function _stakeFor(address _for, uint256 _amount)
internal
returns(bool)
{
_processStake(_amount, _for);
//take away from sender
stakingToken.safeTransferFrom(msg.sender, address(this), _amount);
emit Staked(_for, _amount);
return true;
}
/**
* @dev Generic internal staking function that basically does 3 things: update rewards based
* on previous balance, trigger also on any child contracts, then update balances.
* @param _amount Units to add to the users balance
* @param _receiver Address of user who will receive the stake
*/
function _processStake(uint256 _amount, address _receiver) internal updateReward(_receiver) {
require(_amount > 0, 'RewardPool : Cannot stake 0');
//also stake to linked rewards
for(uint i=0; i < extraRewards.length; i++){
IRewards(extraRewards[i]).stake(_receiver, _amount);
}
_totalSupply = _totalSupply.add(_amount);
_balances[_receiver] = _balances[_receiver].add(_amount);
emit TransferReward(address(0), _receiver, _amount);
}
function withdraw(uint256 amount, bool claim) external returns(bool){
return _withdraw(amount, claim);
}
function _withdraw(uint256 amount, bool claim)
internal
updateReward(msg.sender)
returns(bool)
{
require(amount > 0, 'RewardPool : Cannot withdraw 0');
//also withdraw from linked rewards
for(uint i=0; i < extraRewards.length; i++){
IRewards(extraRewards[i]).withdraw(msg.sender, amount);
}
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
stakingToken.safeTransfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount);
if(claim){
_getReward(msg.sender,true);
}
emit TransferReward(msg.sender, address(0), amount);
return true;
}
function withdrawAll(bool claim) external{
_withdraw(_balances[msg.sender],claim);
}
function getReward(address _account, bool _claimExtras) external returns(bool){
return _getReward(_account, _claimExtras);
}
/**
* @dev Gives a staker their rewards, with the option of claiming extra rewards
* @param _account Account for which to claim
* @param _claimExtras Get the child rewards too?
*/
function _getReward(address _account, bool _claimExtras) internal updateReward(_account) returns(bool){
uint256 reward = _earned(_account);
if (reward > 0) {
rewards[_account] = 0;
rewardToken.safeTransfer(_account, reward);
//IDeposit(operator).rewardClaimed(pid, _account, reward); If you are here then you know what is coming next ;)
emit RewardPaid(_account, reward);
}
//also get rewards from linked rewards
if(_claimExtras){
for(uint i=0; i < extraRewards.length; i++){
IRewards(extraRewards[i]).getReward(_account);
}
}
return true;
}
/**
* @dev Called by a staker to get their allocated rewards
*/
function getReward() external returns(bool){
_getReward(msg.sender,true);
return true;
}
/**
* @dev Processes queued rewards in isolation, providing the period has finished.
* This allows a cheaper way to trigger rewards on low value pools.
*/
function processIdleRewards() external {
if (block.timestamp >= periodFinish && queuedRewards > 0) {
notifyRewardAmount(queuedRewards);
queuedRewards = 0;
}
}
/**
* @dev Called by the booster to allocate new Crv rewards to this pool
* Curve is queued for rewards and the distribution only begins once the new rewards are sufficiently
* large, or the epoch has ended.
*/
function queueNewRewards(uint256 _rewards) external returns(bool){
require(msg.sender == operator, "!authorized");
_rewards = _rewards.add(queuedRewards);
if (block.timestamp >= periodFinish) {
notifyRewardAmount(_rewards);
queuedRewards = 0;
return true;
}
//et = now - (finish-duration)
uint256 elapsedTime = block.timestamp.sub(periodFinish.sub(duration));
//current at now: rewardRate * elapsedTime
uint256 currentAtNow = rewardRate * elapsedTime;
uint256 queuedRatio = currentAtNow.mul(1000).div(_rewards);
//uint256 queuedRatio = currentRewards.mul(1000).div(_rewards);
if(queuedRatio < newRewardRatio){
notifyRewardAmount(_rewards);
queuedRewards = 0;
}else{
queuedRewards = _rewards;
}
return true;
}
function notifyRewardAmount(uint256 reward)
internal
updateReward(address(0))
{
historicalRewards = historicalRewards.add(reward);
if (block.timestamp >= periodFinish) {
rewardRate = reward.div(duration);
} else {
uint256 remaining = periodFinish.sub(block.timestamp);
uint256 leftover = remaining.mul(rewardRate);
reward = reward.add(leftover);
rewardRate = reward.div(duration);
}
currentRewards = reward;
lastUpdateTime = block.timestamp;
periodFinish = block.timestamp.add(duration);
emit RewardAdded(reward);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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. Compatible with tokens that require the approval to be set to
* 0 before setting it to a non-zero value.
*/
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
pragma solidity ^0.8.17;
interface IStakerProxy{
function name() external pure returns (string memory);
function initiateLock(uint256, uint256) external;
function extendLock(uint256 , uint256 ) external;
function unlock(address ) external;
function transferGovernance(address ) external;
function acceptGovernance() external;
function setDepositor(address) external;
function execute(address , uint256 , bytes calldata ) external payable returns (bool, bytes memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface ITokenMinter{
function mint(address,uint256) external;
function burn(address,uint256) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface IRewards{
function stake(address, uint256) external;
function stakeFor(address, uint256) external;
function withdraw(address, uint256) external;
function exit(address) external;
function getReward(address) external;
function queueNewRewards(uint256) external;
function notifyRewardAmount(uint256) external;
function addExtraReward(address) external;
function extraRewardsLength() external view returns (uint256);
function stakingToken() external view returns (address);
function rewardToken() external view returns(address);
function earned(address account) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface IDeposit{
function isShutdown() external view returns(bool);
function balanceOf(address _account) external view returns(uint256);
function totalSupply() external view returns(uint256);
function poolInfo(uint256) external view returns(address,address,address,address,address, bool);
function rewardClaimed(uint256,address,uint256) external;
function withdrawTo(uint256,uint256,address) external;
function claimRewards(uint256,address) external returns(bool);
function rewardArbitrator() external returns(address);
function setGaugeRedirect(uint256 _pid) external returns(bool);
function owner() external returns(address);
function deposit(uint256 _pid, uint256 _amount, bool _stake) external returns(bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library MathUtil {
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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.
*/
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].
*/
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);
}{
"remappings": [
"@prb/test/=lib/prb-test/src/",
"ERC721A/=lib/ERC721A/contracts/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"layerzerolabs-contracts/=lib/solidity-examples/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"prb-test/=lib/prb-test/src/",
"solidity-examples/=lib/solidity-examples/contracts/",
"solmate/=lib/solmate/src/",
"src/=src/",
"lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts:ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"lib/openzeppelin-contracts:forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
"lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/",
"lib/openzeppelin-contracts-upgradeable:ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"lib/openzeppelin-contracts-upgradeable:erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"lib/openzeppelin-contracts-upgradeable:forge-std/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
"lib/openzeppelin-contracts-upgradeable:openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
"lib/solmate:ds-test/=lib/solmate/lib/ds-test/src/"
],
"optimizer": {
"enabled": true,
"runs": 10000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_mavDepositor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"INVALID_AGGREGATOR","type":"error"},{"inputs":[],"name":"ONLY_GOVERNANCE","type":"error"},{"inputs":[],"name":"SWAP_FAILED","type":"error"},{"inputs":[],"name":"unkMAV_ALREADY_INITIATED","type":"error"},{"inputs":[],"name":"AUGUSTUS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INCH_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIFI_DIAMOND","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_TRANSFER_PROXY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNK_MAV","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"aggregator","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"uint256","name":"underlyingAmount","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bool","name":"lock","type":"bool"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"exchangeAndDepositFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"aggregator","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"uint256","name":"underlyingAmount","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bool","name":"stake","type":"bool"}],"name":"exchangeAndLockFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mavDepositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_depositor","type":"address"}],"name":"setDepositor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"transferGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405234801561001057600080fd5b506040516115b13803806115b183398101604081905261002f91610062565b60008054336001600160a01b031991821617909155600180549091166001600160a01b0392909216919091179055610092565b60006020828403121561007457600080fd5b81516001600160a01b038116811461008b57600080fd5b9392505050565b611510806100a16000396000f3fe6080604052600436106100c05760003560e01c80638fb7946e11610074578063a52f39711161004e578063a52f39711461022c578063d38bfff41461023f578063f2c098b71461025f57600080fd5b80638fb7946e146101af57806390e14899146101d7578063975b5443146101ff57600080fd5b806324a21b45116100a557806324a21b45146101455780635aa6e6751461015a57806366306ed51461018757600080fd5b8063020a1f7d146100cc5780630722c9e81461011d57600080fd5b366100c757005b600080fd5b3480156100d857600080fd5b506100f4731231deb6f5749ef6ce6943a275a1d3e7486f4eae81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561012957600080fd5b506100f4731111111254eeb25477b68fb85ed929f73a96058281565b6101586101533660046112e8565b61027f565b005b34801561016657600080fd5b506000546100f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561019357600080fd5b506100f47304506dddbf689714487f91ae1397047169afcf3481565b3480156101bb57600080fd5b506100f473def171fe48cf0115b1d80b88dc8eab59176fee5781565b3480156101e357600080fd5b506100f473216b4b4ba9f3e719726886d34a177484278bfcae81565b34801561020b57600080fd5b506001546100f49073ffffffffffffffffffffffffffffffffffffffff1681565b61015861023a366004611369565b61052b565b34801561024b57600080fd5b5061015861025a3660046113fb565b6107fa565b34801561026b57600080fd5b5061015861027a3660046113fb565b610892565b8473ffffffffffffffffffffffffffffffffffffffff811673def171fe48cf0115b1d80b88dc8eab59176fee57148015906102e4575073ffffffffffffffffffffffffffffffffffffffff8116731111111254eeb25477b68fb85ed929f73a96058214155b801561031a575073ffffffffffffffffffffffffffffffffffffffff8116731231deb6f5749ef6ce6943a275a1d3e7486f4eae14155b15610351576040517f718d6a1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146103a5576103a573ffffffffffffffffffffffffffffffffffffffff871633308461092a565b6103c6867304506dddbf689714487f91ae1397047169afcf3486848b610a0c565b9050821561050357600154604080517fee99205c000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163ee99205c9160048083019260209291908290030181865afa15801561043e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610462919061141f565b6040517f2ee409080000000000000000000000000000000000000000000000000000000081523360048201526024810184905290915073ffffffffffffffffffffffffffffffffffffffff821690632ee40908906044016020604051808303816000875af11580156104d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fc919061143c565b5050610522565b6105227304506dddbf689714487f91ae1397047169afcf343383610cdb565b50505050505050565b8573ffffffffffffffffffffffffffffffffffffffff811673def171fe48cf0115b1d80b88dc8eab59176fee5714801590610590575073ffffffffffffffffffffffffffffffffffffffff8116731111111254eeb25477b68fb85ed929f73a96058214155b80156105c6575073ffffffffffffffffffffffffffffffffffffffff8116731231deb6f5749ef6ce6943a275a1d3e7486f4eae14155b156105fd576040517f718d6a1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146106515761065173ffffffffffffffffffffffffffffffffffffffff881633308461092a565b73ffffffffffffffffffffffffffffffffffffffff8716737448c7456a97769f6cd04f1e83a4a23ccdc46abd146106a6576106a387737448c7456a97769f6cd04f1e83a4a23ccdc46abd87848c610a0c565b90505b6001546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101829052737448c7456a97769f6cd04f1e83a4a23ccdc46abd9063095ea7b3906044016020604051808303816000875af1158015610731573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610755919061143c565b506001546040517fb6f78fec000000000000000000000000000000000000000000000000000000008152336004820152602481018390528515156044820152841515606482015273ffffffffffffffffffffffffffffffffffffffff9091169063b6f78fec90608401600060405180830381600087803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b505050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461084b576040517f4acca31b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108e3576040517f4acca31b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610a069085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610d36565b50505050565b600082817fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff891601610ac0578373ffffffffffffffffffffffffffffffffffffffff168287604051610a73919061147d565b60006040518083038185875af1925050503d8060008114610ab0576040519150601f19603f3d011682016040523d82523d6000602084013e610ab5565b606091505b505080915050610c0a565b610b2f73ffffffffffffffffffffffffffffffffffffffff851673def171fe48cf0115b1d80b88dc8eab59176fee5714610afa5784610b10565b73216b4b4ba9f3e719726886d34a177484278bfcae5b73ffffffffffffffffffffffffffffffffffffffff8a16906000610e4a565b610b9d73ffffffffffffffffffffffffffffffffffffffff851673def171fe48cf0115b1d80b88dc8eab59176fee5714610b695784610b7f565b73216b4b4ba9f3e719726886d34a177484278bfcae5b73ffffffffffffffffffffffffffffffffffffffff8a169087610e4a565b8373ffffffffffffffffffffffffffffffffffffffff1686604051610bc2919061147d565b6000604051808303816000865af19150503d8060008114610bff576040519150601f19603f3d011682016040523d82523d6000602084013e610c04565b606091505b50909150505b80610c41576040517fa6aa277200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8816906370a0823190602401602060405180830381865afa158015610cab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccf9190611499565b98975050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610d319084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610984565b505050565b6000610d98826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610fcc9092919063ffffffff16565b9050805160001480610db9575080806020019051810190610db9919061143c565b610d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b801580610eea57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee89190611499565b155b610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610e41565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610d319084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610984565b6060610fdb8484600085610fe3565b949350505050565b606082471015611075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610e41565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161109e919061147d565b60006040518083038185875af1925050503d80600081146110db576040519150601f19603f3d011682016040523d82523d6000602084013e6110e0565b606091505b50915091506110f1878383876110fc565b979650505050505050565b6060831561119257825160000361118b5773ffffffffffffffffffffffffffffffffffffffff85163b61118b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e41565b5081610fdb565b610fdb83838151156111a75781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4191906114b2565b73ffffffffffffffffffffffffffffffffffffffff811681146111fd57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261124057600080fd5b813567ffffffffffffffff8082111561125b5761125b611200565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156112a1576112a1611200565b816040528381528660208588010111156112ba57600080fd5b836020870160208301376000602085830101528094505050505092915050565b80151581146111fd57600080fd5b600080600080600060a0868803121561130057600080fd5b853561130b816111db565b9450602086013561131b816111db565b935060408601359250606086013567ffffffffffffffff81111561133e57600080fd5b61134a8882890161122f565b925050608086013561135b816112da565b809150509295509295909350565b60008060008060008060c0878903121561138257600080fd5b863561138d816111db565b9550602087013561139d816111db565b945060408701359350606087013567ffffffffffffffff8111156113c057600080fd5b6113cc89828a0161122f565b93505060808701356113dd816112da565b915060a08701356113ed816112da565b809150509295509295509295565b60006020828403121561140d57600080fd5b8135611418816111db565b9392505050565b60006020828403121561143157600080fd5b8151611418816111db565b60006020828403121561144e57600080fd5b8151611418816112da565b60005b8381101561147457818101518382015260200161145c565b50506000910152565b6000825161148f818460208701611459565b9190910192915050565b6000602082840312156114ab57600080fd5b5051919050565b60208152600082518060208401526114d1816040850160208701611459565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000811000a00000000000000000000000051db52ed9105622bd22eacda280844290b8a4dfc
Deployed Bytecode
0x6080604052600436106100c05760003560e01c80638fb7946e11610074578063a52f39711161004e578063a52f39711461022c578063d38bfff41461023f578063f2c098b71461025f57600080fd5b80638fb7946e146101af57806390e14899146101d7578063975b5443146101ff57600080fd5b806324a21b45116100a557806324a21b45146101455780635aa6e6751461015a57806366306ed51461018757600080fd5b8063020a1f7d146100cc5780630722c9e81461011d57600080fd5b366100c757005b600080fd5b3480156100d857600080fd5b506100f4731231deb6f5749ef6ce6943a275a1d3e7486f4eae81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561012957600080fd5b506100f4731111111254eeb25477b68fb85ed929f73a96058281565b6101586101533660046112e8565b61027f565b005b34801561016657600080fd5b506000546100f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561019357600080fd5b506100f47304506dddbf689714487f91ae1397047169afcf3481565b3480156101bb57600080fd5b506100f473def171fe48cf0115b1d80b88dc8eab59176fee5781565b3480156101e357600080fd5b506100f473216b4b4ba9f3e719726886d34a177484278bfcae81565b34801561020b57600080fd5b506001546100f49073ffffffffffffffffffffffffffffffffffffffff1681565b61015861023a366004611369565b61052b565b34801561024b57600080fd5b5061015861025a3660046113fb565b6107fa565b34801561026b57600080fd5b5061015861027a3660046113fb565b610892565b8473ffffffffffffffffffffffffffffffffffffffff811673def171fe48cf0115b1d80b88dc8eab59176fee57148015906102e4575073ffffffffffffffffffffffffffffffffffffffff8116731111111254eeb25477b68fb85ed929f73a96058214155b801561031a575073ffffffffffffffffffffffffffffffffffffffff8116731231deb6f5749ef6ce6943a275a1d3e7486f4eae14155b15610351576040517f718d6a1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff861673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146103a5576103a573ffffffffffffffffffffffffffffffffffffffff871633308461092a565b6103c6867304506dddbf689714487f91ae1397047169afcf3486848b610a0c565b9050821561050357600154604080517fee99205c000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163ee99205c9160048083019260209291908290030181865afa15801561043e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610462919061141f565b6040517f2ee409080000000000000000000000000000000000000000000000000000000081523360048201526024810184905290915073ffffffffffffffffffffffffffffffffffffffff821690632ee40908906044016020604051808303816000875af11580156104d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fc919061143c565b5050610522565b6105227304506dddbf689714487f91ae1397047169afcf343383610cdb565b50505050505050565b8573ffffffffffffffffffffffffffffffffffffffff811673def171fe48cf0115b1d80b88dc8eab59176fee5714801590610590575073ffffffffffffffffffffffffffffffffffffffff8116731111111254eeb25477b68fb85ed929f73a96058214155b80156105c6575073ffffffffffffffffffffffffffffffffffffffff8116731231deb6f5749ef6ce6943a275a1d3e7486f4eae14155b156105fd576040517f718d6a1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146106515761065173ffffffffffffffffffffffffffffffffffffffff881633308461092a565b73ffffffffffffffffffffffffffffffffffffffff8716737448c7456a97769f6cd04f1e83a4a23ccdc46abd146106a6576106a387737448c7456a97769f6cd04f1e83a4a23ccdc46abd87848c610a0c565b90505b6001546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101829052737448c7456a97769f6cd04f1e83a4a23ccdc46abd9063095ea7b3906044016020604051808303816000875af1158015610731573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610755919061143c565b506001546040517fb6f78fec000000000000000000000000000000000000000000000000000000008152336004820152602481018390528515156044820152841515606482015273ffffffffffffffffffffffffffffffffffffffff9091169063b6f78fec90608401600060405180830381600087803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b505050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461084b576040517f4acca31b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108e3576040517f4acca31b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610a069085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610d36565b50505050565b600082817fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff891601610ac0578373ffffffffffffffffffffffffffffffffffffffff168287604051610a73919061147d565b60006040518083038185875af1925050503d8060008114610ab0576040519150601f19603f3d011682016040523d82523d6000602084013e610ab5565b606091505b505080915050610c0a565b610b2f73ffffffffffffffffffffffffffffffffffffffff851673def171fe48cf0115b1d80b88dc8eab59176fee5714610afa5784610b10565b73216b4b4ba9f3e719726886d34a177484278bfcae5b73ffffffffffffffffffffffffffffffffffffffff8a16906000610e4a565b610b9d73ffffffffffffffffffffffffffffffffffffffff851673def171fe48cf0115b1d80b88dc8eab59176fee5714610b695784610b7f565b73216b4b4ba9f3e719726886d34a177484278bfcae5b73ffffffffffffffffffffffffffffffffffffffff8a169087610e4a565b8373ffffffffffffffffffffffffffffffffffffffff1686604051610bc2919061147d565b6000604051808303816000865af19150503d8060008114610bff576040519150601f19603f3d011682016040523d82523d6000602084013e610c04565b606091505b50909150505b80610c41576040517fa6aa277200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8816906370a0823190602401602060405180830381865afa158015610cab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccf9190611499565b98975050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610d319084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610984565b505050565b6000610d98826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610fcc9092919063ffffffff16565b9050805160001480610db9575080806020019051810190610db9919061143c565b610d31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b801580610eea57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015610ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee89190611499565b155b610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610e41565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610d319084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401610984565b6060610fdb8484600085610fe3565b949350505050565b606082471015611075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610e41565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161109e919061147d565b60006040518083038185875af1925050503d80600081146110db576040519150601f19603f3d011682016040523d82523d6000602084013e6110e0565b606091505b50915091506110f1878383876110fc565b979650505050505050565b6060831561119257825160000361118b5773ffffffffffffffffffffffffffffffffffffffff85163b61118b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e41565b5081610fdb565b610fdb83838151156111a75781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4191906114b2565b73ffffffffffffffffffffffffffffffffffffffff811681146111fd57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261124057600080fd5b813567ffffffffffffffff8082111561125b5761125b611200565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156112a1576112a1611200565b816040528381528660208588010111156112ba57600080fd5b836020870160208301376000602085830101528094505050505092915050565b80151581146111fd57600080fd5b600080600080600060a0868803121561130057600080fd5b853561130b816111db565b9450602086013561131b816111db565b935060408601359250606086013567ffffffffffffffff81111561133e57600080fd5b61134a8882890161122f565b925050608086013561135b816112da565b809150509295509295909350565b60008060008060008060c0878903121561138257600080fd5b863561138d816111db565b9550602087013561139d816111db565b945060408701359350606087013567ffffffffffffffff8111156113c057600080fd5b6113cc89828a0161122f565b93505060808701356113dd816112da565b915060a08701356113ed816112da565b809150509295509295509295565b60006020828403121561140d57600080fd5b8135611418816111db565b9392505050565b60006020828403121561143157600080fd5b8151611418816111db565b60006020828403121561144e57600080fd5b8151611418816112da565b60005b8381101561147457818101518382015260200161145c565b50506000910152565b6000825161148f818460208701611459565b9190910192915050565b6000602082840312156114ab57600080fd5b5051919050565b60208152600082518060208401526114d1816040850160208701611459565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000811000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000051db52ed9105622bd22eacda280844290b8a4dfc
-----Decoded View---------------
Arg [0] : _mavDepositor (address): 0x51Db52Ed9105622BD22EaCdA280844290B8a4DFc
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000051db52ed9105622bd22eacda280844290b8a4dfc
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.