Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 22598921 | 8 days ago | 0.27804433 ETH | ||||
Transfer | 22598921 | 8 days ago | 0.27804433 ETH | ||||
Transfer | 22283635 | 52 days ago | 699.28406192 ETH | ||||
Transfer | 22283635 | 52 days ago | 699.28406192 ETH | ||||
Transfer | 22282782 | 52 days ago | 1 ETH | ||||
Transfer | 22282782 | 52 days ago | 1 ETH | ||||
Deposit | 22018531 | 89 days ago | 0.7 ETH | ||||
Transfer | 22018531 | 89 days ago | 0.7 ETH | ||||
Deposit | 21943486 | 100 days ago | 0.3 ETH | ||||
Transfer | 21943486 | 100 days ago | 0.3 ETH | ||||
Transfer | 21842685 | 114 days ago | 0.00696289 ETH | ||||
Transfer | 21842685 | 114 days ago | 0.00696289 ETH | ||||
Deposit | 21793675 | 121 days ago | 0.01 ETH | ||||
Transfer | 21793675 | 121 days ago | 0.01 ETH | ||||
Deposit | 21793666 | 121 days ago | 0.017 ETH | ||||
Transfer | 21793666 | 121 days ago | 0.017 ETH | ||||
Deposit | 21349696 | 183 days ago | 0.105 ETH | ||||
Transfer | 21349696 | 183 days ago | 0.105 ETH | ||||
Transfer | 21334171 | 185 days ago | 0.24598262 ETH | ||||
Transfer | 21334171 | 185 days ago | 0.24598262 ETH | ||||
Transfer | 21228269 | 200 days ago | 0.1718505 ETH | ||||
Transfer | 21228269 | 200 days ago | 0.1718505 ETH | ||||
Deposit | 21182721 | 206 days ago | 0.012 ETH | ||||
Transfer | 21182721 | 206 days ago | 0.012 ETH | ||||
Transfer | 21157103 | 210 days ago | 0.07918816 ETH |
Loading...
Loading
Contract Name:
Core
Compiler Version
v0.6.11+commit.5ef660b1
Contract Source Code (Solidity Standard Json-Input format)
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; import { Action, AbsoluteTokenAmount, ActionType, AmountType } from "../shared/Structs.sol"; import { InteractiveAdapter } from "../interactiveAdapters/InteractiveAdapter.sol"; import { ERC20 } from "../shared/ERC20.sol"; import { ProtocolAdapterRegistry } from "./ProtocolAdapterRegistry.sol"; import { SafeERC20 } from "../shared/SafeERC20.sol"; import { Helpers } from "../shared/Helpers.sol"; import { ReentrancyGuard } from "./ReentrancyGuard.sol"; /** * @title Main contract executing actions. */ contract Core is ReentrancyGuard { using SafeERC20 for ERC20; address internal immutable protocolAdapterRegistry_; address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; event ExecutedAction(Action action); constructor( address protocolAdapterRegistry ) public { require(protocolAdapterRegistry != address(0), "C: empty protocolAdapterRegistry"); protocolAdapterRegistry_ = protocolAdapterRegistry; } // solhint-disable-next-line no-empty-blocks receive() external payable {} /** * @notice Executes actions and returns tokens to account. * @param actions Array with actions to be executed. * @param requiredOutputs Array with required amounts for the returned tokens. * @param account Address that will receive all the resulting funds. * @return actualOutputs Array with actual amounts for the returned tokens. */ function executeActions( Action[] calldata actions, AbsoluteTokenAmount[] calldata requiredOutputs, address payable account ) external payable nonReentrant returns (AbsoluteTokenAmount[] memory) { require(account != address(0), "C: empty account"); address[][] memory tokensToBeWithdrawn = new address[][](actions.length); for (uint256 i = 0; i < actions.length; i++) { tokensToBeWithdrawn[i] = executeAction(actions[i]); emit ExecutedAction(actions[i]); } return returnTokens(requiredOutputs, tokensToBeWithdrawn, account); } /** * @notice Execute one action via external call. * @param action Action struct. * @dev Can be called only by this contract. * This function is used to create cross-protocol adapters. */ function executeActionExternal( Action calldata action ) external returns (address[] memory) { require(msg.sender == address(this), "C: only address(this)"); return executeAction(action); } /** * @return Address of the ProtocolAdapterRegistry contract used. */ function protocolAdapterRegistry() external view returns (address) { return protocolAdapterRegistry_; } function executeAction( Action calldata action ) internal returns (address[] memory) { address adapter = ProtocolAdapterRegistry(protocolAdapterRegistry_).getProtocolAdapterAddress( action.protocolAdapterName ); require(adapter != address(0), "C: bad name"); require( action.actionType == ActionType.Deposit || action.actionType == ActionType.Withdraw, "C: bad action type" ); bytes4 selector; if (action.actionType == ActionType.Deposit) { selector = InteractiveAdapter(adapter).deposit.selector; } else { selector = InteractiveAdapter(adapter).withdraw.selector; } // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returnData) = adapter.delegatecall( abi.encodeWithSelector( selector, action.tokenAmounts, action.data ) ); // assembly revert opcode is used here as `returnData` // is already bytes array generated by the callee's revert() // solhint-disable-next-line no-inline-assembly assembly { if eq(success, 0) { revert(add(returnData, 32), returndatasize()) } } return abi.decode(returnData, (address[])); } function returnTokens( AbsoluteTokenAmount[] calldata requiredOutputs, address[][] memory tokensToBeWithdrawn, address payable account ) internal returns (AbsoluteTokenAmount[] memory) { uint256 length = requiredOutputs.length; uint256 lengthNested; address token; AbsoluteTokenAmount[] memory actualOutputs = new AbsoluteTokenAmount[](length); for (uint256 i = 0; i < length; i++) { token = requiredOutputs[i].token; actualOutputs[i] = AbsoluteTokenAmount({ token: token, amount: checkRequirementAndTransfer( token, requiredOutputs[i].amount, account ) }); } length = tokensToBeWithdrawn.length; for (uint256 i = 0; i < length; i++) { lengthNested = tokensToBeWithdrawn[i].length; for (uint256 j = 0; j < lengthNested; j++) { checkRequirementAndTransfer(tokensToBeWithdrawn[i][j], 0, account); } } return actualOutputs; } function checkRequirementAndTransfer( address token, uint256 requiredAmount, address account ) internal returns (uint256) { uint256 actualAmount; if (token == ETH) { actualAmount = address(this).balance; } else { actualAmount = ERC20(token).balanceOf(address(this)); } require( actualAmount >= requiredAmount, string( abi.encodePacked( "C: ", actualAmount, " is less than ", requiredAmount, " for ", token ) ) ); if (actualAmount > 0) { if (token == ETH) { // solhint-disable-next-line avoid-low-level-calls (bool success, ) = account.call{value: actualAmount}(new bytes(0)); require(success, "ETH transfer to account failed"); } else { ERC20(token).safeTransfer(account, actualAmount, "C"); } } return actualAmount; } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; // The struct consists of AbsoluteTokenAmount structs for // (base) token and its underlying tokens (if any). struct FullAbsoluteTokenAmount { AbsoluteTokenAmountMeta base; AbsoluteTokenAmountMeta[] underlying; } // The struct consists of AbsoluteTokenAmount struct // with token address and absolute amount // and ERC20Metadata struct with ERC20-style metadata. // NOTE: 0xEeee...EEeE address is used for ETH. struct AbsoluteTokenAmountMeta { AbsoluteTokenAmount absoluteTokenAmount; ERC20Metadata erc20metadata; } // The struct consists of ERC20-style token metadata. struct ERC20Metadata { string name; string symbol; uint8 decimals; } // The struct consists of protocol adapter's name // and array of AbsoluteTokenAmount structs // with token addresses and absolute amounts. struct AdapterBalance { bytes32 protocolAdapterName; AbsoluteTokenAmount[] absoluteTokenAmounts; } // The struct consists of token address // and its absolute amount. struct AbsoluteTokenAmount { address token; uint256 amount; } // The struct consists of token address, // and price per full share (1e18). struct Component { address token; uint256 rate; } //=============================== Interactive Adapters Structs ==================================== struct TransactionData { Action[] actions; TokenAmount[] inputs; Fee fee; AbsoluteTokenAmount[] requiredOutputs; uint256 nonce; } struct Action { bytes32 protocolAdapterName; ActionType actionType; TokenAmount[] tokenAmounts; bytes data; } struct TokenAmount { address token; uint256 amount; AmountType amountType; } struct Fee { uint256 share; address beneficiary; } enum ActionType { None, Deposit, Withdraw } enum AmountType { None, Relative, Absolute }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; import { ProtocolAdapter } from "../adapters/ProtocolAdapter.sol"; import { TokenAmount, AmountType } from "../shared/Structs.sol"; import { ERC20 } from "../shared/ERC20.sol"; /** * @title Base contract for interactive protocol adapters. * @dev deposit() and withdraw() functions MUST be implemented * as well as all the functions from ProtocolAdapter abstract contract. * @author Igor Sobolev <[email protected]> */ abstract contract InteractiveAdapter is ProtocolAdapter { uint256 internal constant DELIMITER = 1e18; address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /** * @dev The function must deposit assets to the protocol. * @return MUST return assets to be sent back to the `msg.sender`. */ function deposit( TokenAmount[] memory tokenAmounts, bytes memory data ) public payable virtual returns (address[] memory); /** * @dev The function must withdraw assets from the protocol. * @return MUST return assets to be sent back to the `msg.sender`. */ function withdraw( TokenAmount[] memory tokenAmounts, bytes memory data ) public payable virtual returns (address[] memory); function getAbsoluteAmountDeposit( TokenAmount memory tokenAmount ) internal view virtual returns (uint256) { address token = tokenAmount.token; uint256 amount = tokenAmount.amount; AmountType amountType = tokenAmount.amountType; require( amountType == AmountType.Relative || amountType == AmountType.Absolute, "IA: bad amount type" ); if (amountType == AmountType.Relative) { require(amount <= DELIMITER, "IA: bad amount"); uint256 balance; if (token == ETH) { balance = address(this).balance; } else { balance = ERC20(token).balanceOf(address(this)); } if (amount == DELIMITER) { return balance; } else { return mul(balance, amount) / DELIMITER; } } else { return amount; } } function getAbsoluteAmountWithdraw( TokenAmount memory tokenAmount ) internal view virtual returns (uint256) { address token = tokenAmount.token; uint256 amount = tokenAmount.amount; AmountType amountType = tokenAmount.amountType; require( amountType == AmountType.Relative || amountType == AmountType.Absolute, "IA: bad amount type" ); if (amountType == AmountType.Relative) { require(amount <= DELIMITER, "IA: bad amount"); uint256 balance = getBalance(token, address(this)); if (amount == DELIMITER) { return balance; } else { return mul(balance, amount) / DELIMITER; } } else { return amount; } } function mul( uint256 a, uint256 b ) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "IA: mul overflow"); return c; } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; /** * @title Protocol adapter abstract contract. * @dev adapterType(), tokenType(), and getBalance() functions MUST be implemented. * @author Igor Sobolev <[email protected]> */ abstract contract ProtocolAdapter { /** * @dev MUST return amount and type of the given token * locked on the protocol by the given account. */ function getBalance( address token, address account ) public view virtual returns (uint256); }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; interface ERC20 { function approve(address, uint256) external returns (bool); function transfer(address, uint256) external returns (bool); function transferFrom(address, address, uint256) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address) external view returns (uint256); function allowance(address, address) external view returns (uint256); }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; import { AdapterBalance, AbsoluteTokenAmount } from "../shared/Structs.sol"; import { ERC20 } from "../shared/ERC20.sol"; import { Ownable } from "./Ownable.sol"; import { ProtocolAdapterManager } from "./ProtocolAdapterManager.sol"; import { ProtocolAdapter } from "../adapters/ProtocolAdapter.sol"; /** * @title Registry for protocol adapters. * @notice getBalances() function implements the main functionality. * @author Igor Sobolev <[email protected]> */ contract ProtocolAdapterRegistry is Ownable, ProtocolAdapterManager { address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /** * @param account Address of the account. * @return AdapterBalance array by the given account. * @notice Zero values are filtered out! */ function getBalances( address account ) external view returns (AdapterBalance[] memory) { // Get balances for all the adapters AdapterBalance[] memory adapterBalances = getAdapterBalances( _protocolAdapterNames, account ); // Declare temp variable and counters AbsoluteTokenAmount[] memory currentAbsoluteTokenAmounts; AbsoluteTokenAmount[] memory nonZeroAbsoluteTokenAmounts; uint256 nonZeroAdaptersCounter; uint256[] memory nonZeroTokensCounters; uint256 adapterBalancesLength; uint256 currentAbsoluteTokenAmountsLength; // Reset counters nonZeroTokensCounters = new uint256[](adapterBalances.length); nonZeroAdaptersCounter = 0; adapterBalancesLength = adapterBalances.length; // Iterate over all the adapters' balances for (uint256 i = 0; i < adapterBalancesLength; i++) { // Fill temp variable currentAbsoluteTokenAmounts = adapterBalances[i].absoluteTokenAmounts; // Reset counter nonZeroTokensCounters[i] = 0; currentAbsoluteTokenAmountsLength = currentAbsoluteTokenAmounts.length; // Increment if token balance is positive for (uint256 j = 0; j < currentAbsoluteTokenAmountsLength; j++) { if (currentAbsoluteTokenAmounts[j].amount > 0) { nonZeroTokensCounters[i]++; } } // Increment if at least one positive token balance if (nonZeroTokensCounters[i] > 0) { nonZeroAdaptersCounter++; } } // Declare resulting variable AdapterBalance[] memory nonZeroAdapterBalances; // Reset resulting variable and counter nonZeroAdapterBalances = new AdapterBalance[](nonZeroAdaptersCounter); nonZeroAdaptersCounter = 0; // Iterate over all the adapters' balances for (uint256 i = 0; i < adapterBalancesLength; i++) { // Skip if no positive token balances if (nonZeroTokensCounters[i] == 0) { continue; } // Fill temp variable currentAbsoluteTokenAmounts = adapterBalances[i].absoluteTokenAmounts; // Reset temp variable and counter nonZeroAbsoluteTokenAmounts = new AbsoluteTokenAmount[](nonZeroTokensCounters[i]); nonZeroTokensCounters[i] = 0; currentAbsoluteTokenAmountsLength = currentAbsoluteTokenAmounts.length; for (uint256 j = 0; j < currentAbsoluteTokenAmountsLength; j++) { // Skip if balance is not positive if (currentAbsoluteTokenAmounts[j].amount == 0) { continue; } // Else fill temp variable nonZeroAbsoluteTokenAmounts[nonZeroTokensCounters[i]] = currentAbsoluteTokenAmounts[j]; // Increment counter nonZeroTokensCounters[i]++; } // Fill resulting variable nonZeroAdapterBalances[nonZeroAdaptersCounter] = AdapterBalance({ protocolAdapterName: adapterBalances[i].protocolAdapterName, absoluteTokenAmounts: nonZeroAbsoluteTokenAmounts }); // Increment counter nonZeroAdaptersCounter++; } return nonZeroAdapterBalances; } /** * @param protocolAdapterNames Array of the protocol adapters' names. * @param account Address of the account. * @return AdapterBalance array by the given parameters. */ function getAdapterBalances( bytes32[] memory protocolAdapterNames, address account ) public view returns (AdapterBalance[] memory) { uint256 length = protocolAdapterNames.length; AdapterBalance[] memory adapterBalances = new AdapterBalance[](length); for (uint256 i = 0; i < length; i++) { adapterBalances[i] = getAdapterBalance( protocolAdapterNames[i], _protocolAdapterSupportedTokens[protocolAdapterNames[i]], account ); } return adapterBalances; } /** * @param protocolAdapterName Protocol adapter's Name. * @param tokens Array of tokens' addresses. * @param account Address of the account. * @return AdapterBalance array by the given parameters. */ function getAdapterBalance( bytes32 protocolAdapterName, address[] memory tokens, address account ) public view returns (AdapterBalance memory) { address adapter = _protocolAdapterAddress[protocolAdapterName]; require(adapter != address(0), "AR: bad protocolAdapterName"); uint256 length = tokens.length; AbsoluteTokenAmount[] memory absoluteTokenAmounts = new AbsoluteTokenAmount[](tokens.length); for (uint256 i = 0; i < length; i++) { try ProtocolAdapter(adapter).getBalance( tokens[i], account ) returns (uint256 amount) { absoluteTokenAmounts[i] = AbsoluteTokenAmount({ token: tokens[i], amount: amount }); } catch { absoluteTokenAmounts[i] = AbsoluteTokenAmount({ token: tokens[i], amount: 0 }); } } return AdapterBalance({ protocolAdapterName: protocolAdapterName, absoluteTokenAmounts: absoluteTokenAmounts }); } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; abstract contract Ownable { modifier onlyOwner { require(msg.sender == owner_, "O: only owner"); _; } modifier onlyPendingOwner { require(msg.sender == pendingOwner_, "O: only pending owner"); _; } address private owner_; address private pendingOwner_; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @notice Initializes owner variable with msg.sender address. */ constructor() internal { owner_ = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /** * @notice Sets pending owner to the desired address. * The function is callable only by the owner. */ function proposeOwnership(address newOwner) external onlyOwner { require(newOwner != address(0), "O: empty newOwner"); require(newOwner != owner_, "O: equal to owner_"); require(newOwner != pendingOwner_, "O: equal to pendingOwner_"); pendingOwner_ = newOwner; } /** * @notice Transfers ownership to the pending owner. * The function is callable only by the pending owner. */ function acceptOwnership() external onlyPendingOwner { emit OwnershipTransferred(owner_, msg.sender); owner_ = msg.sender; delete pendingOwner_; } /** * @return Owner of the contract. */ function owner() external view returns (address) { return owner_; } /** * @return Pending owner of the contract. */ function pendingOwner() external view returns (address) { return pendingOwner_; } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; import { Ownable } from "./Ownable.sol"; /** * @title ProtocolAdapterRegistry part responsible for protocol adapters management. * @dev Base contract for ProtocolAdapterRegistry. * @author Igor Sobolev <[email protected]> */ abstract contract ProtocolAdapterManager is Ownable { // Protocol adapters' names bytes32[] internal _protocolAdapterNames; // Protocol adapter's name => protocol adapter's address mapping (bytes32 => address) internal _protocolAdapterAddress; // protocol adapter's name => protocol adapter's supported tokens mapping (bytes32 => address[]) internal _protocolAdapterSupportedTokens; /** * @notice Adds protocol adapters. * The function is callable only by the owner. * @param newProtocolAdapterNames Array of the new protocol adapters' names. * @param newProtocolAdapterAddresses Array of the new protocol adapters' addresses. * @param newSupportedTokens Array of the new protocol adapters' supported tokens. */ function addProtocolAdapters( bytes32[] calldata newProtocolAdapterNames, address[] calldata newProtocolAdapterAddresses, address[][] calldata newSupportedTokens ) external onlyOwner { uint256 length = newProtocolAdapterNames.length; require(length != 0, "PAM: empty[1]"); require(length == newProtocolAdapterAddresses.length, "PAM: lengths differ[1]"); require(length == newSupportedTokens.length, "PAM: lengths differ[2]"); for (uint256 i = 0; i < length; i++) { addProtocolAdapter( newProtocolAdapterNames[i], newProtocolAdapterAddresses[i], newSupportedTokens[i] ); } } /** * @notice Removes protocol adapters. * The function is callable only by the owner. * @param protocolAdapterNames Array of the protocol adapters' names. */ function removeProtocolAdapters( bytes32[] calldata protocolAdapterNames ) external onlyOwner { uint256 length = protocolAdapterNames.length; require(length != 0, "PAM: empty[2]"); for (uint256 i = 0; i < length; i++) { removeProtocolAdapter(protocolAdapterNames[i]); } } /** * @notice Updates protocol adapters. * The function is callable only by the owner. * @param protocolAdapterNames Array of the protocol adapters' names. * @param newProtocolAdapterAddresses Array of the protocol adapters' new addresses. * @param newSupportedTokens Array of the protocol adapters' new supported tokens. */ function updateProtocolAdapters( bytes32[] calldata protocolAdapterNames, address[] calldata newProtocolAdapterAddresses, address[][] calldata newSupportedTokens ) external onlyOwner { uint256 length = protocolAdapterNames.length; require(length != 0, "PAM: empty[3]"); require(length == newProtocolAdapterAddresses.length, "PAM: lengths differ[3]"); require(length == newSupportedTokens.length, "PAM: lengths differ[4]"); for (uint256 i = 0; i < length; i++) { updateProtocolAdapter( protocolAdapterNames[i], newProtocolAdapterAddresses[i], newSupportedTokens[i] ); } } /** * @return Array of protocol adapters' names. */ function getProtocolAdapterNames() external view returns (bytes32[] memory) { return _protocolAdapterNames; } /** * @param protocolAdapterName Name of the protocol adapter. * @return Address of protocol adapter. */ function getProtocolAdapterAddress( bytes32 protocolAdapterName ) external view returns (address) { return _protocolAdapterAddress[protocolAdapterName]; } /** * @param protocolAdapterName Name of the protocol adapter. * @return Array of protocol adapter's supported tokens. */ function getSupportedTokens( bytes32 protocolAdapterName ) external view returns (address[] memory) { return _protocolAdapterSupportedTokens[protocolAdapterName]; } /** * @notice Adds a protocol adapter. * @param newProtocolAdapterName New protocol adapter's protocolAdapterName. * @param newAddress New protocol adapter's address. * @param newSupportedTokens Array of the new protocol adapter's supported tokens. * Empty array is always allowed. */ function addProtocolAdapter( bytes32 newProtocolAdapterName, address newAddress, address[] calldata newSupportedTokens ) internal { require(newProtocolAdapterName != bytes32(0), "PAM: zero[1]"); require(newAddress != address(0), "PAM: zero[2]"); require(_protocolAdapterAddress[newProtocolAdapterName] == address(0), "PAM: exists"); _protocolAdapterNames.push(newProtocolAdapterName); _protocolAdapterAddress[newProtocolAdapterName] = newAddress; _protocolAdapterSupportedTokens[newProtocolAdapterName] = newSupportedTokens; } /** * @notice Removes a protocol adapter. * @param protocolAdapterName Protocol adapter's protocolAdapterName. */ function removeProtocolAdapter( bytes32 protocolAdapterName ) internal { require(_protocolAdapterAddress[protocolAdapterName] != address(0), "PAM: does not exist[1]"); uint256 length = _protocolAdapterNames.length; uint256 index = 0; while (_protocolAdapterNames[index] != protocolAdapterName) { index++; } if (index != length - 1) { _protocolAdapterNames[index] = _protocolAdapterNames[length - 1]; } _protocolAdapterNames.pop(); delete _protocolAdapterAddress[protocolAdapterName]; delete _protocolAdapterSupportedTokens[protocolAdapterName]; } /** * @notice Updates a protocol adapter. * @param protocolAdapterName Protocol adapter's protocolAdapterName. * @param newProtocolAdapterAddress Protocol adapter's new address. * @param newSupportedTokens Array of the protocol adapter's new supported tokens. * Empty array is always allowed. */ function updateProtocolAdapter( bytes32 protocolAdapterName, address newProtocolAdapterAddress, address[] calldata newSupportedTokens ) internal { address oldProtocolAdapterAddress = _protocolAdapterAddress[protocolAdapterName]; require(oldProtocolAdapterAddress != address(0), "PAM: does not exist[2]"); require(newProtocolAdapterAddress != address(0), "PAM: zero[3]"); if (oldProtocolAdapterAddress == newProtocolAdapterAddress) { _protocolAdapterSupportedTokens[protocolAdapterName] = newSupportedTokens; } else { _protocolAdapterAddress[protocolAdapterName] = newProtocolAdapterAddress; _protocolAdapterSupportedTokens[protocolAdapterName] = newSupportedTokens; } } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; import "./ERC20.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token contract * returns false). Tokens that return no value (and instead revert or throw on failure) * are also supported, non-reverting calls are assumed to be successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { function safeTransfer( ERC20 token, address to, uint256 value, string memory location ) internal { callOptionalReturn( token, abi.encodeWithSelector( token.transfer.selector, to, value ), "transfer", location ); } function safeTransferFrom( ERC20 token, address from, address to, uint256 value, string memory location ) internal { callOptionalReturn( token, abi.encodeWithSelector( token.transferFrom.selector, from, to, value ), "transferFrom", location ); } function safeApprove( ERC20 token, address spender, uint256 value, string memory location ) internal { require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: bad approve call" ); callOptionalReturn( token, abi.encodeWithSelector( token.approve.selector, spender, value ), "approve", location ); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), * relaxing the requirement on the return value: the return value is optional * (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * @param location Location of the call (for debug). */ function callOptionalReturn( ERC20 token, bytes memory data, string memory functionName, string memory location ) private { // We need to perform a low level call here, to bypass Solidity's return data size checking // mechanism, since we're implementing it ourselves. // We implement two-steps call as callee is a contract is a responsibility of a caller. // 1. The call itself is made, and success asserted // 2. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require( success, string( abi.encodePacked( "SafeERC20: ", functionName, " failed in ", location ) ) ); if (returndata.length > 0) { // Return data is optional require( abi.decode(returndata, (bool)), string( abi.encodePacked( "SafeERC20: ", functionName, " returned false in ", location ) ) ); } } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; /** * @notice Library helps to convert different types to strings. * @author Igor Sobolev <[email protected]> */ library Helpers { /** * @dev Internal function to convert bytes32 to string and trim zeroes. */ function toString(bytes32 data) internal pure returns (string memory) { uint256 counter = 0; for (uint256 i = 0; i < 32; i++) { if (data[i] != bytes1(0)) { counter++; } } bytes memory result = new bytes(counter); counter = 0; for (uint256 i = 0; i < 32; i++) { if (data[i] != bytes1(0)) { result[counter] = data[i]; counter++; } } return string(result); } /** * @dev Internal function to convert uint256 to string. */ function toString(uint256 data) internal pure returns (string memory) { uint256 length = 0; uint256 dataCopy = data; while (dataCopy != 0) { length++; dataCopy /= 10; } bytes memory result = new bytes(length); dataCopy = data; // Here, we have on-purpose underflow cause we need case `i = 0` to be included in the loop for (uint256 i = length - 1; i < length; i--) { result[i] = bytes1(uint8(48 + dataCopy % 10)); dataCopy /= 10; } return string(result); } }
// Copyright (C) 2020 Zerion Inc. <https://zerion.io> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // // SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.6.11; pragma experimental ABIEncoderV2; contract ReentrancyGuard { uint256 internal constant UNLOCKED = 1; uint256 internal constant LOCKED = 2; uint256 internal guard_; constructor () internal { guard_ = UNLOCKED; } modifier nonReentrant() { require(guard_ == UNLOCKED, "RG: locked"); guard_ = LOCKED; _; guard_ = UNLOCKED; } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "remappings": [] }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"protocolAdapterRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"components":[{"internalType":"bytes32","name":"protocolAdapterName","type":"bytes32"},{"internalType":"enum ActionType","name":"actionType","type":"uint8"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum AmountType","name":"amountType","type":"uint8"}],"internalType":"struct TokenAmount[]","name":"tokenAmounts","type":"tuple[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct Action","name":"action","type":"tuple"}],"name":"ExecutedAction","type":"event"},{"inputs":[{"components":[{"internalType":"bytes32","name":"protocolAdapterName","type":"bytes32"},{"internalType":"enum ActionType","name":"actionType","type":"uint8"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum AmountType","name":"amountType","type":"uint8"}],"internalType":"struct TokenAmount[]","name":"tokenAmounts","type":"tuple[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Action","name":"action","type":"tuple"}],"name":"executeActionExternal","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"protocolAdapterName","type":"bytes32"},{"internalType":"enum ActionType","name":"actionType","type":"uint8"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum AmountType","name":"amountType","type":"uint8"}],"internalType":"struct TokenAmount[]","name":"tokenAmounts","type":"tuple[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Action[]","name":"actions","type":"tuple[]"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct AbsoluteTokenAmount[]","name":"requiredOutputs","type":"tuple[]"},{"internalType":"address payable","name":"account","type":"address"}],"name":"executeActions","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct AbsoluteTokenAmount[]","name":"","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"protocolAdapterRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051620018a0380380620018a08339810160408190526100319161007a565b60016000556001600160a01b0381166100655760405162461bcd60e51b815260040161005c906100a8565b60405180910390fd5b60601b6001600160601b0319166080526100dd565b60006020828403121561008b578081fd5b81516001600160a01b03811681146100a1578182fd5b9392505050565b6020808252818101527f433a20656d7074792070726f746f636f6c416461707465725265676973747279604082015260600190565b60805160601c6117a062000100600039806102b4528061031952506117a06000f3fe6080604052600436106100385760003560e01c8063610961e514610044578063695f72191461007a5780636f16a1101461009a5761003f565b3661003f57005b600080fd5b34801561005057600080fd5b5061006461005f366004610e62565b6100bc565b6040516100719190611191565b60405180910390f35b61008d610088366004610d53565b610111565b60405161007191906111eb565b3480156100a657600080fd5b506100af6102b2565b604051610071919061114a565b6060333014610100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f790611455565b60405180910390fd5b610109826102d6565b90505b919050565b606060016000541461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f790611379565b600260005573ffffffffffffffffffffffffffffffffffffffff82166101a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f79061141e565b60608567ffffffffffffffff811180156101ba57600080fd5b506040519080825280602002602001820160405280156101ee57816020015b60608152602001906001900390816101d95790505b50905060005b868110156102955761022288888381811061020b57fe5b905060200281019061021d9190611644565b6102d6565b82828151811061022e57fe5b60200260200101819052507f5c416a271db2ac40f70515df028f580eeb1e2f7be2e656664553b83d9e15a03988888381811061026657fe5b90506020028101906102789190611644565b604051610285919061148c565b60405180910390a16001016101f4565b506102a28585838661061b565b6001600055979650505050505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f0860220100000000000000000000000000000000000000000000000000000000815260609060009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063086022019061034f908635906004016112e8565b60206040518083038186803b15801561036757600080fd5b505afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610c99565b905073ffffffffffffffffffffffffffffffffffffffff81166103ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f790611342565b60016104006040850160208601610e46565b600281111561040b57fe5b1480610431575060026104246040850160208601610e46565b600281111561042f57fe5b145b610467576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f7906113b0565b6000600161047b6040860160208701610e46565b600281111561048657fe5b14156104b357507f28ffb83d000000000000000000000000000000000000000000000000000000006104d6565b507f387b8174000000000000000000000000000000000000000000000000000000005b6000606073ffffffffffffffffffffffffffffffffffffffff8416836104ff6040890189611571565b61050c60608b018b6115df565b60405160240161051f9493929190611250565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516105a89190610f7b565b600060405180830381855af49150503d80600081146105e3576040519150601f19603f3d011682016040523d82523d6000602084013e6105e8565b606091505b509150915060008214156105fd573d60208201fd5b808060200190518101906106119190610cb5565b9695505050505050565b606083600080838367ffffffffffffffff8111801561063957600080fd5b5060405190808252806020026020018201604052801561067357816020015b610660610c38565b8152602001906001900390816106585790505b50905060005b8481101561070e5789898281811061068d57fe5b6106a39260206040909202019081019150610c76565b925060405180604001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020016106ec858d8d868181106106dc57fe5b905060400201602001358b610794565b8152508282815181106106fb57fe5b6020908102919091010152600101610679565b508651935060005b848110156107875787818151811061072a57fe5b602002602001015151935060008090505b8481101561077e5761077589838151811061075257fe5b6020026020010151828151811061076557fe5b602002602001015160008a610794565b5060010161073b565b50600101610716565b5098975050505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156107d0575047610875565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616906370a082319061082290309060040161114a565b60206040518083038186803b15801561083a57600080fd5b505afa15801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190610e9b565b90505b8381101581858760405160200161088e93929190610f97565b604051602081830303815290604052906108d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f791906112f1565b508015610a275773ffffffffffffffffffffffffffffffffffffffff851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156109c8576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff85169083906040516109459190610f7b565b60006040518083038185875af1925050503d8060008114610982576040519150601f19603f3d011682016040523d82523d6000602084013e610987565b606091505b50509050806109c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f7906113e7565b50610a27565b60408051808201909152600181527f43000000000000000000000000000000000000000000000000000000000000006020820152610a279073ffffffffffffffffffffffffffffffffffffffff8716908590849063ffffffff610a2f16565b949350505050565b610ae78463a9059cbb60e01b8585604051602401610a4e92919061116b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060400160405280600881526020017f7472616e7366657200000000000000000000000000000000000000000000000081525084610aed565b50505050565b600060608573ffffffffffffffffffffffffffffffffffffffff1685604051610b169190610f7b565b6000604051808303816000865af19150503d8060008114610b53576040519150601f19603f3d011682016040523d82523d6000602084013e610b58565b606091505b5091509150818484604051602001610b719291906110c8565b60405160208183030381529060405290610bb8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f791906112f1565b50805115610c305780806020019051810190610bd49190610e26565b8484604051602001610be7929190611046565b60405160208183030381529060405290610c2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f791906112f1565b505b505050505050565b604080518082019091526000808252602082015290565b8051610c5a81611738565b92915050565b8035610c5a81611738565b8035610c5a8161175d565b600060208284031215610c87578081fd5b8135610c9281611738565b9392505050565b600060208284031215610caa578081fd5b8151610c9281611738565b60006020808385031215610cc7578182fd5b825167ffffffffffffffff80821115610cde578384fd5b81850186601f820112610cef578485fd5b8051925081831115610cff578485fd5b8383029150610d0f848301611677565b8381528481019082860184840187018a1015610d29578788fd5b8794505b8585101561078757610d3f8a82610c4f565b835260019490940193918601918601610d2d565b600080600080600060608688031215610d6a578081fd5b853567ffffffffffffffff80821115610d81578283fd5b81880189601f820112610d92578384fd5b8035925081831115610da2578384fd5b60208a818286028401011115610db6578485fd5b8181019850929650888301359282841115610dcf578485fd5b838a0191508a601f830112610de2578485fd5b8135935082841115610df2578485fd5b8a81604086028401011115610e05578485fd5b019450909250610e1a90508760408801610c60565b90509295509295909350565b600060208284031215610e37578081fd5b81518015158114610c92578182fd5b600060208284031215610e57578081fd5b8135610c928161175d565b600060208284031215610e73578081fd5b813567ffffffffffffffff811115610e89578182fd5b80830160808186031215610a27578283fd5b600060208284031215610eac578081fd5b5051919050565b60008284526020808501945082825b85811015610f28578135610ed581611738565b73ffffffffffffffffffffffffffffffffffffffff16875281830135838801526040606081840135610f068161175d565b610f0f81611701565b928a019290925297880197929092019150600101610ec2565b509495945050505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008251610f8d81846020870161170c565b9190910192915050565b7f433a200000000000000000000000000000000000000000000000000000000000815260038101939093527f206973206c657373207468616e20000000000000000000000000000000000000602384015260318301919091527f20666f7220000000000000000000000000000000000000000000000000000000605183015260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166056820152606a0190565b60007f5361666545524332303a200000000000000000000000000000000000000000008252835161107e81600b85016020880161170c565b8083017f2072657475726e65642066616c736520696e2000000000000000000000000000600b820152845191506110bc82601e83016020880161170c565b01601e01949350505050565b60007f5361666545524332303a200000000000000000000000000000000000000000008252835161110081600b85016020880161170c565b8083017f206661696c656420696e20000000000000000000000000000000000000000000600b8201528451915061113e82601683016020880161170c565b01601601949350505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156111df57835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016111ad565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015611243578151805173ffffffffffffffffffffffffffffffffffffffff168552860151868501529284019290850190600101611208565b5091979650505050505050565b6040808252818101859052600090606080840188845b898110156112c6576020823561127b81611738565b73ffffffffffffffffffffffffffffffffffffffff1684528281013590840152848201356112a88161175d565b600381106112b257fe5b838601529183019190830190600101611266565b505084810360208601526112db818789610f33565b9998505050505050505050565b90815260200190565b600060208252825180602084015261131081604085016020870161170c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6020808252600b908201527f433a20626164206e616d65000000000000000000000000000000000000000000604082015260600190565b6020808252600a908201527f52473a206c6f636b656400000000000000000000000000000000000000000000604082015260600190565b60208082526012908201527f433a2062616420616374696f6e20747970650000000000000000000000000000604082015260600190565b6020808252601e908201527f455448207472616e7366657220746f206163636f756e74206661696c65640000604082015260600190565b60208082526010908201527f433a20656d707479206163636f756e7400000000000000000000000000000000604082015260600190565b60208082526015908201527f433a206f6e6c7920616464726573732874686973290000000000000000000000604082015260600190565b60006020825282356020830152604083016114b26114ad8260208701610c6b565b611701565b604084015280357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18536030181126114e8578283fd5b84019050803567ffffffffffffffff811115611502578283fd5b606081023603851315611513578283fd5b6080606085015261152b60a085018260208501610eb3565b611538606087018761169e565b935091507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0858203016080860152610611818484610f33565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126115a5578283fd5b8084018035925067ffffffffffffffff8311156115c0578384fd5b6020019250506060810236038213156115d857600080fd5b9250929050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611613578182fd5b8084018035925067ffffffffffffffff83111561162e578384fd5b602001925050368190038213156115d857600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610f8d578182fd5b60405181810167ffffffffffffffff8111828210171561169657600080fd5b604052919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126116d2578283fd5b830160208101925035905067ffffffffffffffff8111156116f257600080fd5b8036038313156115d857600080fd5b806003811061010c57fe5b60005b8381101561172757818101518382015260200161170f565b83811115610ae75750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461175a57600080fd5b50565b6003811061175a57600080fdfea26469706673582212207b17e4a29427e532adb1b7fa739dcea4f7ddee02801a8339205468480a349a2364736f6c634300060b0033000000000000000000000000adfc6460233221eca99dac25d00f98d32ea3989e
Deployed Bytecode
0x6080604052600436106100385760003560e01c8063610961e514610044578063695f72191461007a5780636f16a1101461009a5761003f565b3661003f57005b600080fd5b34801561005057600080fd5b5061006461005f366004610e62565b6100bc565b6040516100719190611191565b60405180910390f35b61008d610088366004610d53565b610111565b60405161007191906111eb565b3480156100a657600080fd5b506100af6102b2565b604051610071919061114a565b6060333014610100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f790611455565b60405180910390fd5b610109826102d6565b90505b919050565b606060016000541461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f790611379565b600260005573ffffffffffffffffffffffffffffffffffffffff82166101a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f79061141e565b60608567ffffffffffffffff811180156101ba57600080fd5b506040519080825280602002602001820160405280156101ee57816020015b60608152602001906001900390816101d95790505b50905060005b868110156102955761022288888381811061020b57fe5b905060200281019061021d9190611644565b6102d6565b82828151811061022e57fe5b60200260200101819052507f5c416a271db2ac40f70515df028f580eeb1e2f7be2e656664553b83d9e15a03988888381811061026657fe5b90506020028101906102789190611644565b604051610285919061148c565b60405180910390a16001016101f4565b506102a28585838661061b565b6001600055979650505050505050565b7f000000000000000000000000adfc6460233221eca99dac25d00f98d32ea3989e90565b6040517f0860220100000000000000000000000000000000000000000000000000000000815260609060009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000adfc6460233221eca99dac25d00f98d32ea3989e169063086022019061034f908635906004016112e8565b60206040518083038186803b15801561036757600080fd5b505afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610c99565b905073ffffffffffffffffffffffffffffffffffffffff81166103ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f790611342565b60016104006040850160208601610e46565b600281111561040b57fe5b1480610431575060026104246040850160208601610e46565b600281111561042f57fe5b145b610467576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f7906113b0565b6000600161047b6040860160208701610e46565b600281111561048657fe5b14156104b357507f28ffb83d000000000000000000000000000000000000000000000000000000006104d6565b507f387b8174000000000000000000000000000000000000000000000000000000005b6000606073ffffffffffffffffffffffffffffffffffffffff8416836104ff6040890189611571565b61050c60608b018b6115df565b60405160240161051f9493929190611250565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290516105a89190610f7b565b600060405180830381855af49150503d80600081146105e3576040519150601f19603f3d011682016040523d82523d6000602084013e6105e8565b606091505b509150915060008214156105fd573d60208201fd5b808060200190518101906106119190610cb5565b9695505050505050565b606083600080838367ffffffffffffffff8111801561063957600080fd5b5060405190808252806020026020018201604052801561067357816020015b610660610c38565b8152602001906001900390816106585790505b50905060005b8481101561070e5789898281811061068d57fe5b6106a39260206040909202019081019150610c76565b925060405180604001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020016106ec858d8d868181106106dc57fe5b905060400201602001358b610794565b8152508282815181106106fb57fe5b6020908102919091010152600101610679565b508651935060005b848110156107875787818151811061072a57fe5b602002602001015151935060008090505b8481101561077e5761077589838151811061075257fe5b6020026020010151828151811061076557fe5b602002602001015160008a610794565b5060010161073b565b50600101610716565b5098975050505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156107d0575047610875565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616906370a082319061082290309060040161114a565b60206040518083038186803b15801561083a57600080fd5b505afa15801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190610e9b565b90505b8381101581858760405160200161088e93929190610f97565b604051602081830303815290604052906108d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f791906112f1565b508015610a275773ffffffffffffffffffffffffffffffffffffffff851673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156109c8576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff85169083906040516109459190610f7b565b60006040518083038185875af1925050503d8060008114610982576040519150601f19603f3d011682016040523d82523d6000602084013e610987565b606091505b50509050806109c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f7906113e7565b50610a27565b60408051808201909152600181527f43000000000000000000000000000000000000000000000000000000000000006020820152610a279073ffffffffffffffffffffffffffffffffffffffff8716908590849063ffffffff610a2f16565b949350505050565b610ae78463a9059cbb60e01b8585604051602401610a4e92919061116b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060400160405280600881526020017f7472616e7366657200000000000000000000000000000000000000000000000081525084610aed565b50505050565b600060608573ffffffffffffffffffffffffffffffffffffffff1685604051610b169190610f7b565b6000604051808303816000865af19150503d8060008114610b53576040519150601f19603f3d011682016040523d82523d6000602084013e610b58565b606091505b5091509150818484604051602001610b719291906110c8565b60405160208183030381529060405290610bb8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f791906112f1565b50805115610c305780806020019051810190610bd49190610e26565b8484604051602001610be7929190611046565b60405160208183030381529060405290610c2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100f791906112f1565b505b505050505050565b604080518082019091526000808252602082015290565b8051610c5a81611738565b92915050565b8035610c5a81611738565b8035610c5a8161175d565b600060208284031215610c87578081fd5b8135610c9281611738565b9392505050565b600060208284031215610caa578081fd5b8151610c9281611738565b60006020808385031215610cc7578182fd5b825167ffffffffffffffff80821115610cde578384fd5b81850186601f820112610cef578485fd5b8051925081831115610cff578485fd5b8383029150610d0f848301611677565b8381528481019082860184840187018a1015610d29578788fd5b8794505b8585101561078757610d3f8a82610c4f565b835260019490940193918601918601610d2d565b600080600080600060608688031215610d6a578081fd5b853567ffffffffffffffff80821115610d81578283fd5b81880189601f820112610d92578384fd5b8035925081831115610da2578384fd5b60208a818286028401011115610db6578485fd5b8181019850929650888301359282841115610dcf578485fd5b838a0191508a601f830112610de2578485fd5b8135935082841115610df2578485fd5b8a81604086028401011115610e05578485fd5b019450909250610e1a90508760408801610c60565b90509295509295909350565b600060208284031215610e37578081fd5b81518015158114610c92578182fd5b600060208284031215610e57578081fd5b8135610c928161175d565b600060208284031215610e73578081fd5b813567ffffffffffffffff811115610e89578182fd5b80830160808186031215610a27578283fd5b600060208284031215610eac578081fd5b5051919050565b60008284526020808501945082825b85811015610f28578135610ed581611738565b73ffffffffffffffffffffffffffffffffffffffff16875281830135838801526040606081840135610f068161175d565b610f0f81611701565b928a019290925297880197929092019150600101610ec2565b509495945050505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008251610f8d81846020870161170c565b9190910192915050565b7f433a200000000000000000000000000000000000000000000000000000000000815260038101939093527f206973206c657373207468616e20000000000000000000000000000000000000602384015260318301919091527f20666f7220000000000000000000000000000000000000000000000000000000605183015260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166056820152606a0190565b60007f5361666545524332303a200000000000000000000000000000000000000000008252835161107e81600b85016020880161170c565b8083017f2072657475726e65642066616c736520696e2000000000000000000000000000600b820152845191506110bc82601e83016020880161170c565b01601e01949350505050565b60007f5361666545524332303a200000000000000000000000000000000000000000008252835161110081600b85016020880161170c565b8083017f206661696c656420696e20000000000000000000000000000000000000000000600b8201528451915061113e82601683016020880161170c565b01601601949350505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156111df57835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016111ad565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015611243578151805173ffffffffffffffffffffffffffffffffffffffff168552860151868501529284019290850190600101611208565b5091979650505050505050565b6040808252818101859052600090606080840188845b898110156112c6576020823561127b81611738565b73ffffffffffffffffffffffffffffffffffffffff1684528281013590840152848201356112a88161175d565b600381106112b257fe5b838601529183019190830190600101611266565b505084810360208601526112db818789610f33565b9998505050505050505050565b90815260200190565b600060208252825180602084015261131081604085016020870161170c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6020808252600b908201527f433a20626164206e616d65000000000000000000000000000000000000000000604082015260600190565b6020808252600a908201527f52473a206c6f636b656400000000000000000000000000000000000000000000604082015260600190565b60208082526012908201527f433a2062616420616374696f6e20747970650000000000000000000000000000604082015260600190565b6020808252601e908201527f455448207472616e7366657220746f206163636f756e74206661696c65640000604082015260600190565b60208082526010908201527f433a20656d707479206163636f756e7400000000000000000000000000000000604082015260600190565b60208082526015908201527f433a206f6e6c7920616464726573732874686973290000000000000000000000604082015260600190565b60006020825282356020830152604083016114b26114ad8260208701610c6b565b611701565b604084015280357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18536030181126114e8578283fd5b84019050803567ffffffffffffffff811115611502578283fd5b606081023603851315611513578283fd5b6080606085015261152b60a085018260208501610eb3565b611538606087018761169e565b935091507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0858203016080860152610611818484610f33565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126115a5578283fd5b8084018035925067ffffffffffffffff8311156115c0578384fd5b6020019250506060810236038213156115d857600080fd5b9250929050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611613578182fd5b8084018035925067ffffffffffffffff83111561162e578384fd5b602001925050368190038213156115d857600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610f8d578182fd5b60405181810167ffffffffffffffff8111828210171561169657600080fd5b604052919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126116d2578283fd5b830160208101925035905067ffffffffffffffff8111156116f257600080fd5b8036038313156115d857600080fd5b806003811061010c57fe5b60005b8381101561172757818101518382015260200161170f565b83811115610ae75750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461175a57600080fd5b50565b6003811061175a57600080fdfea26469706673582212207b17e4a29427e532adb1b7fa739dcea4f7ddee02801a8339205468480a349a2364736f6c634300060b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000adfc6460233221eca99dac25d00f98d32ea3989e
-----Decoded View---------------
Arg [0] : protocolAdapterRegistry (address): 0xaDfc6460233221eCa99daC25d00f98d32eA3989e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000adfc6460233221eca99dac25d00f98d32ea3989e
Deployed Bytecode Sourcemap
1314:6011:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3149:241;;;;;;;;;;-1:-1:-1;3149:241:1;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2265:660;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3481:143::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;3149:241::-;3252:16;3292:10;3314:4;3292:27;3284:61;;;;;;;;;;;;:::i;:::-;;;;;;;;;3362:21;3376:6;3362:13;:21::i;:::-;3355:28;;3149:241;;;;:::o;2265:660::-;2490:28;876:1:5;1062:6;;:18;1054:41;;;;;;;;;;;;:::i;:::-;918:1;1106:6;:15;2542:21:1::1;::::0;::::1;2534:50;;;;;;;;;;;;:::i;:::-;2594:38;2651:7:::0;2635:31:::1;::::0;::::1;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;2594:72:1;-1:-1:-1;2682:9:1::1;2677:165;2697:18:::0;;::::1;2677:165;;;2761:25;2775:7;;2783:1;2775:10;;;;;;;;;;;;;;;;;;:::i;:::-;2761:13;:25::i;:::-;2736:19;2756:1;2736:22;;;;;;;;;;;;;:50;;;;2805:26;2820:7;;2828:1;2820:10;;;;;;;;;;;;;;;;;;:::i;:::-;2805:26;;;;;;:::i;:::-;;;;;;;;2717:3;;2677:165;;;;2859:59;2872:15;;2889:19;2910:7;2859:12;:59::i;:::-;876:1:5::0;1144:6;:17;2852:66:1;2265:660;-1:-1:-1;;;;;;;2265:660:1:o;3481:143::-;3593:24;3481:143;:::o;3630:1371::-;3775:125;;;;;3725:16;;3757:15;;3775:75;3799:24;3775:75;;;;:125;;3864:26;;;3775:125;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3757:143;-1:-1:-1;3918:21:1;;;3910:45;;;;;;;;;;;;:::i;:::-;4007:18;3986:17;;;;;;;;:::i;:::-;:39;;;;;;;;;:83;;;-1:-1:-1;4050:19:1;4029:17;;;;;;;;:::i;:::-;:40;;;;;;;;;3986:83;3965:148;;;;;;;;;;;;:::i;:::-;4123:15;4173:18;4152:17;;;;;;;;:::i;:::-;:39;;;;;;;;;4148:212;;;-1:-1:-1;4218:44:1;4148:212;;;-1:-1:-1;4304:45:1;4148:212;4430:12;4444:23;4471:20;;;4545:8;4571:19;;;;:6;:19;:::i;:::-;4608:11;;;;:6;:11;:::i;:::-;4505:128;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4471:172;;;;4505:128;4471:172;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4429:214;;;;4880:1;4871:7;4868:14;4865:2;;;4913:16;4908:2;4896:10;4892:19;4885:45;4865:2;4970:10;4959:35;;;;;;;;;;;;:::i;:::-;4952:42;3630:1371;-1:-1:-1;;;;;;3630:1371:1:o;5007:1153::-;5206:28;5267:15;5250:14;;5206:28;5267:15;5397:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;5352:78:1;-1:-1:-1;5446:9:1;5441:366;5465:6;5461:1;:10;5441:366;;;5500:15;;5516:1;5500:18;;;;;;;:24;;;:18;;;;;:24;;;;-1:-1:-1;5500:24:1;:::i;:::-;5492:32;;5557:239;;;;;;;;5602:5;5557:239;;;;;;5633:148;5682:5;5709:15;;5725:1;5709:18;;;;;;;;;;;;:25;;;5756:7;5633:27;:148::i;:::-;5557:239;;;5538:13;5552:1;5538:16;;;;;;;;;;;;;;;;;:258;5473:3;;5441:366;;;-1:-1:-1;5826:26:1;;;-1:-1:-1;5867:9:1;5862:261;5886:6;5882:1;:10;5862:261;;;5928:19;5948:1;5928:22;;;;;;;;;;;;;;:29;5913:44;;5976:9;5988:1;5976:13;;5971:142;5995:12;5991:1;:16;5971:142;;;6032:66;6060:19;6080:1;6060:22;;;;;;;;;;;;;;6083:1;6060:25;;;;;;;;;;;;;;6087:1;6090:7;6032:27;:66::i;:::-;-1:-1:-1;6009:3:1;;5971:142;;;-1:-1:-1;5894:3:1;;5862:261;;;-1:-1:-1;6140:13:1;5007:1153;-1:-1:-1;;;;;;;;5007:1153:1:o;6166:1157::-;6323:7;;6380:12;;;1475:42;6380:12;6376:162;;;-1:-1:-1;6423:21:1;6376:162;;;6490:37;;;;;:22;;;;;;:37;;6521:4;;6490:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6475:52;;6376:162;6585:14;6569:12;:30;;6702:12;6774:14;6839:5;6637:225;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;6548:338;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;6901:16:1;;6897:390;;6937:12;;;1475:42;6937:12;6933:344;;;7089:12;;;7037;7089;;;;;;;;;7055;;;;7075;;7055:47;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7036:66;;;7128:7;7120:50;;;;;;;;;;;;:::i;:::-;6933:344;;;;7209:53;;;;;;;;;;;;;;;;;;;:25;;;;7235:7;;7244:12;;7209:53;:25;:53;:::i;:::-;7304:12;6166:1157;-1:-1:-1;;;;6166:1157:1:o;1276:389:9:-;1431:227;1463:5;1522:23;;;1563:2;1583:5;1482:120;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1431:227;;;;;;;;;;;;;;;;;1640:8;1431:18;:227::i;:::-;1276:389;;;;:::o;3111:1415::-;3767:12;3781:23;3816:5;3808:19;;3828:4;3808:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3766:67;;;;3864:7;3982:12;4051:8;3909:168;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3843:258;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;4116:17:9;;:21;4112:408;;4216:10;4205:30;;;;;;;;;;;;:::i;:::-;4362:12;4447:8;4281:196;;;;;;;;;:::i;:::-;;;;;;;;;;;;;4180:329;;;;;;;;;;;;;;:::i;:::-;;4112:408;3111:1415;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;:::o;142:134::-;220:13;;238:33;220:13;238:33;:::i;:::-;205:71;;;;:::o;283:146::-;358:20;;383:41;358:20;383:41;:::i;2302:160::-;2384:20;;2409:48;2384:20;2409:48;:::i;3101:241::-;;3205:2;3193:9;3184:7;3180:23;3176:32;3173:2;;;-1:-1;;3211:12;3173:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;3263:63;3167:175;-1:-1;;;3167:175::o;3349:263::-;;3464:2;3452:9;3443:7;3439:23;3435:32;3432:2;;;-1:-1;;3470:12;3432:2;226:6;220:13;238:33;265:5;238:33;:::i;3619:392::-;;3759:2;;3747:9;3738:7;3734:23;3730:32;3727:2;;;-1:-1;;3765:12;3727:2;3816:17;3810:24;3854:18;;3846:6;3843:30;3840:2;;;-1:-1;;3876:12;3840:2;3978:6;3967:9;3963:22;582:3;575:4;567:6;563:17;559:27;549:2;;-1:-1;;590:12;549:2;630:6;624:13;610:27;;3854:18;31994:6;31991:30;31988:2;;;-1:-1;;32024:12;31988:2;3759;32061:6;32057:17;;;652:80;3759:2;32057:17;32122:15;652:80;:::i;:::-;760:21;;;817:14;;;;792:17;;;897:27;;;;;894:36;-1:-1;891:2;;;-1:-1;;933:12;891:2;-1:-1;959:10;;953:217;978:6;975:1;972:13;953:217;;;1058:48;1102:3;1090:10;1058:48;:::i;:::-;1046:61;;1000:1;993:9;;;;;1121:14;;;;1149;;953:217;;4018:949;;;;;;4299:2;4287:9;4278:7;4274:23;4270:32;4267:2;;;-1:-1;;4305:12;4267:2;4363:17;4350:31;4401:18;;4393:6;4390:30;4387:2;;;-1:-1;;4423:12;4387:2;4550:6;4539:9;4535:22;1800:3;1793:4;1785:6;1781:17;1777:27;1767:2;;-1:-1;;1808:12;1767:2;1851:6;1838:20;1828:30;;4401:18;1870:6;1867:30;1864:2;;;-1:-1;;1900:12;1864:2;1944:4;1995:3;1944:4;;1979:6;1975:17;1936:6;1961:32;;1958:41;1955:2;;;-1:-1;;2002:12;1955:2;1932:17;;;;-1:-1;4443:124;;-1:-1;4617:18;;;4604:32;;4645:30;;;4642:2;;;-1:-1;;4678:12;4642:2;4818:6;4807:9;4803:22;;;1390:3;1793:4;1375:6;1371:17;1367:27;1357:2;;-1:-1;;1398:12;1357:2;1441:6;1428:20;1418:30;;4401:18;1460:6;1457:30;1454:2;;;-1:-1;;1490:12;1454:2;1585:3;1944:4;1577;1569:6;1565:17;1526:6;1551:32;;1548:41;1545:2;;;-1:-1;;1592:12;1545:2;1522:17;;-1:-1;4698:137;;-1:-1;4890:61;;-1:-1;4943:7;1577:4;4919:22;;4890:61;:::i;:::-;4880:71;;4261:706;;;;;;;;:::o;4974:257::-;;5086:2;5074:9;5065:7;5061:23;5057:32;5054:2;;;-1:-1;;5092:12;5054:2;2111:6;2105:13;40215:5;37464:13;37457:21;40193:5;40190:32;40180:2;;-1:-1;;40226:12;5238:271;;5357:2;5345:9;5336:7;5332:23;5328:32;5325:2;;;-1:-1;;5363:12;5325:2;2397:6;2384:20;2409:48;2451:5;2409:48;:::i;5516:379::-;;5646:2;5634:9;5625:7;5621:23;5617:32;5614:2;;;-1:-1;;5652:12;5614:2;5710:17;5697:31;5748:18;5740:6;5737:30;5734:2;;;-1:-1;;5770:12;5734:2;5862:6;5851:9;5847:22;2768:3;2759:6;2754:3;2750:16;2746:26;2743:2;;;-1:-1;;2775:12;5902:263;;6017:2;6005:9;5996:7;5992:23;5988:32;5985:2;;;-1:-1;;6023:12;5985:2;-1:-1;3038:13;;5979:186;-1:-1;5979:186::o;9369:887::-;;33791:6;33786:3;33779:19;33828:4;;33823:3;33819:14;9566:112;;9794:21;-1:-1;9821:413;9846:6;9843:1;9840:13;9821:413;;;85:6;72:20;97:33;124:5;97:33;:::i;:::-;37928:42;37917:54;7196:37;;35405:12;;;2890:20;20057:14;;;11293:37;20199:4;36916:12;20188:16;;;2384:20;2409:48;2384:20;2409:48;:::i;:::-;38433:39;12740:5;38433:39;:::i;:::-;20272:14;;;12684:63;;;;6958:14;;;;36916:12;;;;;-1:-1;9868:1;9861:9;9821:413;;;-1:-1;10240:10;;9553:703;-1:-1;;;;;9553:703::o;11485:277::-;;33791:6;33786:3;33779:19;38809:6;38804:3;33828:4;33823:3;33819:14;38786:30;-1:-1;33828:4;38856:6;33823:3;38847:16;;38840:27;33828:4;39521:7;39525:2;11748:6;39505:14;39501:28;33823:3;11717:39;;11710:46;;11575:187;;;;;:::o;20704:271::-;;12258:5;32766:12;12369:52;12414:6;12409:3;12402:4;12395:5;12391:16;12369:52;:::i;:::-;12433:16;;;;;20838:137;-1:-1;;20838:137::o;20982:1332::-;14460:5;14440:26;;14425:1;14485:11;;11293:37;;;;15155:16;21723:12;;;15135:37;15191:12;;;11293:37;;;;14806:7;22000:12;;;14786:28;39616:2;39612:14;;;14833:11;;;7454:58;22277:12;;;21457:857::o;22321:970::-;;16855:13;16842:11;16835:34;12258:5;32766:12;12369:52;12414:6;16819:2;16892:3;16888:12;12402:4;12395:5;12391:16;12369:52;:::i;:::-;12442:6;16892:3;12433:16;14097:21;16819:2;12433:16;;14077:42;12258:5;32766:12;12212:52;;12369;12414:6;14138:12;12433:16;14138:12;12402:4;12395:5;12391:16;12369:52;:::i;:::-;12433:16;14138:12;12433:16;;22707:584;-1:-1;;;;22707:584::o;23298:970::-;;16855:13;16842:11;16835:34;12258:5;32766:12;12369:52;12414:6;16819:2;16892:3;16888:12;12402:4;12395:5;12391:16;12369:52;:::i;:::-;12442:6;16892:3;12433:16;16499:13;16819:2;12433:16;;16479:34;12258:5;32766:12;12212:52;;12369;12414:6;16532:12;12433:16;16532:12;12402:4;12395:5;12391:16;12369:52;:::i;:::-;12433:16;16532:12;12433:16;;23684:584;-1:-1;;;;23684:584::o;24275:222::-;37928:42;37917:54;;;;7196:37;;24402:2;24387:18;;24373:124::o;24749:333::-;37928:42;37917:54;;;;7196:37;;25068:2;25053:18;;11293:37;24904:2;24889:18;;24875:207::o;25089:370::-;25266:2;25280:47;;;32766:12;;25251:18;;;33779:19;;;25089:370;;25266:2;32269:14;;;;33819;;;;25089:370;7963:260;7988:6;7985:1;7982:13;7963:260;;;8049:13;;37928:42;37917:54;7196:37;;33334:14;;;;6326;;;;8010:1;8003:9;7963:260;;;-1:-1;25333:116;;25237:222;-1:-1;;;;;;25237:222::o;25466:518::-;25717:2;25731:47;;;32766:12;;25702:18;;;33779:19;;;25466:518;;25717:2;33819:14;;;;;;32269;;;25466:518;8915:371;8940:6;8937:1;8934:13;8915:371;;;9001:13;;17856:23;;37928:42;37917:54;7196:37;;18018:16;;18012:23;18089:14;;;11293:37;6656:14;;;;33334;;;;8962:1;8955:9;8915:371;;;-1:-1;25784:190;;25688:296;-1:-1;;;;;;;25688:296::o;25991:725::-;26294:2;26308:47;;;26279:18;;;33779:19;;;25991:725;;33819:14;;;;10762:21;25991:725;10789:413;10814:6;10811:1;10808:13;10789:413;;;35414:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;37928:42;37917:54;7196:37;;35405:12;;;2890:20;20057:14;;;11293:37;20188:16;;;2384:20;2409:48;2384:20;2409:48;:::i;:::-;39728:1;39721:5;39718:12;39708:2;;39734:9;39708:2;20272:14;;;12684:63;6958:14;;;;36916:12;;;;10836:1;10829:9;10789:413;;;10793:14;;26595:9;26589:4;26585:20;35414:2;26569:9;26565:18;26558:48;26620:86;26701:4;26692:6;26684;26620:86;:::i;:::-;26612:94;26265:451;-1:-1;;;;;;;;;26265:451::o;26723:222::-;11293:37;;;26850:2;26835:18;;26821:124::o;26952:310::-;;27099:2;27120:17;27113:47;12904:5;32766:12;33791:6;27099:2;27088:9;27084:18;33779:19;12998:52;13043:6;33819:14;27088:9;33819:14;27099:2;13024:5;13020:16;12998:52;:::i;:::-;39525:2;39505:14;39521:7;39501:28;13062:39;;;;33819:14;13062:39;;27070:192;-1:-1;;27070:192::o;27269:416::-;27469:2;27483:47;;;13705:2;27454:18;;;33779:19;13741:13;33819:14;;;13721:34;13774:12;;;27440:245::o;27692:416::-;27892:2;27906:47;;;15442:2;27877:18;;;33779:19;15478:12;33819:14;;;15458:33;15510:12;;;27863:245::o;28115:416::-;28315:2;28329:47;;;15761:2;28300:18;;;33779:19;15797:20;33819:14;;;15777:41;15837:12;;;28286:245::o;28538:416::-;28738:2;28752:47;;;16088:2;28723:18;;;33779:19;16124:32;33819:14;;;16104:53;16176:12;;;28709:245::o;28961:416::-;29161:2;29175:47;;;17139:2;29146:18;;;33779:19;17175:18;33819:14;;;17155:39;17213:12;;;29132:245::o;29384:416::-;29584:2;29598:47;;;17464:2;29569:18;;;33779:19;17500:23;33819:14;;;17480:44;17543:12;;;29555:245::o;29807:370::-;;29984:2;30005:17;29998:47;2245:6;2232:20;29984:2;29973:9;29969:18;11293:37;36758:12;18434:16;36758:12;38290:39;36717:54;36758:12;29984:2;18434:16;36090:12;36717:54;:::i;:::-;38290:39;:::i;:::-;36758:12;29973:9;18720:14;12535:63;35604:3;35591:17;35648:48;35672:8;35656:14;35652:29;35648:48;35628:18;35624:73;35614:2;;-1:-1;;35701:12;35614:2;35730:33;;;-1:-1;35785:19;;35855:18;35844:30;;35841:2;;;-1:-1;;35877:12;35841:2;35946:4;35938:6;35934:17;35656:14;35914:38;35904:8;35900:53;35897:2;;;-1:-1;;35956:12;35897:2;18320:4;35946;29973:9;18947:14;18940:38;18993:179;18311:14;29973:9;18311:14;19153:12;29984:2;35823:5;35819:16;18993:179;:::i;:::-;19254:61;35946:4;19302:5;19298:16;19291:5;19254:61;:::i;:::-;19220:95;;;;19351:14;29973:9;19355:4;19351:14;;18320:4;29973:9;19335:14;19328:38;19381:87;19463:4;19449:12;19435;19381:87;:::i;30184:553::-;;;30366:11;30353:25;30417:48;30441:8;30425:14;30421:29;30417:48;30397:18;30393:73;30383:2;;-1:-1;;30470:12;30383:2;30511:18;30501:8;30497:33;30564:4;30551:18;30541:28;;30589:18;30581:6;30578:30;30575:2;;;-1:-1;;30611:12;30575:2;30456:4;30639:13;;-1:-1;;30703:4;30691:17;;30425:14;30671:38;30661:49;;30658:2;;;30723:1;;30713:12;30658:2;30321:416;;;;;:::o;30744:506::-;;;30879:11;30866:25;30930:48;30954:8;30938:14;30934:29;30930:48;30910:18;30906:73;30896:2;;-1:-1;;30983:12;30896:2;31024:18;31014:8;31010:33;31077:4;31064:18;31054:28;;31102:18;31094:6;31091:30;31088:2;;;-1:-1;;31124:12;31088:2;30969:4;31152:13;;-1:-1;;30938:14;31184:38;;;31174:49;;31171:2;;;31236:1;;31226:12;31257:316;;31399:11;31386:25;31450:48;31474:8;31458:14;31454:29;31450:48;31430:18;31426:73;31416:2;;-1:-1;;31503:12;31580:256;31642:2;31636:9;31668:17;;;31743:18;31728:34;;31764:22;;;31725:62;31722:2;;;31800:1;;31790:12;31722:2;31642;31809:22;31620:216;;-1:-1;31620:216::o;36118:501::-;;;36242:3;36229:17;36286:48;36310:8;36294:14;36290:29;36286:48;36266:18;36262:73;36252:2;;-1:-1;;36339:12;36252:2;36368:33;;36325:4;36457:16;;;-1:-1;36423:19;;-1:-1;36493:18;36482:30;;36479:2;;;36525:1;;36515:12;36479:2;36572:17;36294:14;36552:38;36542:8;36538:53;36535:2;;;36604:1;;36594:12;37569:136;37635:16;39728:1;39718:12;;39708:2;;39734:9;38882:268;38947:1;38954:101;38968:6;38965:1;38962:13;38954:101;;;39035:11;;;39029:18;39016:11;;;39009:39;38990:2;38983:10;38954:101;;;39070:6;39067:1;39064:13;39061:2;;;-1:-1;;38947:1;39117:16;;39110:27;38931:219::o;39870:117::-;37928:42;39957:5;37917:54;39932:5;39929:35;39919:2;;39978:1;;39968:12;39919:2;39913:74;:::o;40376:109::-;40460:1;40453:5;40450:12;40440:2;;40476:1;;40466:12
Swarm Source
ipfs://7b17e4a29427e532adb1b7fa739dcea4f7ddee02801a8339205468480a349a23
Loading...
Loading
Loading...
Loading
OVERVIEW
Zerion DeFi SDK Core contract. Internal contract interacting with exchanges.Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.