Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 128 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Sell Usdc | 13545981 | 1045 days ago | IN | 0 ETH | 0.03335002 | ||||
Sell Usdc | 13545942 | 1045 days ago | IN | 0 ETH | 0.03328216 | ||||
Sell Usdc | 13173227 | 1103 days ago | IN | 0 ETH | 0.02464038 | ||||
Sell Usdc | 13168396 | 1104 days ago | IN | 0 ETH | 0.02276974 | ||||
Sell Usdc | 13139780 | 1108 days ago | IN | 0 ETH | 0.01585696 | ||||
Sell Usdc | 13138962 | 1108 days ago | IN | 0 ETH | 0.01430109 | ||||
Sell Usdc | 13136537 | 1108 days ago | IN | 0 ETH | 0.02386114 | ||||
Sell Usdc | 13126476 | 1110 days ago | IN | 0 ETH | 0.01051126 | ||||
Sell Usdc | 13114379 | 1112 days ago | IN | 0 ETH | 0.01134451 | ||||
Sell Usdc | 13113397 | 1112 days ago | IN | 0 ETH | 0.01234076 | ||||
Sell Usdc | 13086926 | 1116 days ago | IN | 0 ETH | 0.01147885 | ||||
Sell Usdc | 13083754 | 1117 days ago | IN | 0 ETH | 0.01769606 | ||||
Sell Usdc | 13082814 | 1117 days ago | IN | 0 ETH | 0.01558692 | ||||
Sell Usdc | 13081180 | 1117 days ago | IN | 0 ETH | 0.00958758 | ||||
Sell Usdc | 13077717 | 1118 days ago | IN | 0 ETH | 0.00473382 | ||||
Sell Usdc | 13077019 | 1118 days ago | IN | 0 ETH | 0.00811731 | ||||
Sell Usdc | 13076965 | 1118 days ago | IN | 0 ETH | 0.00968481 | ||||
Sell Usdc | 13035729 | 1124 days ago | IN | 0 ETH | 0.00874694 | ||||
Sell Usdc | 13035673 | 1124 days ago | IN | 0 ETH | 0.00942153 | ||||
Sell Usdc | 13005957 | 1129 days ago | IN | 0 ETH | 0.01136132 | ||||
Sell Usdc | 13005110 | 1129 days ago | IN | 0 ETH | 0.01732961 | ||||
Sell Usdc | 13004985 | 1129 days ago | IN | 0 ETH | 0.02211226 | ||||
Sell Usdc | 12991951 | 1131 days ago | IN | 0 ETH | 0.01419176 | ||||
Sell Usdc | 12991231 | 1131 days ago | IN | 0 ETH | 0.00857007 | ||||
Sell Usdc | 12987174 | 1132 days ago | IN | 0 ETH | 0.00708015 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
AlphaDistributor
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-04-05 */ // SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.6.12; pragma experimental ABIEncoderV2; // Part: IUniswapV2Router01 interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); } // Part: OpenZeppelin/[email protected]/Address /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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 functionCall(target, data, "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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // Part: OpenZeppelin/[email protected]/IERC20 /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // Part: OpenZeppelin/[email protected]/SafeMath /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // Part: IUniswapV2Router02 interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } // Part: OpenZeppelin/[email protected]/SafeERC20 /** * @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 SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @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' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. 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"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: AlphaDistributor.sol contract AlphaDistributor { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public governance = 0x16388463d60FFE0661Cf7F1f31a7D658aC790ff7; address public strategist = 0xC3D6880fD95E06C816cB030fAc45b3ffe3651Cb0; address public uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public sushiswapRouter = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F; address public router = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F; address public daiStrat = 0x7D960F3313f3cB1BBB6BF67419d303597F3E2Fa8; address public usdcStrat = 0x86Aa49bf28d03B1A4aBEb83872cFC13c89eB4beD; address[] public usdcPath; address[] public daiPath; address public alpha = 0xa1faa113cbE53436Df28FF0aEe54275c13B40975; address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public dai = 0x6B175474E89094C44Da98b954EedeAC495271d0F; address public usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; constructor() public{ usdcPath = new address[](3); usdcPath[0] = alpha; usdcPath[1] = weth; usdcPath[2] = usdc; daiPath = new address[](3); daiPath[0] = alpha; daiPath[1] = weth; daiPath[2] = dai; IERC20(alpha).safeApprove(uniswapRouter, type(uint256).max); IERC20(alpha).safeApprove(sushiswapRouter, type(uint256).max); } modifier onlyAuthorized() { require(msg.sender == strategist || msg.sender == governance, "!authorized"); _; } modifier onlyGovernance() { require(msg.sender == governance, "!authorized"); _; } function setUseSushi(bool _useSushi) public onlyAuthorized { if(_useSushi){ router = sushiswapRouter; }else{ router = uniswapRouter; } } function setUseSushi(bool _usdc, address[] memory path) public onlyGovernance { if(_usdc){ usdcPath = path; }else{ daiPath = path; } } function setStrat(bool _usdc, address _strat) public onlyGovernance { if(_usdc){ usdcStrat = _strat; }else{ daiStrat = _strat; } } function sellUsdc(uint256 amount) public onlyAuthorized{ IUniswapV2Router02(router).swapExactTokensForTokens(amount, 0, usdcPath, usdcStrat, now); } function sellDai(uint256 amount) public onlyAuthorized{ IUniswapV2Router02(router).swapExactTokensForTokens(amount, 0, daiPath, daiStrat, now); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"alpha","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dai","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"daiPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daiStrat","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sellDai","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sellUsdc","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_usdc","type":"bool"},{"internalType":"address","name":"_strat","type":"address"}],"name":"setStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_usdc","type":"bool"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"setUseSushi","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useSushi","type":"bool"}],"name":"setUseSushi","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sushiswapRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usdcPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdcStrat","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600080546001600160a01b03199081167316388463d60ffe0661cf7f1f31a7d658ac790ff71790915560018054821673c3d6880fd95e06c816cb030fac45b3ffe3651cb0179055600280548216737a250d5630b4cf539739df2c5dacb4c659f2488d17905560038054821673d9e1ce17f2641f24ae83637ab66a2cca9c378b9f9081179091556004805483169091179055600580548216737d960f3313f3cb1bbb6bf67419d303597f3e2fa81790556006805482167386aa49bf28d03b1a4abeb83872cfc13c89eb4bed17905560098054821673a1faa113cbe53436df28ff0aee54275c13b40975179055600a8054821673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2179055600b80548216736b175474e89094c44da98b954eedeac495271d0f179055600c805490911673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481790553480156200015757600080fd5b50604080516003808252608082019092529060208201606080368337505081516200018a9260079250602001906200066f565b50600954600780546001600160a01b0390921691600090620001a857fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600a54600780549190921691906001908110620001e657fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600c546007805491909216919060029081106200022457fe5b60009182526020918290200180546001600160a01b0319166001600160a01b03939093169290921790915560408051600380825260808201909252918201606080368337505081516200027f9260089250602001906200066f565b50600954600880546001600160a01b03909216916000906200029d57fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600a54600880549190921691906001908110620002db57fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600b546008805491909216919060029081106200031957fe5b60009182526020918290200180546001600160a01b0319166001600160a01b039384161790556002546009546200036493908116929116906000199062000397811b620005a517901c565b60035460095462000391916001600160a01b03918216911660001962000397602090811b620005a517901c565b620008d3565b801580620004265750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90620003d090309086906004016200075a565b60206040518083038186803b158015620003e957600080fd5b505afa158015620003fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000424919062000723565b155b6200044e5760405162461bcd60e51b8152600401620004459062000843565b60405180910390fd5b620004a98363095ea7b360e01b84846040516024016200047092919062000774565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b0393841617905290620004ae16565b505050565b60606200050a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200054a60201b6200069f179092919060201c565b805190915015620004a957808060200190518101906200052b9190620006fa565b620004a95760405162461bcd60e51b81526004016200044590620007f9565b60606200055b848460008562000563565b949350505050565b6060620005708562000635565b6200058f5760405162461bcd60e51b81526004016200044590620007c2565b60006060866001600160a01b03168587604051620005ae91906200073c565b60006040518083038185875af1925050503d8060008114620005ed576040519150601f19603f3d011682016040523d82523d6000602084013e620005f2565b606091505b50915091508115620006085791506200055b9050565b805115620006195780518082602001fd5b8360405162461bcd60e51b81526004016200044591906200078d565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906200055b575050151592915050565b828054828255906000526020600020908101928215620006c7579160200282015b82811115620006c757825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000690565b50620006d5929150620006d9565b5090565b5b80821115620006d55780546001600160a01b0319168155600101620006da565b6000602082840312156200070c578081fd5b815180151581146200071c578182fd5b9392505050565b60006020828403121562000735578081fd5b5051919050565b6000825162000750818460208701620008a0565b9190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152620007ae816040850160208701620008a0565b601f01601f19169190910160400192915050565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60005b83811015620008bd578181015183820152602001620008a3565b83811115620008cd576000848401525b50505050565b610d8980620008e36000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80639e38afc5116100a2578063e411d0c111610071578063e411d0c1146101e8578063e9240c2d146101f0578063f4b9fa75146101f8578063f63d734514610200578063f887ea401461020857610116565b80639e38afc5146101a7578063bfc36175146101ba578063db1d0fd5146101cd578063dbc8d056146101d557610116565b80635aa6e675116100e95780635aa6e6751461015e57806362856aff146101665780636767698f14610179578063735de9f71461018c5780639b31ae4a1461019457610116565b8063087605e31461011b5780631fe4a686146101305780633e413bee1461014e5780633fc8cef314610156575b600080fd5b61012e6101293660046109b7565b610210565b005b610138610289565b6040516101459190610ae5565b60405180910390f35b610138610298565b6101386102a7565b6101386102b6565b61012e610174366004610a99565b6102c5565b61012e6101873660046109ec565b610398565b6101386103f9565b61012e6101a2366004610978565b610408565b61012e6101b5366004610a99565b61049a565b6101386101c8366004610a99565b610517565b61013861053e565b6101386101e3366004610a99565b61054d565b61013861055a565b610138610569565b610138610578565b610138610587565b610138610596565b6000546001600160a01b031633146102435760405162461bcd60e51b815260040161023a90610b96565b60405180910390fd5b811561026957600680546001600160a01b0319166001600160a01b038316179055610285565b600580546001600160a01b0319166001600160a01b0383161790555b5050565b6001546001600160a01b031681565b600c546001600160a01b031681565b600a546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b03163314806102e857506000546001600160a01b031633145b6103045760405162461bcd60e51b815260040161023a90610b96565b600480546006546040516338ed173960e01b81526001600160a01b03928316936338ed17399361034293879360009360079390921691429101610c5b565b600060405180830381600087803b15801561035c57600080fd5b505af1158015610370573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261028591908101906108e3565b6000546001600160a01b031633146103c25760405162461bcd60e51b815260040161023a90610b96565b81156103e15780516103db906007906020840190610842565b50610285565b80516103f4906008906020840190610842565b505050565b6002546001600160a01b031681565b6001546001600160a01b031633148061042b57506000546001600160a01b031633145b6104475760405162461bcd60e51b815260040161023a90610b96565b801561047457600354600480546001600160a01b0319166001600160a01b03909216919091179055610497565b600254600480546001600160a01b0319166001600160a01b039092169190911790555b50565b6001546001600160a01b03163314806104bd57506000546001600160a01b031633145b6104d95760405162461bcd60e51b815260040161023a90610b96565b600480546005546040516338ed173960e01b81526001600160a01b03928316936338ed17399361034293879360009360089390921691429101610c5b565b6007818154811061052457fe5b6000918252602090912001546001600160a01b0316905081565b6009546001600160a01b031681565b6008818154811061052457fe5b6006546001600160a01b031681565b6003546001600160a01b031681565b600b546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031681565b80158061062d5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906105db9030908690600401610af9565b60206040518083038186803b1580156105f357600080fd5b505afa158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610ab1565b155b6106495760405162461bcd60e51b815260040161023a90610c05565b6103f48363095ea7b360e01b8484604051602401610668929190610b13565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526106b6565b60606106ae8484600085610745565b949350505050565b606061070b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661069f9092919063ffffffff16565b8051909150156103f45780806020019051810190610729919061099b565b6103f45760405162461bcd60e51b815260040161023a90610bbb565b606061075085610809565b61076c5760405162461bcd60e51b815260040161023a90610b5f565b60006060866001600160a01b031685876040516107899190610ac9565b60006040518083038185875af1925050503d80600081146107c6576040519150601f19603f3d011682016040523d82523d6000602084013e6107cb565b606091505b509150915081156107df5791506106ae9050565b8051156107ef5780518082602001fd5b8360405162461bcd60e51b815260040161023a9190610b2c565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106ae575050151592915050565b828054828255906000526020600020908101928215610897579160200282015b8281111561089757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610862565b506108a39291506108a7565b5090565b5b808211156108a35780546001600160a01b03191681556001016108a8565b80356001600160a01b03811681146108dd57600080fd5b92915050565b600060208083850312156108f5578182fd5b825167ffffffffffffffff81111561090b578283fd5b8301601f8101851361091b578283fd5b805161092e61092982610cf5565b610cce565b818152838101908385018584028501860189101561094a578687fd5b8694505b8385101561096c57805183526001949094019391850191850161094e565b50979650505050505050565b600060208284031215610989578081fd5b813561099481610d45565b9392505050565b6000602082840312156109ac578081fd5b815161099481610d45565b600080604083850312156109c9578081fd5b82356109d481610d45565b91506109e384602085016108c6565b90509250929050565b600080604083850312156109fe578182fd5b8235610a0981610d45565b915060208381013567ffffffffffffffff811115610a25578283fd5b8401601f81018613610a35578283fd5b8035610a4361092982610cf5565b81815283810190838501858402850186018a1015610a5f578687fd5b8694505b83851015610a8957610a758a826108c6565b835260019490940193918501918501610a63565b5080955050505050509250929050565b600060208284031215610aaa578081fd5b5035919050565b600060208284031215610ac2578081fd5b5051919050565b60008251610adb818460208701610d15565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152610b4b816040850160208701610d15565b601f01601f19169190910160400192915050565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600b908201526a08585d5d1a1bdc9a5e995960aa1b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b600060a082018783526020878185015260a0604085015281875480845260c0860191508885528285209350845b81811015610cad5784546001600160a01b031683526001948501949284019201610c88565b50506001600160a01b03969096166060850152505050608001529392505050565b60405181810167ffffffffffffffff81118282101715610ced57600080fd5b604052919050565b600067ffffffffffffffff821115610d0b578081fd5b5060209081020190565b60005b83811015610d30578181015183820152602001610d18565b83811115610d3f576000848401525b50505050565b801515811461049757600080fdfea26469706673582212207782d9eb0685714b5a94a5824c538f5bf5c68ad03df9ed00f9b317351766400e64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80639e38afc5116100a2578063e411d0c111610071578063e411d0c1146101e8578063e9240c2d146101f0578063f4b9fa75146101f8578063f63d734514610200578063f887ea401461020857610116565b80639e38afc5146101a7578063bfc36175146101ba578063db1d0fd5146101cd578063dbc8d056146101d557610116565b80635aa6e675116100e95780635aa6e6751461015e57806362856aff146101665780636767698f14610179578063735de9f71461018c5780639b31ae4a1461019457610116565b8063087605e31461011b5780631fe4a686146101305780633e413bee1461014e5780633fc8cef314610156575b600080fd5b61012e6101293660046109b7565b610210565b005b610138610289565b6040516101459190610ae5565b60405180910390f35b610138610298565b6101386102a7565b6101386102b6565b61012e610174366004610a99565b6102c5565b61012e6101873660046109ec565b610398565b6101386103f9565b61012e6101a2366004610978565b610408565b61012e6101b5366004610a99565b61049a565b6101386101c8366004610a99565b610517565b61013861053e565b6101386101e3366004610a99565b61054d565b61013861055a565b610138610569565b610138610578565b610138610587565b610138610596565b6000546001600160a01b031633146102435760405162461bcd60e51b815260040161023a90610b96565b60405180910390fd5b811561026957600680546001600160a01b0319166001600160a01b038316179055610285565b600580546001600160a01b0319166001600160a01b0383161790555b5050565b6001546001600160a01b031681565b600c546001600160a01b031681565b600a546001600160a01b031681565b6000546001600160a01b031681565b6001546001600160a01b03163314806102e857506000546001600160a01b031633145b6103045760405162461bcd60e51b815260040161023a90610b96565b600480546006546040516338ed173960e01b81526001600160a01b03928316936338ed17399361034293879360009360079390921691429101610c5b565b600060405180830381600087803b15801561035c57600080fd5b505af1158015610370573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261028591908101906108e3565b6000546001600160a01b031633146103c25760405162461bcd60e51b815260040161023a90610b96565b81156103e15780516103db906007906020840190610842565b50610285565b80516103f4906008906020840190610842565b505050565b6002546001600160a01b031681565b6001546001600160a01b031633148061042b57506000546001600160a01b031633145b6104475760405162461bcd60e51b815260040161023a90610b96565b801561047457600354600480546001600160a01b0319166001600160a01b03909216919091179055610497565b600254600480546001600160a01b0319166001600160a01b039092169190911790555b50565b6001546001600160a01b03163314806104bd57506000546001600160a01b031633145b6104d95760405162461bcd60e51b815260040161023a90610b96565b600480546005546040516338ed173960e01b81526001600160a01b03928316936338ed17399361034293879360009360089390921691429101610c5b565b6007818154811061052457fe5b6000918252602090912001546001600160a01b0316905081565b6009546001600160a01b031681565b6008818154811061052457fe5b6006546001600160a01b031681565b6003546001600160a01b031681565b600b546001600160a01b031681565b6005546001600160a01b031681565b6004546001600160a01b031681565b80158061062d5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906105db9030908690600401610af9565b60206040518083038186803b1580156105f357600080fd5b505afa158015610607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062b9190610ab1565b155b6106495760405162461bcd60e51b815260040161023a90610c05565b6103f48363095ea7b360e01b8484604051602401610668929190610b13565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526106b6565b60606106ae8484600085610745565b949350505050565b606061070b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661069f9092919063ffffffff16565b8051909150156103f45780806020019051810190610729919061099b565b6103f45760405162461bcd60e51b815260040161023a90610bbb565b606061075085610809565b61076c5760405162461bcd60e51b815260040161023a90610b5f565b60006060866001600160a01b031685876040516107899190610ac9565b60006040518083038185875af1925050503d80600081146107c6576040519150601f19603f3d011682016040523d82523d6000602084013e6107cb565b606091505b509150915081156107df5791506106ae9050565b8051156107ef5780518082602001fd5b8360405162461bcd60e51b815260040161023a9190610b2c565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106ae575050151592915050565b828054828255906000526020600020908101928215610897579160200282015b8281111561089757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190610862565b506108a39291506108a7565b5090565b5b808211156108a35780546001600160a01b03191681556001016108a8565b80356001600160a01b03811681146108dd57600080fd5b92915050565b600060208083850312156108f5578182fd5b825167ffffffffffffffff81111561090b578283fd5b8301601f8101851361091b578283fd5b805161092e61092982610cf5565b610cce565b818152838101908385018584028501860189101561094a578687fd5b8694505b8385101561096c57805183526001949094019391850191850161094e565b50979650505050505050565b600060208284031215610989578081fd5b813561099481610d45565b9392505050565b6000602082840312156109ac578081fd5b815161099481610d45565b600080604083850312156109c9578081fd5b82356109d481610d45565b91506109e384602085016108c6565b90509250929050565b600080604083850312156109fe578182fd5b8235610a0981610d45565b915060208381013567ffffffffffffffff811115610a25578283fd5b8401601f81018613610a35578283fd5b8035610a4361092982610cf5565b81815283810190838501858402850186018a1015610a5f578687fd5b8694505b83851015610a8957610a758a826108c6565b835260019490940193918501918501610a63565b5080955050505050509250929050565b600060208284031215610aaa578081fd5b5035919050565b600060208284031215610ac2578081fd5b5051919050565b60008251610adb818460208701610d15565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152610b4b816040850160208701610d15565b601f01601f19169190910160400192915050565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252600b908201526a08585d5d1a1bdc9a5e995960aa1b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b600060a082018783526020878185015260a0604085015281875480845260c0860191508885528285209350845b81811015610cad5784546001600160a01b031683526001948501949284019201610c88565b50506001600160a01b03969096166060850152505050608001529392505050565b60405181810167ffffffffffffffff81118282101715610ced57600080fd5b604052919050565b600067ffffffffffffffff821115610d0b578081fd5b5060209081020190565b60005b83811015610d30578181015183820152602001610d18565b83811115610d3f576000848401525b50505050565b801515811461049757600080fdfea26469706673582212207782d9eb0685714b5a94a5824c538f5bf5c68ad03df9ed00f9b317351766400e64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 25 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.