Overview
FTM Balance
0 FTM
FTM Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
41158923 | 912 days ago | 45.46295602 FTM | ||||
41158923 | 912 days ago | 182.02468706 FTM | ||||
41158923 | 912 days ago | 204.6697336 FTM | ||||
41158849 | 912 days ago | 837.30443098 FTM | ||||
41158609 | 912 days ago | 71.42601166 FTM | ||||
41158609 | 912 days ago | 642.83410498 FTM | ||||
41157603 | 912 days ago | 0.75591587 FTM | ||||
41156240 | 912 days ago | 161.56487606 FTM | ||||
41156064 | 912 days ago | 42.58128472 FTM | ||||
41155833 | 912 days ago | 42.59644041 FTM | ||||
41155502 | 912 days ago | 299.32008859 FTM | ||||
41154182 | 912 days ago | 9.73956248 FTM | ||||
41154182 | 912 days ago | 1.32812215 FTM | ||||
41153071 | 912 days ago | 14,601.70299228 FTM | ||||
41153071 | 912 days ago | 323.88526518 FTM | ||||
41151617 | 912 days ago | 0.91822734 FTM | ||||
41151617 | 912 days ago | 4.82069358 FTM | ||||
41151110 | 912 days ago | 4.98078583 FTM | ||||
41151110 | 912 days ago | 12.80773499 FTM | ||||
41147106 | 912 days ago | 11.12124692 FTM | ||||
41147106 | 912 days ago | 266.9099262 FTM | ||||
41139189 | 912 days ago | 89.72367945 FTM | ||||
41139189 | 912 days ago | 17.94473589 FTM | ||||
41139189 | 912 days ago | 191.41051617 FTM | ||||
41133947 | 912 days ago | 8.5 FTM |
Loading...
Loading
Contract Name:
FantomAdapter01
Compiler Version
v0.7.5+commit.eb77ed08
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "../IAdapter.sol"; import "../../lib/uniswapv2/NewUniswapV2.sol"; import "../../lib/curve/Curve.sol"; import "../../lib/curve/CurveV2.sol"; import "../../lib/weth/WethExchange.sol"; import "../../lib/balancerv2/BalancerV2.sol"; import "../../lib/aave-v3/AaveV3.sol"; import "../../lib/saddle/SaddleAdapter.sol"; import "../../lib/woofi/WooFiAdapter.sol"; /** * @dev This contract will route call to different exchanges * 1 - WFTM * 2 - UniswapV2Forks * 3 - Curve * 4 - CurveV2 * 5 - BalancerV2 * 6 - AaveV3 * 7 - Saddle * 8 - WooFi * The above are the indexes */ contract FantomAdapter01 is IAdapter, NewUniswapV2, WethExchange, Curve, CurveV2, BalancerV2, AaveV3, SaddleAdapter, WooFiAdapter { using SafeMath for uint256; constructor( address _weth, uint16 _aaveV3RefCode, address _aaveV3Pool, address _aaveV3WethGateway ) public WethProvider(_weth) AaveV3(_aaveV3RefCode, _aaveV3Pool, _aaveV3WethGateway) {} function initialize(bytes calldata data) external override { revert("METHOD NOT IMPLEMENTED"); } function swap( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, uint256 networkFee, Utils.Route[] calldata route ) external payable override { for (uint256 i = 0; i < route.length; i++) { if (route[i].index == 1) { //swap on WETH swapOnWETH(fromToken, toToken, fromAmount.mul(route[i].percent).div(10000)); } else if (route[i].index == 2) { //swap on uniswapV2Fork swapOnUniswapV2Fork(fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].payload); } else if (route[i].index == 3) { //swap on curve swapOnCurve( fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].targetExchange, route[i].payload ); } else if (route[i].index == 4) { //swap on CurveV2 swapOnCurveV2( fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].targetExchange, route[i].payload ); } else if (route[i].index == 5) { swapOnBalancerV2( fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].targetExchange, route[i].payload ); } else if (route[i].index == 6) { swapOnAaveV3(fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].payload); } else if (route[i].index == 7) { // swap on Saddle or Curve forks based on Nerve implementation swapOnSaddle( fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].targetExchange, route[i].payload ); } else if (route[i].index == 8) { swapOnWooFi(fromToken, toToken, fromAmount.mul(route[i].percent).div(10000), route[i].targetExchange); } else { revert("Index not supported"); } } } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "../lib/Utils.sol"; interface IAdapter { /** * @dev Certain adapters needs to be initialized. * This method will be called from Augustus */ function initialize(bytes calldata data) external; /** * @dev The function which performs the swap on an exchange. * @param fromToken Address of the source token * @param toToken Address of the destination token * @param fromAmount Amount of source tokens to be swapped * @param networkFee NOT USED - Network fee to be used in this router * @param route Route to be followed */ function swap( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, uint256 networkFee, Utils.Route[] calldata route ) external payable; }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import "./NewUniswapV2Lib.sol"; import "../Utils.sol"; import "../weth/IWETH.sol"; abstract contract NewUniswapV2 { using SafeMath for uint256; // Pool bits are 255-161: fee, 160: direction flag, 159-0: address uint256 constant FEE_OFFSET = 161; uint256 constant DIRECTION_FLAG = 0x0000000000000000000000010000000000000000000000000000000000000000; struct UniswapV2Data { address weth; uint256[] pools; } function swapOnUniswapV2Fork( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, bytes calldata payload ) internal { UniswapV2Data memory data = abi.decode(payload, (UniswapV2Data)); _swapOnUniswapV2Fork(address(fromToken), fromAmount, data.weth, data.pools); } function buyOnUniswapFork( IERC20 fromToken, IERC20 toToken, uint256 amountInMax, uint256 amountOut, bytes calldata payload ) internal { UniswapV2Data memory data = abi.decode(payload, (UniswapV2Data)); _buyOnUniswapFork(address(fromToken), amountInMax, amountOut, data.weth, data.pools); } function _buyOnUniswapFork( address tokenIn, uint256 amountInMax, uint256 amountOut, address weth, uint256[] memory pools ) private returns (uint256 tokensSold) { uint256 pairs = pools.length; require(pairs != 0, "At least one pool required"); uint256[] memory amounts = new uint256[](pairs + 1); amounts[pairs] = amountOut; for (uint256 i = pairs; i != 0; --i) { uint256 p = pools[i - 1]; amounts[i - 1] = NewUniswapV2Lib.getAmountIn( amounts[i], address(p), p & DIRECTION_FLAG == 0, p >> FEE_OFFSET ); } tokensSold = amounts[0]; require(tokensSold <= amountInMax, "UniswapV2Router: INSUFFICIENT_INPUT_AMOUNT"); bool tokensBoughtEth; if (tokenIn == Utils.ethAddress()) { IWETH(weth).deposit{ value: tokensSold }(); require(IWETH(weth).transfer(address(pools[0]), tokensSold)); } else { TransferHelper.safeTransfer(tokenIn, address(pools[0]), tokensSold); tokensBoughtEth = weth != address(0); } for (uint256 i = 0; i < pairs; ++i) { uint256 p = pools[i]; (uint256 amount0Out, uint256 amount1Out) = p & DIRECTION_FLAG == 0 ? (uint256(0), amounts[i + 1]) : (amounts[i + 1], uint256(0)); IUniswapV2Pair(address(p)).swap( amount0Out, amount1Out, i + 1 == pairs ? address(this) : address(pools[i + 1]), "" ); } if (tokensBoughtEth) { IWETH(weth).withdraw(amountOut); } } function _swapOnUniswapV2Fork( address tokenIn, uint256 amountIn, address weth, uint256[] memory pools ) private returns (uint256 tokensBought) { uint256 pairs = pools.length; require(pairs != 0, "At least one pool required"); bool tokensBoughtEth; if (tokenIn == Utils.ethAddress()) { IWETH(weth).deposit{ value: amountIn }(); require(IWETH(weth).transfer(address(pools[0]), amountIn)); } else { TransferHelper.safeTransfer(tokenIn, address(pools[0]), amountIn); tokensBoughtEth = weth != address(0); } tokensBought = amountIn; for (uint256 i = 0; i < pairs; ++i) { uint256 p = pools[i]; address pool = address(p); bool direction = p & DIRECTION_FLAG == 0; tokensBought = NewUniswapV2Lib.getAmountOut(tokensBought, pool, direction, p >> FEE_OFFSET); (uint256 amount0Out, uint256 amount1Out) = direction ? (uint256(0), tokensBought) : (tokensBought, uint256(0)); IUniswapV2Pair(pool).swap( amount0Out, amount1Out, i + 1 == pairs ? address(this) : address(pools[i + 1]), "" ); } if (tokensBoughtEth) { IWETH(weth).withdraw(tokensBought); } } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ICurve.sol"; import "../Utils.sol"; contract Curve { struct CurveData { int128 i; int128 j; uint256 deadline; bool underlyingSwap; } function swapOnCurve( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, address exchange, bytes calldata payload ) internal { CurveData memory curveData = abi.decode(payload, (CurveData)); Utils.approve(address(exchange), address(fromToken), fromAmount); if (curveData.underlyingSwap) { ICurvePool(exchange).exchange_underlying(curveData.i, curveData.j, fromAmount, 1); } else { if (address(fromToken) == Utils.ethAddress()) { ICurveEthPool(exchange).exchange{ value: fromAmount }(curveData.i, curveData.j, fromAmount, 1); } else { ICurvePool(exchange).exchange(curveData.i, curveData.j, fromAmount, 1); } } } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ICurveV2.sol"; import "../Utils.sol"; import "../weth/IWETH.sol"; import "../WethProvider.sol"; abstract contract CurveV2 is WethProvider { struct CurveV2Data { uint256 i; uint256 j; bool underlyingSwap; } constructor() {} function swapOnCurveV2( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, address exchange, bytes calldata payload ) internal { CurveV2Data memory curveV2Data = abi.decode(payload, (CurveV2Data)); address _fromToken = address(fromToken); if (address(fromToken) == Utils.ethAddress()) { IWETH(WETH).deposit{ value: fromAmount }(); _fromToken = WETH; } Utils.approve(address(exchange), address(_fromToken), fromAmount); if (curveV2Data.underlyingSwap) { ICurveV2Pool(exchange).exchange_underlying(curveV2Data.i, curveV2Data.j, fromAmount, 1); } else { ICurveV2Pool(exchange).exchange(curveV2Data.i, curveV2Data.j, fromAmount, 1); } if (address(toToken) == Utils.ethAddress()) { uint256 receivedAmount = Utils.tokenBalance(WETH, address(this)); IWETH(WETH).withdraw(receivedAmount); } } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IWETH.sol"; import "../Utils.sol"; import "../WethProvider.sol"; abstract contract WethExchange is WethProvider { function swapOnWETH( IERC20 fromToken, IERC20 toToken, uint256 fromAmount ) internal { _swapOnWeth(fromToken, toToken, fromAmount); } function buyOnWeth( IERC20 fromToken, IERC20 toToken, uint256 fromAmount ) internal { _swapOnWeth(fromToken, toToken, fromAmount); } function _swapOnWeth( IERC20 fromToken, IERC20 toToken, uint256 fromAmount ) private { address weth = WETH; if (address(fromToken) == weth) { require(address(toToken) == Utils.ethAddress(), "Destination token should be ETH"); IWETH(weth).withdraw(fromAmount); } else if (address(fromToken) == Utils.ethAddress()) { require(address(toToken) == weth, "Destination token should be weth"); IWETH(weth).deposit{ value: fromAmount }(); } else { revert("Invalid fromToken"); } } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../Utils.sol"; import "./IBalancerV2Vault.sol"; contract BalancerV2 { using SafeMath for uint256; struct BalancerData { IBalancerV2Vault.BatchSwapStep[] swaps; address[] assets; IBalancerV2Vault.FundManagement funds; int256[] limits; uint256 deadline; } function swapOnBalancerV2( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, address vault, bytes calldata payload ) internal { BalancerData memory data = abi.decode(payload, (BalancerData)); uint256 totalAmount; for (uint256 i = 0; i < data.swaps.length; ++i) { totalAmount = totalAmount.add(data.swaps[i].amount); } // This will only work for a direct swap on balancer if (totalAmount != fromAmount) { for (uint256 i = 0; i < data.swaps.length; ++i) { data.swaps[i].amount = data.swaps[i].amount.mul(fromAmount).div(totalAmount); } } if (address(fromToken) == Utils.ethAddress()) { IBalancerV2Vault(vault).batchSwap{ value: fromAmount }( IBalancerV2Vault.SwapKind.GIVEN_IN, data.swaps, data.assets, data.funds, data.limits, data.deadline ); } else { Utils.approve(vault, address(fromToken), fromAmount); IBalancerV2Vault(vault).batchSwap( IBalancerV2Vault.SwapKind.GIVEN_IN, data.swaps, data.assets, data.funds, data.limits, data.deadline ); } } }
pragma solidity 0.7.5; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../Utils.sol"; import "../../AugustusStorage.sol"; interface IAaveV3WETHGateway { function depositETH( address pool, address onBehalfOf, uint16 referralCode ) external payable; function withdrawETH( address pool, uint256 amount, address onBehalfOf ) external; } interface IAaveV3Pool { function supply( IERC20 asset, uint256 amount, address onBehalfOf, uint16 referralCode ) external; function withdraw( IERC20 asset, uint256 amount, address to ) external returns (uint256); } contract AaveV3 { struct AaveData { address aToken; } uint16 public immutable aaveV3RefCode; address public immutable aaveV3Pool; address public immutable aaveV3WethGateway; constructor( uint16 _refCode, address _pool, address _wethGateway ) public { aaveV3RefCode = _refCode; aaveV3Pool = _pool; aaveV3WethGateway = _wethGateway; } function swapOnAaveV3( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, bytes calldata payload ) internal { _swapOnAaveV3(fromToken, toToken, fromAmount, payload); } function buyOnAaveV3( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, bytes calldata payload ) internal { _swapOnAaveV3(fromToken, toToken, fromAmount, payload); } function _swapOnAaveV3( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, bytes memory payload ) private { AaveData memory data = abi.decode(payload, (AaveData)); if (address(fromToken) == address(data.aToken)) { if (address(toToken) == Utils.ethAddress()) { Utils.approve(aaveV3WethGateway, address(fromToken), fromAmount); IAaveV3WETHGateway(aaveV3WethGateway).withdrawETH(aaveV3Pool, fromAmount, address(this)); } else { Utils.approve(aaveV3Pool, address(fromToken), fromAmount); IAaveV3Pool(aaveV3Pool).withdraw(toToken, fromAmount, address(this)); } } else if (address(toToken) == address(data.aToken)) { if (address(fromToken) == Utils.ethAddress()) { IAaveV3WETHGateway(aaveV3WethGateway).depositETH{ value: fromAmount }( aaveV3Pool, address(this), aaveV3RefCode ); } else { Utils.approve(aaveV3Pool, address(fromToken), fromAmount); IAaveV3Pool(aaveV3Pool).supply(fromToken, fromAmount, address(this), aaveV3RefCode); } } else { revert("Invalid aToken"); } } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "../Utils.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ISwap.sol"; contract SaddleAdapter { struct SaddleData { uint8 i; uint8 j; uint256 deadline; } function swapOnSaddle( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, address exchange, bytes calldata payload ) internal { SaddleData memory data = abi.decode(payload, (SaddleData)); Utils.approve(address(exchange), address(fromToken), fromAmount); ISwap(exchange).swap(data.i, data.j, fromAmount, 1, data.deadline); } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../WethProvider.sol"; import "./IWooPP.sol"; import "../Utils.sol"; import "../weth/IWETH.sol"; abstract contract WooFiAdapter is WethProvider { function swapOnWooFi( IERC20 fromToken, IERC20 toToken, uint256 fromAmount, address exchange ) internal { address _fromToken = address(fromToken) == Utils.ethAddress() ? WETH : address(fromToken); address _toToken = address(toToken) == Utils.ethAddress() ? WETH : address(toToken); if (address(fromToken) == Utils.ethAddress()) { IWETH(WETH).deposit{ value: fromAmount }(); } Utils.approve(exchange, _fromToken, fromAmount); address quoteToken = IWooPP(exchange).quoteToken(); if (address(_fromToken) == quoteToken) { IWooPP(exchange).sellQuote(address(_toToken), fromAmount, 1, address(this), address(0)); } else if (address(_toToken) == quoteToken) { IWooPP(exchange).sellBase(address(_fromToken), fromAmount, 1, address(this), address(0)); } else { revert("One of the tokens must be quoteToken"); } if (address(toToken) == Utils.ethAddress()) { IWETH(WETH).withdraw(IERC20(WETH).balanceOf(address(this))); } } }
/*solhint-disable avoid-low-level-calls */ // SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../ITokenTransferProxy.sol"; interface IERC20Permit { function permit( address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; } interface IERC20PermitLegacy { function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external; } library Utils { using SafeMath for uint256; using SafeERC20 for IERC20; address private constant ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); uint256 private constant MAX_UINT = type(uint256).max; /** * @param fromToken Address of the source token * @param fromAmount Amount of source tokens to be swapped * @param toAmount Minimum destination token amount expected out of this swap * @param expectedAmount Expected amount of destination tokens without slippage * @param beneficiary Beneficiary address * 0 then 100% will be transferred to beneficiary. Pass 10000 for 100% * @param path Route to be taken for this swap to take place */ struct SellData { address fromToken; uint256 fromAmount; uint256 toAmount; uint256 expectedAmount; address payable beneficiary; Utils.Path[] path; address payable partner; uint256 feePercent; bytes permit; uint256 deadline; bytes16 uuid; } struct BuyData { address adapter; address fromToken; address toToken; uint256 fromAmount; uint256 toAmount; address payable beneficiary; Utils.Route[] route; address payable partner; uint256 feePercent; bytes permit; uint256 deadline; bytes16 uuid; } struct MegaSwapSellData { address fromToken; uint256 fromAmount; uint256 toAmount; uint256 expectedAmount; address payable beneficiary; Utils.MegaSwapPath[] path; address payable partner; uint256 feePercent; bytes permit; uint256 deadline; bytes16 uuid; } struct SimpleData { address fromToken; address toToken; uint256 fromAmount; uint256 toAmount; uint256 expectedAmount; address[] callees; bytes exchangeData; uint256[] startIndexes; uint256[] values; address payable beneficiary; address payable partner; uint256 feePercent; bytes permit; uint256 deadline; bytes16 uuid; } struct Adapter { address payable adapter; uint256 percent; uint256 networkFee; //NOT USED Route[] route; } struct Route { uint256 index; //Adapter at which index needs to be used address targetExchange; uint256 percent; bytes payload; uint256 networkFee; //NOT USED - Network fee is associated with 0xv3 trades } struct MegaSwapPath { uint256 fromAmountPercent; Path[] path; } struct Path { address to; uint256 totalNetworkFee; //NOT USED - Network fee is associated with 0xv3 trades Adapter[] adapters; } function ethAddress() internal pure returns (address) { return ETH_ADDRESS; } function maxUint() internal pure returns (uint256) { return MAX_UINT; } function approve( address addressToApprove, address token, uint256 amount ) internal { if (token != ETH_ADDRESS) { IERC20 _token = IERC20(token); uint256 allowance = _token.allowance(address(this), addressToApprove); if (allowance < amount) { _token.safeApprove(addressToApprove, 0); _token.safeIncreaseAllowance(addressToApprove, MAX_UINT); } } } function transferTokens( address token, address payable destination, uint256 amount ) internal { if (amount > 0) { if (token == ETH_ADDRESS) { (bool result, ) = destination.call{ value: amount, gas: 10000 }(""); require(result, "Failed to transfer Ether"); } else { IERC20(token).safeTransfer(destination, amount); } } } function tokenBalance(address token, address account) internal view returns (uint256) { if (token == ETH_ADDRESS) { return account.balance; } else { return IERC20(token).balanceOf(account); } } function permit(address token, bytes memory permit) internal { if (permit.length == 32 * 7) { (bool success, ) = token.call(abi.encodePacked(IERC20Permit.permit.selector, permit)); require(success, "Permit failed"); } if (permit.length == 32 * 8) { (bool success, ) = token.call(abi.encodePacked(IERC20PermitLegacy.permit.selector, permit)); require(success, "Permit failed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.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 SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; interface ITokenTransferProxy { function transferFrom( address token, address from, address to, uint256 amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; import "./IUniswapV2Pair.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; library NewUniswapV2Lib { using SafeMath for uint256; function getReservesByPair(address pair, bool direction) internal view returns (uint256 reserveIn, uint256 reserveOut) { (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(pair).getReserves(); (reserveIn, reserveOut) = direction ? (reserve0, reserve1) : (reserve1, reserve0); } function getAmountOut( uint256 amountIn, address pair, bool direction, uint256 fee ) internal view returns (uint256 amountOut) { require(amountIn > 0, "UniswapV2Lib: INSUFFICIENT_INPUT_AMOUNT"); (uint256 reserveIn, uint256 reserveOut) = getReservesByPair(pair, direction); uint256 amountInWithFee = amountIn.mul(fee); uint256 numerator = amountInWithFee.mul(reserveOut); uint256 denominator = reserveIn.mul(10000).add(amountInWithFee); amountOut = uint256(numerator / denominator); } function getAmountIn( uint256 amountOut, address pair, bool direction, uint256 fee ) internal view returns (uint256 amountIn) { require(amountOut > 0, "UniswapV2Lib: INSUFFICIENT_OUTPUT_AMOUNT"); (uint256 reserveIn, uint256 reserveOut) = getReservesByPair(pair, direction); require(reserveOut > amountOut, "UniswapV2Lib: reserveOut should be greater than amountOut"); uint256 numerator = reserveIn.mul(amountOut).mul(10000); uint256 denominator = reserveOut.sub(amountOut).mul(fee); amountIn = (numerator / denominator).add(1); } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; abstract contract IWETH is IERC20 { function deposit() external payable virtual; function withdraw(uint256 amount) external virtual; }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; interface IUniswapV2Pair { function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IPool { function underlying_coins(int128 index) external view returns (address); function coins(int128 index) external view returns (address); } interface IPoolV3 { function underlying_coins(uint256 index) external view returns (address); function coins(uint256 index) external view returns (address); } interface ICurvePool { function exchange_underlying( int128 i, int128 j, uint256 dx, uint256 minDy ) external; function exchange( int128 i, int128 j, uint256 dx, uint256 minDy ) external; } interface ICurveEthPool { function exchange( int128 i, int128 j, uint256 dx, uint256 minDy ) external payable; } interface ICompoundPool { function exchange_underlying( int128 i, int128 j, uint256 dx, uint256 minDy, uint256 deadline ) external; function exchange( int128 i, int128 j, uint256 dx, uint256 minDy, uint256 deadline ) external; }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; interface ICurveV2Pool { function exchange_underlying( uint256 i, uint256 j, uint256 dx, uint256 minDy ) external; function exchange( uint256 i, uint256 j, uint256 dx, uint256 minDy ) external; }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; contract WethProvider { /*solhint-disable var-name-mixedcase*/ address public immutable WETH; /*solhint-enable var-name-mixedcase*/ constructor(address weth) public { WETH = weth; } }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; pragma abicoder v2; import "../Utils.sol"; interface IBalancerV2Vault { enum SwapKind { GIVEN_IN, GIVEN_OUT } struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutIndex; uint256 amount; bytes userData; } struct FundManagement { address sender; bool fromInternalBalance; address payable recipient; bool toInternalBalance; } function batchSwap( SwapKind kind, BatchSwapStep[] memory swaps, address[] memory assets, FundManagement memory funds, int256[] memory limits, uint256 deadline ) external payable returns (int256[] memory); }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; import "./ITokenTransferProxy.sol"; contract AugustusStorage { struct FeeStructure { uint256 partnerShare; bool noPositiveSlippage; bool positiveSlippageToUser; uint16 feePercent; string partnerId; bytes data; } ITokenTransferProxy internal tokenTransferProxy; address payable internal feeWallet; mapping(address => FeeStructure) internal registeredPartners; mapping(bytes4 => address) internal selectorVsRouter; mapping(bytes32 => bool) internal adapterInitialized; mapping(bytes32 => bytes) internal adapterVsData; mapping(bytes32 => bytes) internal routerData; mapping(bytes32 => bool) internal routerInitialized; bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE"); bytes32 public constant ROUTER_ROLE = keccak256("ROUTER_ROLE"); }
// SPDX-License-Identifier: ISC pragma solidity 0.7.5; interface ISwap { function swap( uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.7.5; pragma experimental ABIEncoderV2; interface IWooPP { function quoteToken() external view returns (address); function sellBase( address baseToken, uint256 baseAmount, uint256 minQuoteAmount, address to, address rebateTo ) external returns (uint256 quoteAmount); function sellQuote( address baseToken, uint256 quoteAmount, uint256 minBaseAmount, address to, address rebateTo ) external returns (uint256 baseAmount); }
{ "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"uint16","name":"_aaveV3RefCode","type":"uint16"},{"internalType":"address","name":"_aaveV3Pool","type":"address"},{"internalType":"address","name":"_aaveV3WethGateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aaveV3Pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aaveV3RefCode","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aaveV3WethGateway","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"fromToken","type":"address"},{"internalType":"contract IERC20","name":"toToken","type":"address"},{"internalType":"uint256","name":"fromAmount","type":"uint256"},{"internalType":"uint256","name":"networkFee","type":"uint256"},{"components":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"targetExchange","type":"address"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"uint256","name":"networkFee","type":"uint256"}],"internalType":"struct Utils.Route[]","name":"route","type":"tuple[]"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
6101006040523480156200001257600080fd5b5060405162003f4238038062003f4283398101604081905262000035916200008e565b606093841b6001600160601b031990811660805260f09390931b6001600160f01b03191660a05290831b821660c05290911b1660e052620000f1565b80516001600160a01b03811681146200008957600080fd5b919050565b60008060008060808587031215620000a4578384fd5b620000af8562000071565b9350602085015161ffff81168114620000c6578384fd5b9250620000d66040860162000071565b9150620000e66060860162000071565b905092959194509250565b60805160601c60a05160f01c60c05160601c60e05160601c613dab62000197600039806101bf5280611f6b5280611fce52806121f25250806101775280611ffb528061206352806120c6528061222152806122a9528061230c5250806101185280612245528061233f52508061019b5280610a2c5280610aad5280610c485280610cad5280611103528061116952806111c852806114f752806115a25250613dab6000f3fe6080604052600436106100655760003560e01c8063ad5c464811610043578063ad5c4648146100d9578063ca3817de146100ee578063e76b146c1461010357610065565b80630c3887351461006a578063439fab911461009557806386a06ff0146100b7575b600080fd5b34801561007657600080fd5b5061007f610116565b60405161008c9190613b1b565b60405180910390f35b3480156100a157600080fd5b506100b56100b0366004613200565b61013a565b005b3480156100c357600080fd5b506100cc610175565b60405161008c9190613715565b3480156100e557600080fd5b506100cc610199565b3480156100fa57600080fd5b506100cc6101bd565b6100b561011136600461326d565b6101e1565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613a50565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b81811015610671578282828181106101f857fe5b905060200281019061020a9190613c1e565b356001141561025a57610255878761025061271061024a88888881811061022d57fe5b905060200281019061023f9190613c1e565b8b906040013561067a565b906106f6565b610777565b610669565b82828281811061026657fe5b90506020028101906102789190613c1e565b35600214156102cc57610255878761029b61271061024a88888881811061022d57fe5b8686868181106102a757fe5b90506020028101906102b99190613c1e565b6102c7906060810190613bb4565b610787565b8282828181106102d857fe5b90506020028101906102ea9190613c1e565b356003141561036d57610255878761030d61271061024a88888881811061022d57fe5b86868681811061031957fe5b905060200281019061032b9190613c1e565b61033c90604081019060200161311c565b87878781811061034857fe5b905060200281019061035a9190613c1e565b610368906060810190613bb4565b6107b1565b82828281811061037957fe5b905060200281019061038b9190613c1e565b356004141561040e5761025587876103ae61271061024a88888881811061022d57fe5b8686868181106103ba57fe5b90506020028101906103cc9190613c1e565b6103dd90604081019060200161311c565b8787878181106103e957fe5b90506020028101906103fb9190613c1e565b610409906060810190613bb4565b6109d8565b82828281811061041a57fe5b905060200281019061042c9190613c1e565b35600514156104af57610255878761044f61271061024a88888881811061022d57fe5b86868681811061045b57fe5b905060200281019061046d9190613c1e565b61047e90604081019060200161311c565b87878781811061048a57fe5b905060200281019061049c9190613c1e565b6104aa906060810190613bb4565b610d20565b8282828181106104bb57fe5b90506020028101906104cd9190613c1e565b35600614156105215761025587876104f061271061024a88888881811061022d57fe5b8686868181106104fc57fe5b905060200281019061050e9190613c1e565b61051c906060810190613bb4565b610fef565b82828281811061052d57fe5b905060200281019061053f9190613c1e565b35600714156105c257610255878761056261271061024a88888881811061022d57fe5b86868681811061056e57fe5b90506020028101906105809190613c1e565b61059190604081019060200161311c565b87878781811061059d57fe5b90506020028101906105af9190613c1e565b6105bd906060810190613bb4565b611038565b8282828181106105ce57fe5b90506020028101906105e09190613c1e565b356008141561063757610255878761060361271061024a88888881811061022d57fe5b86868681811061060f57fe5b90506020028101906106219190613c1e565b61063290604081019060200161311c565b6110bf565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613ae4565b6001016101e4565b50505050505050565b600082610689575060006106f0565b8282028284828161069657fe5b04146106ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d1e6021913960400191505060405180910390fd5b90505b92915050565b600080821161076657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161076f57fe5b049392505050565b6107828383836115a0565b505050565b61078f612d61565b61079b82840184613555565b905061067186858360000151846020015161189b565b6107b9612d79565b6107c582840184613428565b90506107d2848887611c07565b80606001511561086f57805160208201516040517fa6417ed600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169263a6417ed692610838928a906001906004016139bf565b600060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b50505050610671565b610877611d4e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141561094157805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df0212492899261090a92919084906001906004016139bf565b6000604051808303818588803b15801561092357600080fd5b505af1158015610937573d6000803e3d6000fd5b5050505050610671565b805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df021249261099d928a906001906004016139bf565b600060405180830381600087803b1580156109b757600080fd5b505af11580156109cb573d6000803e3d6000fd5b5050505050505050505050565b6109e0612da0565b6109ec82840184613499565b9050866109f7611d4e565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415610acf577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b158015610a9257600080fd5b505af1158015610aa6573d6000803e3d6000fd5b50505050507f000000000000000000000000000000000000000000000000000000000000000090505b610ada858288611c07565b816040015115610b7757815160208301516040517f65b2489b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816926365b2489b92610b40928b90600190600401613b6e565b600060405180830381600087803b158015610b5a57600080fd5b505af1158015610b6e573d6000803e3d6000fd5b50505050610c06565b815160208301516040517f5b41b90800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881692635b41b90892610bd3928b90600190600401613b6e565b600060405180830381600087803b158015610bed57600080fd5b505af1158015610c01573d6000803e3d6000fd5b505050505b610c0e611d4e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415610d16576000610c6d7f000000000000000000000000000000000000000000000000000000000000000030611d66565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90610ce2908490600401613b2a565b600060405180830381600087803b158015610cfc57600080fd5b505af1158015610d10573d6000803e3d6000fd5b50505050505b5050505050505050565b610d28612dc3565b610d3482840184613359565b90506000805b825151811015610d7c57610d7283600001518281518110610d5757fe5b60200260200101516060015183611e6190919063ffffffff16565b9150600101610d3a565b50858114610dea5760005b825151811015610de857610dc38261024a8986600001518581518110610da957fe5b60200260200101516060015161067a90919063ffffffff16565b8351805183908110610dd157fe5b602090810291909101015160600152600101610d87565b505b610df2611d4e565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415610ef8578473ffffffffffffffffffffffffffffffffffffffff1663945bcec9876000856000015186602001518760400151886060015189608001516040518863ffffffff1660e01b8152600401610e7e96959493929190613860565b6000604051808303818588803b158015610e9757600080fd5b505af1158015610eab573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610ef29190810190613154565b50610d16565b610f03858988611c07565b815160208301516040808501516060860151608087015192517f945bcec900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b169563945bcec995610f709560009592949193600401613860565b600060405180830381600087803b158015610f8a57600080fd5b505af1158015610f9e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610fe49190810190613154565b505050505050505050565b61103185858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ed592505050565b5050505050565b611040612df8565b61104c828401846134f4565b9050611059848887611c07565b8051602082015160408084015190517f9169558600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169363916955869361099d93919290918b9160019190600401613b89565b60006110c9611d4e565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146111015784611123565b7f00000000000000000000000000000000000000000000000000000000000000005b9050600061112f611d4e565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146111675784611189565b7f00000000000000000000000000000000000000000000000000000000000000005b9050611193611d4e565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611248577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561122e57600080fd5b505af1158015611242573d6000803e3d6000fd5b50505050505b611253838386611c07565b60008373ffffffffffffffffffffffffffffffffffffffff1663217a4b706040518163ffffffff1660e01b815260040160206040518083038186803b15801561129b57600080fd5b505afa1580156112af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d39190613138565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156113bd576040517ff3287c2f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f3287c2f90611365908590899060019030906000906004016137e7565b602060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b7919061363a565b5061147f565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561144d576040517f6846fb5000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690636846fb5090611365908690899060019030906000906004016137e7565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613a87565b611487611d4e565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415610671576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9082906370a0823190611534903090600401613715565b60206040518083038186803b15801561154c57600080fd5b505afa158015611560573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611584919061363a565b6040518263ffffffff1660e01b815260040161099d9190613b2a565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff84811690821614156116f3576115ea611d4e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461168357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f44657374696e6174696f6e20746f6b656e2073686f756c642062652045544800604482015290519081900360640190fd5b8073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156116d657600080fd5b505af11580156116ea573d6000803e3d6000fd5b50505050611895565b6116fb611d4e565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561182e578073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146117c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f44657374696e6174696f6e20746f6b656e2073686f756c642062652077657468604482015290519081900360640190fd5b8073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561181057600080fd5b505af1158015611824573d6000803e3d6000fd5b5050505050611895565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c69642066726f6d546f6b656e000000000000000000000000000000604482015290519081900360640190fd5b50505050565b8051600090806118d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613a19565b60006118e1611d4e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611a24578473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b15801561195c57600080fd5b505af1158015611970573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8560008151811061199e57fe5b6020026020010151886040518363ffffffff1660e01b81526004016119c4929190613736565b602060405180830381600087803b1580156119de57600080fd5b505af11580156119f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1691906131e4565b611a1f57600080fd5b611a5e565b611a438785600081518110611a3557fe5b6020026020010151886123d0565b5073ffffffffffffffffffffffffffffffffffffffff841615155b85925060005b82811015611b71576000858281518110611a7a57fe5b602090810291909101015190508074010000000000000000000000000000000000000000811615611ab187838360a182901c6125a6565b965060008082611ac357886000611ac7565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a60010114611b0f578d8a60010181518110611b0257fe5b6020026020010151611b11565b305b6040518463ffffffff1660e01b8152600401611b2f93929190613b33565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b505050505050505050806001019050611a64565b508015611bfd576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690632e1a7d4d90611bca908690600401613b2a565b600060405180830381600087803b158015611be457600080fd5b505af1158015611bf8573d6000803e3d6000fd5b505050505b5050949350505050565b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610782576040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152829060009073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e90611c91903090899060040161375c565b60206040518083038186803b158015611ca957600080fd5b505afa158015611cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce1919061363a565b90508281101561103157611d0d73ffffffffffffffffffffffffffffffffffffffff8316866000612660565b61103173ffffffffffffffffffffffffffffffffffffffff8316867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6127ee565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b600073ffffffffffffffffffffffffffffffffffffffff831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611db8575073ffffffffffffffffffffffffffffffffffffffff8116316106f0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190611e0a908590600401613715565b60206040518083038186803b158015611e2257600080fd5b505afa158015611e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5a919061363a565b90506106f0565b6000828201838110156106ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b611edd612e18565b81806020019051810190611ef19190613314565b9050806000015173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561215857611f33611d4e565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561205e57611f917f00000000000000000000000000000000000000000000000000000000000000008685611c07565b6040517f80500d2000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906380500d2090612027907f000000000000000000000000000000000000000000000000000000000000000090879030906004016137b7565b600060405180830381600087803b15801561204157600080fd5b505af1158015612055573d6000803e3d6000fd5b50505050612153565b6120897f00000000000000000000000000000000000000000000000000000000000000008685611c07565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906369328dec906120ff908790879030906004016137b7565b602060405180830381600087803b15801561211957600080fd5b505af115801561212d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612151919061363a565b505b611031565b805173ffffffffffffffffffffffffffffffffffffffff8581169116141561239e57612182611d4e565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156122a4576040517f474cf53d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063474cf53d90859061226d907f00000000000000000000000000000000000000000000000000000000000000009030907f000000000000000000000000000000000000000000000000000000000000000090600401613783565b6000604051808303818588803b15801561228657600080fd5b505af115801561229a573d6000803e3d6000fd5b5050505050612153565b6122cf7f00000000000000000000000000000000000000000000000000000000000000008685611c07565b6040517f617ba03700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063617ba03790612367908890879030907f000000000000000000000000000000000000000000000000000000000000000090600401613826565b600060405180830381600087803b15801561238157600080fd5b505af1158015612395573d6000803e3d6000fd5b50505050611031565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c906139e2565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b602083106124a657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612469565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612508576040519150601f19603f3d011682016040523d82523d6000602084013e61250d565b606091505b509150915081801561253b57508051158061253b575080806020019051602081101561253857600080fd5b50515b61103157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000808511612600576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180613cd16027913960400191505060405180910390fd5b60008061260d868661293b565b9092509050600061261e888661067a565b9050600061262c828461067a565b90506000612646836126408761271061067a565b90611e61565b905080828161265157fe5b049a9950505050505050505050565b80158061270c5750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156126de57600080fd5b505afa1580156126f2573d6000803e3d6000fd5b505050506040513d602081101561270857600080fd5b5051155b612761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180613d696036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526107829084906129ed565b60006128ab828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561287957600080fd5b505afa15801561288d573d6000803e3d6000fd5b505050506040513d60208110156128a357600080fd5b505190611e61565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506118959085906129ed565b6000806000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561298757600080fd5b505afa15801561299b573d6000803e3d6000fd5b505050506040513d60608110156129b157600080fd5b5080516020909101516dffffffffffffffffffffffffffff9182169350169050846129dd5780826129e0565b81815b9097909650945050505050565b6060612a4f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612ac59092919063ffffffff16565b80519091501561078257808060200190516020811015612a6e57600080fd5b5051610782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6060612ad48484600085612ade565b90505b9392505050565b606082471015612b39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180613cf86026913960400191505060405180910390fd5b612b4285612c99565b612bad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310612c1757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612bda565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612c79576040519150601f19603f3d011682016040523d82523d6000602084013e612c7e565b606091505b5091509150612c8e828286612ca3565b979650505050505050565b803b15155b919050565b60608315612cb2575081612ad7565b825115612cc25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d26578181015183820152602001612d0e565b50505050905090810190601f168015612d535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60408051808201909152600081526060602082015290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b604051806060016040528060008152602001600081526020016000151581525090565b6040518060a001604052806060815260200160608152602001612de4612d79565b815260200160608152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b60408051602081019091526000815290565b600082601f830112612e3a578081fd5b8135612e4d612e4882613c7f565b613c5b565b818152915060208083019084810181840286018201871015612e6e57600080fd5b60005b84811015612e96578135612e8481613c9d565b84529282019290820190600101612e71565b505050505092915050565b600082601f830112612eb1578081fd5b8135612ebf612e4882613c7f565b818152915060208083019084810181840286018201871015612ee057600080fd5b60005b84811015612e9657813584529282019290820190600101612ee3565b600082601f830112612f0f578081fd5b8135612f1d612e4882613c7f565b818152915060208083019084810160005b84811015612e96578135870160a0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c03011215612f6d57600080fd5b6040805182810167ffffffffffffffff8282108183111715612f8b57fe5b818452888601358352838601358984015260609150818601358484015260809350838601358284015284860135945080851115612fc757600080fd5b5050612fd78c8885870101612ff2565b91810191909152865250509282019290820190600101612f2e565b600082601f830112613002578081fd5b813567ffffffffffffffff81111561301657fe5b61304760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613c5b565b915080825283602082850101111561305e57600080fd5b8060208401602084013760009082016020015292915050565b8035600f81900b8114612c9e57600080fd5b60006080828403121561309a578081fd5b6040516080810181811067ffffffffffffffff821117156130b757fe5b60405290508082356130c881613c9d565b815260208301356130d881613cc2565b602082015260408301356130eb81613c9d565b604082015260608301356130fe81613cc2565b6060919091015292915050565b803560ff81168114612c9e57600080fd5b60006020828403121561312d578081fd5b81356106ed81613c9d565b600060208284031215613149578081fd5b81516106ed81613c9d565b60006020808385031215613166578182fd5b825167ffffffffffffffff81111561317c578283fd5b8301601f8101851361318c578283fd5b805161319a612e4882613c7f565b81815283810190838501858402850186018910156131b6578687fd5b8694505b838510156131d85780518352600194909401939185019185016131ba565b50979650505050505050565b6000602082840312156131f5578081fd5b81516106ed81613cc2565b60008060208385031215613212578081fd5b823567ffffffffffffffff80821115613229578283fd5b818501915085601f83011261323c578283fd5b81358181111561324a578384fd5b86602082850101111561325b578384fd5b60209290920196919550909350505050565b60008060008060008060a08789031215613285578182fd5b863561329081613c9d565b955060208701356132a081613c9d565b94506040870135935060608701359250608087013567ffffffffffffffff808211156132ca578384fd5b818901915089601f8301126132dd578384fd5b8135818111156132eb578485fd5b8a602080830285010111156132fe578485fd5b6020830194508093505050509295509295509295565b600060208284031215613325578081fd5b6040516020810181811067ffffffffffffffff8211171561334257fe5b604052825161335081613c9d565b81529392505050565b60006020828403121561336a578081fd5b813567ffffffffffffffff80821115613381578283fd5b908301906101008286031215613395578283fd5b61339f60a0613c5b565b8235828111156133ad578485fd5b6133b987828601612eff565b8252506020830135828111156133cd578485fd5b6133d987828601612e2a565b6020830152506133ec8660408501613089565b604082015260c083013582811115613402578485fd5b61340e87828601612ea1565b60608301525060e092909201356080830152509392505050565b600060808284031215613439578081fd5b6040516080810181811067ffffffffffffffff8211171561345657fe5b60405261346283613077565b815261347060208401613077565b602082015260408301356040820152606083013561348d81613cc2565b60608201529392505050565b6000606082840312156134aa578081fd5b6040516060810181811067ffffffffffffffff821117156134c757fe5b8060405250823581526020830135602082015260408301356134e881613cc2565b60408201529392505050565b600060608284031215613505578081fd5b6040516060810181811067ffffffffffffffff8211171561352257fe5b60405261352e8361310b565b815261353c6020840161310b565b6020820152604083013560408201528091505092915050565b60006020808385031215613567578182fd5b823567ffffffffffffffff8082111561357e578384fd5b9084019060408287031215613591578384fd5b6040516040810181811083821117156135a657fe5b60405282356135b481613c9d565b815282840135828111156135c6578586fd5b80840193505086601f8401126135da578485fd5b823591506135ea612e4883613c7f565b82815284810190848601868502860187018a1015613606578788fd5b8795505b8486101561362857803583526001959095019491860191860161360a565b50948201949094529695505050505050565b60006020828403121561364b578081fd5b5051919050565b6000815180845260208085019450808401835b8381101561369757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613665565b509495945050505050565b6000815180845260208085019450808401835b83811015613697578151875295820195908201906001016136b5565b73ffffffffffffffffffffffffffffffffffffffff808251168352602082015115156020840152806040830151166040840152506060810151151560608301525050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff938416815291909216602082015261ffff909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff93841681526020810192909252909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff95861681526020810194909452604084019290925283166060830152909116608082015260a00190565b73ffffffffffffffffffffffffffffffffffffffff948516815260208101939093529216604082015261ffff909116606082015260800190565b600061012080830160028a1061387257fe5b898452602080850192909252885190819052610140808501928281028601909101918a8201855b82811015613972578785037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec00186528151805186528481015185870152604080820151908701526060808201519087015260809081015160a091870182905280519187018290529088905b808210156139225782820187015188830160c0015290860190613904565b80821115613933578960c0828a0101525b97860197601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169690960160c00195505090830190600101613899565b5050505083810360408501526139888189613652565b91505061399860608401876136d1565b82810360e08401526139aa81866136a2565b91505082610100830152979650505050505050565b600f94850b81529290930b60208301526040820152606081019190915260800190565b6020808252600e908201527f496e76616c69642061546f6b656e000000000000000000000000000000000000604082015260600190565b6020808252601a908201527f4174206c65617374206f6e6520706f6f6c207265717569726564000000000000604082015260600190565b60208082526016908201527f4d4554484f44204e4f5420494d504c454d454e54454400000000000000000000604082015260600190565b60208082526024908201527f4f6e65206f662074686520746f6b656e73206d7573742062652071756f74655460408201527f6f6b656e00000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526013908201527f496e646578206e6f7420737570706f7274656400000000000000000000000000604082015260600190565b61ffff91909116815260200190565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260806060820181905260009082015260a00190565b93845260208401929092526040830152606082015260800190565b60ff958616815293909416602084015260408301919091526060820152608081019190915260a00190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613be8578283fd5b83018035915067ffffffffffffffff821115613c02578283fd5b602001915036819003821315613c1757600080fd5b9250929050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112613c51578182fd5b9190910192915050565b60405181810167ffffffffffffffff81118282101715613c7757fe5b604052919050565b600067ffffffffffffffff821115613c9357fe5b5060209081020190565b73ffffffffffffffffffffffffffffffffffffffff81168114613cbf57600080fd5b50565b8015158114613cbf57600080fdfe556e697377617056324c69623a20494e53554646494349454e545f494e5055545f414d4f554e54416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a164736f6c6343000705000a00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c830000000000000000000000000000000000000000000000000000000000000000000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f
Deployed Bytecode
0x6080604052600436106100655760003560e01c8063ad5c464811610043578063ad5c4648146100d9578063ca3817de146100ee578063e76b146c1461010357610065565b80630c3887351461006a578063439fab911461009557806386a06ff0146100b7575b600080fd5b34801561007657600080fd5b5061007f610116565b60405161008c9190613b1b565b60405180910390f35b3480156100a157600080fd5b506100b56100b0366004613200565b61013a565b005b3480156100c357600080fd5b506100cc610175565b60405161008c9190613715565b3480156100e557600080fd5b506100cc610199565b3480156100fa57600080fd5b506100cc6101bd565b6100b561011136600461326d565b6101e1565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613a50565b60405180910390fd5b7f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad81565b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8381565b7f00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f81565b60005b81811015610671578282828181106101f857fe5b905060200281019061020a9190613c1e565b356001141561025a57610255878761025061271061024a88888881811061022d57fe5b905060200281019061023f9190613c1e565b8b906040013561067a565b906106f6565b610777565b610669565b82828281811061026657fe5b90506020028101906102789190613c1e565b35600214156102cc57610255878761029b61271061024a88888881811061022d57fe5b8686868181106102a757fe5b90506020028101906102b99190613c1e565b6102c7906060810190613bb4565b610787565b8282828181106102d857fe5b90506020028101906102ea9190613c1e565b356003141561036d57610255878761030d61271061024a88888881811061022d57fe5b86868681811061031957fe5b905060200281019061032b9190613c1e565b61033c90604081019060200161311c565b87878781811061034857fe5b905060200281019061035a9190613c1e565b610368906060810190613bb4565b6107b1565b82828281811061037957fe5b905060200281019061038b9190613c1e565b356004141561040e5761025587876103ae61271061024a88888881811061022d57fe5b8686868181106103ba57fe5b90506020028101906103cc9190613c1e565b6103dd90604081019060200161311c565b8787878181106103e957fe5b90506020028101906103fb9190613c1e565b610409906060810190613bb4565b6109d8565b82828281811061041a57fe5b905060200281019061042c9190613c1e565b35600514156104af57610255878761044f61271061024a88888881811061022d57fe5b86868681811061045b57fe5b905060200281019061046d9190613c1e565b61047e90604081019060200161311c565b87878781811061048a57fe5b905060200281019061049c9190613c1e565b6104aa906060810190613bb4565b610d20565b8282828181106104bb57fe5b90506020028101906104cd9190613c1e565b35600614156105215761025587876104f061271061024a88888881811061022d57fe5b8686868181106104fc57fe5b905060200281019061050e9190613c1e565b61051c906060810190613bb4565b610fef565b82828281811061052d57fe5b905060200281019061053f9190613c1e565b35600714156105c257610255878761056261271061024a88888881811061022d57fe5b86868681811061056e57fe5b90506020028101906105809190613c1e565b61059190604081019060200161311c565b87878781811061059d57fe5b90506020028101906105af9190613c1e565b6105bd906060810190613bb4565b611038565b8282828181106105ce57fe5b90506020028101906105e09190613c1e565b356008141561063757610255878761060361271061024a88888881811061022d57fe5b86868681811061060f57fe5b90506020028101906106219190613c1e565b61063290604081019060200161311c565b6110bf565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613ae4565b6001016101e4565b50505050505050565b600082610689575060006106f0565b8282028284828161069657fe5b04146106ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d1e6021913960400191505060405180910390fd5b90505b92915050565b600080821161076657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161076f57fe5b049392505050565b6107828383836115a0565b505050565b61078f612d61565b61079b82840184613555565b905061067186858360000151846020015161189b565b6107b9612d79565b6107c582840184613428565b90506107d2848887611c07565b80606001511561086f57805160208201516040517fa6417ed600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169263a6417ed692610838928a906001906004016139bf565b600060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b50505050610671565b610877611d4e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141561094157805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df0212492899261090a92919084906001906004016139bf565b6000604051808303818588803b15801561092357600080fd5b505af1158015610937573d6000803e3d6000fd5b5050505050610671565b805160208201516040517f3df0212400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871692633df021249261099d928a906001906004016139bf565b600060405180830381600087803b1580156109b757600080fd5b505af11580156109cb573d6000803e3d6000fd5b5050505050505050505050565b6109e0612da0565b6109ec82840184613499565b9050866109f7611d4e565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415610acf577f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8373ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b158015610a9257600080fd5b505af1158015610aa6573d6000803e3d6000fd5b50505050507f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8390505b610ada858288611c07565b816040015115610b7757815160208301516040517f65b2489b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816926365b2489b92610b40928b90600190600401613b6e565b600060405180830381600087803b158015610b5a57600080fd5b505af1158015610b6e573d6000803e3d6000fd5b50505050610c06565b815160208301516040517f5b41b90800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881692635b41b90892610bd3928b90600190600401613b6e565b600060405180830381600087803b158015610bed57600080fd5b505af1158015610c01573d6000803e3d6000fd5b505050505b610c0e611d4e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415610d16576000610c6d7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8330611d66565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c831690632e1a7d4d90610ce2908490600401613b2a565b600060405180830381600087803b158015610cfc57600080fd5b505af1158015610d10573d6000803e3d6000fd5b50505050505b5050505050505050565b610d28612dc3565b610d3482840184613359565b90506000805b825151811015610d7c57610d7283600001518281518110610d5757fe5b60200260200101516060015183611e6190919063ffffffff16565b9150600101610d3a565b50858114610dea5760005b825151811015610de857610dc38261024a8986600001518581518110610da957fe5b60200260200101516060015161067a90919063ffffffff16565b8351805183908110610dd157fe5b602090810291909101015160600152600101610d87565b505b610df2611d4e565b73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415610ef8578473ffffffffffffffffffffffffffffffffffffffff1663945bcec9876000856000015186602001518760400151886060015189608001516040518863ffffffff1660e01b8152600401610e7e96959493929190613860565b6000604051808303818588803b158015610e9757600080fd5b505af1158015610eab573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610ef29190810190613154565b50610d16565b610f03858988611c07565b815160208301516040808501516060860151608087015192517f945bcec900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b169563945bcec995610f709560009592949193600401613860565b600060405180830381600087803b158015610f8a57600080fd5b505af1158015610f9e573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610fe49190810190613154565b505050505050505050565b61103185858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ed592505050565b5050505050565b611040612df8565b61104c828401846134f4565b9050611059848887611c07565b8051602082015160408084015190517f9169558600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88169363916955869361099d93919290918b9160019190600401613b89565b60006110c9611d4e565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146111015784611123565b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c835b9050600061112f611d4e565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146111675784611189565b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c835b9050611193611d4e565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611248577f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8373ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561122e57600080fd5b505af1158015611242573d6000803e3d6000fd5b50505050505b611253838386611c07565b60008373ffffffffffffffffffffffffffffffffffffffff1663217a4b706040518163ffffffff1660e01b815260040160206040518083038186803b15801561129b57600080fd5b505afa1580156112af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d39190613138565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156113bd576040517ff3287c2f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f3287c2f90611365908590899060019030906000906004016137e7565b602060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b7919061363a565b5061147f565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561144d576040517f6846fb5000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851690636846fb5090611365908690899060019030906000906004016137e7565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613a87565b611487611d4e565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415610671576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c831690632e1a7d4d9082906370a0823190611534903090600401613715565b60206040518083038186803b15801561154c57600080fd5b505afa158015611560573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611584919061363a565b6040518263ffffffff1660e01b815260040161099d9190613b2a565b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8373ffffffffffffffffffffffffffffffffffffffff84811690821614156116f3576115ea611d4e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461168357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f44657374696e6174696f6e20746f6b656e2073686f756c642062652045544800604482015290519081900360640190fd5b8073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156116d657600080fd5b505af11580156116ea573d6000803e3d6000fd5b50505050611895565b6116fb611d4e565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561182e578073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146117c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f44657374696e6174696f6e20746f6b656e2073686f756c642062652077657468604482015290519081900360640190fd5b8073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561181057600080fd5b505af1158015611824573d6000803e3d6000fd5b5050505050611895565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c69642066726f6d546f6b656e000000000000000000000000000000604482015290519081900360640190fd5b50505050565b8051600090806118d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c90613a19565b60006118e1611d4e565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161415611a24578473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0876040518263ffffffff1660e01b81526004016000604051808303818588803b15801561195c57600080fd5b505af1158015611970573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8560008151811061199e57fe5b6020026020010151886040518363ffffffff1660e01b81526004016119c4929190613736565b602060405180830381600087803b1580156119de57600080fd5b505af11580156119f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1691906131e4565b611a1f57600080fd5b611a5e565b611a438785600081518110611a3557fe5b6020026020010151886123d0565b5073ffffffffffffffffffffffffffffffffffffffff841615155b85925060005b82811015611b71576000858281518110611a7a57fe5b602090810291909101015190508074010000000000000000000000000000000000000000811615611ab187838360a182901c6125a6565b965060008082611ac357886000611ac7565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a60010114611b0f578d8a60010181518110611b0257fe5b6020026020010151611b11565b305b6040518463ffffffff1660e01b8152600401611b2f93929190613b33565b600060405180830381600087803b158015611b4957600080fd5b505af1158015611b5d573d6000803e3d6000fd5b505050505050505050806001019050611a64565b508015611bfd576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690632e1a7d4d90611bca908690600401613b2a565b600060405180830381600087803b158015611be457600080fd5b505af1158015611bf8573d6000803e3d6000fd5b505050505b5050949350505050565b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610782576040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152829060009073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e90611c91903090899060040161375c565b60206040518083038186803b158015611ca957600080fd5b505afa158015611cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce1919061363a565b90508281101561103157611d0d73ffffffffffffffffffffffffffffffffffffffff8316866000612660565b61103173ffffffffffffffffffffffffffffffffffffffff8316867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6127ee565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b600073ffffffffffffffffffffffffffffffffffffffff831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415611db8575073ffffffffffffffffffffffffffffffffffffffff8116316106f0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190611e0a908590600401613715565b60206040518083038186803b158015611e2257600080fd5b505afa158015611e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5a919061363a565b90506106f0565b6000828201838110156106ed57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b611edd612e18565b81806020019051810190611ef19190613314565b9050806000015173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561215857611f33611d4e565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561205e57611f917f00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f8685611c07565b6040517f80500d2000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f16906380500d2090612027907f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad90879030906004016137b7565b600060405180830381600087803b15801561204157600080fd5b505af1158015612055573d6000803e3d6000fd5b50505050612153565b6120897f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad8685611c07565b6040517f69328dec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad16906369328dec906120ff908790879030906004016137b7565b602060405180830381600087803b15801561211957600080fd5b505af115801561212d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612151919061363a565b505b611031565b805173ffffffffffffffffffffffffffffffffffffffff8581169116141561239e57612182611d4e565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156122a4576040517f474cf53d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f169063474cf53d90859061226d907f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad9030907f000000000000000000000000000000000000000000000000000000000000000090600401613783565b6000604051808303818588803b15801561228657600080fd5b505af115801561229a573d6000803e3d6000fd5b5050505050612153565b6122cf7f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad8685611c07565b6040517f617ba03700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad169063617ba03790612367908890879030907f000000000000000000000000000000000000000000000000000000000000000090600401613826565b600060405180830381600087803b15801561238157600080fd5b505af1158015612395573d6000803e3d6000fd5b50505050611031565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016c906139e2565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b602083106124a657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612469565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612508576040519150601f19603f3d011682016040523d82523d6000602084013e61250d565b606091505b509150915081801561253b57508051158061253b575080806020019051602081101561253857600080fd5b50515b61103157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000808511612600576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180613cd16027913960400191505060405180910390fd5b60008061260d868661293b565b9092509050600061261e888661067a565b9050600061262c828461067a565b90506000612646836126408761271061067a565b90611e61565b905080828161265157fe5b049a9950505050505050505050565b80158061270c5750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156126de57600080fd5b505afa1580156126f2573d6000803e3d6000fd5b505050506040513d602081101561270857600080fd5b5051155b612761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180613d696036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526107829084906129ed565b60006128ab828573ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561287957600080fd5b505afa15801561288d573d6000803e3d6000fd5b505050506040513d60208110156128a357600080fd5b505190611e61565b6040805173ffffffffffffffffffffffffffffffffffffffff8616602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790529091506118959085906129ed565b6000806000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561298757600080fd5b505afa15801561299b573d6000803e3d6000fd5b505050506040513d60608110156129b157600080fd5b5080516020909101516dffffffffffffffffffffffffffff9182169350169050846129dd5780826129e0565b81815b9097909650945050505050565b6060612a4f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612ac59092919063ffffffff16565b80519091501561078257808060200190516020811015612a6e57600080fd5b5051610782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613d3f602a913960400191505060405180910390fd5b6060612ad48484600085612ade565b90505b9392505050565b606082471015612b39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180613cf86026913960400191505060405180910390fd5b612b4285612c99565b612bad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310612c1757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612bda565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612c79576040519150601f19603f3d011682016040523d82523d6000602084013e612c7e565b606091505b5091509150612c8e828286612ca3565b979650505050505050565b803b15155b919050565b60608315612cb2575081612ad7565b825115612cc25782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d26578181015183820152602001612d0e565b50505050905090810190601f168015612d535780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60408051808201909152600081526060602082015290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b604051806060016040528060008152602001600081526020016000151581525090565b6040518060a001604052806060815260200160608152602001612de4612d79565b815260200160608152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b60408051602081019091526000815290565b600082601f830112612e3a578081fd5b8135612e4d612e4882613c7f565b613c5b565b818152915060208083019084810181840286018201871015612e6e57600080fd5b60005b84811015612e96578135612e8481613c9d565b84529282019290820190600101612e71565b505050505092915050565b600082601f830112612eb1578081fd5b8135612ebf612e4882613c7f565b818152915060208083019084810181840286018201871015612ee057600080fd5b60005b84811015612e9657813584529282019290820190600101612ee3565b600082601f830112612f0f578081fd5b8135612f1d612e4882613c7f565b818152915060208083019084810160005b84811015612e96578135870160a0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c03011215612f6d57600080fd5b6040805182810167ffffffffffffffff8282108183111715612f8b57fe5b818452888601358352838601358984015260609150818601358484015260809350838601358284015284860135945080851115612fc757600080fd5b5050612fd78c8885870101612ff2565b91810191909152865250509282019290820190600101612f2e565b600082601f830112613002578081fd5b813567ffffffffffffffff81111561301657fe5b61304760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613c5b565b915080825283602082850101111561305e57600080fd5b8060208401602084013760009082016020015292915050565b8035600f81900b8114612c9e57600080fd5b60006080828403121561309a578081fd5b6040516080810181811067ffffffffffffffff821117156130b757fe5b60405290508082356130c881613c9d565b815260208301356130d881613cc2565b602082015260408301356130eb81613c9d565b604082015260608301356130fe81613cc2565b6060919091015292915050565b803560ff81168114612c9e57600080fd5b60006020828403121561312d578081fd5b81356106ed81613c9d565b600060208284031215613149578081fd5b81516106ed81613c9d565b60006020808385031215613166578182fd5b825167ffffffffffffffff81111561317c578283fd5b8301601f8101851361318c578283fd5b805161319a612e4882613c7f565b81815283810190838501858402850186018910156131b6578687fd5b8694505b838510156131d85780518352600194909401939185019185016131ba565b50979650505050505050565b6000602082840312156131f5578081fd5b81516106ed81613cc2565b60008060208385031215613212578081fd5b823567ffffffffffffffff80821115613229578283fd5b818501915085601f83011261323c578283fd5b81358181111561324a578384fd5b86602082850101111561325b578384fd5b60209290920196919550909350505050565b60008060008060008060a08789031215613285578182fd5b863561329081613c9d565b955060208701356132a081613c9d565b94506040870135935060608701359250608087013567ffffffffffffffff808211156132ca578384fd5b818901915089601f8301126132dd578384fd5b8135818111156132eb578485fd5b8a602080830285010111156132fe578485fd5b6020830194508093505050509295509295509295565b600060208284031215613325578081fd5b6040516020810181811067ffffffffffffffff8211171561334257fe5b604052825161335081613c9d565b81529392505050565b60006020828403121561336a578081fd5b813567ffffffffffffffff80821115613381578283fd5b908301906101008286031215613395578283fd5b61339f60a0613c5b565b8235828111156133ad578485fd5b6133b987828601612eff565b8252506020830135828111156133cd578485fd5b6133d987828601612e2a565b6020830152506133ec8660408501613089565b604082015260c083013582811115613402578485fd5b61340e87828601612ea1565b60608301525060e092909201356080830152509392505050565b600060808284031215613439578081fd5b6040516080810181811067ffffffffffffffff8211171561345657fe5b60405261346283613077565b815261347060208401613077565b602082015260408301356040820152606083013561348d81613cc2565b60608201529392505050565b6000606082840312156134aa578081fd5b6040516060810181811067ffffffffffffffff821117156134c757fe5b8060405250823581526020830135602082015260408301356134e881613cc2565b60408201529392505050565b600060608284031215613505578081fd5b6040516060810181811067ffffffffffffffff8211171561352257fe5b60405261352e8361310b565b815261353c6020840161310b565b6020820152604083013560408201528091505092915050565b60006020808385031215613567578182fd5b823567ffffffffffffffff8082111561357e578384fd5b9084019060408287031215613591578384fd5b6040516040810181811083821117156135a657fe5b60405282356135b481613c9d565b815282840135828111156135c6578586fd5b80840193505086601f8401126135da578485fd5b823591506135ea612e4883613c7f565b82815284810190848601868502860187018a1015613606578788fd5b8795505b8486101561362857803583526001959095019491860191860161360a565b50948201949094529695505050505050565b60006020828403121561364b578081fd5b5051919050565b6000815180845260208085019450808401835b8381101561369757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101613665565b509495945050505050565b6000815180845260208085019450808401835b83811015613697578151875295820195908201906001016136b5565b73ffffffffffffffffffffffffffffffffffffffff808251168352602082015115156020840152806040830151166040840152506060810151151560608301525050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff938416815291909216602082015261ffff909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff93841681526020810192909252909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff95861681526020810194909452604084019290925283166060830152909116608082015260a00190565b73ffffffffffffffffffffffffffffffffffffffff948516815260208101939093529216604082015261ffff909116606082015260800190565b600061012080830160028a1061387257fe5b898452602080850192909252885190819052610140808501928281028601909101918a8201855b82811015613972578785037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec00186528151805186528481015185870152604080820151908701526060808201519087015260809081015160a091870182905280519187018290529088905b808210156139225782820187015188830160c0015290860190613904565b80821115613933578960c0828a0101525b97860197601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169690960160c00195505090830190600101613899565b5050505083810360408501526139888189613652565b91505061399860608401876136d1565b82810360e08401526139aa81866136a2565b91505082610100830152979650505050505050565b600f94850b81529290930b60208301526040820152606081019190915260800190565b6020808252600e908201527f496e76616c69642061546f6b656e000000000000000000000000000000000000604082015260600190565b6020808252601a908201527f4174206c65617374206f6e6520706f6f6c207265717569726564000000000000604082015260600190565b60208082526016908201527f4d4554484f44204e4f5420494d504c454d454e54454400000000000000000000604082015260600190565b60208082526024908201527f4f6e65206f662074686520746f6b656e73206d7573742062652071756f74655460408201527f6f6b656e00000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526013908201527f496e646578206e6f7420737570706f7274656400000000000000000000000000604082015260600190565b61ffff91909116815260200190565b90815260200190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260806060820181905260009082015260a00190565b93845260208401929092526040830152606082015260800190565b60ff958616815293909416602084015260408301919091526060820152608081019190915260a00190565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613be8578283fd5b83018035915067ffffffffffffffff821115613c02578283fd5b602001915036819003821315613c1757600080fd5b9250929050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112613c51578182fd5b9190910192915050565b60405181810167ffffffffffffffff81118282101715613c7757fe5b604052919050565b600067ffffffffffffffff821115613c9357fe5b5060209081020190565b73ffffffffffffffffffffffffffffffffffffffff81168114613cbf57600080fd5b50565b8015158114613cbf57600080fdfe556e697377617056324c69623a20494e53554646494349454e545f494e5055545f414d4f554e54416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a164736f6c6343000705000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c830000000000000000000000000000000000000000000000000000000000000000000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f
-----Decoded View---------------
Arg [0] : _weth (address): 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83
Arg [1] : _aaveV3RefCode (uint16): 0
Arg [2] : _aaveV3Pool (address): 0x794a61358D6845594F94dc1DB02A252b5b4814aD
Arg [3] : _aaveV3WethGateway (address): 0x17d013C19FE25cf4D911CE85eD5f40FE8880F46f
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000794a61358d6845594f94dc1db02a252b5b4814ad
Arg [3] : 00000000000000000000000017d013c19fe25cf4d911ce85ed5f40fe8880f46f
Loading...
Loading
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.