ETH Price: $2,348.79 (-1.24%)

Contract

0xD253b62108d1831aEd298Fc2434A5A8e4E418053
Transaction Hash
Method
Block
From
To
Swap Exact Input2506258452024-09-06 8:30:475 days ago1725611447IN
0xD253b621...e4E418053
0 ETH0.000002340.01
Swap Exact Input2495878752024-09-03 7:57:128 days ago1725350232IN
0xD253b621...e4E418053
0 ETH0.000002010.01
Swap Exact Input2482586212024-08-30 11:00:4512 days ago1725015645IN
0xD253b621...e4E418053
0 ETH0.000002130.01
Swap Exact Input2482226592024-08-30 8:30:3712 days ago1725006637IN
0xD253b621...e4E418053
0 ETH0.000002130.01
Swap Exact Input2480078002024-08-29 17:30:3913 days ago1724952639IN
0xD253b621...e4E418053
0 ETH0.000002150.01
Swap Exact Input2476354232024-08-28 15:30:4314 days ago1724859043IN
0xD253b621...e4E418053
0 ETH0.000010640.050962
Swap Exact Input2469192622024-08-26 13:31:0616 days ago1724679066IN
0xD253b621...e4E418053
0 ETH0.000002140.01
Swap Exact Input2469185002024-08-26 13:27:5616 days ago1724678876IN
0xD253b621...e4E418053
0 ETH0.000002340.01
Swap Exact Input2431135252024-08-15 11:56:2827 days ago1723722988IN
0xD253b621...e4E418053
0 ETH0.000002910.01
Swap Exact Input2430852322024-08-15 9:58:2127 days ago1723715901IN
0xD253b621...e4E418053
0 ETH0.000002110.01
Swap Exact Input2313983172024-07-12 10:30:3261 days ago1720780232IN
0xD253b621...e4E418053
0 ETH0.000002390.01
Swap Exact Input2313049042024-07-12 4:00:3961 days ago1720756839IN
0xD253b621...e4E418053
0 ETH0.000002230.01
Swap Exact Input2311539962024-07-11 17:30:3362 days ago1720719033IN
0xD253b621...e4E418053
0 ETH0.000002890.01
Swap Exact Input2311037712024-07-11 14:00:3562 days ago1720706435IN
0xD253b621...e4E418053
0 ETH0.000002960.010798
Swap Exact Input2310536642024-07-11 10:30:2962 days ago1720693829IN
0xD253b621...e4E418053
0 ETH0.000002450.01
Swap Exact Input2306701782024-07-10 7:49:0263 days ago1720597742IN
0xD253b621...e4E418053
0 ETH0.000002350.01
Swap Exact Input2283483012024-07-03 14:01:2870 days ago1720015288IN
0xD253b621...e4E418053
0 ETH0.000004790.011297
Swap Exact Input2283462752024-07-03 13:52:5870 days ago1720014778IN
0xD253b621...e4E418053
0 ETH0.00000460.01
Swap Exact Input2283459232024-07-03 13:51:3070 days ago1720014690IN
0xD253b621...e4E418053
0 ETH0.000004030.01
Swap Exact Input2256237242024-06-25 16:31:3878 days ago1719333098IN
0xD253b621...e4E418053
0 ETH0.000001830.01
Swap Exact Input2256228402024-06-25 16:27:5578 days ago1719332875IN
0xD253b621...e4E418053
0 ETH0.00000150.01
Swap Exact Input2228430412024-06-17 15:16:2686 days ago1718637386IN
0xD253b621...e4E418053
0 ETH0.00000370.01
Set Access Contr...2182582632024-06-04 8:24:4699 days ago1717489486IN
0xD253b621...e4E418053
0 ETH0.000000840.01
Swap Exact Input2166161662024-05-30 14:05:03104 days ago1717077903IN
0xD253b621...e4E418053
0 ETH0.000004410.01
Swap Exact Input2165249842024-05-30 7:44:57104 days ago1717055097IN
0xD253b621...e4E418053
0 ETH0.000003340.01

Latest 1 internal transaction

Parent Transaction Hash Block From To
2165206782024-05-30 7:27:02104 days ago1717054022  Contract Creation0 ETH

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiamondProxy

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 13 : DiamondProxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.19;

import { LibDiamond } from "./libraries/LibDiamond.sol";
import { LibStorage as s } from "./libraries/LibStorage.sol";

import "../utils/Errors.sol";
import "./Storage.sol";

/// @title DiamondProxy
/// @author Angle Labs, Inc.
/// @notice Implementation of a Diamond Proxy
/// @dev Reference: EIP-2535 Diamonds
/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/Diamond.sol by mudgen
contract DiamondProxy {
    constructor(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) payable {
        LibDiamond.diamondCut(_diamondCut, _init, _calldata);
    }

    /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                       FALLBACK                                                     
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /// @dev 1. Find the facet for the function that is called.
    /// @dev 2. Delegate the execution to the found facet via `delegatecall`.
    fallback() external payable {
        DiamondStorage storage ds = s.diamondStorage();
        // Get facet from function selector
        address facetAddress = ds.selectorInfo[msg.sig].facetAddress;
        if (facetAddress == address(0)) {
            revert FunctionNotFound(msg.sig);
        }

        assembly {
            // The pointer to the free memory slot
            let ptr := mload(0x40)
            // Copy function signature and arguments from calldata at zero position into memory at pointer position
            calldatacopy(ptr, 0, calldatasize())
            // Delegatecall method of the implementation contract returns 0 on error
            let result := delegatecall(gas(), facetAddress, ptr, calldatasize(), 0, 0)
            // Get the size of the last return data
            let size := returndatasize()
            // Copy the size length of bytes from return data at zero position to pointer position
            returndatacopy(ptr, 0, size)
            // Depending on the result value
            switch result
            case 0 {
                // End execution and revert state changes
                revert(ptr, size)
            }
            default {
                // Return data with length of size at pointers position
                return(ptr, size)
            }
        }
    }
}

File 2 of 13 : LibDiamond.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { LibStorage as s } from "./LibStorage.sol";

import "../../utils/Errors.sol";
import "../Storage.sol";

/// @title LibDiamond
/// @author Angle Labs, Inc.
/// @notice Helper library to deal with diamond proxies.
/// @dev Reference: EIP-2535 Diamonds
/// @dev Forked from https://github.com/mudgen/diamond-3/blob/master/contracts/libraries/LibDiamond.sol by mudgen
library LibDiamond {
    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);

    /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                  INTERNAL FUNCTIONS                                                
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /// @notice Checks whether `admin` has the governor role
    function isGovernor(address admin) internal view returns (bool) {
        return s.diamondStorage().accessControlManager.isGovernor(admin);
    }

    /// @notice Checks whether `admin` has the guardian role
    function isGovernorOrGuardian(address admin) internal view returns (bool) {
        return s.diamondStorage().accessControlManager.isGovernorOrGuardian(admin);
    }

    /// @notice Internal function version of `diamondCut`
    function diamondCut(FacetCut[] memory _diamondCut, address _init, bytes memory _calldata) internal {
        uint256 diamondCutLength = _diamondCut.length;
        for (uint256 facetIndex; facetIndex < diamondCutLength; facetIndex++) {
            bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;
            address facetAddress = _diamondCut[facetIndex].facetAddress;

            if (functionSelectors.length == 0) {
                revert NoSelectorsProvidedForFacetForCut(facetAddress);
            }

            FacetCutAction action = _diamondCut[facetIndex].action;
            if (action == FacetCutAction.Add) {
                _addFunctions(facetAddress, functionSelectors);
            } else if (action == FacetCutAction.Replace) {
                _replaceFunctions(facetAddress, functionSelectors);
            } else if (action == FacetCutAction.Remove) {
                _removeFunctions(facetAddress, functionSelectors);
            }
        }

        emit DiamondCut(_diamondCut, _init, _calldata);
        _initializeDiamondCut(_init, _calldata);
    }

    /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                   PRIVATE FUNCTIONS                                                
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /// @notice Does a delegate call on `_init` with `_calldata`
    function _initializeDiamondCut(address _init, bytes memory _calldata) private {
        if (_init == address(0)) {
            return;
        }
        _enforceHasContractCode(_init);
        (bool success, bytes memory error) = _init.delegatecall(_calldata);
        if (!success) {
            if (error.length > 0) {
                assembly {
                    let returndata_size := mload(error)
                    revert(add(32, error), returndata_size)
                }
            } else {
                revert InitializationFunctionReverted(_init, _calldata);
            }
        }
    }

    /// @notice Adds a new function to the diamond proxy
    /// @dev Reverts if selectors are already existing
    function _addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {
        if (_facetAddress == address(0)) {
            revert CannotAddSelectorsToZeroAddress(_functionSelectors);
        }
        DiamondStorage storage ds = s.diamondStorage();
        uint16 selectorCount = uint16(ds.selectors.length);
        _enforceHasContractCode(_facetAddress);
        uint256 functionSelectorsLength = _functionSelectors.length;
        for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorInfo[selector].facetAddress;
            if (oldFacetAddress != address(0)) {
                revert CannotAddFunctionToDiamondThatAlreadyExists(selector);
            }
            ds.selectorInfo[selector] = FacetInfo(_facetAddress, selectorCount);
            ds.selectors.push(selector);
            selectorCount++;
        }
    }

    /// @notice Upgrades a function in the diamond proxy
    /// @dev Reverts if selectors do not already exist
    function _replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {
        DiamondStorage storage ds = s.diamondStorage();
        if (_facetAddress == address(0)) {
            revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);
        }
        _enforceHasContractCode(_facetAddress);
        uint256 functionSelectorsLength = _functionSelectors.length;
        for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorInfo[selector].facetAddress;
            // Can't replace immutable functions -- functions defined directly in the diamond in this case
            if (oldFacetAddress == address(this)) {
                revert CannotReplaceImmutableFunction(selector);
            }
            if (oldFacetAddress == _facetAddress) {
                revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);
            }
            if (oldFacetAddress == address(0)) {
                revert CannotReplaceFunctionThatDoesNotExists(selector);
            }
            // Replace old facet address
            ds.selectorInfo[selector].facetAddress = _facetAddress;
        }
    }

    /// @notice Removes a function in the diamond proxy
    /// @dev Reverts if selectors do not already exist
    function _removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) private {
        DiamondStorage storage ds = s.diamondStorage();
        uint256 selectorCount = ds.selectors.length;
        if (_facetAddress != address(0)) {
            revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);
        }
        uint256 functionSelectorsLength = _functionSelectors.length;
        for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            FacetInfo memory oldFacetAddressAndSelectorPosition = ds.selectorInfo[selector];
            if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {
                revert CannotRemoveFunctionThatDoesNotExist(selector);
            }

            // Can't remove immutable functions -- functions defined directly in the diamond
            if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {
                revert CannotRemoveImmutableFunction(selector);
            }
            // Replace selector with last selector
            selectorCount--;
            if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {
                bytes4 lastSelector = ds.selectors[selectorCount];
                ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;
                ds.selectorInfo[lastSelector].selectorPosition = oldFacetAddressAndSelectorPosition.selectorPosition;
            }
            // Delete last selector
            ds.selectors.pop();
            delete ds.selectorInfo[selector];
        }
    }

    /// @notice Checks that an address has a non void bytecode
    function _enforceHasContractCode(address _contract) private view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        if (contractSize == 0) {
            revert ContractHasNoCode();
        }
    }
}

File 3 of 13 : LibStorage.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.19;

import "../../utils/Constants.sol";
import { DiamondStorage, ImplementationStorage, TransmuterStorage } from "../Storage.sol";

/// @title LibStorage
/// @author Angle Labs, Inc.
library LibStorage {
    /// @notice Returns the storage struct stored at the `DIAMOND_STORAGE_POSITION` slot
    /// @dev This struct handles the logic of the different facets used in the diamond proxy
    function diamondStorage() internal pure returns (DiamondStorage storage ds) {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }

    /// @notice Returns the storage struct stored at the `TRANSMUTER_STORAGE_POSITION` slot
    /// @dev This struct handles the particular logic of the Transmuter system
    function transmuterStorage() internal pure returns (TransmuterStorage storage ts) {
        bytes32 position = TRANSMUTER_STORAGE_POSITION;
        assembly {
            ts.slot := position
        }
    }

    /// @notice Returns the storage struct stored at the `IMPLEMENTATION_STORAGE_POSITION` slot
    /// @dev This struct handles the logic for making the contract easily usable on Etherscan
    function implementationStorage() internal pure returns (ImplementationStorage storage ims) {
        bytes32 position = IMPLEMENTATION_STORAGE_POSITION;
        assembly {
            ims.slot := position
        }
    }
}

File 4 of 13 : Errors.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.19;

error AlreadyAdded();
error CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);
error CannotAddSelectorsToZeroAddress(bytes4[] _selectors);
error CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);
error CannotRemoveImmutableFunction(bytes4 _selector);
error CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);
error CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);
error CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);
error CannotReplaceImmutableFunction(bytes4 _selector);
error ContractHasNoCode();
error FunctionNotFound(bytes4 _functionSelector);
error IncorrectFacetCutAction(uint8 _action);
error InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);
error InvalidChainlinkRate();
error InvalidLengths();
error InvalidNegativeFees();
error InvalidOracleType();
error InvalidParam();
error InvalidParams();
error InvalidRate();
error InvalidSwap();
error InvalidTokens();
error ManagerHasAssets();
error NoSelectorsProvidedForFacetForCut(address _facetAddress);
error NotAllowed();
error NotCollateral();
error NotGovernor();
error NotGovernorOrGuardian();
error NotTrusted();
error NotWhitelisted();
error OneInchSwapFailed();
error OracleUpdateFailed();
error Paused();
error ReentrantCall();
error RemoveFacetAddressMustBeZeroAddress(address _facetAddress);
error TooBigAmountIn();
error TooLate();
error TooSmallAmountOut();
error ZeroAddress();
error ZeroAmount();

File 5 of 13 : Storage.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.19;

import { IERC20 } from "oz/token/ERC20/IERC20.sol";
import { IAccessControlManager } from "interfaces/IAccessControlManager.sol";
import { IAgToken } from "interfaces/IAgToken.sol";

/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                        ENUMS                                                      
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

enum FacetCutAction {
    Add,
    Replace,
    Remove
}

enum ManagerType {
    EXTERNAL
}

enum ActionType {
    Mint,
    Burn,
    Redeem
}

enum TrustedType {
    Updater,
    Seller
}

enum QuoteType {
    MintExactInput,
    MintExactOutput,
    BurnExactInput,
    BurnExactOutput
}

enum OracleReadType {
    CHAINLINK_FEEDS,
    EXTERNAL,
    NO_ORACLE,
    STABLE,
    WSTETH,
    CBETH,
    RETH,
    SFRXETH,
    PYTH,
    MAX,
    MORPHO_ORACLE
}

enum OracleQuoteType {
    UNIT,
    TARGET
}

enum WhitelistType {
    BACKED
}

/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                    STRUCTS                                                     
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

struct Permit2Details {
    address to; // Address that will receive the funds
    uint256 nonce; // Nonce of the transaction
    bytes signature; // Permit signature of the user
}

struct FacetCut {
    address facetAddress; // Facet contract address
    FacetCutAction action; // Can be add, remove or replace
    bytes4[] functionSelectors; // Ex. bytes4(keccak256("transfer(address,uint256)"))
}

struct Facet {
    address facetAddress; // Facet contract address
    bytes4[] functionSelectors; // Ex. bytes4(keccak256("transfer(address,uint256)"))
}

struct FacetInfo {
    address facetAddress; // Facet contract address
    uint16 selectorPosition; // Position in the list of all selectors
}

struct DiamondStorage {
    bytes4[] selectors; // List of all available selectors
    mapping(bytes4 => FacetInfo) selectorInfo; // Selector to (address, position in list)
    IAccessControlManager accessControlManager; // Contract handling access control
}

struct ImplementationStorage {
    address implementation; // Dummy implementation address for Etherscan usability
}

struct ManagerStorage {
    IERC20[] subCollaterals; // Subtokens handled by the manager or strategies
    bytes config; // Additional configuration data
}

struct Collateral {
    uint8 isManaged; // If the collateral is managed through external strategies
    uint8 isMintLive; // If minting from this asset is unpaused
    uint8 isBurnLive; // If burning to this asset is unpaused
    uint8 decimals; // IERC20Metadata(collateral).decimals()
    uint8 onlyWhitelisted; // If only whitelisted addresses can burn or redeem for this token
    uint216 normalizedStables; // Normalized amount of stablecoins issued from this collateral
    uint64[] xFeeMint; // Increasing exposures in [0,BASE_9[
    int64[] yFeeMint; // Mint fees at the exposures specified in `xFeeMint`
    uint64[] xFeeBurn; // Decreasing exposures in ]0,BASE_9]
    int64[] yFeeBurn; // Burn fees at the exposures specified in `xFeeBurn`
    bytes oracleConfig; // Data about the oracle used for the collateral
    bytes whitelistData; // For whitelisted collateral, data used to verify whitelists
    ManagerStorage managerData; // For managed collateral, data used to handle the strategies
    uint256 stablecoinCap; // Cap on the amount of stablecoins that can be issued from this collateral
}

struct TransmuterStorage {
    IAgToken agToken; // agToken handled by the system
    uint8 isRedemptionLive; // If redemption is unpaused
    uint8 statusReentrant; // If call is reentrant or not
    uint128 normalizedStables; // Normalized amount of stablecoins issued by the system
    uint128 normalizer; // To reconcile `normalizedStables` values with the actual amount
    address[] collateralList; // List of collateral assets supported by the system
    uint64[] xRedemptionCurve; // Increasing collateral ratios > 0
    int64[] yRedemptionCurve; // Value of the redemption fees at `xRedemptionCurve`
    mapping(address => Collateral) collaterals; // Maps a collateral asset to its parameters
    mapping(address => uint256) isTrusted; // If an address is trusted to update the normalizer value
    mapping(address => uint256) isSellerTrusted; // If an address is trusted to sell accruing reward tokens or to run keeper jobs on oracles
    mapping(WhitelistType => mapping(address => uint256)) isWhitelistedForType;
    // Whether an address is whitelisted for a specific whitelist type
}

File 6 of 13 : Constants.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

import { ICbETH } from "interfaces/external/coinbase/ICbETH.sol";
import { ISfrxETH } from "interfaces/external/frax/ISfrxETH.sol";
import { IStETH } from "interfaces/external/lido/IStETH.sol";
import { IRETH } from "interfaces/external/rocketPool/IRETH.sol";

/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                 STORAGE SLOTS                                                  
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

/// @dev Storage position of `DiamondStorage` structure
/// @dev Equals `keccak256("diamond.standard.diamond.storage") - 1`
bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b;

/// @dev Storage position of `TransmuterStorage` structure
/// @dev Equals `keccak256("diamond.standard.transmuter.storage") - 1`
bytes32 constant TRANSMUTER_STORAGE_POSITION = 0xc1f2f38dde3351ac0a64934139e816326caa800303a1235dc53707d0de05d8bd;

/// @dev Storage position of `ImplementationStorage` structure
/// @dev Equals `keccak256("eip1967.proxy.implementation") - 1`
bytes32 constant IMPLEMENTATION_STORAGE_POSITION = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                     MATHS                                                      
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

uint256 constant BASE_6 = 1e6;
uint256 constant BASE_8 = 1e8;
uint256 constant BASE_9 = 1e9;
uint256 constant BASE_12 = 1e12;
uint256 constant BPS = 1e14;
uint256 constant BASE_18 = 1e18;
uint256 constant HALF_BASE_27 = 1e27 / 2;
uint256 constant BASE_27 = 1e27;
uint256 constant BASE_36 = 1e36;
uint256 constant MAX_BURN_FEE = 999_000_000;
uint256 constant MAX_MINT_FEE = BASE_12 - 1;

/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                     REENTRANT                                                      
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint8 constant NOT_ENTERED = 1;
uint8 constant ENTERED = 2;

/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                               COMMON ADDRESSES                                                 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

address constant PERMIT_2 = 0x000000000022D473030F116dDEE9F6B43aC78BA3;
address constant ONE_INCH_ROUTER = 0x1111111254EEB25477B68fb85Ed929f73A960582;
address constant AGEUR = 0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8;
ICbETH constant CBETH = ICbETH(0xBe9895146f7AF43049ca1c1AE358B0541Ea49704);
IRETH constant RETH = IRETH(0xae78736Cd615f374D3085123A210448E74Fc6393);
IStETH constant STETH = IStETH(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);
ISfrxETH constant SFRXETH = ISfrxETH(0xac3E018457B222d93114458476f3E3416Abbe38F);

File 7 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 8 of 13 : IAccessControlManager.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

/// @title IAccessControlManager
/// @author Angle Labs, Inc.
interface IAccessControlManager {
    /// @notice Checks whether an address is governor of the Angle Protocol or not
    /// @param admin Address to check
    /// @return Whether the address has the `GOVERNOR_ROLE` or not
    function isGovernor(address admin) external view returns (bool);

    /// @notice Checks whether an address is governor or a guardian of the Angle Protocol or not
    /// @param admin Address to check
    /// @return Whether the address has the `GUARDIAN_ROLE` or not
    /// @dev Governance should make sure when adding a governor to also give this governor the guardian
    /// role by calling the `addGovernor` function
    function isGovernorOrGuardian(address admin) external view returns (bool);
}

File 9 of 13 : IAgToken.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

import { IERC20 } from "oz/token/ERC20/IERC20.sol";

/// @title IAgToken
/// @author Angle Labs, Inc.
/// @notice Interface for the stablecoins `AgToken` contracts
interface IAgToken is IERC20 {
    /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                              MINTER ROLE ONLY FUNCTIONS                                            
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /// @notice Lets a whitelisted contract mint agTokens
    /// @param account Address to mint to
    /// @param amount Amount to mint
    function mint(address account, uint256 amount) external;

    /// @notice Burns `amount` tokens from a `burner` address after being asked to by `sender`
    /// @param amount Amount of tokens to burn
    /// @param burner Address to burn from
    /// @param sender Address which requested the burn from `burner`
    /// @dev This method is to be called by a contract with the minter right after being requested
    /// to do so by a `sender` address willing to burn tokens from another `burner` address
    /// @dev The method checks the allowance between the `sender` and the `burner`
    function burnFrom(uint256 amount, address burner, address sender) external;

    /// @notice Burns `amount` tokens from a `burner` address
    /// @param amount Amount of tokens to burn
    /// @param burner Address to burn from
    /// @dev This method is to be called by a contract with a minter right on the AgToken after being
    /// requested to do so by an address willing to burn tokens from its address
    function burnSelf(uint256 amount, address burner) external;

    /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                TREASURY ONLY FUNCTIONS                                             
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /// @notice Adds a minter in the contract
    /// @param minter Minter address to add
    /// @dev Zero address checks are performed directly in the `Treasury` contract
    function addMinter(address minter) external;

    /// @notice Removes a minter from the contract
    /// @param minter Minter address to remove
    /// @dev This function can also be called by a minter wishing to revoke itself
    function removeMinter(address minter) external;

    /// @notice Sets a new treasury contract
    /// @param _treasury New treasury address
    function setTreasury(address _treasury) external;

    /*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                                  EXTERNAL FUNCTIONS                                                
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

    /// @notice Checks whether an address has the right to mint agTokens
    /// @param minter Address for which the minting right should be checked
    /// @return Whether the address has the right to mint agTokens or not
    function isMinter(address minter) external view returns (bool);

    /// @notice Amount of decimals of the stablecoin
    function decimals() external view returns (uint8);
}

File 10 of 13 : ICbETH.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

/// @title ICbETH
/// @notice Interface for the `cbETH` contract
interface ICbETH {
    function exchangeRate() external view returns (uint256);
}

File 11 of 13 : ISfrxETH.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

/// @title ISfrxETH
/// @notice Interface for the `sfrxETH` contract
interface ISfrxETH {
    function pricePerShare() external view returns (uint256);
}

File 12 of 13 : IStETH.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

/// @title IStETH
/// @notice Interface for the `StETH` contract
interface IStETH {
    function getPooledEthByShares(uint256 _sharesAmount) external view returns (uint256);

    function submit(address) external payable returns (uint256);

    function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256);
}

File 13 of 13 : IRETH.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

/// @title IRETH
/// @notice Interface for the `rETH` contract
interface IRETH {
    function getExchangeRate() external view returns (uint256);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "stringutils/=lib/solidity-stringutils/",
    "contracts/=contracts/",
    "test/=test/",
    "interfaces/=contracts/interfaces/",
    "oz/=lib/openzeppelin-contracts/contracts/",
    "oz-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "mock/=test/mock/",
    "prb/math/=lib/prb-math/src/",
    "borrow/=lib/borrow-contracts/contracts/",
    "utils/=lib/utils/",
    "@chainlink/=lib/borrow-contracts/node_modules/@chainlink/",
    "@ensdomains/=lib/borrow-contracts/node_modules/@ensdomains/",
    "@prb/test/=lib/prb-math/lib/prb-test/src/",
    "@uniswap/=lib/borrow-contracts/node_modules/@uniswap/",
    "borrow-contracts/=lib/borrow-contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "lz/=lib/utils/lib/solidity-examples/contracts/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "prb-math/=lib/prb-math/src/",
    "prb-test/=lib/prb-math/lib/prb-test/src/",
    "solidity-examples/=lib/utils/lib/solidity-examples/contracts/",
    "solidity-stringutils/=lib/solidity-stringutils/",
    "src/=lib/prb-math/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"internalType":"address","name":"_init","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotAddFunctionToDiamondThatAlreadyExists","type":"error"},{"inputs":[{"internalType":"bytes4[]","name":"_selectors","type":"bytes4[]"}],"name":"CannotAddSelectorsToZeroAddress","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotRemoveFunctionThatDoesNotExist","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotRemoveImmutableFunction","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotReplaceFunctionThatDoesNotExists","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet","type":"error"},{"inputs":[{"internalType":"bytes4[]","name":"_selectors","type":"bytes4[]"}],"name":"CannotReplaceFunctionsFromFacetWithZeroAddress","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotReplaceImmutableFunction","type":"error"},{"inputs":[],"name":"ContractHasNoCode","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_functionSelector","type":"bytes4"}],"name":"FunctionNotFound","type":"error"},{"inputs":[{"internalType":"address","name":"_initializationContractAddress","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"InitializationFunctionReverted","type":"error"},{"inputs":[{"internalType":"address","name":"_facetAddress","type":"address"}],"name":"NoSelectorsProvidedForFacetForCut","type":"error"},{"inputs":[{"internalType":"address","name":"_facetAddress","type":"address"}],"name":"RemoveFacetAddressMustBeZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","type":"event"},{"stateMutability":"payable","type":"fallback"}]

6080604052610dcb803803806100148161021f565b92833960609060608382810103126100db578251916001600160401b0383116100db57818401601f8486010112156100db578284015161005b61005682610244565b61021f565b93602085838152019084870160208460051b838a010101116100db57602081880101915b60208460051b838a01010183106100e05787878761009f6020840161025b565b6040840151939091906001600160401b0385116100db576100cd946100c792820191016102ad565b91610477565b60405160f19081610c9a8239f35b600080fd5b82516001600160401b0381116100db578289010185601f1982898c010301126100db5761010b6101dc565b906101186020820161025b565b8252604081015160038110156100db57602083015280870151906001600160401b0382116100db5701878a01603f820112156100db5760208101519061016061005683610244565b91602083828152018a8d0160408360051b850101116100db5760408301905b60408360051b85010182106101a55750505050604082015281526020928301920161007f565b81516001600160e01b0319811681036100db5781526020918201910161017f565b634e487b7160e01b600052604160045260246000fd5b60405190606082016001600160401b038111838210176101fb57604052565b6101c6565b60408051919082016001600160401b038111838210176101fb57604052565b6040519190601f01601f191682016001600160401b038111838210176101fb57604052565b6001600160401b0381116101fb5760051b60200190565b51906001600160a01b03821682036100db57565b6001600160401b0381116101fb57601f01601f191660200190565b60005b83811061029d5750506000910152565b818101518382015260200161028d565b81601f820112156100db5780516102c66100568261026f565b92818452602082840101116100db576102e5916020808501910161028a565b90565b634e487b7160e01b600052603260045260246000fd5b80518210156103125760209160051b010190565b6102e8565b6003111561032157565b634e487b7160e01b600052602160045260246000fd5b5160038110156103215790565b90815180825260208080930193019160005b828110610364575050505090565b83516001600160e01b03191685529381019392810192600101610356565b9060209161039b8151809281855285808601910161028a565b601f01601f1916010190565b939290919360609260608201936060835281518095526080830160808660051b85010195602080940192600080915b838310610408575050505050506102e594956103fb9183019060018060a01b03169052565b6040818403910152610382565b909192939498607f1988820301865289519060018060a01b0382511681528782015160038110156104635761045560019385848c9594868096015281604080940151938201520190610344565b9b01960194930191906103d6565b634e487b7160e01b85526021600452602485fd5b929190835160005b8181106104c95750507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673816104c794956104bf85604051938493846103a7565b0390a1610bf8565b565b6040806104d683896102fe565b5101516104f46104e6848a6102fe565b51516001600160a01b031690565b9181511561057e575090829161051860206105116001968c6102fe565b5101610337565b61052181610317565b80610536575061053091610aaa565b0161047f565b61053f81610317565b8085036105555750610550916108c4565b610530565b80610561600292610317565b1461056e575b5050610530565b6105779161066c565b3880610567565b5163e767f91f60e01b81526001600160a01b0383166004820152602490fd5b0390fd5b9061ffff6105ad610200565b92546001600160a01b038116845260a01c166020830152565b634e487b7160e01b600052601160045260246000fd5b80156105e9576000190190565b6105c6565b90600080516020610dab833981519152805483101561031257600052601c60206000208360031c019260021b1690565b600080516020610dab83398151915280548015610656576000190190610643826105ee565b63ffffffff82549160031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b600080516020610dab8339815191525491906001600160a01b038116610890575080929192519060009060005b8381106106a857505050509050565b6106c36106b582846102fe565b516001600160e01b03191690565b956106f66106f18863ffffffff60e01b16600052600080516020610d8b833981519152602052604060002090565b6105a1565b8051909190610715906001600160a01b03165b6001600160a01b031690565b1561086e5781513090610730906001600160a01b0316610709565b1461084c57610795602097986001949361074a88946105dc565b998a91018161ffff61075e835161ffff1690565b160361079f575b505061076f61061e565b63ffffffff60e01b16600052600080516020610d8b833981519152602052604060002090565b5501949394610699565b6108266107ff6107c16107b4610845956105ee565b90549060031b1c60e01b90565b926107f7846107da6107d5845161ffff1690565b6105ee565b90919063ffffffff83549160031b9260e01c831b921b1916179055565b5161ffff1690565b9163ffffffff60e01b16600052600080516020610d8b833981519152602052604060002090565b805461ffff60a01b191660a09290921b61ffff60a01b16919091179055565b8838610765565b604051630df5fd6160e31b81526001600160e01b031989166004820152602490fd5b604051637a08a22d60e01b81526001600160e01b031989166004820152602490fd5b60405163d091bc8160e01b81526001600160a01b03919091166004820152602490fd5b9060206102e5928181520190610344565b6001600160a01b03811691908215610a0e576108df81610c7f565b81519160005b8381106108f3575050505050565b6109006106b582846102fe565b61093d6107096109308363ffffffff60e01b16600052600080516020610d8b833981519152602052604060002090565b546001600160a01b031690565b3081146109ec578681146109ca57156109a657906109a08461098160019463ffffffff60e01b16600052600080516020610d8b833981519152602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b016108e5565b604051637479f93960e01b81526001600160e01b0319919091166004820152602490fd5b604051631ac6ce8d60e11b81526001600160e01b031983166004820152602490fd5b604051632901806d60e11b81526001600160e01b031983166004820152602490fd5b60405163cd98a96f60e01b81528061059d84600483016108b3565b8151815460209093015161ffff60a01b60a09190911b166001600160b01b03199093166001600160a01b0390911617919091179055565b600080516020610dab83398151915290815491680100000000000000008310156101fb57826107da9160016104c7950190556105ee565b61ffff8091169081146105e95760010190565b906001600160a01b03821615610bb957600080516020610dab8339815191525461ffff16610ad783610c7f565b8151916000915b838310610aec575050505050565b610af96106b584846102fe565b610b296107096109308363ffffffff60e01b16600052600080516020610d8b833981519152602052604060002090565b610b9557600191610b88610b8d92610b83610b42610200565b6001600160a01b038b16815261ffff851660208201526001600160e01b031983166000908152600080516020610d8b83398151915260205260409020610a29565b610a60565b610a97565b920191610ade565b60405163ebbf5d0760e01b81526001600160e01b0319919091166004820152602490fd5b6040516302b8da0760e21b815290819061059d90600483016108b3565b6001600160a01b0390911681526040602082018190526102e592910190610382565b906001600160a01b03821615610c7b57610c1182610c7f565b600080825160208401855af4913d15610c73573d92610c326100568561026f565b9384523d6000602086013e5b15610c4857505050565b825115610c5757825160208401fd5b61059d60405192839263192105d760e01b845260048401610bd6565b606092610c3e565b5050565b3b15610c8757565b60405163c1df45cf60e01b8152600490fdfe60007fffffffff000000000000000000000000000000000000000000000000000000008135168082527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff604083205416908115608e57508180913682608037608036915af43d809260803e15608a576080f35b6080fd5b7f5416eb980000000000000000000000000000000000000000000000000000000060805260845260246080fdfea2646970667358221220d7c6fa4b06274219e8285a2309815814499ca22af2c7d98e8c593d9c321dd1b364736f6c63430008170033c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131cc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000850900e67129b9cd0dbaaf8a76ad0c853b733e9a0000000000000000000000000000000000000000000000000000000000000d400000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000006e0000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000a800000000000000000000000000000000000000000000000000000000000000bc000000000000000000000000058fff774212aa6b01370dd330cb93a94d25724560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000e41305a48d6f7f232943ea4aabbdf8dd4198c6b90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000025c60da1b00000000000000000000000000000000000000000000000000000000c39aa07d000000000000000000000000000000000000000000000000000000000000000000000000000000004813d282bcddb9022c4e0cfdae8661c473565ae5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed62700000000000000000000000000000000000000000000000000000000000000000000000000000000905d34cb2b7bca4ebe7416aa9235e69f4cf21b66000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000017b4a0bdf300000000000000000000000000000000000000000000000000000000ee565a6300000000000000000000000000000000000000000000000000000000847da7be00000000000000000000000000000000000000000000000000000000eb7aac5f000000000000000000000000000000000000000000000000000000003335221000000000000000000000000000000000000000000000000000000000b718136100000000000000000000000000000000000000000000000000000000b85780bc00000000000000000000000000000000000000000000000000000000cd377c5300000000000000000000000000000000000000000000000000000000782513bd0000000000000000000000000000000000000000000000000000000094e35d9e000000000000000000000000000000000000000000000000000000004ea3e3430000000000000000000000000000000000000000000000000000000010d3d22e0000000000000000000000000000000000000000000000000000000038c269eb00000000000000000000000000000000000000000000000000000000adc9d1f70000000000000000000000000000000000000000000000000000000031da6b13000000000000000000000000000000000000000000000000000000008db9653f000000000000000000000000000000000000000000000000000000000d1266270000000000000000000000000000000000000000000000000000000096d6487900000000000000000000000000000000000000000000000000000000fe7d0c540000000000000000000000000000000000000000000000000000000077dc342900000000000000000000000000000000000000000000000000000000f9839d8900000000000000000000000000000000000000000000000000000000a52aefd40000000000000000000000000000000000000000000000000000000099eeca4900000000000000000000000000000000000000000000000000000000000000000000000000000000d0c0499c7fc15e616402a0c266e47070a9717f2900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000105b4193400000000000000000000000000000000000000000000000000000000000000000000000000000000a880274d57e2d7928e2555d891eec44fdaab07fe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000bf0d2d5a800000000000000000000000000000000000000000000000000000000c1cdee7e0000000000000000000000000000000000000000000000000000000087c8ab7a000000000000000000000000000000000000000000000000000000005c3eebda000000000000000000000000000000000000000000000000000000001f0ec8ee000000000000000000000000000000000000000000000000000000000e32cb860000000000000000000000000000000000000000000000000000000081ee2deb00000000000000000000000000000000000000000000000000000000b13b0847000000000000000000000000000000000000000000000000000000001b0c7182000000000000000000000000000000000000000000000000000000007c0343a1000000000000000000000000000000000000000000000000000000001cb44dfc000000000000000000000000000000000000000000000000000000000000000000000000000000005a0b5892ecb6e400f80e954ad7d1d96b2dd5a0bb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005629feb62000000000000000000000000000000000000000000000000000000004eec47b900000000000000000000000000000000000000000000000000000000603b432700000000000000000000000000000000000000000000000000000000a9e6a1a400000000000000000000000000000000000000000000000000000000b607d09900000000000000000000000000000000000000000000000000000000000000000000000000000000c1ab8dc8301290f10c5aa48b0f4c4ae6e17440ba0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000064583aea6000000000000000000000000000000000000000000000000000000009525f3ab000000000000000000000000000000000000000000000000000000003b6a1fe000000000000000000000000000000000000000000000000000000000d92c6cb200000000000000000000000000000000000000000000000000000000b92567fa00000000000000000000000000000000000000000000000000000000c10a628700000000000000000000000000000000000000000000000000000000000000000000000000000000ed047132c0f2b3ecfa141afd35ef665fd4e11508000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004d703a0cd00000000000000000000000000000000000000000000000000000000815822c1000000000000000000000000000000000000000000000000000000002e7639bc00000000000000000000000000000000000000000000000000000000fd7daaf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c453c425c1000000000000000000000000b38ba207d02f07653a37b53c1c0a250b04f97e820000000000000000000000000000206329b97db379d5e1bf586bbdb969c63274000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e583100000000000000000000000050834f3163758fcc1df9973b6e91f0f0f0434ad300000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000019abdb048db10555344bbd3b596dc6929752cda900000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60007fffffffff000000000000000000000000000000000000000000000000000000008135168082527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff604083205416908115608e57508180913682608037608036915af43d809260803e15608a576080f35b6080fd5b7f5416eb980000000000000000000000000000000000000000000000000000000060805260845260246080fdfea2646970667358221220d7c6fa4b06274219e8285a2309815814499ca22af2c7d98e8c593d9c321dd1b364736f6c63430008170033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000850900e67129b9cd0dbaaf8a76ad0c853b733e9a0000000000000000000000000000000000000000000000000000000000000d400000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000006e0000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000a800000000000000000000000000000000000000000000000000000000000000bc000000000000000000000000058fff774212aa6b01370dd330cb93a94d25724560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000e41305a48d6f7f232943ea4aabbdf8dd4198c6b90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000025c60da1b00000000000000000000000000000000000000000000000000000000c39aa07d000000000000000000000000000000000000000000000000000000000000000000000000000000004813d282bcddb9022c4e0cfdae8661c473565ae5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed62700000000000000000000000000000000000000000000000000000000000000000000000000000000905d34cb2b7bca4ebe7416aa9235e69f4cf21b66000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000017b4a0bdf300000000000000000000000000000000000000000000000000000000ee565a6300000000000000000000000000000000000000000000000000000000847da7be00000000000000000000000000000000000000000000000000000000eb7aac5f000000000000000000000000000000000000000000000000000000003335221000000000000000000000000000000000000000000000000000000000b718136100000000000000000000000000000000000000000000000000000000b85780bc00000000000000000000000000000000000000000000000000000000cd377c5300000000000000000000000000000000000000000000000000000000782513bd0000000000000000000000000000000000000000000000000000000094e35d9e000000000000000000000000000000000000000000000000000000004ea3e3430000000000000000000000000000000000000000000000000000000010d3d22e0000000000000000000000000000000000000000000000000000000038c269eb00000000000000000000000000000000000000000000000000000000adc9d1f70000000000000000000000000000000000000000000000000000000031da6b13000000000000000000000000000000000000000000000000000000008db9653f000000000000000000000000000000000000000000000000000000000d1266270000000000000000000000000000000000000000000000000000000096d6487900000000000000000000000000000000000000000000000000000000fe7d0c540000000000000000000000000000000000000000000000000000000077dc342900000000000000000000000000000000000000000000000000000000f9839d8900000000000000000000000000000000000000000000000000000000a52aefd40000000000000000000000000000000000000000000000000000000099eeca4900000000000000000000000000000000000000000000000000000000000000000000000000000000d0c0499c7fc15e616402a0c266e47070a9717f2900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000105b4193400000000000000000000000000000000000000000000000000000000000000000000000000000000a880274d57e2d7928e2555d891eec44fdaab07fe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000bf0d2d5a800000000000000000000000000000000000000000000000000000000c1cdee7e0000000000000000000000000000000000000000000000000000000087c8ab7a000000000000000000000000000000000000000000000000000000005c3eebda000000000000000000000000000000000000000000000000000000001f0ec8ee000000000000000000000000000000000000000000000000000000000e32cb860000000000000000000000000000000000000000000000000000000081ee2deb00000000000000000000000000000000000000000000000000000000b13b0847000000000000000000000000000000000000000000000000000000001b0c7182000000000000000000000000000000000000000000000000000000007c0343a1000000000000000000000000000000000000000000000000000000001cb44dfc000000000000000000000000000000000000000000000000000000000000000000000000000000005a0b5892ecb6e400f80e954ad7d1d96b2dd5a0bb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005629feb62000000000000000000000000000000000000000000000000000000004eec47b900000000000000000000000000000000000000000000000000000000603b432700000000000000000000000000000000000000000000000000000000a9e6a1a400000000000000000000000000000000000000000000000000000000b607d09900000000000000000000000000000000000000000000000000000000000000000000000000000000c1ab8dc8301290f10c5aa48b0f4c4ae6e17440ba0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000064583aea6000000000000000000000000000000000000000000000000000000009525f3ab000000000000000000000000000000000000000000000000000000003b6a1fe000000000000000000000000000000000000000000000000000000000d92c6cb200000000000000000000000000000000000000000000000000000000b92567fa00000000000000000000000000000000000000000000000000000000c10a628700000000000000000000000000000000000000000000000000000000000000000000000000000000ed047132c0f2b3ecfa141afd35ef665fd4e11508000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004d703a0cd00000000000000000000000000000000000000000000000000000000815822c1000000000000000000000000000000000000000000000000000000002e7639bc00000000000000000000000000000000000000000000000000000000fd7daaf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c453c425c1000000000000000000000000b38ba207d02f07653a37b53c1c0a250b04f97e820000000000000000000000000000206329b97db379d5e1bf586bbdb969c63274000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e583100000000000000000000000050834f3163758fcc1df9973b6e91f0f0f0434ad300000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000019abdb048db10555344bbd3b596dc6929752cda900000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _diamondCut (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : _init (address): 0x850900E67129B9cD0dBaaf8a76AD0c853b733e9A
Arg [2] : _calldata (bytes): 0x53c425c1000000000000000000000000b38ba207d02f07653a37b53c1c0a250b04f97e820000000000000000000000000000206329b97db379d5e1bf586bbdb969c63274000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e583100000000000000000000000050834f3163758fcc1df9973b6e91f0f0f0434ad300000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000019abdb048db10555344bbd3b596dc6929752cda9

-----Encoded View---------------
114 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 000000000000000000000000850900e67129b9cd0dbaaf8a76ad0c853b733e9a
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000d40
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000380
Arg [8] : 00000000000000000000000000000000000000000000000000000000000006e0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000780
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000960
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000a80
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000bc0
Arg [13] : 00000000000000000000000058fff774212aa6b01370dd330cb93a94d2572456
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [17] : 1f931c1c00000000000000000000000000000000000000000000000000000000
Arg [18] : 000000000000000000000000e41305a48d6f7f232943ea4aabbdf8dd4198c6b9
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [22] : 5c60da1b00000000000000000000000000000000000000000000000000000000
Arg [23] : c39aa07d00000000000000000000000000000000000000000000000000000000
Arg [24] : 0000000000000000000000004813d282bcddb9022c4e0cfdae8661c473565ae5
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [28] : cdffacc600000000000000000000000000000000000000000000000000000000
Arg [29] : 52ef6b2c00000000000000000000000000000000000000000000000000000000
Arg [30] : adfca15e00000000000000000000000000000000000000000000000000000000
Arg [31] : 7a0ed62700000000000000000000000000000000000000000000000000000000
Arg [32] : 000000000000000000000000905d34cb2b7bca4ebe7416aa9235e69f4cf21b66
Arg [33] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [34] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [35] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [36] : b4a0bdf300000000000000000000000000000000000000000000000000000000
Arg [37] : ee565a6300000000000000000000000000000000000000000000000000000000
Arg [38] : 847da7be00000000000000000000000000000000000000000000000000000000
Arg [39] : eb7aac5f00000000000000000000000000000000000000000000000000000000
Arg [40] : 3335221000000000000000000000000000000000000000000000000000000000
Arg [41] : b718136100000000000000000000000000000000000000000000000000000000
Arg [42] : b85780bc00000000000000000000000000000000000000000000000000000000
Arg [43] : cd377c5300000000000000000000000000000000000000000000000000000000
Arg [44] : 782513bd00000000000000000000000000000000000000000000000000000000
Arg [45] : 94e35d9e00000000000000000000000000000000000000000000000000000000
Arg [46] : 4ea3e34300000000000000000000000000000000000000000000000000000000
Arg [47] : 10d3d22e00000000000000000000000000000000000000000000000000000000
Arg [48] : 38c269eb00000000000000000000000000000000000000000000000000000000
Arg [49] : adc9d1f700000000000000000000000000000000000000000000000000000000
Arg [50] : 31da6b1300000000000000000000000000000000000000000000000000000000
Arg [51] : 8db9653f00000000000000000000000000000000000000000000000000000000
Arg [52] : 0d12662700000000000000000000000000000000000000000000000000000000
Arg [53] : 96d6487900000000000000000000000000000000000000000000000000000000
Arg [54] : fe7d0c5400000000000000000000000000000000000000000000000000000000
Arg [55] : 77dc342900000000000000000000000000000000000000000000000000000000
Arg [56] : f9839d8900000000000000000000000000000000000000000000000000000000
Arg [57] : a52aefd400000000000000000000000000000000000000000000000000000000
Arg [58] : 99eeca4900000000000000000000000000000000000000000000000000000000
Arg [59] : 000000000000000000000000d0c0499c7fc15e616402a0c266e47070a9717f29
Arg [60] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [61] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [62] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [63] : 05b4193400000000000000000000000000000000000000000000000000000000
Arg [64] : 000000000000000000000000a880274d57e2d7928e2555d891eec44fdaab07fe
Arg [65] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [66] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [67] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [68] : f0d2d5a800000000000000000000000000000000000000000000000000000000
Arg [69] : c1cdee7e00000000000000000000000000000000000000000000000000000000
Arg [70] : 87c8ab7a00000000000000000000000000000000000000000000000000000000
Arg [71] : 5c3eebda00000000000000000000000000000000000000000000000000000000
Arg [72] : 1f0ec8ee00000000000000000000000000000000000000000000000000000000
Arg [73] : 0e32cb8600000000000000000000000000000000000000000000000000000000
Arg [74] : 81ee2deb00000000000000000000000000000000000000000000000000000000
Arg [75] : b13b084700000000000000000000000000000000000000000000000000000000
Arg [76] : 1b0c718200000000000000000000000000000000000000000000000000000000
Arg [77] : 7c0343a100000000000000000000000000000000000000000000000000000000
Arg [78] : 1cb44dfc00000000000000000000000000000000000000000000000000000000
Arg [79] : 0000000000000000000000005a0b5892ecb6e400f80e954ad7d1d96b2dd5a0bb
Arg [80] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [81] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [82] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [83] : 629feb6200000000000000000000000000000000000000000000000000000000
Arg [84] : 4eec47b900000000000000000000000000000000000000000000000000000000
Arg [85] : 603b432700000000000000000000000000000000000000000000000000000000
Arg [86] : a9e6a1a400000000000000000000000000000000000000000000000000000000
Arg [87] : b607d09900000000000000000000000000000000000000000000000000000000
Arg [88] : 000000000000000000000000c1ab8dc8301290f10c5aa48b0f4c4ae6e17440ba
Arg [89] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [90] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [91] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [92] : 4583aea600000000000000000000000000000000000000000000000000000000
Arg [93] : 9525f3ab00000000000000000000000000000000000000000000000000000000
Arg [94] : 3b6a1fe000000000000000000000000000000000000000000000000000000000
Arg [95] : d92c6cb200000000000000000000000000000000000000000000000000000000
Arg [96] : b92567fa00000000000000000000000000000000000000000000000000000000
Arg [97] : c10a628700000000000000000000000000000000000000000000000000000000
Arg [98] : 000000000000000000000000ed047132c0f2b3ecfa141afd35ef665fd4e11508
Arg [99] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [100] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [101] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [102] : d703a0cd00000000000000000000000000000000000000000000000000000000
Arg [103] : 815822c100000000000000000000000000000000000000000000000000000000
Arg [104] : 2e7639bc00000000000000000000000000000000000000000000000000000000
Arg [105] : fd7daaf800000000000000000000000000000000000000000000000000000000
Arg [106] : 00000000000000000000000000000000000000000000000000000000000000c4
Arg [107] : 53c425c1000000000000000000000000b38ba207d02f07653a37b53c1c0a250b
Arg [108] : 04f97e820000000000000000000000000000206329b97db379d5e1bf586bbdb9
Arg [109] : 69c63274000000000000000000000000af88d065e77c8cc2239327c5edb3a432
Arg [110] : 268e583100000000000000000000000050834f3163758fcc1df9973b6e91f0f0
Arg [111] : f0434ad300000000000000000000000000000000000000000000003635c9adc5
Arg [112] : dea0000000000000000000000000000019abdb048db10555344bbd3b596dc692
Arg [113] : 9752cda900000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.