Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Implementati... | 21694798 | 48 days ago | IN | 0 ETH | 0.00310697 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
0x60a06040 | 21988065 | 7 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21988065 | 7 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21988065 | 7 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21985245 | 7 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21985245 | 7 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21985245 | 7 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21906701 | 18 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21906701 | 18 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21906701 | 18 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21902285 | 19 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21902285 | 19 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21902285 | 19 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21862009 | 24 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21862009 | 24 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21862009 | 24 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21859670 | 25 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21859670 | 25 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21859670 | 25 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21852357 | 26 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21852357 | 26 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21852357 | 26 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21833230 | 28 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21833230 | 28 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21833230 | 28 days ago | Contract Creation | 0 ETH | |||
0x60a06040 | 21832930 | 28 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
WeightedIndexFactory
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.28; import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IDecentralizedIndex.sol"; import "./interfaces/IInitializeSelector.sol"; import "./interfaces/IStakingPoolToken.sol"; import "./interfaces/IWeightedIndexFactory.sol"; contract WeightedIndexFactory is Ownable, IWeightedIndexFactory { struct DeployedContracts { address weightedIndexImpl; address stakingPoolTokenImpl; address tokenRewardsImpl; address weightedIndexBeacon; address stakingPoolTokenBeacon; address tokenRewardsBeacon; } DeployedContracts public deployedContracts; event PodDeployed(address weightedIndexProxy, address stakingPoolTokenProxy, address tokenRewardsProxy); constructor() Ownable(_msgSender()) {} function setImplementationsAndBeacons( address weightedIndexImpl, address stakingPoolTokenImpl, address tokenRewardsImpl, address weightedIndexBeacon, address stakingPoolTokenBeacon, address tokenRewardsBeacon ) external onlyOwner { // Store implementation addresses deployedContracts.weightedIndexImpl = weightedIndexImpl; deployedContracts.stakingPoolTokenImpl = stakingPoolTokenImpl; deployedContracts.tokenRewardsImpl = tokenRewardsImpl; // Store beacon addresses deployedContracts.weightedIndexBeacon = weightedIndexBeacon; deployedContracts.stakingPoolTokenBeacon = stakingPoolTokenBeacon; deployedContracts.tokenRewardsBeacon = tokenRewardsBeacon; } function deployPodAndLinkDependencies( string memory indexName, string memory indexSymbol, bytes memory baseConfig, bytes memory immutables ) external override returns (address weightedIndex, address stakingPool, address tokenRewards) { require( deployedContracts.weightedIndexBeacon != address(0) && deployedContracts.stakingPoolTokenBeacon != address(0) && deployedContracts.tokenRewardsBeacon != address(0), "Beacons not deployed" ); require( deployedContracts.weightedIndexImpl != address(0) && deployedContracts.stakingPoolTokenImpl != address(0) && deployedContracts.tokenRewardsImpl != address(0), "Implementations not deployed" ); // Deploy WeightedIndex proxy bytes memory weightedIndexData = abi.encodeWithSelector( IInitializeSelector(deployedContracts.weightedIndexImpl).initializeSelector(), indexName, indexSymbol, baseConfig, immutables ); weightedIndex = address(new BeaconProxy(deployedContracts.weightedIndexBeacon, weightedIndexData)); (,,,, address stakeUserRestriction, bool leaveRewardsAsPairedLp) = abi.decode( baseConfig, (IDecentralizedIndex.Config, IDecentralizedIndex.Fees, address[], uint256[], address, bool) ); // Deploy StakingPoolToken proxy bytes memory stakingPoolData = abi.encodeWithSelector( IInitializeSelector(deployedContracts.stakingPoolTokenImpl).initializeSelector(), string.concat("Staked ", indexName), string.concat("s", indexSymbol), weightedIndex, stakeUserRestriction, immutables ); stakingPool = address(new BeaconProxy(deployedContracts.stakingPoolTokenBeacon, stakingPoolData)); // Deploy TokenRewards proxy bytes memory tokenRewardsData = abi.encodeWithSelector( IInitializeSelector(deployedContracts.tokenRewardsImpl).initializeSelector(), weightedIndex, stakingPool, leaveRewardsAsPairedLp, immutables ); tokenRewards = address(new BeaconProxy(deployedContracts.tokenRewardsBeacon, tokenRewardsData)); // Link contracts together IDecentralizedIndex(payable(weightedIndex)).setLpStakingPool(stakingPool); IStakingPoolToken(stakingPool).setPoolRewards(tokenRewards); Ownable(stakingPool).transferOwnership(weightedIndex); if (!IDecentralizedIndex(payable(weightedIndex)).DEX_HANDLER().ASYNC_INITIALIZE()) { IDecentralizedIndex(payable(weightedIndex)).setup(); } emit PodDeployed(weightedIndex, stakingPool, tokenRewards); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.20; import {IBeacon} from "./IBeacon.sol"; import {Ownable} from "../../access/Ownable.sol"; /** * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their * implementation contract, which is where they will delegate all function calls. * * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon. */ contract UpgradeableBeacon is IBeacon, Ownable { address private _implementation; /** * @dev The `implementation` of the beacon is invalid. */ error BeaconInvalidImplementation(address implementation); /** * @dev Emitted when the implementation returned by the beacon is changed. */ event Upgraded(address indexed implementation); /** * @dev Sets the address of the initial implementation, and the initial owner who can upgrade the beacon. */ constructor(address implementation_, address initialOwner) Ownable(initialOwner) { _setImplementation(implementation_); } /** * @dev Returns the current implementation address. */ function implementation() public view virtual returns (address) { return _implementation; } /** * @dev Upgrades the beacon to a new implementation. * * Emits an {Upgraded} event. * * Requirements: * * - msg.sender must be the owner of the contract. * - `newImplementation` must be a contract. */ function upgradeTo(address newImplementation) public virtual onlyOwner { _setImplementation(newImplementation); } /** * @dev Sets the implementation contract address for this beacon * * Requirements: * * - `newImplementation` must be a contract. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert BeaconInvalidImplementation(newImplementation); } _implementation = newImplementation; emit Upgraded(newImplementation); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.22; import {IBeacon} from "./IBeacon.sol"; import {Proxy} from "../Proxy.sol"; import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; /** * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. * * The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an * immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] so that it can be accessed externally. * * CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust * the beacon to not upgrade the implementation maliciously. * * IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in * an inconsistent state where the beacon storage slot does not match the beacon address. */ contract BeaconProxy is Proxy { // An immutable address for the beacon to avoid unnecessary SLOADs before each delegate call. address private immutable _beacon; /** * @dev Initializes the proxy with `beacon`. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity * constructor. * * Requirements: * * - `beacon` must be a contract with the interface {IBeacon}. * - If `data` is empty, `msg.value` must be zero. */ constructor(address beacon, bytes memory data) payable { ERC1967Utils.upgradeBeaconToAndCall(beacon, data); _beacon = beacon; } /** * @dev Returns the current implementation address of the associated beacon. */ function _implementation() internal view virtual override returns (address) { return IBeacon(_getBeacon()).implementation(); } /** * @dev Returns the beacon. */ function _getBeacon() internal view virtual returns (address) { return _beacon; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IDexAdapter.sol"; interface IDecentralizedIndex is IERC20 { enum IndexType { WEIGHTED, UNWEIGHTED } struct Config { address partner; uint256 debondCooldown; bool hasTransferTax; bool blacklistTKNpTKNPoolV2; } // all fees: 1 == 0.01%, 10 == 0.1%, 100 == 1% struct Fees { uint16 burn; uint16 bond; uint16 debond; uint16 buy; uint16 sell; uint16 partner; } struct IndexAssetInfo { address token; uint256 weighting; uint256 basePriceUSDX96; address c1; // arbitrary contract/address field we can use for an index uint256 q1; // arbitrary quantity/number field we can use for an index } /// @notice The ```Create``` event fires when a new decentralized index has been created /// @param newIdx The CA of the new index contract /// @param wallet The creator of the new index event Create(address indexed newIdx, address indexed wallet); /// @notice The ```Initialize``` event fires when the new pod has been initialized, /// @notice which is at creation on some and in another txn for others (gas limits) /// @param wallet The wallet that initialized /// @param v2Pool The new UniV2 derivative pool that was created at initialization event Initialize(address indexed wallet, address v2Pool); /// @notice The ```Bond``` event fires when someone wraps into the pod which mints new pod tokens /// @param wallet The wallet that wrapped /// @param token The token that was used as a ref to wrap into, representing an underlying tkn /// @param amountTokensBonded Amount of underlying tkns used to wrap/bond /// @param amountTokensMinted Amount of new pod tokens (pTKN) minted event Bond(address indexed wallet, address indexed token, uint256 amountTokensBonded, uint256 amountTokensMinted); /// @notice The ```Debond``` event fires when someone unwraps from a pod and redeems underlying tkn(s) /// @param wallet The wallet that unwrapped/debond /// @param amountDebonded Amount of pTKNs burned/unwrapped event Debond(address indexed wallet, uint256 amountDebonded); /// @notice The ```AddLiquidity``` event fires when new liquidity (LP) for a pod is added /// @param wallet The wallet that added LP /// @param amountTokens Amount of pTKNs used for LP /// @param amountDAI Amount of pairedLpAsset used for LP event AddLiquidity(address indexed wallet, uint256 amountTokens, uint256 amountDAI); /// @notice The ```RemoveLiquidity``` event fires when LP is removed for a pod /// @param wallet The wallet that removed LP /// @param amountLiquidity Amount of liquidity removed event RemoveLiquidity(address indexed wallet, uint256 amountLiquidity); event SetPartner(address indexed wallet, address newPartner); event SetPartnerFee(address indexed wallet, uint16 newFee); function BOND_FEE() external view returns (uint16); function DEBOND_FEE() external view returns (uint16); function DEX_HANDLER() external view returns (IDexAdapter); function FLASH_FEE_AMOUNT_DAI() external view returns (uint256); function PAIRED_LP_TOKEN() external view returns (address); function config() external view returns (Config calldata); function fees() external view returns (Fees calldata); function unlocked() external view returns (uint8); function indexType() external view returns (IndexType); function created() external view returns (uint256); function lpStakingPool() external view returns (address); function lpRewardsToken() external view returns (address); function partner() external view returns (address); function isAsset(address token) external view returns (bool); function getAllAssets() external view returns (IndexAssetInfo[] memory); function getInitialAmount(address sToken, uint256 sAmount, address tToken) external view returns (uint256); function processPreSwapFeesAndSwap() external; function totalAssets() external view returns (uint256 totalManagedAssets); function totalAssets(address asset) external view returns (uint256 totalManagedAssets); function convertToShares(uint256 assets) external view returns (uint256 shares); function convertToAssets(uint256 shares) external view returns (uint256 assets); function setup() external; function bond(address token, uint256 amount, uint256 amountMintMin) external; function debond(uint256 amount, address[] memory token, uint8[] memory percentage) external; function addLiquidityV2(uint256 idxTokens, uint256 daiTokens, uint256 slippage, uint256 deadline) external returns (uint256); function removeLiquidityV2(uint256 lpTokens, uint256 minTokens, uint256 minDAI, uint256 deadline) external; function flash(address recipient, address token, uint256 amount, bytes calldata data) external; function flashMint(address recipient, uint256 amount, bytes calldata data) external; function setLpStakingPool(address lpStakingPool) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; interface IInitializeSelector { function initializeSelector() external view returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; interface IStakingPoolToken { event Stake(address indexed executor, address indexed user, uint256 amount); event Unstake(address indexed user, uint256 amount); function INDEX_FUND() external view returns (address); function POOL_REWARDS() external view returns (address); function stakingToken() external view returns (address); function stakeUserRestriction() external view returns (address); function stake(address user, uint256 amount) external; function unstake(uint256 amount) external; function setPoolRewards(address poolRewards) external; function setStakingToken(address stakingToken) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; import "./IDecentralizedIndex.sol"; interface IWeightedIndexFactory { function deployPodAndLinkDependencies( string memory indexName, string memory indexSymbol, bytes memory baseConfig, bytes memory immutables ) external returns (address weightedIndex, address stakingPool, address tokenRewards); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol) pragma solidity ^0.8.20; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback * function and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.22; import {IBeacon} from "../beacon/IBeacon.sol"; import {IERC1967} from "../../interfaces/IERC1967.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This library provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots. */ library ERC1967Utils { /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev The `implementation` of the proxy is invalid. */ error ERC1967InvalidImplementation(address implementation); /** * @dev The `admin` of the proxy is invalid. */ error ERC1967InvalidAdmin(address admin); /** * @dev The `beacon` of the proxy is invalid. */ error ERC1967InvalidBeacon(address beacon); /** * @dev An upgrade function sees `msg.value > 0` that may be lost. */ error ERC1967NonPayable(); /** * @dev Returns the current implementation address. */ function getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the ERC-1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert ERC1967InvalidImplementation(newImplementation); } StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Performs implementation upgrade with additional setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) internal { _setImplementation(newImplementation); emit IERC1967.Upgraded(newImplementation); if (data.length > 0) { Address.functionDelegateCall(newImplementation, data); } else { _checkNonPayable(); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(ADMIN_SLOT).value; } /** * @dev Stores a new address in the ERC-1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { revert ERC1967InvalidAdmin(address(0)); } StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {IERC1967-AdminChanged} event. */ function changeAdmin(address newAdmin) internal { emit IERC1967.AdminChanged(getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(BEACON_SLOT).value; } /** * @dev Stores a new beacon in the ERC-1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (newBeacon.code.length == 0) { revert ERC1967InvalidBeacon(newBeacon); } StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; address beaconImplementation = IBeacon(newBeacon).implementation(); if (beaconImplementation.code.length == 0) { revert ERC1967InvalidImplementation(beaconImplementation); } } /** * @dev Change the beacon and trigger a setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-BeaconUpgraded} event. * * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for * efficiency. */ function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { _setBeacon(newBeacon); emit IERC1967.BeaconUpgraded(newBeacon); if (data.length > 0) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } else { _checkNonPayable(); } } /** * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract * if an upgrade doesn't perform an initialization call. */ function _checkNonPayable() private { if (msg.value > 0) { revert ERC1967NonPayable(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; interface IDexAdapter { function ASYNC_INITIALIZE() external view returns (bool); function V2_ROUTER() external view returns (address); function V3_ROUTER() external view returns (address); function WETH() external view returns (address); function getV3Pool(address _token0, address _token1, int24 _tickSpacing) external view returns (address _pool); function getV3Pool(address _token0, address _token1, uint24 _poolFee) external view returns (address _pool); function getV2Pool(address _token0, address _token1) external view returns (address _pool); function createV2Pool(address _token0, address _token1) external returns (address _pool); function getReserves(address _pool) external view returns (uint112, uint112); function swapV2Single( address _tokenIn, address _tokenOut, uint256 _amountIn, uint256 _amountOutMin, address _recipient ) external returns (uint256 _amountOut); function swapV2SingleExactOut( address _tokenIn, address _tokenOut, uint256 _amountInMax, uint256 _amountOut, address _recipient ) external returns (uint256 _amountInUsed); function swapV3Single( address _tokenIn, address _tokenOut, uint24 _fee, uint256 _amountIn, uint256 _amountOutMin, address _recipient ) external returns (uint256 _amountOut); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external; function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.20; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } (bool success, bytes memory returndata) = recipient.call{value: amount}(""); if (!success) { _revert(returndata); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {Errors.FailedCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case * of an unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {Errors.FailedCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC-1967 implementation slot: * ```solidity * contract ERC1967 { * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * TIP: Consider using this library along with {SlotDerivation}. */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct Int256Slot { int256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `Int256Slot` with member `value` located at `slot`. */ function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns a `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { assembly ("memory-safe") { r.slot := store.slot } } /** * @dev Returns a `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { assembly ("memory-safe") { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { assembly ("memory-safe") { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
{ "remappings": [ "@chainlink/=node_modules/@chainlink/", "@fraxlend/=test/invariant/modules/fraxlend/", "fuzzlib/=lib/fuzzlib/src/", "swap-router/=test/invariant/modules/v3-periphery/swapRouter/", "v3-core/=test/invariant/modules/v3-core/", "v3-periphery/=test/invariant/modules/v3-periphery/", "v2-core/=test/invariant/modules/uniswap-v2/v2-core/contracts/", "v2-periphery/=test/invariant/modules/uniswap-v2/v2-periphery/contracts/", "uniswap-v2/=test/invariant/modules/uniswap-v2/", "solidity-bytes-utils/contracts/=test/invariant/modules/fraxlend/libraries/", "@rari-capital/solmate/=node_modules/solmate/", "@arbitrum/=node_modules/@arbitrum/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", "@ethereum-waffle/=node_modules/@ethereum-waffle/", "@mean-finance/=node_modules/@mean-finance/", "@offchainlabs/=node_modules/@offchainlabs/", "@openzeppelin/=node_modules/@openzeppelin/", "@scroll-tech/=node_modules/@scroll-tech/", "@uniswap/=node_modules/@uniswap/", "@zksync/=node_modules/@zksync/", "base64-sol/=node_modules/base64-sol/", "ds-test/=lib/fuzzlib/lib/forge-std/lib/ds-test/src/", "erc721a/=node_modules/erc721a/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "solidity-code-metrics/=node_modules/solidity-code-metrics/", "solmate/=node_modules/solmate/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"weightedIndexProxy","type":"address"},{"indexed":false,"internalType":"address","name":"stakingPoolTokenProxy","type":"address"},{"indexed":false,"internalType":"address","name":"tokenRewardsProxy","type":"address"}],"name":"PodDeployed","type":"event"},{"inputs":[{"internalType":"string","name":"indexName","type":"string"},{"internalType":"string","name":"indexSymbol","type":"string"},{"internalType":"bytes","name":"baseConfig","type":"bytes"},{"internalType":"bytes","name":"immutables","type":"bytes"}],"name":"deployPodAndLinkDependencies","outputs":[{"internalType":"address","name":"weightedIndex","type":"address"},{"internalType":"address","name":"stakingPool","type":"address"},{"internalType":"address","name":"tokenRewards","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployedContracts","outputs":[{"internalType":"address","name":"weightedIndexImpl","type":"address"},{"internalType":"address","name":"stakingPoolTokenImpl","type":"address"},{"internalType":"address","name":"tokenRewardsImpl","type":"address"},{"internalType":"address","name":"weightedIndexBeacon","type":"address"},{"internalType":"address","name":"stakingPoolTokenBeacon","type":"address"},{"internalType":"address","name":"tokenRewardsBeacon","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"weightedIndexImpl","type":"address"},{"internalType":"address","name":"stakingPoolTokenImpl","type":"address"},{"internalType":"address","name":"tokenRewardsImpl","type":"address"},{"internalType":"address","name":"weightedIndexBeacon","type":"address"},{"internalType":"address","name":"stakingPoolTokenBeacon","type":"address"},{"internalType":"address","name":"tokenRewardsBeacon","type":"address"}],"name":"setImplementationsAndBeacons","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052348015600f57600080fd5b503380603557604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b603c816041565b506091565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611707806100a06000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a6146100675780638874dd95146100715780638da5cb5b146100b3578063b3762c80146100ce578063c54a9588146100e1578063f2fde38b14610155575b600080fd5b61006f610168565b005b61008461007f366004610aa5565b61017c565b604080516001600160a01b03948516815292841660208401529216918101919091526060015b60405180910390f35b6000546040516001600160a01b0390911681526020016100aa565b61006f6100dc366004610b7a565b61087f565b600154600254600354600454600554600654610113956001600160a01b03908116958116948116938116928116911686565b604080516001600160a01b03978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c0016100aa565b61006f610163366004610bfc565b6108f6565b610170610934565b61017a6000610961565b565b600454600090819081906001600160a01b0316158015906101a757506005546001600160a01b031615155b80156101bd57506006546001600160a01b031615155b6102055760405162461bcd60e51b815260206004820152601460248201527310995858dbdb9cc81b9bdd0819195c1b1bde595960621b60448201526064015b60405180910390fd5b6001546001600160a01b03161580159061022957506002546001600160a01b031615155b801561023f57506003546001600160a01b031615155b61028b5760405162461bcd60e51b815260206004820152601c60248201527f496d706c656d656e746174696f6e73206e6f74206465706c6f7965640000000060448201526064016101fc565b6001546040805163438838eb60e11b815290516000926001600160a01b03169163871071d69160048083019260209291908290030181865afa1580156102d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f99190610c20565b888888886040516024016103109493929190610c9a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260045491519092506001600160a01b03909116908290610361906109b1565b61036c929190610cf2565b604051809103906000f080158015610388573d6000803e3d6000fd5b509350600080878060200190518101906103a29190610eea565b6002546040805163438838eb60e11b81529051939950919750600096506001600160a01b0316945063871071d6935060048082019350602092918290030181865afa1580156103f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104199190610c20565b8b60405160200161042a9190610fe2565b6040516020818303038152906040528b60405160200161044a9190611011565b60408051601f198184030181529082905261046e92918b9088908e9060240161103a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260055491519092506001600160a01b039091169082906104bf906109b1565b6104ca929190610cf2565b604051809103906000f0801580156104e6573d6000803e3d6000fd5b5095506000600160020160009054906101000a90046001600160a01b03166001600160a01b031663871071d66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105659190610c20565b8888858c60405160240161057c9493929190611096565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260065491519092506001600160a01b039091169082906105cd906109b1565b6105d8929190610cf2565b604051809103906000f0801580156105f4573d6000803e3d6000fd5b506040516328492b2960e01b81526001600160a01b038981166004830152919750908916906328492b2990602401600060405180830381600087803b15801561063c57600080fd5b505af1158015610650573d6000803e3d6000fd5b5050604051633a28b8d360e21b81526001600160a01b0389811660048301528a16925063e8a2e34c9150602401600060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b038b811660048301528a16925063f2fde38b9150602401600060405180830381600087803b1580156106f257600080fd5b505af1158015610706573d6000803e3d6000fd5b50505050876001600160a01b031663822631d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076c91906110d4565b6001600160a01b031663c3749ae56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cd91906110f1565b61082557876001600160a01b031663ba0bba406040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050505b604080516001600160a01b038a81168252898116602083015288168183015290517fe7c65191a1ec2d39173cef6d950b221cec32a2f948b79d737c02e06893c1af289181900360600190a150505050509450945094915050565b610887610934565b600180546001600160a01b03199081166001600160a01b0398891617909155600280548216968816969096179095556003805486169487169490941790935560048054851692861692909217909155600580548416918516919091179055600680549092169216919091179055565b6108fe610934565b6001600160a01b03811661092857604051631e4fbdf760e01b8152600060048201526024016101fc565b61093181610961565b50565b6000546001600160a01b0316331461017a5760405163118cdaa760e01b81523360048201526024016101fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105c58061110d83390190565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156109f7576109f76109be565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610a2657610a266109be565b604052919050565b600082601f830112610a3f57600080fd5b81356020830160008067ffffffffffffffff841115610a6057610a606109be565b50601f8301601f1916602001610a75816109fd565b915050828152858383011115610a8a57600080fd5b82826020830137600092810160200192909252509392505050565b60008060008060808587031215610abb57600080fd5b843567ffffffffffffffff811115610ad257600080fd5b610ade87828801610a2e565b945050602085013567ffffffffffffffff811115610afb57600080fd5b610b0787828801610a2e565b935050604085013567ffffffffffffffff811115610b2457600080fd5b610b3087828801610a2e565b925050606085013567ffffffffffffffff811115610b4d57600080fd5b610b5987828801610a2e565b91505092959194509250565b6001600160a01b038116811461093157600080fd5b60008060008060008060c08789031215610b9357600080fd5b8635610b9e81610b65565b95506020870135610bae81610b65565b94506040870135610bbe81610b65565b93506060870135610bce81610b65565b92506080870135610bde81610b65565b915060a0870135610bee81610b65565b809150509295509295509295565b600060208284031215610c0e57600080fd5b8135610c1981610b65565b9392505050565b600060208284031215610c3257600080fd5b81516001600160e01b031981168114610c1957600080fd5b60005b83811015610c65578181015183820152602001610c4d565b50506000910152565b60008151808452610c86816020860160208601610c4a565b601f01601f19169290920160200192915050565b608081526000610cad6080830187610c6e565b8281036020840152610cbf8187610c6e565b90508281036040840152610cd38186610c6e565b90508281036060840152610ce78185610c6e565b979650505050505050565b6001600160a01b0383168152604060208201819052600090610d1690830184610c6e565b949350505050565b80518015158114610d2e57600080fd5b919050565b805161ffff81168114610d2e57600080fd5b600060c08284031215610d5757600080fd5b60405160c0810167ffffffffffffffff81118282101715610d7a57610d7a6109be565b604052905080610d8983610d33565b8152610d9760208401610d33565b6020820152610da860408401610d33565b6040820152610db960608401610d33565b6060820152610dca60808401610d33565b6080820152610ddb60a08401610d33565b60a08201525092915050565b600067ffffffffffffffff821115610e0157610e016109be565b5060051b60200190565b600082601f830112610e1c57600080fd5b8151610e2f610e2a82610de7565b6109fd565b8082825260208201915060208360051b860101925085831115610e5157600080fd5b602085015b83811015610e77578051610e6981610b65565b835260209283019201610e56565b5095945050505050565b600082601f830112610e9257600080fd5b8151610ea0610e2a82610de7565b8082825260208201915060208360051b860101925085831115610ec257600080fd5b602085015b83811015610e77578051835260209283019201610ec7565b8051610d2e81610b65565b6000806000806000808688036101c0811215610f0557600080fd5b6080811215610f1357600080fd5b50610f1c6109d4565b8751610f2781610b65565b815260208881015190820152610f3f60408901610d1e565b6040820152610f5060608901610d1e565b60608201529550610f648860808901610d45565b945061014087015167ffffffffffffffff811115610f8157600080fd5b610f8d89828a01610e0b565b94505061016087015167ffffffffffffffff811115610fab57600080fd5b610fb789828a01610e81565b935050610fc76101808801610edf565b9150610fd66101a08801610d1e565b90509295509295509295565b66029ba30b5b2b2160cd1b815260008251611004816007850160208701610c4a565b9190910160070192915050565b607360f81b81526000825161102d816001850160208701610c4a565b9190910160010192915050565b60a08152600061104d60a0830188610c6e565b828103602084015261105f8188610c6e565b6001600160a01b038781166040860152861660608501528381036080850152905061108a8185610c6e565b98975050505050505050565b6001600160a01b0385811682528416602082015282151560408201526080606082018190526000906110ca90830184610c6e565b9695505050505050565b6000602082840312156110e657600080fd5b8151610c1981610b65565b60006020828403121561110357600080fd5b610c1982610d1e56fe60a06040526040516105c53803806105c583398101604081905261002291610387565b61002c828261003e565b506001600160a01b0316608052610484565b610047826100fe565b6040516001600160a01b038316907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a28051156100f2576100ed826001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e7919061044d565b82610211565b505050565b6100fa610288565b5050565b806001600160a01b03163b60000361013957604051631933b43b60e21b81526001600160a01b03821660048201526024015b60405180910390fd5b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392831617905560408051635c60da1b60e01b81529051600092841691635c60da1b9160048083019260209291908290030181865afa1580156101b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d9919061044d565b9050806001600160a01b03163b6000036100fa57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610130565b6060600080846001600160a01b03168460405161022e9190610468565b600060405180830381855af49150503d8060008114610269576040519150601f19603f3d011682016040523d82523d6000602084013e61026e565b606091505b50909250905061027f8583836102a9565b95945050505050565b34156102a75760405163b398979f60e01b815260040160405180910390fd5b565b6060826102be576102b982610308565b610301565b81511580156102d557506001600160a01b0384163b155b156102fe57604051639996b31560e01b81526001600160a01b0385166004820152602401610130565b50805b9392505050565b8051156103185780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b80516001600160a01b038116811461034857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561037e578181015183820152602001610366565b50506000910152565b6000806040838503121561039a57600080fd5b6103a383610331565b60208401519092506001600160401b038111156103bf57600080fd5b8301601f810185136103d057600080fd5b80516001600160401b038111156103e9576103e961034d565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104175761041761034d565b60405281815282820160200187101561042f57600080fd5b610440826020830160208601610363565b8093505050509250929050565b60006020828403121561045f57600080fd5b61030182610331565b6000825161047a818460208701610363565b9190910192915050565b60805161012761049e6000396000601e01526101276000f3fe6080604052600a600c565b005b60186014601a565b60a0565b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156079573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190609b919060c3565b905090565b3660008037600080366000845af43d6000803e80801560be573d6000f35b3d6000fd5b60006020828403121560d457600080fd5b81516001600160a01b038116811460ea57600080fd5b939250505056fea26469706673582212204503deb08ae9a9a00c6ebd78ce3d44449a27b3befcbd999da9692f8479d938b464736f6c634300081c0033a2646970667358221220ca91658a9d7be5ca6037144fa2e15b8ed75b2d7ffb58b1ba23df52d9b80a556a64736f6c634300081c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a6146100675780638874dd95146100715780638da5cb5b146100b3578063b3762c80146100ce578063c54a9588146100e1578063f2fde38b14610155575b600080fd5b61006f610168565b005b61008461007f366004610aa5565b61017c565b604080516001600160a01b03948516815292841660208401529216918101919091526060015b60405180910390f35b6000546040516001600160a01b0390911681526020016100aa565b61006f6100dc366004610b7a565b61087f565b600154600254600354600454600554600654610113956001600160a01b03908116958116948116938116928116911686565b604080516001600160a01b03978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c0016100aa565b61006f610163366004610bfc565b6108f6565b610170610934565b61017a6000610961565b565b600454600090819081906001600160a01b0316158015906101a757506005546001600160a01b031615155b80156101bd57506006546001600160a01b031615155b6102055760405162461bcd60e51b815260206004820152601460248201527310995858dbdb9cc81b9bdd0819195c1b1bde595960621b60448201526064015b60405180910390fd5b6001546001600160a01b03161580159061022957506002546001600160a01b031615155b801561023f57506003546001600160a01b031615155b61028b5760405162461bcd60e51b815260206004820152601c60248201527f496d706c656d656e746174696f6e73206e6f74206465706c6f7965640000000060448201526064016101fc565b6001546040805163438838eb60e11b815290516000926001600160a01b03169163871071d69160048083019260209291908290030181865afa1580156102d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f99190610c20565b888888886040516024016103109493929190610c9a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260045491519092506001600160a01b03909116908290610361906109b1565b61036c929190610cf2565b604051809103906000f080158015610388573d6000803e3d6000fd5b509350600080878060200190518101906103a29190610eea565b6002546040805163438838eb60e11b81529051939950919750600096506001600160a01b0316945063871071d6935060048082019350602092918290030181865afa1580156103f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104199190610c20565b8b60405160200161042a9190610fe2565b6040516020818303038152906040528b60405160200161044a9190611011565b60408051601f198184030181529082905261046e92918b9088908e9060240161103a565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260055491519092506001600160a01b039091169082906104bf906109b1565b6104ca929190610cf2565b604051809103906000f0801580156104e6573d6000803e3d6000fd5b5095506000600160020160009054906101000a90046001600160a01b03166001600160a01b031663871071d66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105659190610c20565b8888858c60405160240161057c9493929190611096565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260065491519092506001600160a01b039091169082906105cd906109b1565b6105d8929190610cf2565b604051809103906000f0801580156105f4573d6000803e3d6000fd5b506040516328492b2960e01b81526001600160a01b038981166004830152919750908916906328492b2990602401600060405180830381600087803b15801561063c57600080fd5b505af1158015610650573d6000803e3d6000fd5b5050604051633a28b8d360e21b81526001600160a01b0389811660048301528a16925063e8a2e34c9150602401600060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505060405163f2fde38b60e01b81526001600160a01b038b811660048301528a16925063f2fde38b9150602401600060405180830381600087803b1580156106f257600080fd5b505af1158015610706573d6000803e3d6000fd5b50505050876001600160a01b031663822631d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076c91906110d4565b6001600160a01b031663c3749ae56040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cd91906110f1565b61082557876001600160a01b031663ba0bba406040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050505b604080516001600160a01b038a81168252898116602083015288168183015290517fe7c65191a1ec2d39173cef6d950b221cec32a2f948b79d737c02e06893c1af289181900360600190a150505050509450945094915050565b610887610934565b600180546001600160a01b03199081166001600160a01b0398891617909155600280548216968816969096179095556003805486169487169490941790935560048054851692861692909217909155600580548416918516919091179055600680549092169216919091179055565b6108fe610934565b6001600160a01b03811661092857604051631e4fbdf760e01b8152600060048201526024016101fc565b61093181610961565b50565b6000546001600160a01b0316331461017a5760405163118cdaa760e01b81523360048201526024016101fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105c58061110d83390190565b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff811182821017156109f7576109f76109be565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610a2657610a266109be565b604052919050565b600082601f830112610a3f57600080fd5b81356020830160008067ffffffffffffffff841115610a6057610a606109be565b50601f8301601f1916602001610a75816109fd565b915050828152858383011115610a8a57600080fd5b82826020830137600092810160200192909252509392505050565b60008060008060808587031215610abb57600080fd5b843567ffffffffffffffff811115610ad257600080fd5b610ade87828801610a2e565b945050602085013567ffffffffffffffff811115610afb57600080fd5b610b0787828801610a2e565b935050604085013567ffffffffffffffff811115610b2457600080fd5b610b3087828801610a2e565b925050606085013567ffffffffffffffff811115610b4d57600080fd5b610b5987828801610a2e565b91505092959194509250565b6001600160a01b038116811461093157600080fd5b60008060008060008060c08789031215610b9357600080fd5b8635610b9e81610b65565b95506020870135610bae81610b65565b94506040870135610bbe81610b65565b93506060870135610bce81610b65565b92506080870135610bde81610b65565b915060a0870135610bee81610b65565b809150509295509295509295565b600060208284031215610c0e57600080fd5b8135610c1981610b65565b9392505050565b600060208284031215610c3257600080fd5b81516001600160e01b031981168114610c1957600080fd5b60005b83811015610c65578181015183820152602001610c4d565b50506000910152565b60008151808452610c86816020860160208601610c4a565b601f01601f19169290920160200192915050565b608081526000610cad6080830187610c6e565b8281036020840152610cbf8187610c6e565b90508281036040840152610cd38186610c6e565b90508281036060840152610ce78185610c6e565b979650505050505050565b6001600160a01b0383168152604060208201819052600090610d1690830184610c6e565b949350505050565b80518015158114610d2e57600080fd5b919050565b805161ffff81168114610d2e57600080fd5b600060c08284031215610d5757600080fd5b60405160c0810167ffffffffffffffff81118282101715610d7a57610d7a6109be565b604052905080610d8983610d33565b8152610d9760208401610d33565b6020820152610da860408401610d33565b6040820152610db960608401610d33565b6060820152610dca60808401610d33565b6080820152610ddb60a08401610d33565b60a08201525092915050565b600067ffffffffffffffff821115610e0157610e016109be565b5060051b60200190565b600082601f830112610e1c57600080fd5b8151610e2f610e2a82610de7565b6109fd565b8082825260208201915060208360051b860101925085831115610e5157600080fd5b602085015b83811015610e77578051610e6981610b65565b835260209283019201610e56565b5095945050505050565b600082601f830112610e9257600080fd5b8151610ea0610e2a82610de7565b8082825260208201915060208360051b860101925085831115610ec257600080fd5b602085015b83811015610e77578051835260209283019201610ec7565b8051610d2e81610b65565b6000806000806000808688036101c0811215610f0557600080fd5b6080811215610f1357600080fd5b50610f1c6109d4565b8751610f2781610b65565b815260208881015190820152610f3f60408901610d1e565b6040820152610f5060608901610d1e565b60608201529550610f648860808901610d45565b945061014087015167ffffffffffffffff811115610f8157600080fd5b610f8d89828a01610e0b565b94505061016087015167ffffffffffffffff811115610fab57600080fd5b610fb789828a01610e81565b935050610fc76101808801610edf565b9150610fd66101a08801610d1e565b90509295509295509295565b66029ba30b5b2b2160cd1b815260008251611004816007850160208701610c4a565b9190910160070192915050565b607360f81b81526000825161102d816001850160208701610c4a565b9190910160010192915050565b60a08152600061104d60a0830188610c6e565b828103602084015261105f8188610c6e565b6001600160a01b038781166040860152861660608501528381036080850152905061108a8185610c6e565b98975050505050505050565b6001600160a01b0385811682528416602082015282151560408201526080606082018190526000906110ca90830184610c6e565b9695505050505050565b6000602082840312156110e657600080fd5b8151610c1981610b65565b60006020828403121561110357600080fd5b610c1982610d1e56fe60a06040526040516105c53803806105c583398101604081905261002291610387565b61002c828261003e565b506001600160a01b0316608052610484565b610047826100fe565b6040516001600160a01b038316907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a28051156100f2576100ed826001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e7919061044d565b82610211565b505050565b6100fa610288565b5050565b806001600160a01b03163b60000361013957604051631933b43b60e21b81526001600160a01b03821660048201526024015b60405180910390fd5b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392831617905560408051635c60da1b60e01b81529051600092841691635c60da1b9160048083019260209291908290030181865afa1580156101b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d9919061044d565b9050806001600160a01b03163b6000036100fa57604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610130565b6060600080846001600160a01b03168460405161022e9190610468565b600060405180830381855af49150503d8060008114610269576040519150601f19603f3d011682016040523d82523d6000602084013e61026e565b606091505b50909250905061027f8583836102a9565b95945050505050565b34156102a75760405163b398979f60e01b815260040160405180910390fd5b565b6060826102be576102b982610308565b610301565b81511580156102d557506001600160a01b0384163b155b156102fe57604051639996b31560e01b81526001600160a01b0385166004820152602401610130565b50805b9392505050565b8051156103185780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b80516001600160a01b038116811461034857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561037e578181015183820152602001610366565b50506000910152565b6000806040838503121561039a57600080fd5b6103a383610331565b60208401519092506001600160401b038111156103bf57600080fd5b8301601f810185136103d057600080fd5b80516001600160401b038111156103e9576103e961034d565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104175761041761034d565b60405281815282820160200187101561042f57600080fd5b610440826020830160208601610363565b8093505050509250929050565b60006020828403121561045f57600080fd5b61030182610331565b6000825161047a818460208701610363565b9190910192915050565b60805161012761049e6000396000601e01526101276000f3fe6080604052600a600c565b005b60186014601a565b60a0565b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156079573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190609b919060c3565b905090565b3660008037600080366000845af43d6000803e80801560be573d6000f35b3d6000fd5b60006020828403121560d457600080fd5b81516001600160a01b038116811460ea57600080fd5b939250505056fea26469706673582212204503deb08ae9a9a00c6ebd78ce3d44449a27b3befcbd999da9692f8479d938b464736f6c634300081c0033a2646970667358221220ca91658a9d7be5ca6037144fa2e15b8ed75b2d7ffb58b1ba23df52d9b80a556a64736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.