Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BaseAsyncSwapper
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED // Copyright (c) 2023 Tokemak Foundation. All rights reserved. pragma solidity 0.8.17; import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; import { LibAdapter } from "src/libs/LibAdapter.sol"; import { IAsyncSwapper, SwapParams } from "src/interfaces/liquidation/IAsyncSwapper.sol"; /** * @title BaseAsyncSwapper * @notice This contract is designed to be invoked via delegatecall. It does not implement its own reentrancy * protection. * * @dev WARNING: Any contract delegatecalling into this MUST implement its own ReentrancyGuard protection mechanism to * prevent potential reentrancy attacks. */ contract BaseAsyncSwapper is IAsyncSwapper { // solhint-disable-next-line var-name-mixedcase address public immutable AGGREGATOR; constructor(address aggregator) { if (aggregator == address(0)) revert TokenAddressZero(); AGGREGATOR = aggregator; } /// @inheritdoc IAsyncSwapper function swap(SwapParams memory swapParams) public virtual returns (uint256 buyTokenAmountReceived) { //slither-disable-start reentrancy-events if (swapParams.buyTokenAddress == address(0)) revert TokenAddressZero(); if (swapParams.sellTokenAddress == address(0)) revert TokenAddressZero(); if (swapParams.sellAmount == 0) revert InsufficientSellAmount(); if (swapParams.buyAmount == 0) revert InsufficientBuyAmount(); IERC20 sellToken = IERC20(swapParams.sellTokenAddress); IERC20 buyToken = IERC20(swapParams.buyTokenAddress); uint256 sellTokenBalance = sellToken.balanceOf(address(this)); if (sellTokenBalance < swapParams.sellAmount) { revert InsufficientBalance(sellTokenBalance, swapParams.sellAmount); } LibAdapter._approve(sellToken, AGGREGATOR, swapParams.sellAmount); uint256 buyTokenBalanceBefore = buyToken.balanceOf(address(this)); // we don't need the returned value, we calculate the buyTokenAmountReceived ourselves // slither-disable-start low-level-calls,unchecked-lowlevel // solhint-disable-next-line avoid-low-level-calls (bool success,) = AGGREGATOR.call(swapParams.data); // slither-disable-end low-level-calls,unchecked-lowlevel if (!success) { revert SwapFailed(); } uint256 buyTokenBalanceAfter = buyToken.balanceOf(address(this)); buyTokenAmountReceived = buyTokenBalanceAfter - buyTokenBalanceBefore; if (buyTokenAmountReceived < swapParams.buyAmount) { revert InsufficientBuyAmountReceived(buyTokenAmountReceived, swapParams.buyAmount); } emit Swapped( swapParams.sellTokenAddress, swapParams.buyTokenAddress, swapParams.sellAmount, swapParams.buyAmount, buyTokenAmountReceived ); return buyTokenAmountReceived; //slither-disable-end reentrancy-events } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: UNLICENSED // Copyright (c) 2023 Tokemak Foundation. All rights reserved. pragma solidity 0.8.17; import { IERC20 } from "openzeppelin-contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol"; library LibAdapter { using SafeERC20 for IERC20; address public constant CURVE_REGISTRY_ETH_ADDRESS_POINTER = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; error MinLpAmountNotReached(); error LpTokenAmountMismatch(); error NoNonZeroAmountProvided(); error InvalidBalanceChange(); // Utils function _approve(IERC20 token, address spender, uint256 amount) internal { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance > 0) { token.safeDecreaseAllowance(spender, currentAllowance); } token.safeIncreaseAllowance(spender, amount); } }
// SPDX-License-Identifier: UNLICENSED // Copyright (c) 2023 Tokemak Foundation. All rights reserved. pragma solidity 0.8.17; struct SwapParams { /// @dev The address of the token to be sold. address sellTokenAddress; /// @dev The amount of tokens to be sold. uint256 sellAmount; /// @dev The address of the token to be bought. address buyTokenAddress; /// @dev The expected minimum amount of tokens to be bought. uint256 buyAmount; /// @dev Data payload to be used for complex swap operations. bytes data; /// @dev Extra data payload reserved for future development. This field allows for additional information /// or functionality to be added without changing the struct and interface. bytes extraData; /// @dev Execution deadline in timestamp format uint256 deadline; } interface IAsyncSwapper { error TokenAddressZero(); error SwapFailed(); error InsufficientBuyAmountReceived(uint256 buyTokenAmountReceived, uint256 buyAmount); error InsufficientSellAmount(); error InsufficientBuyAmount(); error InsufficientBalance(uint256 balanceNeeded, uint256 balanceAvailable); event Swapped( address indexed sellTokenAddress, address indexed buyTokenAddress, uint256 sellAmount, uint256 buyAmount, uint256 buyTokenAmountReceived ); /** * @notice Swaps sellToken for buyToken * @param swapParams Encoded swap data * @return buyTokenAmountReceived The amount of buyToken received from the swap */ function swap(SwapParams memory swapParams) external returns (uint256 buyTokenAmountReceived); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; 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' 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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "forge-std/=lib/forge-std/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "src/=src/", "test/=test/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "erc4626-tests/=lib/erc4626-tests/", "prb-math/=lib/prb-math/", "crytic/properties/=lib/properties/", "ERC4626/=lib/properties/lib/ERC4626/contracts/", "properties/=lib/properties/contracts/", "solmate/=lib/properties/lib/solmate/src/", "usingtellor/=lib/usingtellor/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"aggregator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"balanceNeeded","type":"uint256"},{"internalType":"uint256","name":"balanceAvailable","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InsufficientBuyAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"buyTokenAmountReceived","type":"uint256"},{"internalType":"uint256","name":"buyAmount","type":"uint256"}],"name":"InsufficientBuyAmountReceived","type":"error"},{"inputs":[],"name":"InsufficientSellAmount","type":"error"},{"inputs":[],"name":"SwapFailed","type":"error"},{"inputs":[],"name":"TokenAddressZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sellTokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"buyTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"sellAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"buyTokenAmountReceived","type":"uint256"}],"name":"Swapped","type":"event"},{"inputs":[],"name":"AGGREGATOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sellTokenAddress","type":"address"},{"internalType":"uint256","name":"sellAmount","type":"uint256"},{"internalType":"address","name":"buyTokenAddress","type":"address"},{"internalType":"uint256","name":"buyAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct SwapParams","name":"swapParams","type":"tuple"}],"name":"swap","outputs":[{"internalType":"uint256","name":"buyTokenAmountReceived","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051610d0a380380610d0a83398101604081905261002f91610067565b6001600160a01b038116610056576040516381c609f760e01b815260040160405180910390fd5b6001600160a01b0316608052610097565b60006020828403121561007957600080fd5b81516001600160a01b038116811461009057600080fd5b9392505050565b608051610c4b6100bf600039600081816066015281816101f801526102920152610c4b6000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633efe5daa1461003b578063eb365adc14610061575b600080fd5b61004e610049366004610a4a565b6100a0565b6040519081526020015b60405180910390f35b6100887f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610058565b60408101516000906001600160a01b03166100ce576040516381c609f760e01b815260040160405180910390fd5b81516001600160a01b03166100f6576040516381c609f760e01b815260040160405180910390fd5b816020015160000361011b5760405163c5dd842560e01b815260040160405180910390fd5b8160600151600003610140576040516363988c1360e01b815260040160405180910390fd5b815160408084015190516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561018e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b29190610b1e565b905084602001518110156101f257602085015160405163cf47918160e01b81526101e9918391600401918252602082015260400190565b60405180910390fd5b610221837f00000000000000000000000000000000000000000000000000000000000000008760200151610459565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028c9190610b1e565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031687608001516040516102cc9190610b5b565b6000604051808303816000865af19150503d8060008114610309576040519150601f19603f3d011682016040523d82523d6000602084013e61030e565b606091505b50509050806103305760405163081ceff360e41b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610377573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039b9190610b1e565b90506103a78382610b8d565b965087606001518710156103de576060880151604051634e8984c160e11b81526101e9918991600401918252602082015260400190565b87604001516001600160a01b031688600001516001600160a01b03167fa54201e99d8e1488291e015a3af88c7a169bcf4932617ecd9536e1f1ad4351108a602001518b606001518b604051610446939291909283526020830191909152604082015260600190565b60405180910390a3505050505050919050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156104a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cd9190610b1e565b905080156104e9576104e96001600160a01b0385168483610503565b6104fd6001600160a01b0385168484610649565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190610b1e565b9050818110156105db5760405162461bcd60e51b815260206004820152602960248201527f5361666545524332303a2064656372656173656420616c6c6f77616e63652062604482015268656c6f77207a65726f60b81b60648201526084016101e9565b6040516001600160a01b0384166024820152828203604482018190529061064290869063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526106fb565b5050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561069a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106be9190610b1e565b6106c89190610ba6565b6040516001600160a01b0385166024820152604481018290529091506104fd90859063095ea7b360e01b9060640161060b565b6000610750826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107d29092919063ffffffff16565b8051909150156107cd578080602001905181019061076e9190610bb9565b6107cd5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101e9565b505050565b60606107e184846000856107e9565b949350505050565b60608247101561084a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101e9565b600080866001600160a01b031685876040516108669190610b5b565b60006040518083038185875af1925050503d80600081146108a3576040519150601f19603f3d011682016040523d82523d6000602084013e6108a8565b606091505b50915091506108b9878383876108c4565b979650505050505050565b6060831561093357825160000361092c576001600160a01b0385163b61092c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101e9565b50816107e1565b6107e183838151156109485781518083602001fd5b8060405162461bcd60e51b81526004016101e99190610be2565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561099b5761099b610962565b60405290565b80356001600160a01b03811681146109b857600080fd5b919050565b600082601f8301126109ce57600080fd5b813567ffffffffffffffff808211156109e9576109e9610962565b604051601f8301601f19908116603f01168101908282118183101715610a1157610a11610962565b81604052838152866020858801011115610a2a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610a5c57600080fd5b813567ffffffffffffffff80821115610a7457600080fd5b9083019060e08286031215610a8857600080fd5b610a90610978565b610a99836109a1565b815260208301356020820152610ab1604084016109a1565b604082015260608301356060820152608083013582811115610ad257600080fd5b610ade878286016109bd565b60808301525060a083013582811115610af657600080fd5b610b02878286016109bd565b60a08301525060c083013560c082015280935050505092915050565b600060208284031215610b3057600080fd5b5051919050565b60005b83811015610b52578181015183820152602001610b3a565b50506000910152565b60008251610b6d818460208701610b37565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ba057610ba0610b77565b92915050565b80820180821115610ba057610ba0610b77565b600060208284031215610bcb57600080fd5b81518015158114610bdb57600080fd5b9392505050565b6020815260008251806020840152610c01816040850160208701610b37565b601f01601f1916919091016040019291505056fea26469706673582212207afb7de35861ddf594ca5d022b9c064e55a476b0eac4afcbd44ce2d4fce2f17d64736f6c634300081100330000000000000000000000000000000000001ff3684f28c67538d4d072c22734
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80633efe5daa1461003b578063eb365adc14610061575b600080fd5b61004e610049366004610a4a565b6100a0565b6040519081526020015b60405180910390f35b6100887f0000000000000000000000000000000000001ff3684f28c67538d4d072c2273481565b6040516001600160a01b039091168152602001610058565b60408101516000906001600160a01b03166100ce576040516381c609f760e01b815260040160405180910390fd5b81516001600160a01b03166100f6576040516381c609f760e01b815260040160405180910390fd5b816020015160000361011b5760405163c5dd842560e01b815260040160405180910390fd5b8160600151600003610140576040516363988c1360e01b815260040160405180910390fd5b815160408084015190516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561018e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b29190610b1e565b905084602001518110156101f257602085015160405163cf47918160e01b81526101e9918391600401918252602082015260400190565b60405180910390fd5b610221837f0000000000000000000000000000000000001ff3684f28c67538d4d072c227348760200151610459565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028c9190610b1e565b905060007f0000000000000000000000000000000000001ff3684f28c67538d4d072c227346001600160a01b031687608001516040516102cc9190610b5b565b6000604051808303816000865af19150503d8060008114610309576040519150601f19603f3d011682016040523d82523d6000602084013e61030e565b606091505b50509050806103305760405163081ceff360e41b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015610377573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039b9190610b1e565b90506103a78382610b8d565b965087606001518710156103de576060880151604051634e8984c160e11b81526101e9918991600401918252602082015260400190565b87604001516001600160a01b031688600001516001600160a01b03167fa54201e99d8e1488291e015a3af88c7a169bcf4932617ecd9536e1f1ad4351108a602001518b606001518b604051610446939291909283526020830191909152604082015260600190565b60405180910390a3505050505050919050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156104a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cd9190610b1e565b905080156104e9576104e96001600160a01b0385168483610503565b6104fd6001600160a01b0385168484610649565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190610b1e565b9050818110156105db5760405162461bcd60e51b815260206004820152602960248201527f5361666545524332303a2064656372656173656420616c6c6f77616e63652062604482015268656c6f77207a65726f60b81b60648201526084016101e9565b6040516001600160a01b0384166024820152828203604482018190529061064290869063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526106fb565b5050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561069a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106be9190610b1e565b6106c89190610ba6565b6040516001600160a01b0385166024820152604481018290529091506104fd90859063095ea7b360e01b9060640161060b565b6000610750826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107d29092919063ffffffff16565b8051909150156107cd578080602001905181019061076e9190610bb9565b6107cd5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101e9565b505050565b60606107e184846000856107e9565b949350505050565b60608247101561084a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101e9565b600080866001600160a01b031685876040516108669190610b5b565b60006040518083038185875af1925050503d80600081146108a3576040519150601f19603f3d011682016040523d82523d6000602084013e6108a8565b606091505b50915091506108b9878383876108c4565b979650505050505050565b6060831561093357825160000361092c576001600160a01b0385163b61092c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101e9565b50816107e1565b6107e183838151156109485781518083602001fd5b8060405162461bcd60e51b81526004016101e99190610be2565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561099b5761099b610962565b60405290565b80356001600160a01b03811681146109b857600080fd5b919050565b600082601f8301126109ce57600080fd5b813567ffffffffffffffff808211156109e9576109e9610962565b604051601f8301601f19908116603f01168101908282118183101715610a1157610a11610962565b81604052838152866020858801011115610a2a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215610a5c57600080fd5b813567ffffffffffffffff80821115610a7457600080fd5b9083019060e08286031215610a8857600080fd5b610a90610978565b610a99836109a1565b815260208301356020820152610ab1604084016109a1565b604082015260608301356060820152608083013582811115610ad257600080fd5b610ade878286016109bd565b60808301525060a083013582811115610af657600080fd5b610b02878286016109bd565b60a08301525060c083013560c082015280935050505092915050565b600060208284031215610b3057600080fd5b5051919050565b60005b83811015610b52578181015183820152602001610b3a565b50506000910152565b60008251610b6d818460208701610b37565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ba057610ba0610b77565b92915050565b80820180821115610ba057610ba0610b77565b600060208284031215610bcb57600080fd5b81518015158114610bdb57600080fd5b9392505050565b6020815260008251806020840152610c01816040850160208701610b37565b601f01601f1916919091016040019291505056fea26469706673582212207afb7de35861ddf594ca5d022b9c064e55a476b0eac4afcbd44ce2d4fce2f17d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000001ff3684f28c67538d4d072c22734
-----Decoded View---------------
Arg [0] : aggregator (address): 0x0000000000001fF3684f28c67538d4D072C22734
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000001ff3684f28c67538d4d072c22734
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.