Source Code
Latest 10 from a total of 10 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer | 13919092 | 1525 days ago | IN | 0.011 ETH | 0.00120768 | ||||
| Transfer Ownersh... | 13773983 | 1547 days ago | IN | 0 ETH | 0.0028699 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.0070878 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.007086 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.007086 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.0070878 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.0070878 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.0070878 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.007086 | ||||
| Add | 13773965 | 1547 days ago | IN | 0 ETH | 0.0070878 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 13842359 | 1537 days ago | 0.1 ETH | ||||
| - | 13842359 | 1537 days ago | 0.1 ETH | ||||
| - | 13810085 | 1542 days ago | 0.005 ETH | ||||
| - | 13810085 | 1542 days ago | 0.005 ETH | ||||
| - | 13802360 | 1543 days ago | 0.003 ETH | ||||
| - | 13802360 | 1543 days ago | 0.003 ETH | ||||
| - | 13798772 | 1543 days ago | 0.02599999 ETH | ||||
| - | 13798772 | 1543 days ago | 0.02599999 ETH | ||||
| - | 13798664 | 1543 days ago | 0.001 ETH | ||||
| - | 13798664 | 1543 days ago | 0.001 ETH | ||||
| - | 13798489 | 1543 days ago | 0.0279 ETH | ||||
| - | 13798489 | 1543 days ago | 0.0279 ETH | ||||
| - | 13798220 | 1544 days ago | 0.01 ETH | ||||
| - | 13798220 | 1544 days ago | 0.01 ETH | ||||
| - | 13781921 | 1546 days ago | 0.003 ETH | ||||
| - | 13781921 | 1546 days ago | 0.003 ETH | ||||
| - | 13777227 | 1547 days ago | 0.002 ETH | ||||
| - | 13777227 | 1547 days ago | 0.002 ETH | ||||
| - | 13776966 | 1547 days ago | 0.1 ETH | ||||
| - | 13776966 | 1547 days ago | 0.1 ETH | ||||
| - | 13776946 | 1547 days ago | 0.0002 ETH | ||||
| - | 13776946 | 1547 days ago | 0.0002 ETH | ||||
| - | 13776432 | 1547 days ago | 0.003 ETH | ||||
| - | 13776432 | 1547 days ago | 0.003 ETH | ||||
| - | 13775880 | 1547 days ago | 0.01 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DHedgeAdapter
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.2;
import { SafeERC20, IERC20 } from "../ecosystem/openzeppelin/token/ERC20/utils/SafeERC20.sol";
import "./AbstractAdapter.sol";
interface IDHedge {
function getFundComposition() external view returns(bytes32[] memory, uint256[] memory, uint256[] memory);
function getAssetProxy(bytes32 key) external view returns(address);
function withdraw(uint256 _fundTokenAmount) external;
function deposit(uint256 _susdAmount) external returns (uint256);
function totalSupply() external view returns (uint256);
function totalFundValue() external view returns (uint256);
}
/// @title DHedge Vampire Attack Contract
/// @author Enso.finance (github.com/EnsoFinance)
/// @notice Adapter for redeeming the underlying assets from Dhedge Protocol
contract DHedgeAdapter is AbstractAdapter {
using SafeERC20 for IERC20;
address public immutable SUSD;
constructor(address owner_, address susd_) AbstractAdapter(owner_) {
SUSD = susd_;
}
function outputTokens(address _lp)
public
view
override
returns (address[] memory)
{
(bytes32[] memory assets, , ) = IDHedge(_lp).getFundComposition();
address[] memory outputs = new address[](assets.length);
for (uint256 i = 0; i < assets.length; i++) {
outputs[i] = IDHedge(_lp).getAssetProxy(assets[i]);
}
return outputs;
}
function encodeMigration(address _genericRouter, address _strategy, address _lp, uint256 _amount)
public
override
view
onlyWhitelisted(_lp)
returns (Call[] memory calls)
{
address[] memory tokens = outputTokens(_lp);
calls = new Call[](tokens.length + 1);
calls[0] = encodeWithdraw(_lp, _amount)[0];
for (uint256 i = 0; i < tokens.length; i++) {
calls[i + 1] = Call(
_genericRouter,
abi.encodeWithSelector(
IGenericRouter(_genericRouter).settleTransfer.selector,
tokens[i],
_strategy
)
);
}
return calls;
}
function encodeWithdraw(address _lp, uint256 _amount)
public
override
view
onlyWhitelisted(_lp)
returns (Call[] memory calls)
{
calls = new Call[](1);
calls[0] = Call(
payable(_lp),
abi.encodeWithSelector(
IDHedge(_lp).withdraw.selector,
_amount
)
);
}
/*
function buy(address _lp, address _exchange, uint256 _minAmountOut, uint256 _deadline)
public
override
payable
onlyWhitelisted(_lp)
{
// WARNING: Cannot transfer due to dHedge's cooldown period
address[] memory path = new address[](2);
path[0] = WETH;
path[1] = SUSD;
IUniswapV2Router(_exchange).swapExactETHForTokens{value: msg.value}(
1,
path,
address(this),
_deadline
);
uint256 susdAmount = IERC20(SUSD).balanceOf(address(this));
IERC20(SUSD).approve(_lp, susdAmount);
IDHedge(_lp).deposit(susdAmount);
uint256 lpAmount = IERC20(_lp).balanceOf(address(this));
require(lpAmount >= _minAmountOut, "Insufficient LP tokens");
IERC20(_lp).transfer(msg.sender, lpAmount);
}
*/
/*
function getAmountOut(
address _lp,
address _exchange,
uint256 _amountIn
) external override view onlyWhitelisted(_lp) returns (uint256) {
address[] memory path = new address[](2);
path[0] = WETH;
path[1] = SUSD;
uint256 susdAmount = IUniswapV2Router(_exchange).getAmountsOut(_amountIn, path)[1];
uint256 totalSupply = IDHedge(_lp).totalSupply();
if (totalSupply > 0) {
uint256 fundValue = IDHedge(_lp).totalFundValue();
return susdAmount * totalSupply / fundValue;
} else {
return susdAmount;
}
}
*/
}// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.0;
import "../IERC20.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;
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) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
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");
uint256 newAllowance = oldAllowance - value;
_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");
}
}
}//SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.2;
import "../interfaces/IAdapter.sol";
import "../helpers/Whitelistable.sol";
import "../interfaces/IUniswapV2Router.sol";
import "../interfaces/IUniswapV3Router.sol";
import "../interfaces/IQuoter.sol";
interface IGenericRouter {
function settleTransfer(address token, address to) external;
function settleSwap(
address adapter,
address tokenIn,
address tokenOut,
address from,
address to
) external;
}
/// @title Token Sets Vampire Attack Contract
/// @author Enso.finance (github.com/EnsoFinance)
/// @notice Adapter for redeeming the underlying assets from Token Sets
abstract contract AbstractAdapter is IAdapter, Whitelistable {
address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public constant SUSHI = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F;
address public constant UNI_V2 = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;
address public constant UNI_V3 = 0xE592427A0AEce92De3Edee1F18E0157C05861564;
address public constant QUOTER = 0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6;
/**
* @dev Require exchange registered
*/
modifier onlyExchange(address _exchange) {
require(isExchange(_exchange), "AbstractAdapter#buy: should be exchanges");
_;
}
constructor(address owner_) {
_setOwner(owner_);
}
function outputTokens(address _lp)
public
view
override
virtual
returns (address[] memory outputs);
function encodeMigration(address _genericRouter, address _strategy, address _lp, uint256 _amount)
public
override
virtual
view
returns (Call[] memory calls);
function encodeWithdraw(address _lp, uint256 _amount)
public
override
virtual
view
returns (Call[] memory calls);
function buy(address _lp, address _exchange, uint256 _minAmountOut, uint256 _deadline)
public
override
virtual
payable
onlyExchange(_exchange)
onlyWhitelisted(_lp)
{
if (_exchange == UNI_V3) {
_buyV3(_lp, _minAmountOut, _deadline);
} else {
_buyV2(_lp, _exchange, _minAmountOut, _deadline);
}
}
function getAmountOut(
address _lp,
address _exchange,
uint256 _amountIn
)
external
override
virtual
onlyExchange(_exchange)
onlyWhitelisted(_lp)
returns (uint256)
{
if (_exchange == UNI_V3) {
return _getV3(_lp, _amountIn);
} else {
return _getV2(_lp, _exchange, _amountIn);
}
}
function _buyV2(
address _lp,
address _exchange,
uint256 _minAmountOut,
uint256 _deadline
)
internal
{
address[] memory path = new address[](2);
path[0] = WETH;
path[1] = _lp;
IUniswapV2Router(_exchange).swapExactETHForTokens{value: msg.value}(
_minAmountOut,
path,
msg.sender,
_deadline
);
}
function _buyV3(
address _lp,
uint256 _minAmountOut,
uint256 _deadline
)
internal
{
IUniswapV3Router(UNI_V3).exactInputSingle{value: msg.value}(IUniswapV3Router.ExactInputSingleParams(
WETH,
_lp,
3000,
msg.sender,
_deadline,
msg.value,
_minAmountOut,
0
));
}
function _getV2(address _lp, address _exchange, uint256 _amountIn)
internal
view
returns (uint256)
{
address[] memory path = new address[](2);
path[0] = WETH;
path[1] = _lp;
return IUniswapV2Router(_exchange).getAmountsOut(_amountIn, path)[1];
}
function _getV3(address _lp, uint256 _amountIn)
internal
returns (uint256)
{
return IQuoter(QUOTER).quoteExactInputSingle(
WETH,
_lp,
3000,
_amountIn,
0
);
}
/**
* @param _lp to view pool token
* @return if token in whitelist
*/
function isWhitelisted(address _lp)
public
view
override
returns(bool)
{
return whitelisted[_lp];
}
function isExchange(address _exchange)
public
pure
returns (bool)
{
return(_exchange == SUSHI || _exchange == UNI_V2 || _exchange == UNI_V3);
}
}// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.0;
/**
* @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);
}// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.0;
/**
* @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) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 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://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");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(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) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(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) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
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);
}
}
}
}//SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.2;
interface IAdapter {
struct Call {
address target;
bytes callData;
}
function outputTokens(address inputToken) external view returns (address[] memory outputs);
function encodeMigration(address _genericRouter, address _strategy, address _lp, uint256 _amount)
external view returns (Call[] memory calls);
function encodeWithdraw(address _lp, uint256 _amount) external view returns (Call[] memory calls);
function buy(address _lp, address _exchange, uint256 _minAmountOut, uint256 _deadline) external payable;
function getAmountOut(address _lp, address _exchange, uint256 _amountIn) external returns (uint256);
function isWhitelisted(address _token) external view returns (bool);
}import "../helpers/Ownable.sol";
// SPDX-License-Identifier: WTFPL
pragma solidity 0.8.2;
abstract contract Whitelistable is Ownable {
mapping(address => bool) public whitelisted;
event Added(address token);
event Removed(address token);
/**
* @dev Require adapter registered
*/
modifier onlyWhitelisted(address _lp) {
require(whitelisted[_lp], "Whitelistable#onlyWhitelisted: not whitelisted lp");
_;
}
/**
* @dev add pool token to whitelist
* @param _token pool address
*/
function add(address _token)
public
onlyOwner
{
_add(_token);
}
/**
* @dev batch add pool token to whitelist
* @param _tokens[] array of pool address
*/
function addBatch(address[] memory _tokens)
public
onlyOwner
{
for (uint256 i = 0; i < _tokens.length; i++) {
_add(_tokens[i]);
}
}
/**
* @dev remove pool token from whitelist
* @param _token pool address
*/
function remove(address _token)
public
onlyOwner
{
_remove(_token);
}
/**
* @dev batch remove pool token from whitelist
* @param _tokens[] array of pool address
*/
function removeBatch(address[] memory _tokens)
public
onlyOwner
{
for (uint256 i = 0; i < _tokens.length; i++) {
_remove(_tokens[i]);
}
}
function _add(address _token)
internal
{
whitelisted[_token] = true;
emit Added(_token);
}
function _remove(address _token)
internal
{
require(whitelisted[_token], 'Whitelistable#_Remove: not exist');
whitelisted[_token] = false;
emit Removed(_token);
}
}pragma solidity 0.8.2;
interface IUniswapV2Router {
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
}pragma solidity 0.8.2;
interface IUniswapV3Router {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
}pragma solidity 0.8.2;
interface IQuoter {
function quoteExactInputSingle(
address tokenIn,
address tokenOut,
uint24 fee,
uint256 amountIn,
uint160 sqrtPriceLimitX96
) external returns (uint256 amountOut);
}// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.0;
import "../ecosystem/openzeppelin/utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function _setOwner(address owner_)
internal
{
_owner = owner_;
emit OwnershipTransferred(address(0), owner_);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: WTFPL
pragma solidity ^0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}{
"optimizer": {
"enabled": true,
"runs": 2000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"susd_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"Added","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"Removed","type":"event"},{"inputs":[],"name":"QUOTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSHI","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNI_V2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNI_V3","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"addBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"address","name":"_exchange","type":"address"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_genericRouter","type":"address"},{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_lp","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"encodeMigration","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct IAdapter.Call[]","name":"calls","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"encodeWithdraw","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct IAdapter.Call[]","name":"calls","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"address","name":"_exchange","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_exchange","type":"address"}],"name":"isExchange","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"outputTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"remove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"removeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a06040523480156200001157600080fd5b5060405162001f2938038062001f298339810160408190526200003491620000c0565b81620000408162000058565b5060601b6001600160601b03191660805250620000f7565b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b80516001600160a01b0381168114620000bb57600080fd5b919050565b60008060408385031215620000d3578182fd5b620000de83620000a3565b9150620000ee60208401620000a3565b90509250929050565b60805160601c611e136200011660003960006101d70152611e136000f3fe6080604052600436106101695760003560e01c8063715018a6116100cb578063ab560e101161007f578063d936547e11610059578063d936547e14610438578063ee72053b14610468578063f2fde38b1461049057610169565b8063ab560e10146103c0578063ad5c4648146103e8578063b8511ca91461041057610169565b80638dae88c2116100b05780638dae88c214610365578063a9b298611461038d578063a9d424e2146103ad57610169565b8063715018a6146103325780638da5cb5b1461034757610169565b80633af32abf1161012257806351ecd2fa1161010757806351ecd2fa146102b85780636b80fe4a146102e55780636b845bfe1461031257610169565b80633af32abf146102515780634aa066521461028a57610169565b806315d8eeba1161015357806315d8eeba146101c557806324efa2641461021157806329092d0e1461023157610169565b806236d2d31461016e5780630a3b0a4f146101a3575b600080fd5b34801561017a57600080fd5b5061018e610189366004611880565b6104b0565b60405190151581526020015b60405180910390f35b3480156101af57600080fd5b506101c36101be366004611880565b610526565b005b3480156101d157600080fd5b506101f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161019a565b34801561021d57600080fd5b506101c361022c3660046119b8565b610591565b34801561023d57600080fd5b506101c361024c366004611880565b61063d565b34801561025d57600080fd5b5061018e61026c366004611880565b6001600160a01b031660009081526001602052604090205460ff1690565b34801561029657600080fd5b506102aa6102a5366004611908565b6106a0565b60405190815260200161019a565b3480156102c457600080fd5b506102d86102d3366004611880565b6107f8565b60405161019a9190611bc4565b3480156102f157600080fd5b5061030561030036600461198d565b6109ce565b60405161019a9190611bd7565b34801561031e57600080fd5b506101c361032d3660046119b8565b610b69565b34801561033e57600080fd5b506101c3610c11565b34801561035357600080fd5b506000546001600160a01b03166101f9565b34801561037157600080fd5b506101f973b27308f9f90d607463bb33ea1bebb41c27ce5ab681565b34801561039957600080fd5b506103056103a83660046118b8565b610ccd565b6101c36103bb366004611948565b610f79565b3480156103cc57600080fd5b506101f973d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b3480156103f457600080fd5b506101f973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561041c57600080fd5b506101f973f164fc0ec4e93095b804a4795bbe1e041497b92a81565b34801561044457600080fd5b5061018e610453366004611880565b60016020526000908152604090205460ff1681565b34801561047457600080fd5b506101f973e592427a0aece92de3edee1f18e0157c0586156481565b34801561049c57600080fd5b506101c36104ab366004611880565b6110ce565b60006001600160a01b03821673d9e1ce17f2641f24ae83637ab66a2cca9c378b9f14806104f957506001600160a01b03821673f164fc0ec4e93095b804a4795bbe1e041497b92a145b8061052057506001600160a01b03821673e592427a0aece92de3edee1f18e0157c05861564145b92915050565b6000546001600160a01b031633146105855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61058e81611217565b50565b6000546001600160a01b031633146105eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b60005b81518110156106395761062782828151811061061a57634e487b7160e01b600052603260045260246000fd5b6020026020010151611217565b8061063181611d63565b9150506105ee565b5050565b6000546001600160a01b031633146106975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b61058e81611273565b6000826106ac816104b0565b61071e5760405162461bcd60e51b815260206004820152602860248201527f416273747261637441646170746572236275793a2073686f756c64206265206560448201527f786368616e676573000000000000000000000000000000000000000000000000606482015260840161057c565b6001600160a01b038516600090815260016020526040902054859060ff166107ae5760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b6001600160a01b03851673e592427a0aece92de3edee1f18e0157c0586156414156107e4576107dd868561132c565b92506107ef565b6107dd86868661140c565b50509392505050565b60606000826001600160a01b031663f09d14d76040518163ffffffff1660e01b815260040160006040518083038186803b15801561083557600080fd5b505afa158015610849573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108719190810190611a51565b505090506000815167ffffffffffffffff81111561089f57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156108c8578160200160208202803683370190505b50905060005b82518110156109c657846001600160a01b0316633ded653084838151811061090657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b815260040161092c91815260200190565b60206040518083038186803b15801561094457600080fd5b505afa158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c919061189c565b82828151811061099c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806109be81611d63565b9150506108ce565b509392505050565b6001600160a01b038216600090815260016020526040902054606090839060ff16610a615760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b60408051600180825281830190925290816020015b604080518082019091526000815260606020820152815260200190600190039081610a765790505091506040518060400160405280856001600160a01b03168152602001632e1a7d4d60e01b85604051602401610ad591815260200190565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905282518390600090610b5757634e487b7160e01b600052603260045260246000fd5b60200260200101819052505092915050565b6000546001600160a01b03163314610bc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b60005b815181101561063957610bff828281518110610bf257634e487b7160e01b600052603260045260246000fd5b6020026020010151611273565b80610c0981611d63565b915050610bc6565b6000546001600160a01b03163314610c6b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6001600160a01b038216600090815260016020526040902054606090839060ff16610d605760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b6000610d6b856107f8565b905080516001610d7b9190611d4b565b67ffffffffffffffff811115610da157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610de757816020015b604080518082019091526000815260606020820152815260200190600190039081610dbf5790505b509250610df485856109ce565b600081518110610e1457634e487b7160e01b600052603260045260246000fd5b602002602001015183600081518110610e3d57634e487b7160e01b600052603260045260246000fd5b602002602001018190525060005b8151811015610f6e576040518060400160405280896001600160a01b0316815260200163beff455360e01b848481518110610e9657634e487b7160e01b600052603260045260246000fd5b60200260200101518a604051602401610ec59291906001600160a01b0392831681529116602082015260400190565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905284610f32836001611d4b565b81518110610f5057634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610f6690611d63565b915050610e4b565b505050949350505050565b82610f83816104b0565b610ff55760405162461bcd60e51b815260206004820152602860248201527f416273747261637441646170746572236275793a2073686f756c64206265206560448201527f786368616e676573000000000000000000000000000000000000000000000000606482015260840161057c565b6001600160a01b038516600090815260016020526040902054859060ff166110855760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b6001600160a01b03851673e592427a0aece92de3edee1f18e0157c0586156414156110ba576110b5868585611585565b6110c6565b6110c6868686866116c9565b505050505050565b6000546001600160a01b031633146111285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b6001600160a01b0381166111a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161057c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527fdcfefddfe354ab15def7a2a6a8758e2ad4100c920318c627db94e29d833e156791015b60405180910390a150565b6001600160a01b03811660009081526001602052604090205460ff166112db5760405162461bcd60e51b815260206004820181905260248201527f57686974656c69737461626c65235f52656d6f76653a206e6f74206578697374604482015260640161057c565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f066a905b79c0121afe61e3a44e0b14b6bc1ec16d854cdba09efdfc9b6aa9af819101611268565b6040517ff7729d4300000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b0383166024820152610bb86044820152606481018290526000608482018190529073b27308f9f90d607463bb33ea1bebb41c27ce5ab69063f7729d439060a401602060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114059190611b69565b9392505050565b6040805160028082526060820183526000928392919060208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061146757634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b03168152505084816001815181106114a957634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526040517fd06ca61f0000000000000000000000000000000000000000000000000000000081529085169063d06ca61f906114ff9086908590600401611ca8565b60006040518083038186803b15801561151757600080fd5b505afa15801561152b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115539190810190611b2e565b60018151811061157357634e487b7160e01b600052603260045260246000fd5b60200260200101519150509392505050565b604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281526001600160a01b0385811660208301908152610bb88385019081523360608501908152608085018781523460a0870181815260c088018b8152600060e08a0190815299517f414bf3890000000000000000000000000000000000000000000000000000000081529851881660048a0152955187166024890152935162ffffff166044880152915185166064870152516084860152905160a4850152905160c484015292511660e482015273e592427a0aece92de3edee1f18e0157c058615649163414bf38991610104016020604051808303818588803b15801561168a57600080fd5b505af115801561169e573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906116c39190611b69565b50505050565b60408051600280825260608201835260009260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061172057634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050848160018151811061176257634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526040517f7ff36ab500000000000000000000000000000000000000000000000000000000815290851690637ff36ab59034906117be908790869033908990600401611cc1565b6000604051808303818588803b1580156117d757600080fd5b505af11580156117eb573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526110c69190810190611b2e565b600082601f830112611824578081fd5b8151602061183961183483611d27565b611cf6565b8281528181019085830183850287018401881015611855578586fd5b855b8581101561187357815184529284019290840190600101611857565b5090979650505050505050565b600060208284031215611891578081fd5b813561140581611dc8565b6000602082840312156118ad578081fd5b815161140581611dc8565b600080600080608085870312156118cd578283fd5b84356118d881611dc8565b935060208501356118e881611dc8565b925060408501356118f881611dc8565b9396929550929360600135925050565b60008060006060848603121561191c578283fd5b833561192781611dc8565b9250602084013561193781611dc8565b929592945050506040919091013590565b6000806000806080858703121561195d578384fd5b843561196881611dc8565b9350602085013561197881611dc8565b93969395505050506040820135916060013590565b6000806040838503121561199f578182fd5b82356119aa81611dc8565b946020939093013593505050565b600060208083850312156119ca578182fd5b823567ffffffffffffffff8111156119e0578283fd5b8301601f810185136119f0578283fd5b80356119fe61183482611d27565b8181528381019083850185840285018601891015611a1a578687fd5b8694505b83851015611a45578035611a3181611dc8565b835260019490940193918501918501611a1e565b50979650505050505050565b600080600060608486031215611a65578283fd5b835167ffffffffffffffff80821115611a7c578485fd5b818601915086601f830112611a8f578485fd5b81516020611a9f61183483611d27565b82815281810190858301838502870184018c1015611abb57898afd5b8996505b84871015611add578051835260019690960195918301918301611abf565b5091890151919750909350505080821115611af6578384fd5b611b0287838801611814565b93506040860151915080821115611b17578283fd5b50611b2486828701611814565b9150509250925092565b600060208284031215611b3f578081fd5b815167ffffffffffffffff811115611b55578182fd5b611b6184828501611814565b949350505050565b600060208284031215611b7a578081fd5b5051919050565b6000815180845260208085019450808401835b83811015611bb95781516001600160a01b031687529582019590820190600101611b94565b509495945050505050565b6000602082526114056020830184611b81565b60208082528251828201819052600091906040908185019080840286018301878501865b83811015611c9a578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b031684528701518784018790528051878501819052895b81811015611c68578281018a0151868201606001528901611c4c565b81811115611c79578a606083880101525b5095880195601f01601f191693909301606001925090860190600101611bfb565b509098975050505050505050565b600083825260406020830152611b616040830184611b81565b600085825260806020830152611cda6080830186611b81565b6001600160a01b03949094166040830152506060015292915050565b604051601f8201601f1916810167ffffffffffffffff81118282101715611d1f57611d1f611db2565b604052919050565b600067ffffffffffffffff821115611d4157611d41611db2565b5060209081020190565b60008219821115611d5e57611d5e611d9c565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611d9557611d95611d9c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461058e57600080fdfea2646970667358221220f2ee6549aa9650b98910dff8d5a82b330003e1add870813e4de17c9d6ecedb6764736f6c6343000802003300000000000000000000000058ce791454e62f6a5392706745cd863a4f1f52ac00000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f51
Deployed Bytecode
0x6080604052600436106101695760003560e01c8063715018a6116100cb578063ab560e101161007f578063d936547e11610059578063d936547e14610438578063ee72053b14610468578063f2fde38b1461049057610169565b8063ab560e10146103c0578063ad5c4648146103e8578063b8511ca91461041057610169565b80638dae88c2116100b05780638dae88c214610365578063a9b298611461038d578063a9d424e2146103ad57610169565b8063715018a6146103325780638da5cb5b1461034757610169565b80633af32abf1161012257806351ecd2fa1161010757806351ecd2fa146102b85780636b80fe4a146102e55780636b845bfe1461031257610169565b80633af32abf146102515780634aa066521461028a57610169565b806315d8eeba1161015357806315d8eeba146101c557806324efa2641461021157806329092d0e1461023157610169565b806236d2d31461016e5780630a3b0a4f146101a3575b600080fd5b34801561017a57600080fd5b5061018e610189366004611880565b6104b0565b60405190151581526020015b60405180910390f35b3480156101af57600080fd5b506101c36101be366004611880565b610526565b005b3480156101d157600080fd5b506101f97f00000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f5181565b6040516001600160a01b03909116815260200161019a565b34801561021d57600080fd5b506101c361022c3660046119b8565b610591565b34801561023d57600080fd5b506101c361024c366004611880565b61063d565b34801561025d57600080fd5b5061018e61026c366004611880565b6001600160a01b031660009081526001602052604090205460ff1690565b34801561029657600080fd5b506102aa6102a5366004611908565b6106a0565b60405190815260200161019a565b3480156102c457600080fd5b506102d86102d3366004611880565b6107f8565b60405161019a9190611bc4565b3480156102f157600080fd5b5061030561030036600461198d565b6109ce565b60405161019a9190611bd7565b34801561031e57600080fd5b506101c361032d3660046119b8565b610b69565b34801561033e57600080fd5b506101c3610c11565b34801561035357600080fd5b506000546001600160a01b03166101f9565b34801561037157600080fd5b506101f973b27308f9f90d607463bb33ea1bebb41c27ce5ab681565b34801561039957600080fd5b506103056103a83660046118b8565b610ccd565b6101c36103bb366004611948565b610f79565b3480156103cc57600080fd5b506101f973d9e1ce17f2641f24ae83637ab66a2cca9c378b9f81565b3480156103f457600080fd5b506101f973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561041c57600080fd5b506101f973f164fc0ec4e93095b804a4795bbe1e041497b92a81565b34801561044457600080fd5b5061018e610453366004611880565b60016020526000908152604090205460ff1681565b34801561047457600080fd5b506101f973e592427a0aece92de3edee1f18e0157c0586156481565b34801561049c57600080fd5b506101c36104ab366004611880565b6110ce565b60006001600160a01b03821673d9e1ce17f2641f24ae83637ab66a2cca9c378b9f14806104f957506001600160a01b03821673f164fc0ec4e93095b804a4795bbe1e041497b92a145b8061052057506001600160a01b03821673e592427a0aece92de3edee1f18e0157c05861564145b92915050565b6000546001600160a01b031633146105855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61058e81611217565b50565b6000546001600160a01b031633146105eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b60005b81518110156106395761062782828151811061061a57634e487b7160e01b600052603260045260246000fd5b6020026020010151611217565b8061063181611d63565b9150506105ee565b5050565b6000546001600160a01b031633146106975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b61058e81611273565b6000826106ac816104b0565b61071e5760405162461bcd60e51b815260206004820152602860248201527f416273747261637441646170746572236275793a2073686f756c64206265206560448201527f786368616e676573000000000000000000000000000000000000000000000000606482015260840161057c565b6001600160a01b038516600090815260016020526040902054859060ff166107ae5760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b6001600160a01b03851673e592427a0aece92de3edee1f18e0157c0586156414156107e4576107dd868561132c565b92506107ef565b6107dd86868661140c565b50509392505050565b60606000826001600160a01b031663f09d14d76040518163ffffffff1660e01b815260040160006040518083038186803b15801561083557600080fd5b505afa158015610849573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108719190810190611a51565b505090506000815167ffffffffffffffff81111561089f57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156108c8578160200160208202803683370190505b50905060005b82518110156109c657846001600160a01b0316633ded653084838151811061090657634e487b7160e01b600052603260045260246000fd5b60200260200101516040518263ffffffff1660e01b815260040161092c91815260200190565b60206040518083038186803b15801561094457600080fd5b505afa158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c919061189c565b82828151811061099c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806109be81611d63565b9150506108ce565b509392505050565b6001600160a01b038216600090815260016020526040902054606090839060ff16610a615760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b60408051600180825281830190925290816020015b604080518082019091526000815260606020820152815260200190600190039081610a765790505091506040518060400160405280856001600160a01b03168152602001632e1a7d4d60e01b85604051602401610ad591815260200190565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905282518390600090610b5757634e487b7160e01b600052603260045260246000fd5b60200260200101819052505092915050565b6000546001600160a01b03163314610bc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b60005b815181101561063957610bff828281518110610bf257634e487b7160e01b600052603260045260246000fd5b6020026020010151611273565b80610c0981611d63565b915050610bc6565b6000546001600160a01b03163314610c6b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6001600160a01b038216600090815260016020526040902054606090839060ff16610d605760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b6000610d6b856107f8565b905080516001610d7b9190611d4b565b67ffffffffffffffff811115610da157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610de757816020015b604080518082019091526000815260606020820152815260200190600190039081610dbf5790505b509250610df485856109ce565b600081518110610e1457634e487b7160e01b600052603260045260246000fd5b602002602001015183600081518110610e3d57634e487b7160e01b600052603260045260246000fd5b602002602001018190525060005b8151811015610f6e576040518060400160405280896001600160a01b0316815260200163beff455360e01b848481518110610e9657634e487b7160e01b600052603260045260246000fd5b60200260200101518a604051602401610ec59291906001600160a01b0392831681529116602082015260400190565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152905284610f32836001611d4b565b81518110610f5057634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610f6690611d63565b915050610e4b565b505050949350505050565b82610f83816104b0565b610ff55760405162461bcd60e51b815260206004820152602860248201527f416273747261637441646170746572236275793a2073686f756c64206265206560448201527f786368616e676573000000000000000000000000000000000000000000000000606482015260840161057c565b6001600160a01b038516600090815260016020526040902054859060ff166110855760405162461bcd60e51b815260206004820152603160248201527f57686974656c69737461626c65236f6e6c7957686974656c69737465643a206e60448201527f6f742077686974656c6973746564206c70000000000000000000000000000000606482015260840161057c565b6001600160a01b03851673e592427a0aece92de3edee1f18e0157c0586156414156110ba576110b5868585611585565b6110c6565b6110c6868686866116c9565b505050505050565b6000546001600160a01b031633146111285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161057c565b6001600160a01b0381166111a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161057c565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527fdcfefddfe354ab15def7a2a6a8758e2ad4100c920318c627db94e29d833e156791015b60405180910390a150565b6001600160a01b03811660009081526001602052604090205460ff166112db5760405162461bcd60e51b815260206004820181905260248201527f57686974656c69737461626c65235f52656d6f76653a206e6f74206578697374604482015260640161057c565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f066a905b79c0121afe61e3a44e0b14b6bc1ec16d854cdba09efdfc9b6aa9af819101611268565b6040517ff7729d4300000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b0383166024820152610bb86044820152606481018290526000608482018190529073b27308f9f90d607463bb33ea1bebb41c27ce5ab69063f7729d439060a401602060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114059190611b69565b9392505050565b6040805160028082526060820183526000928392919060208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061146757634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b03168152505084816001815181106114a957634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526040517fd06ca61f0000000000000000000000000000000000000000000000000000000081529085169063d06ca61f906114ff9086908590600401611ca8565b60006040518083038186803b15801561151757600080fd5b505afa15801561152b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115539190810190611b2e565b60018151811061157357634e487b7160e01b600052603260045260246000fd5b60200260200101519150509392505050565b604080516101008101825273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281526001600160a01b0385811660208301908152610bb88385019081523360608501908152608085018781523460a0870181815260c088018b8152600060e08a0190815299517f414bf3890000000000000000000000000000000000000000000000000000000081529851881660048a0152955187166024890152935162ffffff166044880152915185166064870152516084860152905160a4850152905160c484015292511660e482015273e592427a0aece92de3edee1f18e0157c058615649163414bf38991610104016020604051808303818588803b15801561168a57600080fd5b505af115801561169e573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906116c39190611b69565b50505050565b60408051600280825260608201835260009260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061172057634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050848160018151811061176257634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526040517f7ff36ab500000000000000000000000000000000000000000000000000000000815290851690637ff36ab59034906117be908790869033908990600401611cc1565b6000604051808303818588803b1580156117d757600080fd5b505af11580156117eb573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526110c69190810190611b2e565b600082601f830112611824578081fd5b8151602061183961183483611d27565b611cf6565b8281528181019085830183850287018401881015611855578586fd5b855b8581101561187357815184529284019290840190600101611857565b5090979650505050505050565b600060208284031215611891578081fd5b813561140581611dc8565b6000602082840312156118ad578081fd5b815161140581611dc8565b600080600080608085870312156118cd578283fd5b84356118d881611dc8565b935060208501356118e881611dc8565b925060408501356118f881611dc8565b9396929550929360600135925050565b60008060006060848603121561191c578283fd5b833561192781611dc8565b9250602084013561193781611dc8565b929592945050506040919091013590565b6000806000806080858703121561195d578384fd5b843561196881611dc8565b9350602085013561197881611dc8565b93969395505050506040820135916060013590565b6000806040838503121561199f578182fd5b82356119aa81611dc8565b946020939093013593505050565b600060208083850312156119ca578182fd5b823567ffffffffffffffff8111156119e0578283fd5b8301601f810185136119f0578283fd5b80356119fe61183482611d27565b8181528381019083850185840285018601891015611a1a578687fd5b8694505b83851015611a45578035611a3181611dc8565b835260019490940193918501918501611a1e565b50979650505050505050565b600080600060608486031215611a65578283fd5b835167ffffffffffffffff80821115611a7c578485fd5b818601915086601f830112611a8f578485fd5b81516020611a9f61183483611d27565b82815281810190858301838502870184018c1015611abb57898afd5b8996505b84871015611add578051835260019690960195918301918301611abf565b5091890151919750909350505080821115611af6578384fd5b611b0287838801611814565b93506040860151915080821115611b17578283fd5b50611b2486828701611814565b9150509250925092565b600060208284031215611b3f578081fd5b815167ffffffffffffffff811115611b55578182fd5b611b6184828501611814565b949350505050565b600060208284031215611b7a578081fd5b5051919050565b6000815180845260208085019450808401835b83811015611bb95781516001600160a01b031687529582019590820190600101611b94565b509495945050505050565b6000602082526114056020830184611b81565b60208082528251828201819052600091906040908185019080840286018301878501865b83811015611c9a578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b031684528701518784018790528051878501819052895b81811015611c68578281018a0151868201606001528901611c4c565b81811115611c79578a606083880101525b5095880195601f01601f191693909301606001925090860190600101611bfb565b509098975050505050505050565b600083825260406020830152611b616040830184611b81565b600085825260806020830152611cda6080830186611b81565b6001600160a01b03949094166040830152506060015292915050565b604051601f8201601f1916810167ffffffffffffffff81118282101715611d1f57611d1f611db2565b604052919050565b600067ffffffffffffffff821115611d4157611d41611db2565b5060209081020190565b60008219821115611d5e57611d5e611d9c565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611d9557611d95611d9c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461058e57600080fdfea2646970667358221220f2ee6549aa9650b98910dff8d5a82b330003e1add870813e4de17c9d6ecedb6764736f6c63430008020033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000058ce791454e62f6a5392706745cd863a4f1f52ac00000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f51
-----Decoded View---------------
Arg [0] : owner_ (address): 0x58CE791454e62f6a5392706745cD863a4f1F52aC
Arg [1] : susd_ (address): 0x57Ab1ec28D129707052df4dF418D58a2D46d5f51
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000058ce791454e62f6a5392706745cd863a4f1f52ac
Arg [1] : 00000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f51
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.