Source Code
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
CurveHelper
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GNU AGPLv3
pragma solidity 0.8.20;
import { ICurveRouterNgPoolsOnlyV1 } from "contracts/curve/interfaces/ICurveRouterNgPoolsOnlyV1.sol";
import { ICurveRouterWrapper } from "contracts/curve/interfaces/ICurveRouterWrapper.sol";
import { Constants } from "contracts/shared/Constants.sol";
import { ERC20 } from "@rari-capital/solmate/src/tokens/ERC20.sol";
library CurveHelper {
/// @notice Get the last non-zero token in the route
function getLastTokenInRoute(address[11] memory route) public pure returns (address) {
for (uint256 i = route.length - 1; i >= 0; i--) {
if (route[i] != address(0)) {
return route[i];
}
}
revert("No token in route");
}
struct CurveSwapExtraParams {
address[11] route;
uint256[4][5] swapParams;
uint256 swapSlippageBufferBps;
}
function decodeCurveSwapExtraParams(
bytes memory data
) public pure returns (CurveSwapExtraParams memory _swapExtraParams) {
(_swapExtraParams.route, _swapExtraParams.swapParams, _swapExtraParams.swapSlippageBufferBps) = abi.decode(
data,
(address[11], uint256[4][5], uint256)
);
}
function swapExactOutput(
ICurveRouterNgPoolsOnlyV1 _curveRouter,
address[11] memory _route,
uint256[4][5] memory _swapParams,
address[11] memory _reverseRoute,
uint256[4][5] memory _reverseSwapParams,
uint256 swapSlippageBufferBps,
uint256 maxSlippageSurplusSwapBps,
uint256 _amountOutput,
uint256 _maxInputAmount
) public returns (uint256) {
// As Curve does not support exact output swaps, we need to calculate the required input amount
// and add a buffer to account for potential slippage. Then swapping back the surplus amount
address inputToken = _route[0];
// Calculate the required input amount
uint256 estimatedAmountIn = _curveRouter.get_dx(_route, _swapParams, _amountOutput);
// Add a buffer to account for potential slippage
uint256 amountIn = (estimatedAmountIn * (Constants.ONE_HUNDRED_PERCENT_BPS + swapSlippageBufferBps)) /
Constants.ONE_HUNDRED_PERCENT_BPS;
// amountIn cannot exceed current balance of input token
uint256 inputTokenBalance = ERC20(inputToken).balanceOf(address(this));
if (amountIn > inputTokenBalance) {
amountIn = inputTokenBalance;
}
if (amountIn > _maxInputAmount) {
revert ICurveRouterWrapper.InputAmountExceedsMaximum(amountIn, _maxInputAmount);
}
// Input token balance before the swap
uint256 inputTokenBalanceBefore = ERC20(inputToken).balanceOf(address(this));
// Approve the router to spend our tokens
ERC20(inputToken).approve(address(_curveRouter), _maxInputAmount);
// Execute the swap
uint256 actualAmountOut = _curveRouter.exchange(
_route,
_swapParams,
amountIn,
_amountOutput, // This is now our minimum expected output
address(this) // The receiver of the output tokens
);
// Get the difference between the actual and expected output
uint256 redundantAmount = actualAmountOut - _amountOutput;
// Swap the redundant amount back to the input token with the reverse route
if (redundantAmount > 0) {
// Calculate estimated amount out for the swap back
uint256 estimatedSwapBackAmountOut = _curveRouter.get_dy(
_reverseRoute,
_reverseSwapParams,
redundantAmount
);
// Calculate minimum output amount using maxSlippageSurplusSwapBps
uint256 minSwapBackAmountOut = (estimatedSwapBackAmountOut *
(Constants.ONE_HUNDRED_PERCENT_BPS - maxSlippageSurplusSwapBps)) / Constants.ONE_HUNDRED_PERCENT_BPS;
address outputToken = getLastTokenInRoute(_route);
ERC20(outputToken).approve(address(_curveRouter), redundantAmount);
_curveRouter.exchange(
_reverseRoute,
_reverseSwapParams,
redundantAmount,
minSwapBackAmountOut,
address(this)
);
}
// Input token balance after the swap
uint256 inputTokenBalanceAfter = ERC20(inputToken).balanceOf(address(this));
if (inputTokenBalanceAfter < inputTokenBalanceBefore) {
uint256 usedInputAmount = inputTokenBalanceBefore - inputTokenBalanceAfter;
return usedInputAmount;
} else {
return 0;
}
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
/*//////////////////////////////////////////////////////////////
METADATA STORAGE
//////////////////////////////////////////////////////////////*/
string public name;
string public symbol;
uint8 public immutable decimals;
/*//////////////////////////////////////////////////////////////
ERC20 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*//////////////////////////////////////////////////////////////
EIP-2612 STORAGE
//////////////////////////////////////////////////////////////*/
uint256 internal immutable INITIAL_CHAIN_ID;
bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
mapping(address => uint256) public nonces;
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals
) {
name = _name;
symbol = _symbol;
decimals = _decimals;
INITIAL_CHAIN_ID = block.chainid;
INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
}
/*//////////////////////////////////////////////////////////////
ERC20 LOGIC
//////////////////////////////////////////////////////////////*/
function approve(address spender, uint256 amount) public virtual returns (bool) {
allowance[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transfer(address to, uint256 amount) public virtual returns (bool) {
balanceOf[msg.sender] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(msg.sender, to, amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.
if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;
balanceOf[from] -= amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(from, to, amount);
return true;
}
/*//////////////////////////////////////////////////////////////
EIP-2612 LOGIC
//////////////////////////////////////////////////////////////*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual {
require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");
// Unchecked because the only math done is incrementing
// the owner's nonce which cannot realistically overflow.
unchecked {
address recoveredAddress = ecrecover(
keccak256(
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(
abi.encode(
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
),
owner,
spender,
value,
nonces[owner]++,
deadline
)
)
)
),
v,
r,
s
);
require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");
allowance[recoveredAddress][spender] = value;
}
emit Approval(owner, spender, value);
}
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
}
function computeDomainSeparator() internal view virtual returns (bytes32) {
return
keccak256(
abi.encode(
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
keccak256(bytes(name)),
keccak256("1"),
block.chainid,
address(this)
)
);
}
/*//////////////////////////////////////////////////////////////
INTERNAL MINT/BURN LOGIC
//////////////////////////////////////////////////////////////*/
function _mint(address to, uint256 amount) internal virtual {
totalSupply += amount;
// Cannot overflow because the sum of all user
// balances can't exceed the max uint256 value.
unchecked {
balanceOf[to] += amount;
}
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal virtual {
balanceOf[from] -= amount;
// Cannot underflow because a user's balance
// will never be larger than the total supply.
unchecked {
totalSupply -= amount;
}
emit Transfer(from, address(0), amount);
}
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity ^0.8.20;
/**
* @dev Interface for Curve.Fi RouterNG contract (pools-only version 1).
* @dev Generated from original ABI: https://fraxscan.com/address/0x9f2Fa7709B30c75047980a0d70A106728f0Ef2db#code
*/
interface ICurveRouterNgPoolsOnlyV1 {
event Exchange(
address indexed sender,
address indexed receiver,
address[11] route,
uint256[4][5] swap_params,
uint256 in_amount,
uint256 out_amount
);
function exchange(
address[11] calldata _route,
uint256[4][5] calldata _swap_params,
uint256 _amount,
uint256 _min_dy
) external payable returns (uint256);
function exchange(
address[11] calldata _route,
uint256[4][5] calldata _swap_params,
uint256 _amount,
uint256 _min_dy,
address _receiver
) external payable returns (uint256);
function get_dy(
address[11] calldata _route,
uint256[4][5] calldata _swap_params,
uint256 _amount
) external view returns (uint256);
function get_dx(
address[11] calldata _route,
uint256[4][5] calldata _swap_params,
uint256 _out_amount
) external view returns (uint256);
function version() external view returns (string memory);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity ^0.8.20;
import "./IRouterNG.sol";
interface ICurveRouterWrapper {
error InsufficientOutputAmount(uint256 amountOut, uint256 minAmountOut);
error InputAmountExceedsMaximum(uint256 amountIn, uint256 maxAmountIn);
error InvalidRouteLength(address[11] route);
error InvalidInputTokenInRoute(address tokenIn, address[11] route);
error NotFoundKeyForSwapExtraParams(address inputToken, address outputToken, string key);
error DuplicateKeyForSwapExtraParams(address inputToken, address outputToken, string key);
function router() external view returns (ICurveRouterNG);
/**
* @dev Executes a token swap on Curve with exact input
* @param route The route of the swap
* @param swapParams The swap parameters
* @param amountIn The exact amount of input tokens
* @param minAmountOut The minimum amount of output tokens to receive
* @param pools The pools to use for the swap
* @param tokenIn The address of the input token
* @return The amount of output tokens received
*/
function swapExactIn(
address[11] calldata route,
uint256[5][5] calldata swapParams,
uint256 amountIn,
uint256 minAmountOut,
address[5] calldata pools,
address tokenIn
) external returns (uint256);
/**
* @dev Executes a token swap on Curve with exact output
* @param route The route of the swap
* @param swapParams The swap parameters
* @param amountOut The exact amount of output tokens to receive
* @param maxAmountIn The maximum amount of input tokens to spend
* @param pools The pools to use for the swap
* @param tokenIn The address of the input token
* @return The amount of input tokens spent
*/
function swapExactOutput(
address[11] calldata route,
uint256[5][5] calldata swapParams,
uint256 amountOut,
uint256 maxAmountIn,
address[5] calldata pools,
address tokenIn
) external returns (uint256);
/**
* @dev Gets the expected output amount for a swap
* @param route The route of the swap
* @param swapParams The swap parameters
* @param amountIn The amount of input tokens
* @param pools The pools to use for the swap
* @return The expected amount of output tokens
*/
function getExpectedOutput(
address[11] calldata route,
uint256[5][5] calldata swapParams,
uint256 amountIn,
address[5] calldata pools
) external view returns (uint256);
/**
* @dev Gets the expected input amount for a desired output amount
* @param route The route of the swap
* @param swapParams The swap parameters
* @param amountOut The desired amount of output tokens
* @param pools The pools to use for the swap
* @return The expected amount of input tokens required
*/
function getExpectedInput(
address[11] calldata route,
uint256[5][5] calldata swapParams,
uint256 amountOut,
address[5] calldata pools
) external view returns (uint256);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity ^0.8.20;
/**
* @dev Interface for Curve.Fi RouterNG contract.
* @dev See original implementation in official repository:
* https://github.com/curvefi/curve-router-ng/blob/master/contracts/Router.vy
* ABI: https://etherscan.io/address/0x16C6521Dff6baB339122a0FE25a9116693265353#code
*/
interface ICurveRouterNG {
event Exchange(
address indexed sender,
address indexed receiver,
address[11] route,
uint256[5][5] swap_params,
address[5] pools,
uint256 in_amount,
uint256 out_amount
);
fallback() external payable;
receive() external payable;
function exchange(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _amount,
uint256 _min_dy
) external payable returns (uint256);
function exchange(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _amount,
uint256 _min_dy,
address[5] calldata _pools
) external payable returns (uint256);
function exchange(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _amount,
uint256 _min_dy,
address[5] calldata _pools,
address _receiver
) external payable returns (uint256);
function get_dy(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _amount
) external view returns (uint256);
function get_dy(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _amount,
address[5] calldata _pools
) external view returns (uint256);
function get_dx(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _out_amount,
address[5] calldata _pools
) external view returns (uint256);
function get_dx(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _out_amount,
address[5] calldata _pools,
address[5] calldata _base_pools
) external view returns (uint256);
function get_dx(
address[11] calldata _route,
uint256[5][5] calldata _swap_params,
uint256 _out_amount,
address[5] calldata _pools,
address[5] calldata _base_pools,
address[5] calldata _base_tokens
) external view returns (uint256);
function version() external view returns (string memory);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity ^0.8.0;
library Constants {
// Shared definitions of how we represent percentages and basis points
uint16 public constant ONE_BPS = 100; // 1 basis point with 2 decimals
uint32 public constant ONE_PERCENT_BPS = ONE_BPS * 100;
uint32 public constant ONE_HUNDRED_PERCENT_BPS = ONE_PERCENT_BPS * 100;
uint32 public constant ORACLE_BASE_CURRENCY_UNIT = 1e8;
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "london",
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"maxAmountIn","type":"uint256"}],"name":"InputAmountExceedsMaximum","type":"error"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"decodeCurveSwapExtraParams","outputs":[{"components":[{"internalType":"address[11]","name":"route","type":"address[11]"},{"internalType":"uint256[4][5]","name":"swapParams","type":"uint256[4][5]"},{"internalType":"uint256","name":"swapSlippageBufferBps","type":"uint256"}],"internalType":"struct CurveHelper.CurveSwapExtraParams","name":"_swapExtraParams","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address[11]","name":"route","type":"address[11]"}],"name":"getLastTokenInRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"}]Contract Creation Code
6080806040523461001d57610c9690816100238239308161038b0152f35b600080fdfe60806040908082526004908136101561001757600080fd5b600090813560e01c9081633fff811314610384575080636d5fe7ce146103085763fd47dd581461004657600080fd5b602090816003193601126103055782359167ffffffffffffffff9384841161030157366023850112156103015783810135948086116102ee57865196601f96610097818901601f191686018a6105f4565b8089528489019636602483830101116102ea5781879260248893018a378a0101528051906060820192828410908411176102d7578281526100d783610589565b610160928336823782528482019181516100f0816105bc565b86885b60a081106102bb5750508352818101978789528a518b01998b888c019b6104009d8e9103126102b7578b603f820112156102b75784519b6101338d610589565b8c61018083019482861161028c57905b8582106102945750508061019f83011215610290578551939291908e610168866105bc565b8592019381851161028c57908e9695949392919a999a915b84831061021a5750505050518a528452525196878587915b600b83106101fa575050505051918601919084925b600584106101c157888888516103e0820152f35b8483518288905b8582106101e3575050506080600192019301930192916101ad565b9280839460019394518152019301910187926101c8565b83516001600160a01b031681529281019260019290920191879101610198565b90838382949596979899509c9b9c01121561028c57875161023a816105d8565b806080850184811161028857918e9286949294905b808210610270575050608093508152019201908e96959493929a999a610180565b919381939581925181520192018f939194929461024f565b8f80fd5b8c80fd5b8a80fd5b81516001600160a01b03811681036102b3578152908b01908b01610143565b8d80fd5b8980fd5b84516102c6816105d8565b6080368237818401520187906100f3565b634e487b7160e01b865260418452602486fd5b8680fd5b634e487b7160e01b845260418252602484fd5b8280fd5b80fd5b5082906101603660031901126103055736602312156103055781519261032d84610589565b83916101649136831161038057925b8284106103605760208561034f88610660565b90516001600160a01b039091168152f35b83356001600160a01b03811681036103015781526020938401930161033c565b5080fd5b84915083307f00000000000000000000000000000000000000000000000000000000000000001461056c5761086036600319011261056c576001600160a01b039390358481168103610380573660431215610380576103e283610589565b6101849183368411610380576024905b848210610570575050366101a3121561030557845195610411876105bc565b866104049436861161056c57905b85821061051c5750503661042312156103805785519061043e82610589565b81906105649536871161051857915b8683106104ff575050503661058312156103805785519161046d836105bc565b826107e49536871161030157905b8682106104ab576020896104a48c8b8b8b8b8b61084435956108243595610804359535946107cc565b9051908152f35b36601f830112156103015788516104c1816105d8565b80608084013681116104fb5784915b8183106104eb5750505081602091608093520191019061047b565b82358152602092830192016104d0565b8580fd5b823582811681036104fb5781526020928301920161044d565b8480fd5b36601f8301121561056c578751610532816105d8565b80608084013681116102ea5784915b81831061055c5750505081602091608093520191019061041f565b8235815260209283019201610541565b8380fd5b8135888116810361056c578152602091820191016103f2565b610160810190811067ffffffffffffffff8211176105a657604052565b634e487b7160e01b600052604160045260246000fd5b60a0810190811067ffffffffffffffff8211176105a657604052565b6080810190811067ffffffffffffffff8211176105a657604052565b90601f8019910116810190811067ffffffffffffffff8211176105a657604052565b9190820391821161062357565b634e487b7160e01b600052601160045260246000fd5b90600b81101561064a5760051b0190565b634e487b7160e01b600052603260045260246000fd5b90600a5b6001600160a01b03806106778386610639565b51166106a25750801561068d5760001901610664565b60246000634e487b7160e01b81526011600452fd5b9192906106ae91610639565b511690565b6000915b600b83106106c457505050565b81516001600160a01b0316815260019290920191602091820191016106b7565b9060009182915b600583106106f95750505050565b815184825b6004821061071c5750505060206080600192019201920191906106eb565b6001908351815260208091019301910190916106fe565b6107576103e09295949361074c836104008101986106b3565b6101608301906106e4565b0152565b8181029291811591840414171561062357565b90816020910312610786575180151581036107865790565b600080fd5b9390959491926107b2610420946107a78761044081019a6106b3565b6101608701906106e4565b6103e08501526104008401526001600160a01b0316910152565b8151604051637b5e2c7b60e01b81526001600160a01b03909116989297949694959194919392916020828061080686888e60048501610733565b03816001600160a01b038a165afa9182156109ca57600092610c2c575b50620f4240019081620f42401161062357620f4240916108429161075b565b046040516370a0823160e01b81523060048201526020816024818d5afa9081156109ca57600091610bfa575b50808211610bf2575b50898111610bd4576040516370a0823160e01b81523060048201529960208b6024818d5afa9a8b156109ca5760009b610b9f575b5060405163095ea7b360e01b8082526001600160a01b03881660048301526024820192909252909392919060208160448160008f5af180156109ca578a926020928592610b82575b506109166040519485938493633f51256760e21b998a865230936004870161078b565b038160006001600160a01b038b165af19081156109ca57600091610b4e575b509061094091610616565b94856109d6575b50505050505050506020602491604051928380926370a0823160e01b82523060048301525afa9081156109ca57600091610998575b50818110156109915761098e91610616565b90565b5050600090565b906020823d6020116109c2575b816109b2602093836105f4565b810103126103055750513861097c565b3d91506109a5565b6040513d6000823e3d90fd5b6040516308f109c360e11b815290602082806109f78a898d60048501610733565b03816001600160a01b038a165afa9182156109ca57600092610b1a575b50620f424003620f4240811161062357610a34620f42409160209361075b565b04976001600160a01b0390610a4890610660565b6040519485526001600160a01b03871660048601526024850188905284916044918391600091165af180156109ca57602096600093610a9e92610aed575b5060405198899788968795865230936004870161078b565b03926001600160a01b03165af180156109ca57610ac2575b80808080808080610947565b602090813d8311610ae6575b610ad881836105f4565b810103126107865738610ab6565b503d610ace565b610b0c90893d8b11610b13575b610b0481836105f4565b81019061076e565b5038610a86565b503d610afa565b90916020823d602011610b46575b81610b35602093836105f4565b810103126103055750519038610a14565b3d9150610b28565b906020823d602011610b7a575b81610b68602093836105f4565b81010312610305575051610940610935565b3d9150610b5b565b610b9890843d8611610b1357610b0481836105f4565b50386108f3565b909a6020823d602011610bcc575b81610bba602093836105f4565b810103126103055750519960006108ab565b3d9150610bad565b6044908a604051916334398dcf60e01b835260048301526024820152fd5b905038610877565b906020823d602011610c24575b81610c14602093836105f4565b810103126103055750513861086e565b3d9150610c07565b90916020823d602011610c58575b81610c47602093836105f4565b810103126103055750519038610823565b3d9150610c3a56fea26469706673582212200032fda758825f3367722947d71ecffef25967cc85edb6707891c84ddb699ffd64736f6c63430008140033
Deployed Bytecode
0x60806040908082526004908136101561001757600080fd5b600090813560e01c9081633fff811314610384575080636d5fe7ce146103085763fd47dd581461004657600080fd5b602090816003193601126103055782359167ffffffffffffffff9384841161030157366023850112156103015783810135948086116102ee57865196601f96610097818901601f191686018a6105f4565b8089528489019636602483830101116102ea5781879260248893018a378a0101528051906060820192828410908411176102d7578281526100d783610589565b610160928336823782528482019181516100f0816105bc565b86885b60a081106102bb5750508352818101978789528a518b01998b888c019b6104009d8e9103126102b7578b603f820112156102b75784519b6101338d610589565b8c61018083019482861161028c57905b8582106102945750508061019f83011215610290578551939291908e610168866105bc565b8592019381851161028c57908e9695949392919a999a915b84831061021a5750505050518a528452525196878587915b600b83106101fa575050505051918601919084925b600584106101c157888888516103e0820152f35b8483518288905b8582106101e3575050506080600192019301930192916101ad565b9280839460019394518152019301910187926101c8565b83516001600160a01b031681529281019260019290920191879101610198565b90838382949596979899509c9b9c01121561028c57875161023a816105d8565b806080850184811161028857918e9286949294905b808210610270575050608093508152019201908e96959493929a999a610180565b919381939581925181520192018f939194929461024f565b8f80fd5b8c80fd5b8a80fd5b81516001600160a01b03811681036102b3578152908b01908b01610143565b8d80fd5b8980fd5b84516102c6816105d8565b6080368237818401520187906100f3565b634e487b7160e01b865260418452602486fd5b8680fd5b634e487b7160e01b845260418252602484fd5b8280fd5b80fd5b5082906101603660031901126103055736602312156103055781519261032d84610589565b83916101649136831161038057925b8284106103605760208561034f88610660565b90516001600160a01b039091168152f35b83356001600160a01b03811681036103015781526020938401930161033c565b5080fd5b84915083307f000000000000000000000000eb609695017aa8597fa9b3db276ec639783351d41461056c5761086036600319011261056c576001600160a01b039390358481168103610380573660431215610380576103e283610589565b6101849183368411610380576024905b848210610570575050366101a3121561030557845195610411876105bc565b866104049436861161056c57905b85821061051c5750503661042312156103805785519061043e82610589565b81906105649536871161051857915b8683106104ff575050503661058312156103805785519161046d836105bc565b826107e49536871161030157905b8682106104ab576020896104a48c8b8b8b8b8b61084435956108243595610804359535946107cc565b9051908152f35b36601f830112156103015788516104c1816105d8565b80608084013681116104fb5784915b8183106104eb5750505081602091608093520191019061047b565b82358152602092830192016104d0565b8580fd5b823582811681036104fb5781526020928301920161044d565b8480fd5b36601f8301121561056c578751610532816105d8565b80608084013681116102ea5784915b81831061055c5750505081602091608093520191019061041f565b8235815260209283019201610541565b8380fd5b8135888116810361056c578152602091820191016103f2565b610160810190811067ffffffffffffffff8211176105a657604052565b634e487b7160e01b600052604160045260246000fd5b60a0810190811067ffffffffffffffff8211176105a657604052565b6080810190811067ffffffffffffffff8211176105a657604052565b90601f8019910116810190811067ffffffffffffffff8211176105a657604052565b9190820391821161062357565b634e487b7160e01b600052601160045260246000fd5b90600b81101561064a5760051b0190565b634e487b7160e01b600052603260045260246000fd5b90600a5b6001600160a01b03806106778386610639565b51166106a25750801561068d5760001901610664565b60246000634e487b7160e01b81526011600452fd5b9192906106ae91610639565b511690565b6000915b600b83106106c457505050565b81516001600160a01b0316815260019290920191602091820191016106b7565b9060009182915b600583106106f95750505050565b815184825b6004821061071c5750505060206080600192019201920191906106eb565b6001908351815260208091019301910190916106fe565b6107576103e09295949361074c836104008101986106b3565b6101608301906106e4565b0152565b8181029291811591840414171561062357565b90816020910312610786575180151581036107865790565b600080fd5b9390959491926107b2610420946107a78761044081019a6106b3565b6101608701906106e4565b6103e08501526104008401526001600160a01b0316910152565b8151604051637b5e2c7b60e01b81526001600160a01b03909116989297949694959194919392916020828061080686888e60048501610733565b03816001600160a01b038a165afa9182156109ca57600092610c2c575b50620f4240019081620f42401161062357620f4240916108429161075b565b046040516370a0823160e01b81523060048201526020816024818d5afa9081156109ca57600091610bfa575b50808211610bf2575b50898111610bd4576040516370a0823160e01b81523060048201529960208b6024818d5afa9a8b156109ca5760009b610b9f575b5060405163095ea7b360e01b8082526001600160a01b03881660048301526024820192909252909392919060208160448160008f5af180156109ca578a926020928592610b82575b506109166040519485938493633f51256760e21b998a865230936004870161078b565b038160006001600160a01b038b165af19081156109ca57600091610b4e575b509061094091610616565b94856109d6575b50505050505050506020602491604051928380926370a0823160e01b82523060048301525afa9081156109ca57600091610998575b50818110156109915761098e91610616565b90565b5050600090565b906020823d6020116109c2575b816109b2602093836105f4565b810103126103055750513861097c565b3d91506109a5565b6040513d6000823e3d90fd5b6040516308f109c360e11b815290602082806109f78a898d60048501610733565b03816001600160a01b038a165afa9182156109ca57600092610b1a575b50620f424003620f4240811161062357610a34620f42409160209361075b565b04976001600160a01b0390610a4890610660565b6040519485526001600160a01b03871660048601526024850188905284916044918391600091165af180156109ca57602096600093610a9e92610aed575b5060405198899788968795865230936004870161078b565b03926001600160a01b03165af180156109ca57610ac2575b80808080808080610947565b602090813d8311610ae6575b610ad881836105f4565b810103126107865738610ab6565b503d610ace565b610b0c90893d8b11610b13575b610b0481836105f4565b81019061076e565b5038610a86565b503d610afa565b90916020823d602011610b46575b81610b35602093836105f4565b810103126103055750519038610a14565b3d9150610b28565b906020823d602011610b7a575b81610b68602093836105f4565b81010312610305575051610940610935565b3d9150610b5b565b610b9890843d8611610b1357610b0481836105f4565b50386108f3565b909a6020823d602011610bcc575b81610bba602093836105f4565b810103126103055750519960006108ab565b3d9150610bad565b6044908a604051916334398dcf60e01b835260048301526024820152fd5b905038610877565b906020823d602011610c24575b81610c14602093836105f4565b810103126103055750513861086e565b3d9150610c07565b90916020823d602011610c58575b81610c47602093836105f4565b810103126103055750519038610823565b3d9150610c3a56fea26469706673582212200032fda758825f3367722947d71ecffef25967cc85edb6707891c84ddb699ffd64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.