Source Code
Latest 16 from a total of 16 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Spender Whit... | 23429546 | 187 days ago | IN | 0 ETH | 0.00000683 | ||||
| Set Spender Whit... | 23429545 | 187 days ago | IN | 0 ETH | 0.00001329 | ||||
| Execute Flash Ar... | 23390263 | 193 days ago | IN | 0 ETH | 0.00134579 | ||||
| Execute Flash Ar... | 23387540 | 193 days ago | IN | 0 ETH | 0.0000982 | ||||
| Execute Flash Ar... | 23384494 | 193 days ago | IN | 0 ETH | 0.00079069 | ||||
| Execute Flash Ar... | 23384487 | 193 days ago | IN | 0 ETH | 0.00079525 | ||||
| Execute Flash Ar... | 23383406 | 193 days ago | IN | 0 ETH | 0.00028484 | ||||
| Execute Flash Ar... | 23383307 | 194 days ago | IN | 0 ETH | 0.00027914 | ||||
| Execute Flash Ar... | 23382731 | 194 days ago | IN | 0 ETH | 0.00016765 | ||||
| Execute Flash Ar... | 23382422 | 194 days ago | IN | 0 ETH | 0.00011736 | ||||
| Execute Flash Ar... | 23381938 | 194 days ago | IN | 0 ETH | 0.00016376 | ||||
| Execute Flash Ar... | 23381721 | 194 days ago | IN | 0 ETH | 0.00015647 | ||||
| Execute Flash Ar... | 23381356 | 194 days ago | IN | 0 ETH | 0.00014624 | ||||
| Execute Flash Ar... | 23379819 | 194 days ago | IN | 0 ETH | 0.00005313 | ||||
| Set Spender Whit... | 23379361 | 194 days ago | IN | 0 ETH | 0.00001347 | ||||
| Set Spender Whit... | 23379360 | 194 days ago | IN | 0 ETH | 0.00002996 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ArbSeekerFlashLoan
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
/// @notice Minimal Aave V3 pool interface (flashLoanSimple + flashLoan)
interface IPool {
function flashLoanSimple(
address receiverAddress,
address asset,
uint256 amount,
bytes calldata params,
uint16 referralCode
) external;
function flashLoan(
address receiverAddress,
address[] calldata assets,
uint256[] calldata amounts,
uint256[] calldata interestRateModes,
address onBehalfOf,
bytes calldata params,
uint16 referralCode
) external;
}
/// @notice Minimal Aave V3 addresses provider interface (to fetch pool address)
interface IPoolAddressesProvider {
function getPool() external view returns (address);
}
/// @notice Minimal IFlashLoanSimpleReceiver interface
interface IFlashLoanSimpleReceiver {
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
function POOL() external view returns (IPool);
function executeOperation(
address asset,
uint256 amount,
uint256 premium,
address initiator,
bytes calldata params
) external returns (bool);
}
/// @notice Minimal multi-asset Aave V3 receiver interface
interface IFlashLoanReceiver {
function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider);
function POOL() external view returns (IPool);
function executeOperation(
address[] calldata assets,
uint256[] calldata amounts,
uint256[] calldata premiums,
address initiator,
bytes calldata params
) external returns (bool);
}
/// @title ArbSeekerFlashLoan
/// @notice Owner-only Aave V3 flash loan executor with arbitrary multicall for arbitrage
/// and safe withdrawal helpers. Designed to be called by an off-chain arb seeker.
contract ArbSeekerFlashLoan is Ownable, ReentrancyGuard, IFlashLoanSimpleReceiver, IFlashLoanReceiver {
using SafeERC20 for IERC20;
/// @notice Target call to execute during the flash loan
struct Call {
address target;
uint256 value;
bytes data;
}
/// @notice Ephemeral token approvals to apply around the trade sequence
struct Approval {
address token;
address spender;
uint256 amount;
bool revokeAfter;
}
/// @notice Plan for a flash execution
struct Plan {
Approval[] approvals;
Call[] calls;
}
/// @notice Aave V3 Addresses Provider (network-specific)
IPoolAddressesProvider private immutable _addressesProvider;
/// @notice Active Aave V3 Pool fetched from the provider
IPool private _pool;
/// @notice Whitelist of allowed spenders for token approvals
mapping(address => bool) public isWhitelistedSpender;
event FlashArbStarted(address indexed asset, uint256 amount);
event FlashArbExecuted(address indexed asset, uint256 amount, uint256 premium, uint256 balanceAfter);
event FlashArbMultiStarted(address[] assets, uint256[] amounts);
event FlashArbMultiExecuted(address[] assets, uint256[] amounts, uint256[] premiums);
event CallExecuted(uint256 indexed index, address indexed target, uint256 value);
event SpenderWhitelistUpdated(address indexed spender, bool allowed);
event ApprovalApplied(address indexed token, address indexed spender, uint256 amount, bool revokeAfter);
error NotAavePool();
error InvalidInitiator();
error InsufficientBalanceForRepayment();
error CallFailed(uint256 index, address target, bytes reason);
error SpenderNotWhitelisted(address spender);
event CallFailedEvent(uint256 indexed index, address indexed target, bytes reason);
/// @param addressesProvider Aave V3 addresses provider for the target chain (e.g., Ethereum mainnet)
constructor(address addressesProvider) {
_addressesProvider = IPoolAddressesProvider(addressesProvider);
_pool = IPool(_addressesProvider.getPool());
}
/// @notice Refreshes the cached POOL address from the provider (in case of upgrades)
function refreshPool() external onlyOwner {
_pool = IPool(_addressesProvider.getPool());
}
/// @notice Initiate a single-asset flash loan with approvals and calls
function executeFlashArbWithApprovals(
address asset,
uint256 amount,
Approval[] calldata approvals,
Call[] calldata calls
) external onlyOwner {
Plan memory plan;
plan.approvals = approvals;
plan.calls = calls;
bytes memory params = abi.encode(plan);
emit FlashArbStarted(asset, amount);
_pool.flashLoanSimple(address(this), asset, amount, params, 0);
}
/// @notice Backward-compatible entrypoint without approvals (encodes empty approvals)
function executeFlashArb(
address asset,
uint256 amount,
Call[] calldata calls
) external onlyOwner {
Approval[] memory approvals;
bytes memory params = abi.encode(Plan({approvals: approvals, calls: calls}));
emit FlashArbStarted(asset, amount);
_pool.flashLoanSimple(address(this), asset, amount, params, 0);
}
/// @notice Initiate a multi-asset flash loan and execute a sequence of calls atomically
function executeFlashArbMulti(
address[] calldata assets,
uint256[] calldata amounts,
Approval[] calldata approvals,
Call[] calldata calls
) external onlyOwner {
require(assets.length == amounts.length && assets.length > 0, "len mismatch");
uint256[] memory irModes = new uint256[](assets.length);
// all zeros => flash mode
Plan memory plan;
plan.approvals = approvals;
plan.calls = calls;
bytes memory params = abi.encode(plan);
emit FlashArbMultiStarted(assets, amounts);
_pool.flashLoan(address(this), assets, amounts, irModes, address(this), params, 0);
}
/// @inheritdoc IFlashLoanSimpleReceiver
function ADDRESSES_PROVIDER()
external
view
override(IFlashLoanSimpleReceiver, IFlashLoanReceiver)
returns (IPoolAddressesProvider)
{
return _addressesProvider;
}
/// @inheritdoc IFlashLoanSimpleReceiver
function POOL()
external
view
override(IFlashLoanSimpleReceiver, IFlashLoanReceiver)
returns (IPool)
{
return _pool;
}
/// @notice Aave flash loan callback (single asset). Executes approvals + calls and approves repayment.
/// @dev Do NOT mark as nonReentrant; it is invoked during another external call.
function executeOperation(
address asset,
uint256 amount,
uint256 premium,
address initiator,
bytes calldata params
) external returns (bool) {
if (msg.sender != address(_pool)) revert NotAavePool();
if (initiator != address(this)) revert InvalidInitiator();
// Decode plan, apply approvals, run calls, and then revoke if requested
Plan memory plan = abi.decode(params, (Plan));
_applyApprovals(plan.approvals);
_executeCalls(plan.calls);
_maybeRevokeApprovals(plan.approvals);
uint256 repayAmount = amount + premium;
// Ensure we have enough to repay
if (IERC20(asset).balanceOf(address(this)) < repayAmount) {
revert InsufficientBalanceForRepayment();
}
// Approve pool to pull the owed amount
_safeResetApprove(asset, address(_pool), repayAmount);
emit FlashArbExecuted(asset, amount, premium, IERC20(asset).balanceOf(address(this)));
return true;
}
/// @notice Aave flash loan callback (multi-asset). Executes approvals + calls and approves repayments.
function executeOperation(
address[] calldata assets,
uint256[] calldata amounts,
uint256[] calldata premiums,
address initiator,
bytes calldata params
) external returns (bool) {
if (msg.sender != address(_pool)) revert NotAavePool();
if (initiator != address(this)) revert InvalidInitiator();
Plan memory plan = abi.decode(params, (Plan));
_applyApprovals(plan.approvals);
_executeCalls(plan.calls);
_maybeRevokeApprovals(plan.approvals);
for (uint256 i = 0; i < assets.length; i++) {
uint256 repayAmount = amounts[i] + premiums[i];
if (IERC20(assets[i]).balanceOf(address(this)) < repayAmount) revert InsufficientBalanceForRepayment();
_safeResetApprove(assets[i], address(_pool), repayAmount);
}
emit FlashArbMultiExecuted(assets, amounts, premiums);
return true;
}
/// @notice Owner-only: withdraw native ETH held by this contract
function withdrawETH(uint256 amount, address payable to) external onlyOwner nonReentrant {
require(to != address(0), "to=0");
(bool ok, ) = to.call{value: amount}("");
require(ok, "ETH transfer failed");
}
/// @notice Owner-only: withdraw any ERC20 token held by this contract
function withdrawToken(address token, uint256 amount, address to) external onlyOwner nonReentrant {
require(to != address(0), "to=0");
IERC20(token).safeTransfer(to, amount);
}
/// @dev Execute an arbitrary list of calls in order
function _executeCalls(Call[] memory calls) internal {
for (uint256 i = 0; i < calls.length; i++) {
(bool ok, bytes memory reason) = calls[i].target.call{value: calls[i].value}(calls[i].data);
if (!ok) {
emit CallFailedEvent(i, calls[i].target, reason);
revert CallFailed(i, calls[i].target, reason);
}
emit CallExecuted(i, calls[i].target, calls[i].value);
}
}
/// @dev Apply ephemeral approvals with whitelist enforcement
function _applyApprovals(Approval[] memory approvals) internal {
for (uint256 i = 0; i < approvals.length; i++) {
Approval memory a = approvals[i];
if (!isWhitelistedSpender[a.spender]) revert SpenderNotWhitelisted(a.spender);
_safeResetApprove(a.token, a.spender, a.amount);
emit ApprovalApplied(a.token, a.spender, a.amount, a.revokeAfter);
}
}
/// @dev Revoke approvals set with revokeAfter flag
function _maybeRevokeApprovals(Approval[] memory approvals) internal {
for (uint256 i = 0; i < approvals.length; i++) {
if (approvals[i].revokeAfter) {
IERC20(approvals[i].token).safeApprove(approvals[i].spender, 0);
}
}
}
/// @dev Safe approve sequence with USDT support while avoiding redundant zeroing
function _safeResetApprove(address token, address spender, uint256 amount) internal {
IERC20 t = IERC20(token);
// Try direct approve first (covers standard ERC20s without extra calls)
if (!_tryApprove(t, spender, amount)) {
// Fallback handles USDT-style tokens that require allowance reset
t.forceApprove(spender, amount);
}
}
function _tryApprove(IERC20 token, address spender, uint256 amount) private returns (bool) {
(bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(IERC20.approve.selector, spender, amount));
if (!success) {
return false;
}
if (data.length > 0) {
return abi.decode(data, (bool));
}
return true;
}
/// @notice Owner-only: set or unset a spender in the whitelist
function setSpenderWhitelist(address spender, bool allowed) external onlyOwner {
isWhitelistedSpender[spender] = allowed;
emit SpenderWhitelistUpdated(spender, allowed);
}
/// @notice Owner-only: batch set/unset spenders in the whitelist
function setSpenderWhitelistBatch(address[] calldata spenders, bool allowed) external onlyOwner {
for (uint256 i = 0; i < spenders.length; i++) {
isWhitelistedSpender[spenders[i]] = allowed;
emit SpenderWhitelistUpdated(spenders[i], allowed);
}
}
receive() external payable {}
fallback() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
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].
*
* CAUTION: See Security Considerations above.
*/
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.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
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) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": false,
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"addressesProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"CallFailed","type":"error"},{"inputs":[],"name":"InsufficientBalanceForRepayment","type":"error"},{"inputs":[],"name":"InvalidInitiator","type":"error"},{"inputs":[],"name":"NotAavePool","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"SpenderNotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"revokeAfter","type":"bool"}],"name":"ApprovalApplied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"CallExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"CallFailedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"premium","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balanceAfter","type":"uint256"}],"name":"FlashArbExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"assets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"premiums","type":"uint256[]"}],"name":"FlashArbMultiExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"assets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"FlashArbMultiStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FlashArbStarted","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":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"SpenderWhitelistUpdated","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ADDRESSES_PROVIDER","outputs":[{"internalType":"contract IPoolAddressesProvider","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL","outputs":[{"internalType":"contract IPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ArbSeekerFlashLoan.Call[]","name":"calls","type":"tuple[]"}],"name":"executeFlashArb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"revokeAfter","type":"bool"}],"internalType":"struct ArbSeekerFlashLoan.Approval[]","name":"approvals","type":"tuple[]"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ArbSeekerFlashLoan.Call[]","name":"calls","type":"tuple[]"}],"name":"executeFlashArbMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"revokeAfter","type":"bool"}],"internalType":"struct ArbSeekerFlashLoan.Approval[]","name":"approvals","type":"tuple[]"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ArbSeekerFlashLoan.Call[]","name":"calls","type":"tuple[]"}],"name":"executeFlashArbWithApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"executeOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"premiums","type":"uint256[]"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"executeOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelistedSpender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refreshPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setSpenderWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"spenders","type":"address[]"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setSpenderWhitelistBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"to","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a06040523480156200001157600080fd5b50604051620028d8380380620028d883398101604081905262000034916200012b565b6200003f33620000db565b600180556001600160a01b03811660808190526040805163026b1d5f60e01b8152905163026b1d5f916004808201926020929091908290030181865afa1580156200008e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b491906200012b565b600280546001600160a01b0319166001600160a01b0392909216919091179055506200015d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156200013e57600080fd5b81516001600160a01b03811681146200015657600080fd5b9392505050565b6080516127586200018060003960008181610103015261033001526127586000f3fe6080604052600436106100eb5760003560e01c806351330c12116100845780638da5cb5b116100565780638da5cb5b146102a8578063920f5c84146102c6578063d6914f1e146102e6578063f2fde38b1461030657005b806351330c12146102355780635609921914610255578063715018a6146102755780637535d2461461028a57005b80633bd3cc97116100bd5780633bd3cc97146101a55780633ccdbb28146101c557806344fd00fc146101e557806346bef6fc1461021557005b80630542975c146100f45780631967e945146101405780631b11d0ff1461015557806336118b521461018557005b366100f257005b005b34801561010057600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014c57600080fd5b506100f2610326565b34801561016157600080fd5b50610175610170366004611ac3565b6103d2565b6040519015158152602001610137565b34801561019157600080fd5b506100f26101a0366004611b3e565b6105cb565b3480156101b157600080fd5b506100f26101c0366004611bc0565b6106ca565b3480156101d157600080fd5b506100f26101e0366004611c16565b6107b4565b3480156101f157600080fd5b50610175610200366004611c4d565b60036020526000908152604090205460ff1681565b34801561022157600080fd5b506100f2610230366004611cae565b610825565b34801561024157600080fd5b506100f2610250366004611d71565b610a23565b34801561026157600080fd5b506100f2610270366004611dea565b610b84565b34801561028157600080fd5b506100f2610c87565b34801561029657600080fd5b506002546001600160a01b0316610123565b3480156102b457600080fd5b506000546001600160a01b0316610123565b3480156102d257600080fd5b506101756102e1366004611e45565b610c9b565b3480156102f257600080fd5b506100f2610301366004611f1f565b610ec5565b34801561031257600080fd5b506100f2610321366004611c4d565b610f2c565b61032e610fa5565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190611f4d565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546000906001600160a01b031633146104005760405163b27a27bf60e01b815260040160405180910390fd5b6001600160a01b0384163014610429576040516317fb43e560e31b815260040160405180910390fd5b6000610437838501856121d9565b90506104468160000151610fff565b610453816020015161110e565b805161045e90611307565b600061046a87896122de565b6040516370a0823160e01b815230600482015290915081906001600160a01b038b16906370a0823190602401602060405180830381865afa1580156104b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d791906122f1565b10156104f657604051631da1f36960e21b815260040160405180910390fd5b60025461050e908a906001600160a01b0316836113a1565b6040516370a0823160e01b81523060048201526001600160a01b038a16907f3fcb4c6d6b7a5dbf2535b8c18862408d8d52b68d0be3082de09c60888dd691c4908a908a9084906370a0823190602401602060405180830381865afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e91906122f1565b6040805193845260208401929092529082015260600160405180910390a250600198975050505050505050565b6105d3610fa5565b6105db6113c5565b6001600160a01b0381166106235760405162461bcd60e51b815260040161061a906020808252600490820152630746f3d360e41b604082015260600190565b60405180910390fd5b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610670576040519150601f19603f3d011682016040523d82523d6000602084013e610675565b606091505b50509050806106bc5760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015260640161061a565b506106c660018055565b5050565b6106d2610fa5565b60005b828110156107ae5781600360008686858181106106f4576106f461230a565b90506020020160208101906107099190611c4d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106107435761074361230a565b90506020020160208101906107589190611c4d565b6001600160a01b03167f40f2571e25e1108f878fbd3d103ba5a81b7d42f5d2537f907ffc39e43b68cffe83604051610794911515815260200190565b60405180910390a2806107a681612320565b9150506106d5565b50505050565b6107bc610fa5565b6107c46113c5565b6001600160a01b0381166108035760405162461bcd60e51b815260040161061a906020808252600490820152630746f3d360e41b604082015260600190565b6108176001600160a01b038416828461141e565b61082060018055565b505050565b61082d610fa5565b868514801561083b57508615155b6108765760405162461bcd60e51b815260206004820152600c60248201526b0d8cadc40dad2e6dac2e8c6d60a31b604482015260640161061a565b6000876001600160401b0381111561089057610890611f6a565b6040519080825280602002602001820160405280156108b9578160200160208202803683370190505b5090506108d9604051806040016040528060608152602001606081525090565b8585808060200260200160405190810160405280939291908181526020016000905b828210156109275761091860808302860136819003810190612339565b815260200190600101906108fb565b5050509183525061093a90508385612355565b81602001819052506000816040516020016109559190612430565b60405160208183030381529060405290507f80dffc7ba76ffaaeb216dcc6d621cc1ae23618b44ad14d2f7667717618a2f0278b8b8b8b60405161099b9493929190612543565b60405180910390a160025460405163ab9c4b5d60e01b81526001600160a01b039091169063ab9c4b5d906109e49030908f908f908f908f908b9086908b9060009060040161256a565b600060405180830381600087803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b505050505050505050505050505050565b610a2b610fa5565b60408051808201909152606080825260208201528484808060200260200160405190810160405280939291908181526020016000905b82821015610a8d57610a7e60808302860136819003810190612339565b81526020019060010190610a61565b50505091835250610aa090508284612355565b8160200181905250600081604051602001610abb9190612430565b6040516020818303038152906040529050876001600160a01b03167f9fe2016da503781dae3a14147b2494d4ff06d509fdb3ff12fc949b0be206ffab88604051610b0791815260200190565b60405180910390a26002546040516310ac2ddf60e21b81526001600160a01b03909116906342b0b77c90610b489030908c908c90879060009060040161261e565b600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b505050505050505050505050565b610b8c610fa5565b606060006040518060400160405280838152602001858590610bae9190612355565b9052604051610bc09190602001612430565b6040516020818303038152906040529050856001600160a01b03167f9fe2016da503781dae3a14147b2494d4ff06d509fdb3ff12fc949b0be206ffab86604051610c0c91815260200190565b60405180910390a26002546040516310ac2ddf60e21b81526001600160a01b03909116906342b0b77c90610c4d9030908a908a90879060009060040161261e565b600060405180830381600087803b158015610c6757600080fd5b505af1158015610c7b573d6000803e3d6000fd5b50505050505050505050565b610c8f610fa5565b610c996000611481565b565b6002546000906001600160a01b03163314610cc95760405163b27a27bf60e01b815260040160405180910390fd5b6001600160a01b0384163014610cf2576040516317fb43e560e31b815260040160405180910390fd5b6000610d00838501856121d9565b9050610d0f8160000151610fff565b610d1c816020015161110e565b8051610d2790611307565b60005b8a811015610e72576000888883818110610d4657610d4661230a565b905060200201358b8b84818110610d5f57610d5f61230a565b90506020020135610d7091906122de565b9050808d8d84818110610d8557610d8561230a565b9050602002016020810190610d9a9190611c4d565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0491906122f1565b1015610e2357604051631da1f36960e21b815260040160405180910390fd5b610e5f8d8d84818110610e3857610e3861230a565b9050602002016020810190610e4d9190611c4d565b6002546001600160a01b0316836113a1565b5080610e6a81612320565b915050610d2a565b507fd59563e3054f0385f4b66a08f3e5cfc3eb9e8f1c9d10073afac0789c6dd1aa618b8b8b8b8b8b604051610eac96959493929190612667565b60405180910390a15060019a9950505050505050505050565b610ecd610fa5565b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915591519182527f40f2571e25e1108f878fbd3d103ba5a81b7d42f5d2537f907ffc39e43b68cffe910160405180910390a25050565b610f34610fa5565b6001600160a01b038116610f995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061a565b610fa281611481565b50565b6000546001600160a01b03163314610c995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061a565b60005b81518110156106c657600082828151811061101f5761101f61230a565b602090810291909101810151808201516001600160a01b03166000908152600390925260409091205490915060ff1661107c57602081015160405163f1883d2160e01b81526001600160a01b03909116600482015260240161061a565b6110938160000151826020015183604001516113a1565b80602001516001600160a01b031681600001516001600160a01b03167f166ca0ff5621262dbd9061cca8d06f252046c5b50763b431da1c3de8444372c1836040015184606001516040516110f39291909182521515602082015260400190565b60405180910390a3508061110681612320565b915050611002565b60005b81518110156106c65760008083838151811061112f5761112f61230a565b6020026020010151600001516001600160a01b03168484815181106111565761115661230a565b6020026020010151602001518585815181106111745761117461230a565b60200260200101516040015160405161118d91906126a3565b60006040518083038185875af1925050503d80600081146111ca576040519150601f19603f3d011682016040523d82523d6000602084013e6111cf565b606091505b509150915081611274578383815181106111eb576111eb61230a565b6020026020010151600001516001600160a01b0316837f23604e4de032d53c7fcf3d136324b5e753e3e4f1b7ee647c1af35a959235d2da8360405161123091906126bf565b60405180910390a38284848151811061124b5761124b61230a565b6020026020010151600001518260405163405c0fff60e01b815260040161061a939291906126d2565b8383815181106112865761128661230a565b6020026020010151600001516001600160a01b0316837fa24144c38ea555f0b8ddcc7da88241ff42d87743273a8958eabc009217b512178686815181106112cf576112cf61230a565b6020026020010151602001516040516112ea91815260200190565b60405180910390a3505080806112ff90612320565b915050611111565b60005b81518110156106c6578181815181106113255761132561230a565b6020026020010151606001511561138f5761138f82828151811061134b5761134b61230a565b602002602001015160200151600084848151811061136b5761136b61230a565b6020026020010151600001516001600160a01b03166114d19092919063ffffffff16565b8061139981612320565b91505061130a565b826113ad8184846115e6565b6107ae576107ae6001600160a01b03821684846116cd565b6002600154036114175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161061a565b6002600155565b6040516001600160a01b03831660248201526044810182905261082090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611758565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80158061154b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611525573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154991906122f1565b155b6115b65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161061a565b6040516001600160a01b03831660248201526044810182905261082090849063095ea7b360e01b9060640161144a565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839283929188169161164491906126a3565b6000604051808303816000865af19150503d8060008114611681576040519150601f19603f3d011682016040523d82523d6000602084013e611686565b606091505b50915091508161169b576000925050506116c6565b8051156116bf57808060200190518101906116b69190612705565b925050506116c6565b6001925050505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261171e848261182d565b6107ae576040516001600160a01b03841660248201526000604482015261175290859063095ea7b360e01b9060640161144a565b6107ae84825b60006117ad826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118d69092919063ffffffff16565b90508051600014806117ce5750808060200190518101906117ce9190612705565b6108205760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061a565b6000806000846001600160a01b03168460405161184a91906126a3565b6000604051808303816000865af19150503d8060008114611887576040519150601f19603f3d011682016040523d82523d6000602084013e61188c565b606091505b50915091508180156118b65750805115806118b65750808060200190518101906118b69190612705565b80156118cb57506001600160a01b0385163b15155b925050505b92915050565b60606118e584846000856118ed565b949350505050565b60608247101561194e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061a565b600080866001600160a01b0316858760405161196a91906126a3565b60006040518083038185875af1925050503d80600081146119a7576040519150601f19603f3d011682016040523d82523d6000602084013e6119ac565b606091505b50915091506119bd878383876119c8565b979650505050505050565b60608315611a37578251600003611a30576001600160a01b0385163b611a305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061a565b50816118e5565b6118e58383815115611a4c5781518083602001fd5b8060405162461bcd60e51b815260040161061a91906126bf565b6001600160a01b0381168114610fa257600080fd5b60008083601f840112611a8d57600080fd5b5081356001600160401b03811115611aa457600080fd5b602083019150836020828501011115611abc57600080fd5b9250929050565b60008060008060008060a08789031215611adc57600080fd5b8635611ae781611a66565b955060208701359450604087013593506060870135611b0581611a66565b925060808701356001600160401b03811115611b2057600080fd5b611b2c89828a01611a7b565b979a9699509497509295939492505050565b60008060408385031215611b5157600080fd5b823591506020830135611b6381611a66565b809150509250929050565b60008083601f840112611b8057600080fd5b5081356001600160401b03811115611b9757600080fd5b6020830191508360208260051b8501011115611abc57600080fd5b8015158114610fa257600080fd5b600080600060408486031215611bd557600080fd5b83356001600160401b03811115611beb57600080fd5b611bf786828701611b6e565b9094509250506020840135611c0b81611bb2565b809150509250925092565b600080600060608486031215611c2b57600080fd5b8335611c3681611a66565b9250602084013591506040840135611c0b81611a66565b600060208284031215611c5f57600080fd5b81356116c681611a66565b60008083601f840112611c7c57600080fd5b5081356001600160401b03811115611c9357600080fd5b6020830191508360208260071b8501011115611abc57600080fd5b6000806000806000806000806080898b031215611cca57600080fd5b88356001600160401b0380821115611ce157600080fd5b611ced8c838d01611b6e565b909a50985060208b0135915080821115611d0657600080fd5b611d128c838d01611b6e565b909850965060408b0135915080821115611d2b57600080fd5b611d378c838d01611c6a565b909650945060608b0135915080821115611d5057600080fd5b50611d5d8b828c01611b6e565b999c989b5096995094979396929594505050565b60008060008060008060808789031215611d8a57600080fd5b8635611d9581611a66565b95506020870135945060408701356001600160401b0380821115611db857600080fd5b611dc48a838b01611c6a565b90965094506060890135915080821115611ddd57600080fd5b50611b2c89828a01611b6e565b60008060008060608587031215611e0057600080fd5b8435611e0b81611a66565b93506020850135925060408501356001600160401b03811115611e2d57600080fd5b611e3987828801611b6e565b95989497509550505050565b600080600080600080600080600060a08a8c031215611e6357600080fd5b89356001600160401b0380821115611e7a57600080fd5b611e868d838e01611b6e565b909b50995060208c0135915080821115611e9f57600080fd5b611eab8d838e01611b6e565b909950975060408c0135915080821115611ec457600080fd5b611ed08d838e01611b6e565b909750955060608c01359150611ee582611a66565b90935060808b01359080821115611efb57600080fd5b50611f088c828d01611a7b565b915080935050809150509295985092959850929598565b60008060408385031215611f3257600080fd5b8235611f3d81611a66565b91506020830135611b6381611bb2565b600060208284031215611f5f57600080fd5b81516116c681611a66565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715611fa257611fa2611f6a565b60405290565b604080519081016001600160401b0381118282101715611fa257611fa2611f6a565b604051601f8201601f191681016001600160401b0381118282101715611ff257611ff2611f6a565b604052919050565b60006001600160401b0382111561201357612013611f6a565b5060051b60200190565b60006080828403121561202f57600080fd5b604051608081018181106001600160401b038211171561205157612051611f6a565b604052905080823561206281611a66565b8152602083013561207281611a66565b602082015260408381013590820152606083013561208f81611bb2565b6060919091015292915050565b60006120af6120aa84611ffa565b611fca565b8381529050602080820190600585901b8401868111156120ce57600080fd5b845b818110156121ae5780356001600160401b03808211156120f05760008081fd5b908701906060828b0312156121055760008081fd5b61210d611f80565b823561211881611a66565b81528286013586820152604080840135838111156121365760008081fd5b808501945050601f8c8186011261214d5760008081fd5b84358481111561215f5761215f611f6a565b612170818301601f19168a01611fca565b94508085528d8982880101111561218957600091508182fd5b808987018a8701376000908501890152508101919091528552509282019282016120d0565b505050509392505050565b600082601f8301126121ca57600080fd5b6116c68383356020850161209c565b600060208083850312156121ec57600080fd5b82356001600160401b038082111561220357600080fd5b908401906040828703121561221757600080fd5b61221f611fa8565b82358281111561222e57600080fd5b8301601f8101881361223f57600080fd5b803561224d6120aa82611ffa565b81815260079190911b8201860190868101908a83111561226c57600080fd5b928701925b82841015612295576122838b8561201d565b82528782019150608084019350612271565b845250505082840135828111156122ab57600080fd5b6122b7888286016121b9565b948201949094529695505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156118d0576118d06122c8565b60006020828403121561230357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201612332576123326122c8565b5060010190565b60006080828403121561234b57600080fd5b6116c6838361201d565b60006116c636848461209c565b60005b8381101561237d578181015183820152602001612365565b50506000910152565b6000815180845261239e816020860160208601612362565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015612423578284038952815180516001600160a01b03168552858101518686015260409081015160609186018290529061240f81870183612386565b9a87019a95505050908401906001016123d0565b5091979650505050505050565b600060208083526060808401855160408085880152828251808552608094508489019150868401935060005b8181101561249f57845180516001600160a01b0390811685528982015116898501528481015185850152870151151587840152938701939185019160010161245c565b505094880151878603601f190182890152946124bb81876123b2565b9998505050505050505050565b8183526000602080850194508260005b858110156125065781356124eb81611a66565b6001600160a01b0316875295820195908201906001016124d8565b509495945050505050565b81835260006001600160fb1b0383111561252a57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006125576040830186886124c8565b82810360208401526119bd818587612511565b6001600160a01b038a16815260e060208083018290526000916125909084018b8d6124c8565b83810360408501526125a3818a8c612511565b84810360608601528851808252838a0192509083019060005b818110156125d8578351835292840192918401916001016125bc565b50506001600160a01b038816608086015284810360a08601526125fb8188612386565b935050505061261060c083018461ffff169052565b9a9950505050505050505050565b6001600160a01b038681168252851660208201526040810184905260a06060820181905260009061265190830185612386565b905061ffff831660808301529695505050505050565b60608152600061267b60608301888a6124c8565b828103602084015261268e818789612511565b905082810360408401526124bb818587612511565b600082516126b5818460208701612362565b9190910192915050565b6020815260006116c66020830184612386565b8381526001600160a01b03831660208201526060604082018190526000906126fc90830184612386565b95945050505050565b60006020828403121561271757600080fd5b81516116c681611bb256fea264697066735822122022b10f2478a1b524cda16b6bae40f7a44558f2404dfa47fa69db02dfaa81f74664736f6c634300081400330000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e
Deployed Bytecode
0x6080604052600436106100eb5760003560e01c806351330c12116100845780638da5cb5b116100565780638da5cb5b146102a8578063920f5c84146102c6578063d6914f1e146102e6578063f2fde38b1461030657005b806351330c12146102355780635609921914610255578063715018a6146102755780637535d2461461028a57005b80633bd3cc97116100bd5780633bd3cc97146101a55780633ccdbb28146101c557806344fd00fc146101e557806346bef6fc1461021557005b80630542975c146100f45780631967e945146101405780631b11d0ff1461015557806336118b521461018557005b366100f257005b005b34801561010057600080fd5b507f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e5b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014c57600080fd5b506100f2610326565b34801561016157600080fd5b50610175610170366004611ac3565b6103d2565b6040519015158152602001610137565b34801561019157600080fd5b506100f26101a0366004611b3e565b6105cb565b3480156101b157600080fd5b506100f26101c0366004611bc0565b6106ca565b3480156101d157600080fd5b506100f26101e0366004611c16565b6107b4565b3480156101f157600080fd5b50610175610200366004611c4d565b60036020526000908152604090205460ff1681565b34801561022157600080fd5b506100f2610230366004611cae565b610825565b34801561024157600080fd5b506100f2610250366004611d71565b610a23565b34801561026157600080fd5b506100f2610270366004611dea565b610b84565b34801561028157600080fd5b506100f2610c87565b34801561029657600080fd5b506002546001600160a01b0316610123565b3480156102b457600080fd5b506000546001600160a01b0316610123565b3480156102d257600080fd5b506101756102e1366004611e45565b610c9b565b3480156102f257600080fd5b506100f2610301366004611f1f565b610ec5565b34801561031257600080fd5b506100f2610321366004611c4d565b610f2c565b61032e610fa5565b7f0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e6001600160a01b031663026b1d5f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190611f4d565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546000906001600160a01b031633146104005760405163b27a27bf60e01b815260040160405180910390fd5b6001600160a01b0384163014610429576040516317fb43e560e31b815260040160405180910390fd5b6000610437838501856121d9565b90506104468160000151610fff565b610453816020015161110e565b805161045e90611307565b600061046a87896122de565b6040516370a0823160e01b815230600482015290915081906001600160a01b038b16906370a0823190602401602060405180830381865afa1580156104b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d791906122f1565b10156104f657604051631da1f36960e21b815260040160405180910390fd5b60025461050e908a906001600160a01b0316836113a1565b6040516370a0823160e01b81523060048201526001600160a01b038a16907f3fcb4c6d6b7a5dbf2535b8c18862408d8d52b68d0be3082de09c60888dd691c4908a908a9084906370a0823190602401602060405180830381865afa15801561057a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059e91906122f1565b6040805193845260208401929092529082015260600160405180910390a250600198975050505050505050565b6105d3610fa5565b6105db6113c5565b6001600160a01b0381166106235760405162461bcd60e51b815260040161061a906020808252600490820152630746f3d360e41b604082015260600190565b60405180910390fd5b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610670576040519150601f19603f3d011682016040523d82523d6000602084013e610675565b606091505b50509050806106bc5760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b604482015260640161061a565b506106c660018055565b5050565b6106d2610fa5565b60005b828110156107ae5781600360008686858181106106f4576106f461230a565b90506020020160208101906107099190611c4d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106107435761074361230a565b90506020020160208101906107589190611c4d565b6001600160a01b03167f40f2571e25e1108f878fbd3d103ba5a81b7d42f5d2537f907ffc39e43b68cffe83604051610794911515815260200190565b60405180910390a2806107a681612320565b9150506106d5565b50505050565b6107bc610fa5565b6107c46113c5565b6001600160a01b0381166108035760405162461bcd60e51b815260040161061a906020808252600490820152630746f3d360e41b604082015260600190565b6108176001600160a01b038416828461141e565b61082060018055565b505050565b61082d610fa5565b868514801561083b57508615155b6108765760405162461bcd60e51b815260206004820152600c60248201526b0d8cadc40dad2e6dac2e8c6d60a31b604482015260640161061a565b6000876001600160401b0381111561089057610890611f6a565b6040519080825280602002602001820160405280156108b9578160200160208202803683370190505b5090506108d9604051806040016040528060608152602001606081525090565b8585808060200260200160405190810160405280939291908181526020016000905b828210156109275761091860808302860136819003810190612339565b815260200190600101906108fb565b5050509183525061093a90508385612355565b81602001819052506000816040516020016109559190612430565b60405160208183030381529060405290507f80dffc7ba76ffaaeb216dcc6d621cc1ae23618b44ad14d2f7667717618a2f0278b8b8b8b60405161099b9493929190612543565b60405180910390a160025460405163ab9c4b5d60e01b81526001600160a01b039091169063ab9c4b5d906109e49030908f908f908f908f908b9086908b9060009060040161256a565b600060405180830381600087803b1580156109fe57600080fd5b505af1158015610a12573d6000803e3d6000fd5b505050505050505050505050505050565b610a2b610fa5565b60408051808201909152606080825260208201528484808060200260200160405190810160405280939291908181526020016000905b82821015610a8d57610a7e60808302860136819003810190612339565b81526020019060010190610a61565b50505091835250610aa090508284612355565b8160200181905250600081604051602001610abb9190612430565b6040516020818303038152906040529050876001600160a01b03167f9fe2016da503781dae3a14147b2494d4ff06d509fdb3ff12fc949b0be206ffab88604051610b0791815260200190565b60405180910390a26002546040516310ac2ddf60e21b81526001600160a01b03909116906342b0b77c90610b489030908c908c90879060009060040161261e565b600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b505050505050505050505050565b610b8c610fa5565b606060006040518060400160405280838152602001858590610bae9190612355565b9052604051610bc09190602001612430565b6040516020818303038152906040529050856001600160a01b03167f9fe2016da503781dae3a14147b2494d4ff06d509fdb3ff12fc949b0be206ffab86604051610c0c91815260200190565b60405180910390a26002546040516310ac2ddf60e21b81526001600160a01b03909116906342b0b77c90610c4d9030908a908a90879060009060040161261e565b600060405180830381600087803b158015610c6757600080fd5b505af1158015610c7b573d6000803e3d6000fd5b50505050505050505050565b610c8f610fa5565b610c996000611481565b565b6002546000906001600160a01b03163314610cc95760405163b27a27bf60e01b815260040160405180910390fd5b6001600160a01b0384163014610cf2576040516317fb43e560e31b815260040160405180910390fd5b6000610d00838501856121d9565b9050610d0f8160000151610fff565b610d1c816020015161110e565b8051610d2790611307565b60005b8a811015610e72576000888883818110610d4657610d4661230a565b905060200201358b8b84818110610d5f57610d5f61230a565b90506020020135610d7091906122de565b9050808d8d84818110610d8557610d8561230a565b9050602002016020810190610d9a9190611c4d565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0491906122f1565b1015610e2357604051631da1f36960e21b815260040160405180910390fd5b610e5f8d8d84818110610e3857610e3861230a565b9050602002016020810190610e4d9190611c4d565b6002546001600160a01b0316836113a1565b5080610e6a81612320565b915050610d2a565b507fd59563e3054f0385f4b66a08f3e5cfc3eb9e8f1c9d10073afac0789c6dd1aa618b8b8b8b8b8b604051610eac96959493929190612667565b60405180910390a15060019a9950505050505050505050565b610ecd610fa5565b6001600160a01b038216600081815260036020908152604091829020805460ff191685151590811790915591519182527f40f2571e25e1108f878fbd3d103ba5a81b7d42f5d2537f907ffc39e43b68cffe910160405180910390a25050565b610f34610fa5565b6001600160a01b038116610f995760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061a565b610fa281611481565b50565b6000546001600160a01b03163314610c995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061a565b60005b81518110156106c657600082828151811061101f5761101f61230a565b602090810291909101810151808201516001600160a01b03166000908152600390925260409091205490915060ff1661107c57602081015160405163f1883d2160e01b81526001600160a01b03909116600482015260240161061a565b6110938160000151826020015183604001516113a1565b80602001516001600160a01b031681600001516001600160a01b03167f166ca0ff5621262dbd9061cca8d06f252046c5b50763b431da1c3de8444372c1836040015184606001516040516110f39291909182521515602082015260400190565b60405180910390a3508061110681612320565b915050611002565b60005b81518110156106c65760008083838151811061112f5761112f61230a565b6020026020010151600001516001600160a01b03168484815181106111565761115661230a565b6020026020010151602001518585815181106111745761117461230a565b60200260200101516040015160405161118d91906126a3565b60006040518083038185875af1925050503d80600081146111ca576040519150601f19603f3d011682016040523d82523d6000602084013e6111cf565b606091505b509150915081611274578383815181106111eb576111eb61230a565b6020026020010151600001516001600160a01b0316837f23604e4de032d53c7fcf3d136324b5e753e3e4f1b7ee647c1af35a959235d2da8360405161123091906126bf565b60405180910390a38284848151811061124b5761124b61230a565b6020026020010151600001518260405163405c0fff60e01b815260040161061a939291906126d2565b8383815181106112865761128661230a565b6020026020010151600001516001600160a01b0316837fa24144c38ea555f0b8ddcc7da88241ff42d87743273a8958eabc009217b512178686815181106112cf576112cf61230a565b6020026020010151602001516040516112ea91815260200190565b60405180910390a3505080806112ff90612320565b915050611111565b60005b81518110156106c6578181815181106113255761132561230a565b6020026020010151606001511561138f5761138f82828151811061134b5761134b61230a565b602002602001015160200151600084848151811061136b5761136b61230a565b6020026020010151600001516001600160a01b03166114d19092919063ffffffff16565b8061139981612320565b91505061130a565b826113ad8184846115e6565b6107ae576107ae6001600160a01b03821684846116cd565b6002600154036114175760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161061a565b6002600155565b6040516001600160a01b03831660248201526044810182905261082090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611758565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80158061154b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611525573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154991906122f1565b155b6115b65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161061a565b6040516001600160a01b03831660248201526044810182905261082090849063095ea7b360e01b9060640161144a565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b1790529151600092839283929188169161164491906126a3565b6000604051808303816000865af19150503d8060008114611681576040519150601f19603f3d011682016040523d82523d6000602084013e611686565b606091505b50915091508161169b576000925050506116c6565b8051156116bf57808060200190518101906116b69190612705565b925050506116c6565b6001925050505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261171e848261182d565b6107ae576040516001600160a01b03841660248201526000604482015261175290859063095ea7b360e01b9060640161144a565b6107ae84825b60006117ad826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118d69092919063ffffffff16565b90508051600014806117ce5750808060200190518101906117ce9190612705565b6108205760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061a565b6000806000846001600160a01b03168460405161184a91906126a3565b6000604051808303816000865af19150503d8060008114611887576040519150601f19603f3d011682016040523d82523d6000602084013e61188c565b606091505b50915091508180156118b65750805115806118b65750808060200190518101906118b69190612705565b80156118cb57506001600160a01b0385163b15155b925050505b92915050565b60606118e584846000856118ed565b949350505050565b60608247101561194e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061a565b600080866001600160a01b0316858760405161196a91906126a3565b60006040518083038185875af1925050503d80600081146119a7576040519150601f19603f3d011682016040523d82523d6000602084013e6119ac565b606091505b50915091506119bd878383876119c8565b979650505050505050565b60608315611a37578251600003611a30576001600160a01b0385163b611a305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061a565b50816118e5565b6118e58383815115611a4c5781518083602001fd5b8060405162461bcd60e51b815260040161061a91906126bf565b6001600160a01b0381168114610fa257600080fd5b60008083601f840112611a8d57600080fd5b5081356001600160401b03811115611aa457600080fd5b602083019150836020828501011115611abc57600080fd5b9250929050565b60008060008060008060a08789031215611adc57600080fd5b8635611ae781611a66565b955060208701359450604087013593506060870135611b0581611a66565b925060808701356001600160401b03811115611b2057600080fd5b611b2c89828a01611a7b565b979a9699509497509295939492505050565b60008060408385031215611b5157600080fd5b823591506020830135611b6381611a66565b809150509250929050565b60008083601f840112611b8057600080fd5b5081356001600160401b03811115611b9757600080fd5b6020830191508360208260051b8501011115611abc57600080fd5b8015158114610fa257600080fd5b600080600060408486031215611bd557600080fd5b83356001600160401b03811115611beb57600080fd5b611bf786828701611b6e565b9094509250506020840135611c0b81611bb2565b809150509250925092565b600080600060608486031215611c2b57600080fd5b8335611c3681611a66565b9250602084013591506040840135611c0b81611a66565b600060208284031215611c5f57600080fd5b81356116c681611a66565b60008083601f840112611c7c57600080fd5b5081356001600160401b03811115611c9357600080fd5b6020830191508360208260071b8501011115611abc57600080fd5b6000806000806000806000806080898b031215611cca57600080fd5b88356001600160401b0380821115611ce157600080fd5b611ced8c838d01611b6e565b909a50985060208b0135915080821115611d0657600080fd5b611d128c838d01611b6e565b909850965060408b0135915080821115611d2b57600080fd5b611d378c838d01611c6a565b909650945060608b0135915080821115611d5057600080fd5b50611d5d8b828c01611b6e565b999c989b5096995094979396929594505050565b60008060008060008060808789031215611d8a57600080fd5b8635611d9581611a66565b95506020870135945060408701356001600160401b0380821115611db857600080fd5b611dc48a838b01611c6a565b90965094506060890135915080821115611ddd57600080fd5b50611b2c89828a01611b6e565b60008060008060608587031215611e0057600080fd5b8435611e0b81611a66565b93506020850135925060408501356001600160401b03811115611e2d57600080fd5b611e3987828801611b6e565b95989497509550505050565b600080600080600080600080600060a08a8c031215611e6357600080fd5b89356001600160401b0380821115611e7a57600080fd5b611e868d838e01611b6e565b909b50995060208c0135915080821115611e9f57600080fd5b611eab8d838e01611b6e565b909950975060408c0135915080821115611ec457600080fd5b611ed08d838e01611b6e565b909750955060608c01359150611ee582611a66565b90935060808b01359080821115611efb57600080fd5b50611f088c828d01611a7b565b915080935050809150509295985092959850929598565b60008060408385031215611f3257600080fd5b8235611f3d81611a66565b91506020830135611b6381611bb2565b600060208284031215611f5f57600080fd5b81516116c681611a66565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715611fa257611fa2611f6a565b60405290565b604080519081016001600160401b0381118282101715611fa257611fa2611f6a565b604051601f8201601f191681016001600160401b0381118282101715611ff257611ff2611f6a565b604052919050565b60006001600160401b0382111561201357612013611f6a565b5060051b60200190565b60006080828403121561202f57600080fd5b604051608081018181106001600160401b038211171561205157612051611f6a565b604052905080823561206281611a66565b8152602083013561207281611a66565b602082015260408381013590820152606083013561208f81611bb2565b6060919091015292915050565b60006120af6120aa84611ffa565b611fca565b8381529050602080820190600585901b8401868111156120ce57600080fd5b845b818110156121ae5780356001600160401b03808211156120f05760008081fd5b908701906060828b0312156121055760008081fd5b61210d611f80565b823561211881611a66565b81528286013586820152604080840135838111156121365760008081fd5b808501945050601f8c8186011261214d5760008081fd5b84358481111561215f5761215f611f6a565b612170818301601f19168a01611fca565b94508085528d8982880101111561218957600091508182fd5b808987018a8701376000908501890152508101919091528552509282019282016120d0565b505050509392505050565b600082601f8301126121ca57600080fd5b6116c68383356020850161209c565b600060208083850312156121ec57600080fd5b82356001600160401b038082111561220357600080fd5b908401906040828703121561221757600080fd5b61221f611fa8565b82358281111561222e57600080fd5b8301601f8101881361223f57600080fd5b803561224d6120aa82611ffa565b81815260079190911b8201860190868101908a83111561226c57600080fd5b928701925b82841015612295576122838b8561201d565b82528782019150608084019350612271565b845250505082840135828111156122ab57600080fd5b6122b7888286016121b9565b948201949094529695505050505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156118d0576118d06122c8565b60006020828403121561230357600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201612332576123326122c8565b5060010190565b60006080828403121561234b57600080fd5b6116c6838361201d565b60006116c636848461209c565b60005b8381101561237d578181015183820152602001612365565b50506000910152565b6000815180845261239e816020860160208601612362565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015612423578284038952815180516001600160a01b03168552858101518686015260409081015160609186018290529061240f81870183612386565b9a87019a95505050908401906001016123d0565b5091979650505050505050565b600060208083526060808401855160408085880152828251808552608094508489019150868401935060005b8181101561249f57845180516001600160a01b0390811685528982015116898501528481015185850152870151151587840152938701939185019160010161245c565b505094880151878603601f190182890152946124bb81876123b2565b9998505050505050505050565b8183526000602080850194508260005b858110156125065781356124eb81611a66565b6001600160a01b0316875295820195908201906001016124d8565b509495945050505050565b81835260006001600160fb1b0383111561252a57600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006125576040830186886124c8565b82810360208401526119bd818587612511565b6001600160a01b038a16815260e060208083018290526000916125909084018b8d6124c8565b83810360408501526125a3818a8c612511565b84810360608601528851808252838a0192509083019060005b818110156125d8578351835292840192918401916001016125bc565b50506001600160a01b038816608086015284810360a08601526125fb8188612386565b935050505061261060c083018461ffff169052565b9a9950505050505050505050565b6001600160a01b038681168252851660208201526040810184905260a06060820181905260009061265190830185612386565b905061ffff831660808301529695505050505050565b60608152600061267b60608301888a6124c8565b828103602084015261268e818789612511565b905082810360408401526124bb818587612511565b600082516126b5818460208701612362565b9190910192915050565b6020815260006116c66020830184612386565b8381526001600160a01b03831660208201526060604082018190526000906126fc90830184612386565b95945050505050565b60006020828403121561271757600080fd5b81516116c681611bb256fea264697066735822122022b10f2478a1b524cda16b6bae40f7a44558f2404dfa47fa69db02dfaa81f74664736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e
-----Decoded View---------------
Arg [0] : addressesProvider (address): 0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.71
Net Worth in ETH
0.000342
Token Allocations
WBTC
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $67,439.73 | 0.00001049 | $0.7074 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.