Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unwrap | 17563755 | 579 days ago | IN | 0 ETH | 0.00578083 | ||||
Unwrap | 17563747 | 579 days ago | IN | 0 ETH | 0.00612187 | ||||
Wrap | 16619224 | 712 days ago | IN | 0 ETH | 0.00888273 | ||||
Wrap | 16346909 | 750 days ago | IN | 0 ETH | 0.00535693 | ||||
Wrap With Ether | 16346870 | 750 days ago | IN | 0 ETH | 0.00420845 | ||||
Wrap | 16339913 | 751 days ago | IN | 0 ETH | 0.00746177 | ||||
Wrap | 16339879 | 751 days ago | IN | 0 ETH | 0.00989051 | ||||
Wrap With Ether | 16332517 | 752 days ago | IN | 0 ETH | 0.00496627 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
WrapExtension
Compiler Version
v0.6.10+commit.00c0fcaf
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* Copyright 2022 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; pragma experimental "ABIEncoderV2"; import {ISetToken} from "@setprotocol/set-protocol-v2/contracts/interfaces/ISetToken.sol"; import {IWETH} from "@setprotocol/set-protocol-v2/contracts/interfaces/external/IWETH.sol"; import {IWrapModuleV2} from "@setprotocol/set-protocol-v2/contracts/interfaces/IWrapModuleV2.sol"; import {BaseGlobalExtension} from "../lib/BaseGlobalExtension.sol"; import {IDelegatedManager} from "../interfaces/IDelegatedManager.sol"; import {IManagerCore} from "../interfaces/IManagerCore.sol"; /** * @title WrapExtension * @author Set Protocol * * Smart contract global extension which provides DelegatedManager operator(s) the ability to wrap ERC20 and Ether positions * via third party protocols. * * Some examples of wrap actions include wrapping, DAI to cDAI (Compound) or Dai to aDai (AAVE). */ contract WrapExtension is BaseGlobalExtension { /* ============ Events ============ */ event WrapExtensionInitialized( address indexed _setToken, address indexed _delegatedManager ); /* ============ State Variables ============ */ // Instance of WrapModuleV2 IWrapModuleV2 public immutable wrapModule; /* ============ Constructor ============ */ /** * Instantiate with ManagerCore address and WrapModuleV2 address. * * @param _managerCore Address of ManagerCore contract * @param _wrapModule Address of WrapModuleV2 contract */ constructor(IManagerCore _managerCore, IWrapModuleV2 _wrapModule) public BaseGlobalExtension(_managerCore) { wrapModule = _wrapModule; } /* ============ External Functions ============ */ /** * ONLY OWNER: Initializes WrapModuleV2 on the SetToken associated with the DelegatedManager. * * @param _delegatedManager Instance of the DelegatedManager to initialize the WrapModuleV2 for */ function initializeModule(IDelegatedManager _delegatedManager) external onlyOwnerAndValidManager(_delegatedManager) { _initializeModule(_delegatedManager.setToken(), _delegatedManager); } /** * ONLY OWNER: Initializes WrapExtension to the DelegatedManager. * * @param _delegatedManager Instance of the DelegatedManager to initialize */ function initializeExtension(IDelegatedManager _delegatedManager) external onlyOwnerAndValidManager(_delegatedManager) { ISetToken setToken = _delegatedManager.setToken(); _initializeExtension(setToken, _delegatedManager); emit WrapExtensionInitialized( address(setToken), address(_delegatedManager) ); } /** * ONLY OWNER: Initializes WrapExtension to the DelegatedManager and TradeModule to the SetToken * * @param _delegatedManager Instance of the DelegatedManager to initialize */ function initializeModuleAndExtension(IDelegatedManager _delegatedManager) external onlyOwnerAndValidManager(_delegatedManager) { ISetToken setToken = _delegatedManager.setToken(); _initializeExtension(setToken, _delegatedManager); _initializeModule(setToken, _delegatedManager); emit WrapExtensionInitialized( address(setToken), address(_delegatedManager) ); } /** * ONLY MANAGER: Remove an existing SetToken and DelegatedManager tracked by the WrapExtension */ function removeExtension() external override { IDelegatedManager delegatedManager = IDelegatedManager(msg.sender); ISetToken setToken = delegatedManager.setToken(); _removeExtension(setToken, delegatedManager); } /** * ONLY OPERATOR: Instructs the SetToken to wrap an underlying asset into a wrappedToken via a specified adapter. * * @param _setToken Instance of the SetToken * @param _underlyingToken Address of the component to be wrapped * @param _wrappedToken Address of the desired wrapped token * @param _underlyingUnits Quantity of underlying units in Position units * @param _integrationName Name of wrap module integration (mapping on integration registry) * @param _wrapData Arbitrary bytes to pass into the WrapV2Adapter */ function wrap( ISetToken _setToken, address _underlyingToken, address _wrappedToken, uint256 _underlyingUnits, string calldata _integrationName, bytes memory _wrapData ) external onlyOperator(_setToken) onlyAllowedAsset(_setToken, _wrappedToken) { bytes memory callData = abi.encodeWithSelector( IWrapModuleV2.wrap.selector, _setToken, _underlyingToken, _wrappedToken, _underlyingUnits, _integrationName, _wrapData ); _invokeManager(_manager(_setToken), address(wrapModule), callData); } /** * ONLY OPERATOR: Instructs the SetToken to wrap Ether into a wrappedToken via a specified adapter. Since SetTokens * only hold WETH, in order to support protocols that collateralize with Ether the SetToken's WETH must be unwrapped * first before sending to the external protocol. * * @param _setToken Instance of the SetToken * @param _wrappedToken Address of the desired wrapped token * @param _underlyingUnits Quantity of underlying units in Position units * @param _integrationName Name of wrap module integration (mapping on integration registry) * @param _wrapData Arbitrary bytes to pass into the WrapV2Adapter */ function wrapWithEther( ISetToken _setToken, address _wrappedToken, uint256 _underlyingUnits, string calldata _integrationName, bytes memory _wrapData ) external onlyOperator(_setToken) { bytes memory callData = abi.encodeWithSelector( IWrapModuleV2.wrapWithEther.selector, _setToken, _wrappedToken, _underlyingUnits, _integrationName, _wrapData ); _invokeManager(_manager(_setToken), address(wrapModule), callData); } /** * ONLY OPERATOR: Instructs the SetToken to unwrap a wrapped asset into its underlying via a specified adapter. * * @param _setToken Instance of the SetToken * @param _underlyingToken Address of the underlying asset * @param _wrappedToken Address of the component to be unwrapped * @param _wrappedUnits Quantity of wrapped tokens in Position units * @param _integrationName ID of wrap module integration (mapping on integration registry) * @param _unwrapData Arbitrary bytes to pass into the WrapV2Adapter */ function unwrap( ISetToken _setToken, address _underlyingToken, address _wrappedToken, uint256 _wrappedUnits, string calldata _integrationName, bytes memory _unwrapData ) external onlyOperator(_setToken) onlyAllowedAsset(_setToken, _underlyingToken) { bytes memory callData = abi.encodeWithSelector( IWrapModuleV2.unwrap.selector, _setToken, _underlyingToken, _wrappedToken, _wrappedUnits, _integrationName, _unwrapData ); _invokeManager(_manager(_setToken), address(wrapModule), callData); } /** * ONLY OPERATOR: Instructs the SetToken to unwrap a wrapped asset collateralized by Ether into Wrapped Ether. Since * external protocol will send back Ether that Ether must be Wrapped into WETH in order to be accounted for by SetToken. * * @param _setToken Instance of the SetToken * @param _wrappedToken Address of the component to be unwrapped * @param _wrappedUnits Quantity of wrapped tokens in Position units * @param _integrationName ID of wrap module integration (mapping on integration registry) * @param _unwrapData Arbitrary bytes to pass into the WrapV2Adapter */ function unwrapWithEther( ISetToken _setToken, address _wrappedToken, uint256 _wrappedUnits, string calldata _integrationName, bytes memory _unwrapData ) external onlyOperator(_setToken) onlyAllowedAsset(_setToken, address(wrapModule.weth())) { bytes memory callData = abi.encodeWithSelector( IWrapModuleV2.unwrapWithEther.selector, _setToken, _wrappedToken, _wrappedUnits, _integrationName, _unwrapData ); _invokeManager(_manager(_setToken), address(wrapModule), callData); } /* ============ Internal Functions ============ */ /** * Internal function to initialize WrapModuleV2 on the SetToken associated with the DelegatedManager. * * @param _setToken Instance of the SetToken corresponding to the DelegatedManager * @param _delegatedManager Instance of the DelegatedManager to initialize the WrapModuleV2 for */ function _initializeModule( ISetToken _setToken, IDelegatedManager _delegatedManager ) internal { bytes memory callData = abi.encodeWithSelector( IWrapModuleV2.initialize.selector, _setToken ); _invokeManager(_delegatedManager, address(wrapModule), callData); } }
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; pragma experimental "ABIEncoderV2"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title ISetToken * @author Set Protocol * * Interface for operating with SetTokens. */ interface ISetToken is IERC20 { /* ============ Enums ============ */ enum ModuleState { NONE, PENDING, INITIALIZED } /* ============ Structs ============ */ /** * The base definition of a SetToken Position * * @param component Address of token in the Position * @param module If not in default state, the address of associated module * @param unit Each unit is the # of components per 10^18 of a SetToken * @param positionState Position ENUM. Default is 0; External is 1 * @param data Arbitrary data */ struct Position { address component; address module; int256 unit; uint8 positionState; bytes data; } /** * A struct that stores a component's cash position details and external positions * This data structure allows O(1) access to a component's cash position units and * virtual units. * * @param virtualUnit Virtual value of a component's DEFAULT position. Stored as virtual for efficiency * updating all units at once via the position multiplier. Virtual units are achieved * by dividing a "real" value by the "positionMultiplier" * @param componentIndex * @param externalPositionModules List of external modules attached to each external position. Each module * maps to an external position * @param externalPositions Mapping of module => ExternalPosition struct for a given component */ struct ComponentPosition { int256 virtualUnit; address[] externalPositionModules; mapping(address => ExternalPosition) externalPositions; } /** * A struct that stores a component's external position details including virtual unit and any * auxiliary data. * * @param virtualUnit Virtual value of a component's EXTERNAL position. * @param data Arbitrary data */ struct ExternalPosition { int256 virtualUnit; bytes data; } /* ============ Functions ============ */ function addComponent(address _component) external; function removeComponent(address _component) external; function editDefaultPositionUnit(address _component, int256 _realUnit) external; function addExternalPositionModule(address _component, address _positionModule) external; function removeExternalPositionModule(address _component, address _positionModule) external; function editExternalPositionUnit(address _component, address _positionModule, int256 _realUnit) external; function editExternalPositionData(address _component, address _positionModule, bytes calldata _data) external; function invoke(address _target, uint256 _value, bytes calldata _data) external returns(bytes memory); function editPositionMultiplier(int256 _newMultiplier) external; function mint(address _account, uint256 _quantity) external; function burn(address _account, uint256 _quantity) external; function lock() external; function unlock() external; function addModule(address _module) external; function removeModule(address _module) external; function initializeModule() external; function setManager(address _manager) external; function manager() external view returns (address); function moduleStates(address _module) external view returns (ModuleState); function getModules() external view returns (address[] memory); function getDefaultPositionRealUnit(address _component) external view returns(int256); function getExternalPositionRealUnit(address _component, address _positionModule) external view returns(int256); function getComponents() external view returns(address[] memory); function getExternalPositionModules(address _component) external view returns(address[] memory); function getExternalPositionData(address _component, address _positionModule) external view returns(bytes memory); function isExternalPositionModule(address _component, address _module) external view returns(bool); function isComponent(address _component) external view returns(bool); function positionMultiplier() external view returns (int256); function getPositions() external view returns (Position[] memory); function getTotalComponentRealUnits(address _component) external view returns(int256); function isInitializedModule(address _module) external view returns(bool); function isPendingModule(address _module) external view returns(bool); function isLocked() external view returns (bool); }
/* Copyright 2018 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title IWETH * @author Set Protocol * * Interface for Wrapped Ether. This interface allows for interaction for wrapped ether's deposit and withdrawal * functionality. */ interface IWETH is IERC20{ function deposit() external payable; function withdraw( uint256 wad ) external; }
/* Copyright 2022 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; pragma experimental "ABIEncoderV2"; import { ISetToken } from "./ISetToken.sol"; import { IWETH } from "./external/IWETH.sol"; interface IWrapModuleV2 { function weth() external view returns(IWETH); function initialize(ISetToken _setToken) external; function wrap( ISetToken _setToken, address _underlyingToken, address _wrappedToken, uint256 _underlyingUnits, string calldata _integrationName, bytes memory _wrapData ) external; function wrapWithEther( ISetToken _setToken, address _wrappedToken, uint256 _underlyingUnits, string calldata _integrationName, bytes memory _wrapData ) external; function unwrap( ISetToken _setToken, address _underlyingToken, address _wrappedToken, uint256 _wrappedUnits, string calldata _integrationName, bytes memory _unwrapData ) external; function unwrapWithEther( ISetToken _setToken, address _wrappedToken, uint256 _wrappedUnits, string calldata _integrationName, bytes memory _unwrapData ) external; }
/* Copyright 2022 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; import { AddressArrayUtils } from "@setprotocol/set-protocol-v2/contracts/lib/AddressArrayUtils.sol"; import { ISetToken } from "@setprotocol/set-protocol-v2/contracts/interfaces/ISetToken.sol"; import { IDelegatedManager } from "../interfaces/IDelegatedManager.sol"; import { IManagerCore } from "../interfaces/IManagerCore.sol"; /** * @title BaseGlobalExtension * @author Set Protocol * * Abstract class that houses common global extension-related functions. Global extensions must * also have their own initializeExtension function (not included here because interfaces will vary). */ abstract contract BaseGlobalExtension { using AddressArrayUtils for address[]; /* ============ Events ============ */ event ExtensionRemoved( address indexed _setToken, address indexed _delegatedManager ); /* ============ State Variables ============ */ // Address of the ManagerCore IManagerCore public immutable managerCore; // Mapping from Set Token to DelegatedManager mapping(ISetToken => IDelegatedManager) public setManagers; /* ============ Modifiers ============ */ /** * Throws if the sender is not the SetToken manager contract owner */ modifier onlyOwner(ISetToken _setToken) { require(msg.sender == _manager(_setToken).owner(), "Must be owner"); _; } /** * Throws if the sender is not the SetToken methodologist */ modifier onlyMethodologist(ISetToken _setToken) { require(msg.sender == _manager(_setToken).methodologist(), "Must be methodologist"); _; } /** * Throws if the sender is not a SetToken operator */ modifier onlyOperator(ISetToken _setToken) { require(_manager(_setToken).operatorAllowlist(msg.sender), "Must be approved operator"); _; } /** * Throws if the sender is not the SetToken manager contract owner or if the manager is not enabled on the ManagerCore */ modifier onlyOwnerAndValidManager(IDelegatedManager _delegatedManager) { require(msg.sender == _delegatedManager.owner(), "Must be owner"); require(managerCore.isManager(address(_delegatedManager)), "Must be ManagerCore-enabled manager"); _; } /** * Throws if asset is not allowed to be held by the Set */ modifier onlyAllowedAsset(ISetToken _setToken, address _asset) { require(_manager(_setToken).isAllowedAsset(_asset), "Must be allowed asset"); _; } /* ============ Constructor ============ */ /** * Set state variables * * @param _managerCore Address of managerCore contract */ constructor(IManagerCore _managerCore) public { managerCore = _managerCore; } /* ============ External Functions ============ */ /** * ONLY MANAGER: Deletes SetToken/Manager state from extension. Must only be callable by manager! */ function removeExtension() external virtual; /* ============ Internal Functions ============ */ /** * Invoke call from manager * * @param _delegatedManager Manager to interact with * @param _module Module to interact with * @param _encoded Encoded byte data */ function _invokeManager(IDelegatedManager _delegatedManager, address _module, bytes memory _encoded) internal { _delegatedManager.interactManager(_module, _encoded); } /** * Internal function to grab manager of passed SetToken from extensions data structure. * * @param _setToken SetToken who's manager is needed */ function _manager(ISetToken _setToken) internal view returns (IDelegatedManager) { return setManagers[_setToken]; } /** * Internal function to initialize extension to the DelegatedManager. * * @param _setToken Instance of the SetToken corresponding to the DelegatedManager * @param _delegatedManager Instance of the DelegatedManager to initialize */ function _initializeExtension(ISetToken _setToken, IDelegatedManager _delegatedManager) internal { setManagers[_setToken] = _delegatedManager; _delegatedManager.initializeExtension(); } /** * ONLY MANAGER: Internal function to delete SetToken/Manager state from extension */ function _removeExtension(ISetToken _setToken, IDelegatedManager _delegatedManager) internal { require(msg.sender == address(_manager(_setToken)), "Must be Manager"); delete setManagers[_setToken]; emit ExtensionRemoved(address(_setToken), address(_delegatedManager)); } }
/* Copyright 2021 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; pragma experimental "ABIEncoderV2"; import { ISetToken } from "@setprotocol/set-protocol-v2/contracts/interfaces/ISetToken.sol"; interface IDelegatedManager { function interactManager(address _module, bytes calldata _encoded) external; function initializeExtension() external; function transferTokens(address _token, address _destination, uint256 _amount) external; function updateOwnerFeeSplit(uint256 _newFeeSplit) external; function updateOwnerFeeRecipient(address _newFeeRecipient) external; function setMethodologist(address _newMethodologist) external; function transferOwnership(address _owner) external; function setToken() external view returns(ISetToken); function owner() external view returns(address); function methodologist() external view returns(address); function operatorAllowlist(address _operator) external view returns(bool); function assetAllowlist(address _asset) external view returns(bool); function useAssetAllowlist() external view returns(bool); function isAllowedAsset(address _asset) external view returns(bool); function isPendingExtension(address _extension) external view returns(bool); function isInitializedExtension(address _extension) external view returns(bool); function getExtensions() external view returns(address[] memory); function getOperators() external view returns(address[] memory); function getAllowedAssets() external view returns(address[] memory); function ownerFeeRecipient() external view returns(address); function ownerFeeSplit() external view returns(uint256); }
/* Copyright 2022 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; interface IManagerCore { function addManager(address _manager) external; function isExtension(address _extension) external view returns(bool); function isFactory(address _factory) external view returns(bool); function isManager(address _manager) external view returns(bool); function owner() external view returns(address); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
/* Copyright 2020 Set Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache License, Version 2.0 */ pragma solidity 0.6.10; /** * @title AddressArrayUtils * @author Set Protocol * * Utility functions to handle Address Arrays * * CHANGELOG: * - 4/21/21: Added validatePairsWithArray methods */ library AddressArrayUtils { /** * Finds the index of the first occurrence of the given element. * @param A The input array to search * @param a The value to find * @return Returns (index and isIn) for the first occurrence starting from index 0 */ function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) { uint256 length = A.length; for (uint256 i = 0; i < length; i++) { if (A[i] == a) { return (i, true); } } return (uint256(-1), false); } /** * Returns true if the value is present in the list. Uses indexOf internally. * @param A The input array to search * @param a The value to find * @return Returns isIn for the first occurrence starting from index 0 */ function contains(address[] memory A, address a) internal pure returns (bool) { (, bool isIn) = indexOf(A, a); return isIn; } /** * Returns true if there are 2 elements that are the same in an array * @param A The input array to search * @return Returns boolean for the first occurrence of a duplicate */ function hasDuplicate(address[] memory A) internal pure returns(bool) { require(A.length > 0, "A is empty"); for (uint256 i = 0; i < A.length - 1; i++) { address current = A[i]; for (uint256 j = i + 1; j < A.length; j++) { if (current == A[j]) { return true; } } } return false; } /** * @param A The input array to search * @param a The address to remove * @return Returns the array with the object removed. */ function remove(address[] memory A, address a) internal pure returns (address[] memory) { (uint256 index, bool isIn) = indexOf(A, a); if (!isIn) { revert("Address not in array."); } else { (address[] memory _A,) = pop(A, index); return _A; } } /** * @param A The input array to search * @param a The address to remove */ function removeStorage(address[] storage A, address a) internal { (uint256 index, bool isIn) = indexOf(A, a); if (!isIn) { revert("Address not in array."); } else { uint256 lastIndex = A.length - 1; // If the array would be empty, the previous line would throw, so no underflow here if (index != lastIndex) { A[index] = A[lastIndex]; } A.pop(); } } /** * Removes specified index from array * @param A The input array to search * @param index The index to remove * @return Returns the new array and the removed entry */ function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) { uint256 length = A.length; require(index < A.length, "Index must be < A length"); address[] memory newAddresses = new address[](length - 1); for (uint256 i = 0; i < index; i++) { newAddresses[i] = A[i]; } for (uint256 j = index + 1; j < length; j++) { newAddresses[j - 1] = A[j]; } return (newAddresses, A[index]); } /** * Returns the combination of the two arrays * @param A The first array * @param B The second array * @return Returns A extended by B */ function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) { uint256 aLength = A.length; uint256 bLength = B.length; address[] memory newAddresses = new address[](aLength + bLength); for (uint256 i = 0; i < aLength; i++) { newAddresses[i] = A[i]; } for (uint256 j = 0; j < bLength; j++) { newAddresses[aLength + j] = B[j]; } return newAddresses; } /** * Validate that address and uint array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of uint */ function validatePairsWithArray(address[] memory A, uint[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); } /** * Validate that address and bool array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of bool */ function validatePairsWithArray(address[] memory A, bool[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); } /** * Validate that address and string array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of strings */ function validatePairsWithArray(address[] memory A, string[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); } /** * Validate that address array lengths match, and calling address array are not empty * and contain no duplicate elements. * * @param A Array of addresses * @param B Array of addresses */ function validatePairsWithArray(address[] memory A, address[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); } /** * Validate that address and bytes array lengths match. Validate address array is not empty * and contains no duplicate elements. * * @param A Array of addresses * @param B Array of bytes */ function validatePairsWithArray(address[] memory A, bytes[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); } /** * Validate address array is not empty and contains no duplicate elements. * * @param A Array of addresses */ function _validateLengthAndUniqueness(address[] memory A) internal pure { require(A.length > 0, "Array length must be > 0"); require(!hasDuplicate(A), "Cannot duplicate addresses"); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IManagerCore","name":"_managerCore","type":"address"},{"internalType":"contract IWrapModuleV2","name":"_wrapModule","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_setToken","type":"address"},{"indexed":true,"internalType":"address","name":"_delegatedManager","type":"address"}],"name":"ExtensionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_setToken","type":"address"},{"indexed":true,"internalType":"address","name":"_delegatedManager","type":"address"}],"name":"WrapExtensionInitialized","type":"event"},{"inputs":[{"internalType":"contract IDelegatedManager","name":"_delegatedManager","type":"address"}],"name":"initializeExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IDelegatedManager","name":"_delegatedManager","type":"address"}],"name":"initializeModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IDelegatedManager","name":"_delegatedManager","type":"address"}],"name":"initializeModuleAndExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"managerCore","outputs":[{"internalType":"contract IManagerCore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"removeExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISetToken","name":"","type":"address"}],"name":"setManagers","outputs":[{"internalType":"contract IDelegatedManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISetToken","name":"_setToken","type":"address"},{"internalType":"address","name":"_underlyingToken","type":"address"},{"internalType":"address","name":"_wrappedToken","type":"address"},{"internalType":"uint256","name":"_wrappedUnits","type":"uint256"},{"internalType":"string","name":"_integrationName","type":"string"},{"internalType":"bytes","name":"_unwrapData","type":"bytes"}],"name":"unwrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISetToken","name":"_setToken","type":"address"},{"internalType":"address","name":"_wrappedToken","type":"address"},{"internalType":"uint256","name":"_wrappedUnits","type":"uint256"},{"internalType":"string","name":"_integrationName","type":"string"},{"internalType":"bytes","name":"_unwrapData","type":"bytes"}],"name":"unwrapWithEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISetToken","name":"_setToken","type":"address"},{"internalType":"address","name":"_underlyingToken","type":"address"},{"internalType":"address","name":"_wrappedToken","type":"address"},{"internalType":"uint256","name":"_underlyingUnits","type":"uint256"},{"internalType":"string","name":"_integrationName","type":"string"},{"internalType":"bytes","name":"_wrapData","type":"bytes"}],"name":"wrap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrapModule","outputs":[{"internalType":"contract IWrapModuleV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISetToken","name":"_setToken","type":"address"},{"internalType":"address","name":"_wrappedToken","type":"address"},{"internalType":"uint256","name":"_underlyingUnits","type":"uint256"},{"internalType":"string","name":"_integrationName","type":"string"},{"internalType":"bytes","name":"_wrapData","type":"bytes"}],"name":"wrapWithEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b50604051620016da380380620016da8339810160408190526100319161004f565b6001600160601b0319606092831b8116608052911b1660a0526100a0565b60008060408385031215610061578182fd5b825161006c81610088565b602084015190925061007d81610088565b809150509250929050565b6001600160a01b038116811461009d57600080fd5b50565b60805160601c60a05160601c6115f2620000e86000398061028752806107885280610cbc52806110415250806105c952806109e15280610d975280610eb952506115f26000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638c72ef23116100715780638c72ef231461011a5780639b4683121461012d578063aa0770bc14610140578063ae0d6c6114610153578063de2236bd1461015b578063e4bc91b71461016e576100a9565b806310ac16d7146100ae57806320022b7e146100c35780632b1fce91146100cb5780633231b2d7146100f457806383d1a23714610107575b600080fd5b6100c16100bc3660046112b3565b610176565b005b6100c16102b6565b6100de6100d93660046111ef565b61033e565b6040516100eb91906113bc565b60405180910390f35b6100c161010236600461120b565b610359565b6100c16101153660046111ef565b610510565b6100c16101283660046112b3565b6106e4565b6100c161013b3660046111ef565b610928565b6100c161014e36600461120b565b610b50565b6100de610cba565b6100c16101693660046111ef565b610cde565b6100de610eb7565b8561018081610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b81526004016101ab91906113bc565b60206040518083038186803b1580156101c357600080fd5b505afa1580156101d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fb91906111cf565b6102205760405162461bcd60e51b81526004016102179061153e565b60405180910390fd5b60606310ac16d760e01b88888888888860405160240161024596959493929190611458565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915290506102ac61028589610edb565b7f000000000000000000000000000000000000000000000000000000000000000083610ef9565b5050505050505050565b60003390506000816001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f657600080fd5b505afa15801561030a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032e91906111ac565b905061033a8183610f5e565b5050565b6000602081905290815260409020546001600160a01b031681565b8661036381610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b815260040161038e91906113bc565b60206040518083038186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de91906111cf565b6103fa5760405162461bcd60e51b81526004016102179061153e565b878661040582610edb565b6001600160a01b031663c537bed0826040518263ffffffff1660e01b815260040161043091906113bc565b60206040518083038186803b15801561044857600080fd5b505afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048091906111cf565b61049c5760405162461bcd60e51b815260040161021790611575565b6060633231b2d760e01b8b8b8b8b8b8b8b6040516024016104c397969594939291906113fc565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915290506105036102858c610edb565b5050505050505050505050565b80806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561054a57600080fd5b505afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058291906111ac565b6001600160a01b0316336001600160a01b0316146105b25760405162461bcd60e51b8152600401610217906114ee565b60405163f3ae241560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f3ae2415906105fe9084906004016113bc565b60206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906111cf565b61066a5760405162461bcd60e51b8152600401610217906114ab565b61033a826001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106a657600080fd5b505afa1580156106ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106de91906111ac565b83610fec565b856106ee81610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b815260040161071991906113bc565b60206040518083038186803b15801561073157600080fd5b505afa158015610745573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076991906111cf565b6107855760405162461bcd60e51b81526004016102179061153e565b867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633fc8cef36040518163ffffffff1660e01b815260040160206040518083038186803b1580156107df57600080fd5b505afa1580156107f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081791906111ac565b61082082610edb565b6001600160a01b031663c537bed0826040518263ffffffff1660e01b815260040161084b91906113bc565b60206040518083038186803b15801561086357600080fd5b505afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b91906111cf565b6108b75760405162461bcd60e51b815260040161021790611575565b6060638c72ef2360e01b8a8a8a8a8a8a6040516024016108dc96959493929190611458565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905061091c6102858b610edb565b50505050505050505050565b80806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561096257600080fd5b505afa158015610976573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099a91906111ac565b6001600160a01b0316336001600160a01b0316146109ca5760405162461bcd60e51b8152600401610217906114ee565b60405163f3ae241560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f3ae241590610a169084906004016113bc565b60206040518083038186803b158015610a2e57600080fd5b505afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906111cf565b610a825760405162461bcd60e51b8152600401610217906114ab565b6000826001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610abd57600080fd5b505afa158015610ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af591906111ac565b9050610b01818461106b565b610b0b8184610fec565b826001600160a01b0316816001600160a01b03167f042032409f3a4fb206fc2527d64cac0a53fc7d19d8d39bfe669e5d7d27573b3360405160405180910390a3505050565b86610b5a81610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b8152600401610b8591906113bc565b60206040518083038186803b158015610b9d57600080fd5b505afa158015610bb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd591906111cf565b610bf15760405162461bcd60e51b81526004016102179061153e565b8787610bfc82610edb565b6001600160a01b031663c537bed0826040518263ffffffff1660e01b8152600401610c2791906113bc565b60206040518083038186803b158015610c3f57600080fd5b505afa158015610c53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7791906111cf565b610c935760405162461bcd60e51b815260040161021790611575565b606063aa0770bc60e01b8b8b8b8b8b8b8b6040516024016104c397969594939291906113fc565b7f000000000000000000000000000000000000000000000000000000000000000081565b80806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1857600080fd5b505afa158015610d2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5091906111ac565b6001600160a01b0316336001600160a01b031614610d805760405162461bcd60e51b8152600401610217906114ee565b60405163f3ae241560e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f3ae241590610dcc9084906004016113bc565b60206040518083038186803b158015610de457600080fd5b505afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c91906111cf565b610e385760405162461bcd60e51b8152600401610217906114ab565b6000826001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7357600080fd5b505afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab91906111ac565b9050610b0b818461106b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b039081166000908152602081905260409020541690565b604051634cf4f63b60e01b81526001600160a01b03841690634cf4f63b90610f2790859085906004016113d0565b600060405180830381600087803b158015610f4157600080fd5b505af1158015610f55573d6000803e3d6000fd5b50505050505050565b610f6782610edb565b6001600160a01b0316336001600160a01b031614610f975760405162461bcd60e51b815260040161021790611515565b6001600160a01b0380831660008181526020819052604080822080546001600160a01b031916905551928416927f6a87827eefdfa1b8651b66ff7c8c5b7e72436f627cd2ecd358b9eeada2e910349190a35050565b606063c4d66de860e01b8360405160240161100791906113bc565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050611066827f000000000000000000000000000000000000000000000000000000000000000083610ef9565b505050565b6001600160a01b0382811660009081526020819052604080822080546001600160a01b0319169385169384179055805163dc20f8bf60e01b8152905163dc20f8bf9260048084019391929182900301818387803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b505050505050565b600082601f8301126110f7578081fd5b813567ffffffffffffffff8082111561110e578283fd5b604051601f8301601f19168101602001828111828210171561112e578485fd5b60405282815292508284830160200186101561114957600080fd5b8260208601602083013760006020848301015250505092915050565b60008083601f840112611176578182fd5b50813567ffffffffffffffff81111561118d578182fd5b6020830191508360208285010111156111a557600080fd5b9250929050565b6000602082840312156111bd578081fd5b81516111c8816115a4565b9392505050565b6000602082840312156111e0578081fd5b815180151581146111c8578182fd5b600060208284031215611200578081fd5b81356111c8816115a4565b600080600080600080600060c0888a031215611225578283fd5b8735611230816115a4565b96506020880135611240816115a4565b95506040880135611250816115a4565b945060608801359350608088013567ffffffffffffffff80821115611273578485fd5b61127f8b838c01611165565b909550935060a08a0135915080821115611297578283fd5b506112a48a828b016110e7565b91505092959891949750929550565b60008060008060008060a087890312156112cb578182fd5b86356112d6816115a4565b955060208701356112e6816115a4565b945060408701359350606087013567ffffffffffffffff80821115611309578384fd5b6113158a838b01611165565b9095509350608089013591508082111561132d578283fd5b5061133a89828a016110e7565b9150509295509295509295565b60008151808452815b8181101561136c57602081850181015186830182015201611350565b8181111561137d5782602083870101525b50601f01601f19169290920160200192915050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6001600160a01b0391909116815260200190565b6001600160a01b03831681526040602082018190526000906113f490830184611347565b949350505050565b6001600160a01b0388811682528781166020830152861660408201526060810185905260c0608082018190526000906114389083018587611392565b82810360a084015261144a8185611347565b9a9950505050505050505050565b6001600160a01b038781168252861660208201526040810185905260a06060820181905260009061148c9083018587611392565b828103608084015261149e8185611347565b9998505050505050505050565b60208082526023908201527f4d757374206265204d616e61676572436f72652d656e61626c6564206d616e6160408201526233b2b960e91b606082015260800190565b6020808252600d908201526c26bab9ba1031329037bbb732b960991b604082015260600190565b6020808252600f908201526e26bab9ba1031329026b0b730b3b2b960891b604082015260600190565b60208082526019908201527f4d75737420626520617070726f766564206f70657261746f7200000000000000604082015260600190565b602080825260159082015274135d5cdd08189948185b1b1bddd95908185cdcd95d605a1b604082015260600190565b6001600160a01b03811681146115b957600080fd5b5056fea264697066735822122028b559b81c24f04dd08abdc0014d005ddf6e15804e7800e3e5e882dd32bb62de64736f6c634300060a0033000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e5836
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638c72ef23116100715780638c72ef231461011a5780639b4683121461012d578063aa0770bc14610140578063ae0d6c6114610153578063de2236bd1461015b578063e4bc91b71461016e576100a9565b806310ac16d7146100ae57806320022b7e146100c35780632b1fce91146100cb5780633231b2d7146100f457806383d1a23714610107575b600080fd5b6100c16100bc3660046112b3565b610176565b005b6100c16102b6565b6100de6100d93660046111ef565b61033e565b6040516100eb91906113bc565b60405180910390f35b6100c161010236600461120b565b610359565b6100c16101153660046111ef565b610510565b6100c16101283660046112b3565b6106e4565b6100c161013b3660046111ef565b610928565b6100c161014e36600461120b565b610b50565b6100de610cba565b6100c16101693660046111ef565b610cde565b6100de610eb7565b8561018081610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b81526004016101ab91906113bc565b60206040518083038186803b1580156101c357600080fd5b505afa1580156101d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fb91906111cf565b6102205760405162461bcd60e51b81526004016102179061153e565b60405180910390fd5b60606310ac16d760e01b88888888888860405160240161024596959493929190611458565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915290506102ac61028589610edb565b7f0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e583683610ef9565b5050505050505050565b60003390506000816001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102f657600080fd5b505afa15801561030a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032e91906111ac565b905061033a8183610f5e565b5050565b6000602081905290815260409020546001600160a01b031681565b8661036381610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b815260040161038e91906113bc565b60206040518083038186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de91906111cf565b6103fa5760405162461bcd60e51b81526004016102179061153e565b878661040582610edb565b6001600160a01b031663c537bed0826040518263ffffffff1660e01b815260040161043091906113bc565b60206040518083038186803b15801561044857600080fd5b505afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048091906111cf565b61049c5760405162461bcd60e51b815260040161021790611575565b6060633231b2d760e01b8b8b8b8b8b8b8b6040516024016104c397969594939291906113fc565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915290506105036102858c610edb565b5050505050505050505050565b80806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561054a57600080fd5b505afa15801561055e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058291906111ac565b6001600160a01b0316336001600160a01b0316146105b25760405162461bcd60e51b8152600401610217906114ee565b60405163f3ae241560e01b81526001600160a01b037f000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed169063f3ae2415906105fe9084906004016113bc565b60206040518083038186803b15801561061657600080fd5b505afa15801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906111cf565b61066a5760405162461bcd60e51b8152600401610217906114ab565b61033a826001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106a657600080fd5b505afa1580156106ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106de91906111ac565b83610fec565b856106ee81610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b815260040161071991906113bc565b60206040518083038186803b15801561073157600080fd5b505afa158015610745573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076991906111cf565b6107855760405162461bcd60e51b81526004016102179061153e565b867f0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e58366001600160a01b0316633fc8cef36040518163ffffffff1660e01b815260040160206040518083038186803b1580156107df57600080fd5b505afa1580156107f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081791906111ac565b61082082610edb565b6001600160a01b031663c537bed0826040518263ffffffff1660e01b815260040161084b91906113bc565b60206040518083038186803b15801561086357600080fd5b505afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b91906111cf565b6108b75760405162461bcd60e51b815260040161021790611575565b6060638c72ef2360e01b8a8a8a8a8a8a6040516024016108dc96959493929190611458565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905061091c6102858b610edb565b50505050505050505050565b80806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561096257600080fd5b505afa158015610976573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099a91906111ac565b6001600160a01b0316336001600160a01b0316146109ca5760405162461bcd60e51b8152600401610217906114ee565b60405163f3ae241560e01b81526001600160a01b037f000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed169063f3ae241590610a169084906004016113bc565b60206040518083038186803b158015610a2e57600080fd5b505afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906111cf565b610a825760405162461bcd60e51b8152600401610217906114ab565b6000826001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610abd57600080fd5b505afa158015610ad1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af591906111ac565b9050610b01818461106b565b610b0b8184610fec565b826001600160a01b0316816001600160a01b03167f042032409f3a4fb206fc2527d64cac0a53fc7d19d8d39bfe669e5d7d27573b3360405160405180910390a3505050565b86610b5a81610edb565b6001600160a01b031663aa99c067336040518263ffffffff1660e01b8152600401610b8591906113bc565b60206040518083038186803b158015610b9d57600080fd5b505afa158015610bb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd591906111cf565b610bf15760405162461bcd60e51b81526004016102179061153e565b8787610bfc82610edb565b6001600160a01b031663c537bed0826040518263ffffffff1660e01b8152600401610c2791906113bc565b60206040518083038186803b158015610c3f57600080fd5b505afa158015610c53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7791906111cf565b610c935760405162461bcd60e51b815260040161021790611575565b606063aa0770bc60e01b8b8b8b8b8b8b8b6040516024016104c397969594939291906113fc565b7f0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e583681565b80806001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1857600080fd5b505afa158015610d2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5091906111ac565b6001600160a01b0316336001600160a01b031614610d805760405162461bcd60e51b8152600401610217906114ee565b60405163f3ae241560e01b81526001600160a01b037f000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed169063f3ae241590610dcc9084906004016113bc565b60206040518083038186803b158015610de457600080fd5b505afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c91906111cf565b610e385760405162461bcd60e51b8152600401610217906114ab565b6000826001600160a01b031663ed9cf58c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7357600080fd5b505afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab91906111ac565b9050610b0b818461106b565b7f000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed81565b6001600160a01b039081166000908152602081905260409020541690565b604051634cf4f63b60e01b81526001600160a01b03841690634cf4f63b90610f2790859085906004016113d0565b600060405180830381600087803b158015610f4157600080fd5b505af1158015610f55573d6000803e3d6000fd5b50505050505050565b610f6782610edb565b6001600160a01b0316336001600160a01b031614610f975760405162461bcd60e51b815260040161021790611515565b6001600160a01b0380831660008181526020819052604080822080546001600160a01b031916905551928416927f6a87827eefdfa1b8651b66ff7c8c5b7e72436f627cd2ecd358b9eeada2e910349190a35050565b606063c4d66de860e01b8360405160240161100791906113bc565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050611066827f0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e583683610ef9565b505050565b6001600160a01b0382811660009081526020819052604080822080546001600160a01b0319169385169384179055805163dc20f8bf60e01b8152905163dc20f8bf9260048084019391929182900301818387803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b505050505050565b600082601f8301126110f7578081fd5b813567ffffffffffffffff8082111561110e578283fd5b604051601f8301601f19168101602001828111828210171561112e578485fd5b60405282815292508284830160200186101561114957600080fd5b8260208601602083013760006020848301015250505092915050565b60008083601f840112611176578182fd5b50813567ffffffffffffffff81111561118d578182fd5b6020830191508360208285010111156111a557600080fd5b9250929050565b6000602082840312156111bd578081fd5b81516111c8816115a4565b9392505050565b6000602082840312156111e0578081fd5b815180151581146111c8578182fd5b600060208284031215611200578081fd5b81356111c8816115a4565b600080600080600080600060c0888a031215611225578283fd5b8735611230816115a4565b96506020880135611240816115a4565b95506040880135611250816115a4565b945060608801359350608088013567ffffffffffffffff80821115611273578485fd5b61127f8b838c01611165565b909550935060a08a0135915080821115611297578283fd5b506112a48a828b016110e7565b91505092959891949750929550565b60008060008060008060a087890312156112cb578182fd5b86356112d6816115a4565b955060208701356112e6816115a4565b945060408701359350606087013567ffffffffffffffff80821115611309578384fd5b6113158a838b01611165565b9095509350608089013591508082111561132d578283fd5b5061133a89828a016110e7565b9150509295509295509295565b60008151808452815b8181101561136c57602081850181015186830182015201611350565b8181111561137d5782602083870101525b50601f01601f19169290920160200192915050565b60008284528282602086013780602084860101526020601f19601f85011685010190509392505050565b6001600160a01b0391909116815260200190565b6001600160a01b03831681526040602082018190526000906113f490830184611347565b949350505050565b6001600160a01b0388811682528781166020830152861660408201526060810185905260c0608082018190526000906114389083018587611392565b82810360a084015261144a8185611347565b9a9950505050505050505050565b6001600160a01b038781168252861660208201526040810185905260a06060820181905260009061148c9083018587611392565b828103608084015261149e8185611347565b9998505050505050505050565b60208082526023908201527f4d757374206265204d616e61676572436f72652d656e61626c6564206d616e6160408201526233b2b960e91b606082015260800190565b6020808252600d908201526c26bab9ba1031329037bbb732b960991b604082015260600190565b6020808252600f908201526e26bab9ba1031329026b0b730b3b2b960891b604082015260600190565b60208082526019908201527f4d75737420626520617070726f766564206f70657261746f7200000000000000604082015260600190565b602080825260159082015274135d5cdd08189948185b1b1bddd95908185cdcd95d605a1b604082015260600190565b6001600160a01b03811681146115b957600080fd5b5056fea264697066735822122028b559b81c24f04dd08abdc0014d005ddf6e15804e7800e3e5e882dd32bb62de64736f6c634300060a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e5836
-----Decoded View---------------
Arg [0] : _managerCore (address): 0xBea48CA3AaC57D570a9054CC374D2F01c2Bc48Ed
Arg [1] : _wrapModule (address): 0x9F781FDa6Cdf7a339aF514d0F5E16f6b2b2E5836
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000bea48ca3aac57d570a9054cc374d2f01c2bc48ed
Arg [1] : 0000000000000000000000009f781fda6cdf7a339af514d0f5e16f6b2b2e5836
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.