Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 22270571 | 2 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
SpectraDecoderAndSanitizer
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: SEL-1.0
// Copyright © 2025 Veda Tech Labs
// Derived from Boring Vault Software © 2025 Veda Tech Labs (TEST ONLY – NO COMMERCIAL USE)
// Licensed under Software Evaluation License, Version 1.0
pragma solidity 0.8.21;
import {BaseDecoderAndSanitizer} from "src/base/DecodersAndSanitizers/BaseDecoderAndSanitizer.sol";
import {ERC4626DecoderAndSanitizer} from "src/base/DecodersAndSanitizers/Protocols/ERC4626DecoderAndSanitizer.sol";
/// @dev some Spectra contracts implement some of the ERC4626 standard, some revert on calling. Ex. A contract might implement `deposit()` and `withdraw()`, but not `mint()` or `redeem()`. `wrap()` and `unwrap()` should therefore be used most of the time.
contract SpectraDecoderAndSanitizer is BaseDecoderAndSanitizer, ERC4626DecoderAndSanitizer {
//============================== Principal Token ===============================
//slippage protected functions
function deposit(uint256, /*assets*/ address ptReceiver, address ytReceiver, uint256 /*minShares*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(ptReceiver, ytReceiver);
}
function redeem(uint256, /*shares*/ address receiver, address owner, uint256 /*minAssets*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function withdraw(uint256, /*assets*/ address receiver, address owner, uint256 /*maxShares*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function depositIBT(uint256, /*ibts*/ address receiver)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver);
}
function depositIBT(uint256, /*ibts*/ address ptReceiver, address ytReceiver, uint256 /*minShares*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(ptReceiver, ytReceiver);
}
function redeemForIBT(uint256, /*shares*/ address receiver, address owner)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function redeemForIBT(uint256, /*shares*/ address receiver, address owner, uint256 /*minIbts*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function withdrawIBT(uint256, /*ibts*/ address receiver, address owner)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function withdrawIBT(uint256, /*ibts*/ address receiver, address owner, uint256 /*maxShares*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function updateYield(address _user) external pure virtual returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(_user);
}
function claimYield(address _receiver, uint256 /*_minAssets*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(_receiver);
}
//============================== Yield Token ===============================
function burn(uint256 /*amount*/ ) external pure virtual returns (bytes memory addressesFound) {
return addressesFound;
}
//============================== swTokens ===============================
function wrap(uint256, /*vaultShares*/ address receiver)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver);
}
function unwrap(uint256, /*vaultShares*/ address receiver, address owner)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
//============================== Pool Functions ===============================
function exchange(uint256, /*i*/ uint256, /*j*/ uint256, /*dx*/ uint256 /*dy*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
return addressesFound;
}
function add_liquidity(uint256[2] memory, /*amounts*/ uint256 /*minOut*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
return addressesFound;
}
function remove_liquidity(uint256, /*lpAmount*/ uint256[2] memory /*minAmountsOut*/ )
external
pure
virtual
returns (bytes memory addressesFound)
{
return addressesFound;
}
}// SPDX-License-Identifier: SEL-1.0
// Copyright © 2025 Veda Tech Labs
// Derived from Boring Vault Software © 2025 Veda Tech Labs (TEST ONLY – NO COMMERCIAL USE)
// Licensed under Software Evaluation License, Version 1.0
pragma solidity 0.8.21;
import {DecoderCustomTypes} from "src/interfaces/DecoderCustomTypes.sol";
contract BaseDecoderAndSanitizer {
error BaseDecoderAndSanitizer__FunctionSelectorNotSupported();
//============================== IMMUTABLES ===============================
function approve(address spender, uint256) external pure returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(spender);
}
function transfer(address _to, uint256) external pure returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(_to);
}
function claimFees(address feeAsset) external pure returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(feeAsset);
}
function claimYield(address yieldAsset) external pure returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(yieldAsset);
}
function withdrawNonBoringToken(address token, uint256 /*amount*/ )
external
pure
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(token);
}
function withdrawNativeFromDrone() external pure returns (bytes memory addressesFound) {
return addressesFound;
}
//============================== FALLBACK ===============================
/**
* @notice The purpose of this function is to revert with a known error,
* so that during merkle tree creation we can verify that a
* leafs decoder and sanitizer implments the required function
* selector.
*/
fallback() external {
revert BaseDecoderAndSanitizer__FunctionSelectorNotSupported();
}
}// SPDX-License-Identifier: SEL-1.0
// Copyright © 2025 Veda Tech Labs
// Derived from Boring Vault Software © 2025 Veda Tech Labs (TEST ONLY – NO COMMERCIAL USE)
// Licensed under Software Evaluation License, Version 1.0
pragma solidity 0.8.21;
import {DecoderCustomTypes} from "src/interfaces/DecoderCustomTypes.sol";
contract ERC4626DecoderAndSanitizer {
//============================== ERC4626 ===============================
function deposit(uint256, address receiver) external pure virtual returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(receiver);
}
function mint(uint256, address receiver) external pure virtual returns (bytes memory addressesFound) {
addressesFound = abi.encodePacked(receiver);
}
function withdraw(uint256, address receiver, address owner)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
function redeem(uint256, address receiver, address owner)
external
pure
virtual
returns (bytes memory addressesFound)
{
addressesFound = abi.encodePacked(receiver, owner);
}
}// SPDX-License-Identifier: SEL-1.0
// Copyright © 2025 Veda Tech Labs
// Derived from Boring Vault Software © 2025 Veda Tech Labs (TEST ONLY – NO COMMERCIAL USE)
// Licensed under Software Evaluation License, Version 1.0
pragma solidity 0.8.21;
contract DecoderCustomTypes {
// ========================================= BALANCER =========================================
struct JoinPoolRequest {
address[] assets;
uint256[] maxAmountsIn;
bytes userData;
bool fromInternalBalance;
}
struct ExitPoolRequest {
address[] assets;
uint256[] minAmountsOut;
bytes userData;
bool toInternalBalance;
}
enum SwapKind {
GIVEN_IN,
GIVEN_OUT
}
struct SingleSwap {
bytes32 poolId;
SwapKind kind;
address assetIn;
address assetOut;
uint256 amount;
bytes userData;
}
struct FundManagement {
address sender;
bool fromInternalBalance;
address recipient;
bool toInternalBalance;
}
// ========================================= UNISWAP V3 =========================================
struct MintParams {
address token0;
address token1;
uint24 fee;
int24 tickLower;
int24 tickUpper;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
address recipient;
uint256 deadline;
}
struct IncreaseLiquidityParams {
uint256 tokenId;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
uint256 deadline;
}
struct DecreaseLiquidityParams {
uint256 tokenId;
uint128 liquidity;
uint256 amount0Min;
uint256 amount1Min;
uint256 deadline;
}
struct CollectParams {
uint256 tokenId;
address recipient;
uint128 amount0Max;
uint128 amount1Max;
}
struct ExactInputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
}
struct ExactInputParamsRouter02 {
bytes path;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
}
struct PancakeSwapExactInputParams {
bytes path;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
}
// ========================================= UNISWAP V4 =========================================
struct SwapParams {
/// Whether to swap token0 for token1 or vice versa
bool zeroForOne;
/// The desired input amount if negative (exactIn), or the desired output amount if positive (exactOut)
int256 amountSpecified;
/// The sqrt price at which, if reached, the swap will stop executing
uint160 sqrtPriceLimitX96;
}
struct PoolKey {
/// @notice The lower currency of the pool, sorted numerically
address currency0;
/// @notice The higher currency of the pool, sorted numerically
address currency1;
/// @notice The pool LP fee, capped at 1_000_000. If the highest bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000
uint24 fee;
/// @notice Ticks that involve positions must be a multiple of tick spacing
int24 tickSpacing;
/// @notice The hooks of the pool
address hooks;
}
/// @dev comes from IV4 Router
struct ExactInputSingleParams {
PoolKey poolKey;
bool zeroForOne;
uint128 amountIn;
uint128 amountOutMinimum;
bytes hookData;
}
/// @notice Parameters for a single-hop exact-output swap
struct ExactOutputSingleParams {
PoolKey poolKey;
bool zeroForOne;
uint128 amountOut;
uint128 amountInMaximum;
bytes hookData;
}
// ========================================= MORPHO BLUE =========================================
struct MarketParams {
address loanToken;
address collateralToken;
address oracle;
address irm;
uint256 lltv;
}
// ========================================= 1INCH =========================================
struct SwapDescription {
address srcToken;
address dstToken;
address payable srcReceiver;
address payable dstReceiver;
uint256 amount;
uint256 minReturnAmount;
uint256 flags;
}
// ========================================= PENDLE =========================================
struct TokenInput {
// TOKEN DATA
address tokenIn;
uint256 netTokenIn;
address tokenMintSy;
// AGGREGATOR DATA
address pendleSwap;
SwapData swapData;
}
struct TokenOutput {
// TOKEN DATA
address tokenOut;
uint256 minTokenOut;
address tokenRedeemSy;
// AGGREGATOR DATA
address pendleSwap;
SwapData swapData;
}
struct ApproxParams {
uint256 guessMin;
uint256 guessMax;
uint256 guessOffchain; // pass 0 in to skip this variable
uint256 maxIteration; // every iteration, the diff between guessMin and guessMax will be divided by 2
uint256 eps; // the max eps between the returned result & the correct result, base 1e18. Normally this number will be set
// to 1e15 (1e18/1000 = 0.1%)
}
struct SwapData {
SwapType swapType;
address extRouter;
bytes extCalldata;
bool needScale;
}
enum SwapType {
NONE,
KYBERSWAP,
ONE_INCH,
// ETH_WETH not used in Aggregator
ETH_WETH
}
struct LimitOrderData {
address limitRouter;
uint256 epsSkipMarket; // only used for swap operations, will be ignored otherwise
FillOrderParams[] normalFills;
FillOrderParams[] flashFills;
bytes optData;
}
struct FillOrderParams {
Order order;
bytes signature;
uint256 makingAmount;
}
struct Order {
uint256 salt;
uint256 expiry;
uint256 nonce;
OrderType orderType;
address token;
address YT;
address maker;
address receiver;
uint256 makingAmount;
uint256 lnImpliedRate;
uint256 failSafeRate;
bytes permit;
}
enum OrderType {
SY_FOR_PT,
PT_FOR_SY,
SY_FOR_YT,
YT_FOR_SY
}
// ========================================= EIGEN LAYER =========================================
struct QueuedWithdrawalParams {
// Array of strategies that the QueuedWithdrawal contains
address[] strategies;
// Array containing the amount of shares in each Strategy in the `strategies` array
uint256[] shares;
// The address of the withdrawer
address withdrawer;
}
struct Withdrawal {
// The address that originated the Withdrawal
address staker;
// The address that the staker was delegated to at the time that the Withdrawal was created
address delegatedTo;
// The address that can complete the Withdrawal + will receive funds when completing the withdrawal
address withdrawer;
// Nonce used to guarantee that otherwise identical withdrawals have unique hashes
uint256 nonce;
// Block number when the Withdrawal was created
uint32 startBlock;
// Array of strategies that the Withdrawal contains
address[] strategies;
// Array containing the amount of shares in each Strategy in the `strategies` array
uint256[] shares;
}
struct SignatureWithExpiry {
// the signature itself, formatted as a single bytes object
bytes signature;
// the expiration timestamp (UTC) of the signature
uint256 expiry;
}
struct EarnerTreeMerkleLeaf {
address earner;
bytes32 earnerTokenRoot;
}
struct TokenTreeMerkleLeaf {
address token;
uint256 cumulativeEarnings;
}
struct RewardsMerkleClaim {
uint32 rootIndex;
uint32 earnerIndex;
bytes earnerTreeProof;
EarnerTreeMerkleLeaf earnerLeaf;
uint32[] tokenIndices;
bytes[] tokenTreeProofs;
TokenTreeMerkleLeaf[] tokenLeaves;
}
// ========================================= CCIP =========================================
// If extraArgs is empty bytes, the default is 200k gas limit.
struct EVM2AnyMessage {
bytes receiver; // abi.encode(receiver address) for dest EVM chains
bytes data; // Data payload
EVMTokenAmount[] tokenAmounts; // Token transfers
address feeToken; // Address of feeToken. address(0) means you will send msg.value.
bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV2)
}
/// @dev RMN depends on this struct, if changing, please notify the RMN maintainers.
struct EVMTokenAmount {
address token; // token address on the local chain.
uint256 amount; // Amount of tokens.
}
struct EVMExtraArgsV1 {
uint256 gasLimit;
}
// ========================================= OFT =========================================
struct SendParam {
uint32 dstEid; // Destination endpoint ID.
bytes32 to; // Recipient address.
uint256 amountLD; // Amount to send in local decimals.
uint256 minAmountLD; // Minimum amount to send in local decimals.
bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.
bytes composeMsg; // The composed message for the send() operation.
bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.
}
struct MessagingFee {
uint256 nativeFee;
uint256 lzTokenFee;
}
// ========================================= L1StandardBridge =========================================
struct WithdrawalTransaction {
uint256 nonce;
address sender;
address target;
uint256 value;
uint256 gasLimit;
bytes data;
}
struct OutputRootProof {
bytes32 version;
bytes32 stateRoot;
bytes32 messagePasserStorageRoot;
bytes32 latestBlockhash;
}
// ========================================= Mantle L1StandardBridge =========================================
struct MantleWithdrawalTransaction {
uint256 nonce;
address sender;
address target;
uint256 mntValue;
uint256 value;
uint256 gasLimit;
bytes data;
}
// ========================================= Linea Bridge =========================================
struct ClaimMessageWithProofParams {
bytes32[] proof;
uint256 messageNumber;
uint32 leafIndex;
address from;
address to;
uint256 fee;
uint256 value;
address payable feeRecipient;
bytes32 merkleRoot;
bytes data;
}
// ========================================= Scroll Bridge =========================================
struct L2MessageProof {
uint256 batchIndex;
bytes merkleProof;
}
// ========================================= Camelot V3 / Algebra V3 =========================================
struct CamelotMintParams {
address token0;
address token1;
int24 tickLower;
int24 tickUpper;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
address recipient;
uint256 deadline;
}
// ========================================= Algebra V4 =========================================
struct AlgebraMintParams {
address token0;
address token1;
address deployer;
int24 tickLower;
int24 tickUpper;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
address recipient;
uint256 deadline;
}
// ========================================= Velodrome V3 =========================================
struct VelodromeMintParams {
address token0;
address token1;
int24 tickSpacing;
int24 tickLower;
int24 tickUpper;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
address recipient;
uint256 deadline;
uint160 sqrtPriceX96;
}
// ========================================= Karak =========================================
struct QueuedWithdrawal {
address staker;
address delegatedTo;
uint256 nonce;
uint256 start;
WithdrawRequest request;
}
struct WithdrawRequest {
address[] vaults;
uint256[] shares;
address withdrawer;
}
// ========================================= Term Finance ==================================
/// @dev TermAuctionOfferSubmission represents an offer submission to offeror an amount of money for a specific interest rate
struct TermAuctionOfferSubmission {
/// @dev For an existing offer this is the unique onchain identifier for this offer. For a new offer this is a randomized input that will be used to generate the unique onchain identifier.
bytes32 id;
/// @dev The address of the offeror
address offeror;
/// @dev Hash of the offered price as a percentage of the initial loaned amount vs amount returned at maturity. This stores 9 decimal places
bytes32 offerPriceHash;
/// @dev The maximum amount of purchase tokens that can be lent
uint256 amount;
/// @dev The address of the ERC20 purchase token
address purchaseToken;
}
// ========================================= Dolomite Finance ==================================
enum BalanceCheckFlag {
Both,
From,
To,
None
}
// ========================================= Silo Finance ==================================
/// @dev There are 2 types of accounting in the system: for non-borrowable collateral deposit called "protected" and
/// for borrowable collateral deposit called "collateral". System does
/// identical calculations for each type of accounting but it uses different data. To avoid code duplication
/// this enum is used to decide which data should be read.
enum CollateralType {
Protected, // default
Collateral
}
enum ActionType {
Deposit,
Mint,
Repay,
RepayShares
}
struct Action {
// what do you want to do?
uint8 actionType;
// which Silo are you interacting with?
address silo;
// what asset do you want to use?
address asset;
// options specific for actions
bytes options;
}
struct AnyAction {
// how much assets or shares do you want to use?
uint256 amount;
// are you using Protected, Collateral
uint8 assetType;
}
// ========================================= LBTC Bridge ==================================
struct DepositBridgeAction {
uint256 fromChain;
bytes32 fromContract;
uint256 toChain;
address toContract;
address recipient;
uint64 amount;
uint256 nonce;
}
// ========================================= Odos ==================================
struct swapTokenInfo {
address inputToken;
uint256 inputAmount;
address inputReceiver;
address outputToken;
uint256 outputQuote;
uint256 outputMin;
address outputReceiver;
}
struct swapTokenInfoOogaBooga {
address inputToken;
uint256 inputAmount;
address outputToken;
uint256 outputQuote;
uint256 outputMin;
address outputReceiver;
}
// ========================================= Level ==================================
/// @dev for reference
//enum OrderType {
// MINT,
// REDEEM
//}
struct LevelOrder {
uint8 order_type;
address benefactor;
address beneficiary;
address collateral_asset;
uint256 collateral_amount;
uint256 lvlusd_amount;
}
struct LevelOrderV2 {
address beneficiary;
address collateral_asset;
uint256 collateral_amount;
uint256 min_lvlusd_amount;
}
struct Route {
address[] addresses;
uint256[] ratios;
}
// ========================================= Royco ==================================
struct APOffer { // RecipeMarketHub
uint256 offerID;
bytes32 targetMarketHash;
address ap;
address fundingVault;
uint256 quantity;
uint256 expiry;
address[] incentivesRequested;
uint256[] incentiveAmountsRequested;
}
struct APOfferVault { // VaultMarketHub (renamed to avoid collision)
uint256 offerID;
address targetVault;
address ap;
address fundingVault;
uint256 expiry;
address[] incentivesRequested;
uint256[] incentivesRatesRequested;
}
struct Reward {
uint48 startEpoch;
uint48 endEpoch;
address token;
uint256 rewardRate;
}
// ========================================= Permit2 ==================================
struct TokenSpenderPair {
address token;
address spender;
}
// ========================================= OnChainQueue ==================================
struct OnChainWithdraw {
uint96 nonce; // read from state, used to make it impossible for request Ids to be repeated.
address user; // msg.sender
address assetOut; // input sanitized
uint128 amountOfShares; // input transfered in
uint128 amountOfAssets; // derived from amountOfShares and price
uint40 creationTime; // time withdraw was made
uint24 secondsToMaturity; // in contract, from withdrawAsset?
uint24 secondsToDeadline; // in contract, from withdrawAsset? To get the deadline you take the creationTime add seconds to maturity, add the secondsToDeadline
}
// ========================================= Beraborrow ==================================
struct OpenDenVaultParams {
address denManager;
address collVault;
uint256 _maxFeePercentage;
uint256 _debtAmount;
uint256 _collAssetToDeposit;
address _upperHint;
address _lowerHint;
uint256 _minSharesMinted;
uint256 _collIndex;
bytes _preDeposit;
}
struct AdjustDenVaultParams {
address denManager;
address collVault;
uint256 _maxFeePercentage;
uint256 _collAssetToDeposit;
uint256 _collWithdrawal;
uint256 _debtChange;
bool _isDebtIncrease;
address _upperHint;
address _lowerHint;
bool unwrap;
uint256 _minSharesMinted;
uint256 _minAssetsWithdrawn;
uint256 _collIndex;
bytes _preDeposit;
}
struct RedeemCollateralVaultParams {
address denManager;
address collVault;
uint256 _debtAmount;
address _firstRedemptionHint;
address _upperPartialRedemptionHint;
address _lowerPartialRedemptionHint;
uint256 _partialRedemptionHintNICR;
uint256 _maxIterations;
uint256 _maxFeePercentage;
uint256 _minSharesWithdrawn;
uint256 minAssetsWithdrawn;
uint256 collIndex;
bool unwrap;
}
struct AddCollParams {
address upperHint;
address lowerHint;
uint256 minSharesOut;
uint256 minCollVaultShares;
}
struct ExternalRebalanceParams {
address swapper;
bytes payload;
uint256 minRebalanceOut;
}
// ========================================= Tac Crosschain Layer ==================================
struct TokenAmount {
address evmAddress;
uint256 amount;
}
struct NFTAmount {
address evmAddress;
uint256 tokenId;
uint256 amount;
}
struct OutMessageV1 {
uint64 shardsKey;
string tvmTarget;
string tvmPayload;
uint256 tvmProtocolFee;
uint256 tvmExecutorFee;
string[] tvmValidExecutors;
TokenAmount[] toBridge;
NFTAmount[] toBridgeNFT;
}
// ========================================= Valantis ==================================
struct DirectSwapParams {
bool[] isUniversalPool;
address[] pools;
uint256[] amountInSpecified;
bytes[] payloads;
bool isTokenOutEth;
address tokenIn;
address tokenOut;
address recipient;
uint256 amountOutMin;
uint256 deadline;
bytes32 code;
}
struct UniversalPoolSwapPayload {
bool isZeroToOne;
address recipient;
int24 limitPriceTick;
uint256 amountOutMin;
uint8[] almOrdering;
bytes[] externalContext;
bytes swapFeeModuleContext;
}
/**
* @notice Internal struct used for single swap payloads in Sovereign pools.
*/
struct SovereignPoolSwapPayload {
bool isZeroToOne;
address recipient;
address swapTokenOut;
uint256 amountOutMin;
bytes externalContext;
bytes verificationContext;
bytes swapFeeModuleContext;
}
struct SovereignPoolSwapContextData {
bytes externalContext;
bytes verifierContext;
bytes swapCallbackContext;
bytes swapFeeModuleContext;
}
struct SovereignPoolSwapParams {
bool isSwapCallback;
bool isZeroToOne;
uint256 amountIn;
uint256 amountOutMin;
uint256 deadline;
address recipient;
address swapTokenOut;
SovereignPoolSwapContextData swapContext;
}
struct UniversalSwapParams {
bool isZeroToOne;
bool isSwapCallback;
int24 limitPriceTick;
address recipient;
uint256 amountIn;
uint256 amountOutMin;
uint256 deadline;
bytes swapCallbackContext;
bytes swapFeeModuleContext;
uint8[] almOrdering;
bytes[] externalContext;
}
// ========================================= Ethena Minting ==================================
enum EthenaOrderType {
MINT,
REDEEM
}
struct EthenaOrder {
string order_id;
EthenaOrderType order_type;
uint120 expiry;
uint128 nonce;
address benefactor;
address beneficiary;
address collateral_asset;
uint128 collateral_amount;
uint128 usde_amount;
}
struct EthenaRoute {
address[] addresses;
uint128[] ratios;
}
enum SignatureType {
EIP712,
EIP1271
}
struct EthenaSignature {
SignatureType signature_type;
bytes signature_bytes;
}
// ========================================= GlueX ==================================
struct Interaction {
address target;
uint256 value;
bytes callData;
}
struct RouteDescription {
address inputToken; // Token used as input for the route
address outputToken; // Token received as output from the route
address payable inputReceiver; // Address to receive the input token
address payable outputReceiver; // Address to receive the output token
address payable partnerAddress; // Address of the partner receiving surplus share
uint256 inputAmount; // Amount of input token
uint256 outputAmount; // Optimizer output amount
uint256 partnerFee; // Fee charged by the partner
uint256 routingFee; // Fee charged for routing operation
uint256 partnerSurplusShare; // Percentage (in bps) of surplus shared with the partner
uint256 protocolSurplusShare; // Percentage (in bps) of surplus shared with GlueX
uint256 partnerSlippageShare; // Percentage (in bps) of slippage shared with the partner
uint256 protocolSlippageShare; // Percentage (in bps) of slippage shared with GlueX
uint256 effectiveOutputAmount; // Effective output amount for the user
uint256 minOutputAmount; // Minimum acceptable output amount
bool isPermit2; // Whether to use Permit2 for token transfers
bytes32 uniquePID; // Unique identifier for the partner
}
}{
"remappings": [
"@solmate/=lib/solmate/src/",
"@forge-std/=lib/forge-std/src/",
"@ds-test/=lib/forge-std/lib/ds-test/src/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@ccip/=lib/ccip/",
"@oapp-auth/=lib/OAppAuth/src/",
"@devtools-oapp-evm/=lib/OAppAuth/lib/devtools/packages/oapp-evm/contracts/oapp/",
"@layerzerolabs/lz-evm-messagelib-v2/=lib/OAppAuth/node_modules/@layerzerolabs/lz-evm-messagelib-v2/",
"@layerzerolabs/lz-evm-protocol-v2/=lib/OAppAuth/lib/LayerZero-V2/packages/layerzero-v2/evm/protocol/",
"@layerzerolabs/oapp-evm/=lib/OAppAuth/lib/devtools/packages/oapp-evm/",
"@lz-oapp-evm/=lib/OAppAuth/lib/LayerZero-V2/packages/layerzero-v2/evm/oapp/contracts/oapp/",
"@sbu/=lib/OAppAuth/lib/solidity-bytes-utils/",
"LayerZero-V2/=lib/OAppAuth/lib/",
"OAppAuth/=lib/OAppAuth/",
"ccip/=lib/ccip/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/OAppAuth/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"solidity-bytes-utils/=lib/OAppAuth/node_modules/solidity-bytes-utils/",
"solmate/=lib/solmate/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": true,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"BaseDecoderAndSanitizer__FunctionSelectorNotSupported","type":"error"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"uint256[2]","name":"","type":"uint256[2]"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"add_liquidity","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"feeAsset","type":"address"}],"name":"claimFees","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimYield","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"yieldAsset","type":"address"}],"name":"claimYield","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"ptReceiver","type":"address"},{"internalType":"address","name":"ytReceiver","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"ptReceiver","type":"address"},{"internalType":"address","name":"ytReceiver","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositIBT","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"depositIBT","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"exchange","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"redeemForIBT","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"redeemForIBT","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[2]","name":"","type":"uint256[2]"}],"name":"remove_liquidity","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"unwrap","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"updateYield","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdrawIBT","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawIBT","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdrawNativeFromDrone","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawNonBoringToken","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"wrap","outputs":[{"internalType":"bytes","name":"addressesFound","type":"bytes"}],"stateMutability":"pure","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b506106098061001d5f395ff3fe608060405234801561000f575f80fd5b50600436106101a6575f3560e01c80636e553f65116100f7578063b2afd5a311610095578063da3ef9d21161006f578063da3ef9d21461031d578063e4cca4b014610299578063f90d63db1461025a578063fb183a02146101bf576101a6565b8063b2afd5a3146101bf578063b460af94146101bf578063ba087652146101bf576101a6565b8063999927df116100d1578063999927df1461025a5780639f40a7b314610299578063a318c1a414610299578063a9059cbb1461021e576101a6565b80636e553f651461024757806385326f451461029957806394bf804d14610247576101a6565b80631869ebda11610164578063443b6aed1161013e578063443b6aed146102475780635b36389c146102f75780635b41b9081461030557806365edd06414610299576101a6565b80631869ebda1461021e5780632a4128061461029957806342966c68146102e3576101a6565b806277e146146101bf578063095ea7b31461021e57806309f0e0c21461021e5780630b4c7e4d1461023157806313bac8201461024757806315a0ea6a1461025a575b604051633790be8760e21b815260040160405180910390fd5b6102086101cd366004610392565b604080516001600160601b0319606094851b811660208301529290931b90911660348301528051602881840301815260489092019052919050565b60405161021591906103cb565b60405180910390f35b61020861022c366004610416565b610324565b61020861023f3660046104b7565b606092915050565b6102086102553660046104e0565b610357565b61020861026836600461050a565b604051606082811b6001600160601b0319166020830152906034016040516020818303038152906040529050919050565b6102086102a736600461052a565b50604080516001600160601b0319606094851b811660208301529290931b90911660348301528051602881840301815260489092019052919050565b6102086102f136600461056b565b50606090565b61020861023f366004610582565b6102086103133660046105a4565b6060949350505050565b6060610208565b604051606083811b6001600160601b0319166020830152906034015b604051602081830303815290604052905092915050565b604051606082811b6001600160601b031916602083015290603401610340565b80356001600160a01b038116811461038d575f80fd5b919050565b5f805f606084860312156103a4575f80fd5b833592506103b460208501610377565b91506103c260408501610377565b90509250925092565b5f6020808352835180828501525f5b818110156103f6578581018301518582016040015282016103da565b505f604082860101526040601f19601f8301168501019250505092915050565b5f8060408385031215610427575f80fd5b61043083610377565b946020939093013593505050565b5f82601f83011261044d575f80fd5b6040516040810181811067ffffffffffffffff8211171561047c57634e487b7160e01b5f52604160045260245ffd5b8060405250806040840185811115610492575f80fd5b845b818110156104ac578035835260209283019201610494565b509195945050505050565b5f80606083850312156104c8575f80fd5b6104d2848461043e565b946040939093013593505050565b5f80604083850312156104f1575f80fd5b8235915061050160208401610377565b90509250929050565b5f6020828403121561051a575f80fd5b61052382610377565b9392505050565b5f805f806080858703121561053d575f80fd5b8435935061054d60208601610377565b925061055b60408601610377565b9396929550929360600135925050565b5f6020828403121561057b575f80fd5b5035919050565b5f8060608385031215610593575f80fd5b82359150610501846020850161043e565b5f805f80608085870312156105b7575f80fd5b505082359460208401359450604084013593606001359250905056fea264697066735822122012bb4ccd3bd477c44c1fca8a02bd342c69d1661e9bc2eb5d536ee44807a3846d64736f6c63430008150033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106101a6575f3560e01c80636e553f65116100f7578063b2afd5a311610095578063da3ef9d21161006f578063da3ef9d21461031d578063e4cca4b014610299578063f90d63db1461025a578063fb183a02146101bf576101a6565b8063b2afd5a3146101bf578063b460af94146101bf578063ba087652146101bf576101a6565b8063999927df116100d1578063999927df1461025a5780639f40a7b314610299578063a318c1a414610299578063a9059cbb1461021e576101a6565b80636e553f651461024757806385326f451461029957806394bf804d14610247576101a6565b80631869ebda11610164578063443b6aed1161013e578063443b6aed146102475780635b36389c146102f75780635b41b9081461030557806365edd06414610299576101a6565b80631869ebda1461021e5780632a4128061461029957806342966c68146102e3576101a6565b806277e146146101bf578063095ea7b31461021e57806309f0e0c21461021e5780630b4c7e4d1461023157806313bac8201461024757806315a0ea6a1461025a575b604051633790be8760e21b815260040160405180910390fd5b6102086101cd366004610392565b604080516001600160601b0319606094851b811660208301529290931b90911660348301528051602881840301815260489092019052919050565b60405161021591906103cb565b60405180910390f35b61020861022c366004610416565b610324565b61020861023f3660046104b7565b606092915050565b6102086102553660046104e0565b610357565b61020861026836600461050a565b604051606082811b6001600160601b0319166020830152906034016040516020818303038152906040529050919050565b6102086102a736600461052a565b50604080516001600160601b0319606094851b811660208301529290931b90911660348301528051602881840301815260489092019052919050565b6102086102f136600461056b565b50606090565b61020861023f366004610582565b6102086103133660046105a4565b6060949350505050565b6060610208565b604051606083811b6001600160601b0319166020830152906034015b604051602081830303815290604052905092915050565b604051606082811b6001600160601b031916602083015290603401610340565b80356001600160a01b038116811461038d575f80fd5b919050565b5f805f606084860312156103a4575f80fd5b833592506103b460208501610377565b91506103c260408501610377565b90509250925092565b5f6020808352835180828501525f5b818110156103f6578581018301518582016040015282016103da565b505f604082860101526040601f19601f8301168501019250505092915050565b5f8060408385031215610427575f80fd5b61043083610377565b946020939093013593505050565b5f82601f83011261044d575f80fd5b6040516040810181811067ffffffffffffffff8211171561047c57634e487b7160e01b5f52604160045260245ffd5b8060405250806040840185811115610492575f80fd5b845b818110156104ac578035835260209283019201610494565b509195945050505050565b5f80606083850312156104c8575f80fd5b6104d2848461043e565b946040939093013593505050565b5f80604083850312156104f1575f80fd5b8235915061050160208401610377565b90509250929050565b5f6020828403121561051a575f80fd5b61052382610377565b9392505050565b5f805f806080858703121561053d575f80fd5b8435935061054d60208601610377565b925061055b60408601610377565b9396929550929360600135925050565b5f6020828403121561057b575f80fd5b5035919050565b5f8060608385031215610593575f80fd5b82359150610501846020850161043e565b5f805f80608085870312156105b7575f80fd5b505082359460208401359450604084013593606001359250905056fea264697066735822122012bb4ccd3bd477c44c1fca8a02bd342c69d1661e9bc2eb5d536ee44807a3846d64736f6c63430008150033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.