More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x7cE6D0F1...A3729Bd89 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
StrategyProxy
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.23;import "../../core/base/UpgradeableProxy.sol";import "../../interfaces/IControllable.sol";import "../../interfaces/IPlatform.sol";import "../../interfaces/IFactory.sol";import "../../interfaces/IStrategyProxy.sol";/// @title EIP1967 Upgradeable proxy implementation for built by Factory strategies./// @author Alien Deployer (https://github.com/a17)/// @author JodsMigel (https://github.com/JodsMigel)/// @author Jude (https://github.com/iammrjude)contract StrategyProxy is UpgradeableProxy, IStrategyProxy {/// @dev Strategy logic idbytes32 private constant _ID_SLOT = bytes32(uint(keccak256("eip1967.strategyProxy.id")) - 1);/// @inheritdoc IStrategyProxyfunction initStrategyProxy(string memory id) external {bytes32 strategyIdHash = keccak256(abi.encodePacked(id));//slither-disable-next-line unused-returnIFactory.StrategyLogicConfig memory strategyConfig = IFactory(msg.sender).strategyLogicConfig(strategyIdHash);address strategyImplementation = strategyConfig.implementation;_init(strategyImplementation);bytes32 slot = _ID_SLOT;//slither-disable-next-line assembly
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.23;/// @title Simple ERC-1967 upgradeable proxy implementationabstract contract UpgradeableProxy {error ImplementationIsNotContract();/// @dev This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and isbytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;/// @dev Emitted when the implementation is upgraded.event Upgraded(address indexed implementation);constructor() {assert(_IMPLEMENTATION_SLOT == bytes32(uint(keccak256("eip1967.proxy.implementation")) - 1));}/// @dev Post deploy initialisation for compatability with EIP-1167 factoryfunction _init(address _logic) internal {// nosemgreprequire(_implementation() == address(0), "Already inited");_setImplementation(_logic);}/// @dev Returns the current implementation address.function _implementation() internal view virtual returns (address impl) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.23;/// @dev Base core interface implemented by most platform contracts./// Inherited contracts store an immutable Platform proxy address in the storage,/// which provides authorization capabilities and infrastructure contract addresses./// @author Alien Deployer (https://github.com/a17)/// @author JodsMigel (https://github.com/JodsMigel)interface IControllable {//region ----- Custom Errors -----error IncorrectZeroArgument();error IncorrectMsgSender();error NotGovernance();error NotMultisig();error NotGovernanceAndNotMultisig();error NotOperator();error NotFactory();error NotPlatform();error NotVault();error IncorrectArrayLength();error AlreadyExist();error NotExist();error NotTheOwner();error ETHTransferFailed();error IncorrectInitParams();//endregion -- Custom Errors -----
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.23;/// @notice Interface of the main contract and entry point to the platform./// @author Alien Deployer (https://github.com/a17)/// @author Jude (https://github.com/iammrjude)/// @author JodsMigel (https://github.com/JodsMigel)interface IPlatform {/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*//* CUSTOM ERRORS *//*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/error AlreadyAnnounced();error SameVersion();error NoNewVersion();error UpgradeTimerIsNotOver(uint TimerTimestamp);error IncorrectFee(uint minFee, uint maxFee);error NotEnoughAllowedBBToken();error TokenAlreadyExistsInSet(address token);error AggregatorNotExists(address dexAggRouter);/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*//* EVENTS *//*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/event PlatformVersion(string version);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.23;import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";/// @notice Creating vaults, upgrading vaults and strategies, vault list, farms and strategy logics management/// @author Alien Deployer (https://github.com/a17)/// @author Jude (https://github.com/iammrjude)/// @author JodsMigel (https://github.com/JodsMigel)/// @author HCrypto7 (https://github.com/hcrypto7)interface IFactory {//region ----- Custom Errors -----error VaultImplementationIsNotAvailable();error VaultNotAllowedToDeploy();error StrategyImplementationIsNotAvailable();error StrategyLogicNotAllowedToDeploy();error YouDontHaveEnoughTokens(uint userBalance, uint requireBalance, address payToken);error SuchVaultAlreadyDeployed(bytes32 key);error NotActiveVault();error UpgradeDenied(bytes32 _hash);error AlreadyLastVersion(bytes32 _hash);error NotStrategy();error BoostDurationTooLow();error BoostAmountTooLow();error BoostAmountIsZero();
123456789101112131415161718192021// SPDX-License-Identifier: MITpragma solidity ^0.8.23;/// @dev Interface of proxy contract for a strategy implementationinterface IStrategyProxy {/// @notice Initialize strategy proxy by Factory/// @param id Strategy logic ID stringfunction initStrategyProxy(string memory id) external;/// @notice Upgrade strategy implementation if available and allowed/// Anyone can execute strategy upgradefunction upgrade() external;/// @notice Current strategy implementation/// @return Address of strategy implementation contractfunction implementation() external view returns (address);/// @notice Strategy logic hash/// @return keccan256 hash of strategy logic ID stringfunction strategyImplementationLogicIdHash() external view returns (bytes32);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.pragma solidity ^0.8.20;/*** @dev Library for managing* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive* types.** Sets have the following properties:** - Elements are added, removed, and checked for existence in constant time* (O(1)).* - Elements are enumerated in O(n). No guarantees are made on the ordering.** ```solidity* contract Example {* // Add the library methods* using EnumerableSet for EnumerableSet.AddressSet;** // Declare a set state variable* EnumerableSet.AddressSet private mySet;* }* ```
1234567891011121314151617181920212223242526{"remappings": ["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@solady/=lib/solady/src/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/","solady/=lib/solady/","openzeppelin-contracts/=lib/openzeppelin-contracts/"],"optimizer": {"enabled": true,"runs": 200},"metadata": {"useLiteralContent": false,"bytecodeHash": "ipfs","appendCBOR": true},"outputSelection": {"*": {"*": ["evm.bytecode",
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ImplementationIsNotContract","type":"error"},{"inputs":[],"name":"NotFactory","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"id","type":"string"}],"name":"initStrategyProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategyImplementationLogicIdHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x608060405260043610610042575f3560e01c80635c60da1b14610059578063670855191461008a578063c29df70a146100a9578063d55ec697146100cb57610051565b366100515761004f6100df565b005b61004f6100df565b348015610064575f80fd5b5061006d6100fe565b6040516001600160a01b0390911681526020015b60405180910390f35b348015610095575f80fd5b5061004f6100a436600461055a565b610119565b3480156100b4575f80fd5b506100bd6101ec565b604051908152602001610081565b3480156100d6575f80fd5b5061004f610222565b6100fc6100f75f805160206107708339815191525490565b6103c0565b565b5f6101145f805160206107708339815191525490565b905090565b5f8160405160200161012b91906105f6565b60408051808303601f190181529082905280516020909101206362b75e6b60e11b82526004820181905291505f90339063c56ebcd6906024015f60405180830381865afa15801561017e573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526101a5919081019061063b565b60208101519091506101b6816103de565b5f6101e260017f36d20b145d4c7d169f9328d7a80168d1708bdba6b07117bf1684bf33864f41de61072a565b9390935550505050565b5f808061021a60017f36d20b145d4c7d169f9328d7a80168d1708bdba6b07117bf1684bf33864f41de61072a565b549392505050565b336001600160a01b0316306001600160a01b0316634bde38c86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610268573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028c919061074f565b6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102eb919061074f565b6001600160a01b03161461031257604051631966391b60e11b815260040160405180910390fd5b5f8061033f60017f36d20b145d4c7d169f9328d7a80168d1708bdba6b07117bf1684bf33864f41de61072a565b80546040516362b75e6b60e11b8152600481018290529093509091505f90339063c56ebcd6906024015f60405180830381865afa158015610382573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526103a9919081019061063b565b60208101519091506103ba8161044b565b50505050565b365f80375f80365f845af43d5f803e8080156103da573d5ff35b3d5ffd5b5f6103f45f805160206107708339815191525490565b6001600160a01b03161461043f5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a5b9a5d195960921b604482015260640160405180910390fd5b6104488161048a565b50565b6104548161048a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b806001600160a01b03163b5f036104b45760405163e84f0f9960e01b815260040160405180910390fd5b5f8051602061077083398151915255565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff811182821017156104fc576104fc6104c5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561052b5761052b6104c5565b604052919050565b5f67ffffffffffffffff82111561054c5761054c6104c5565b50601f01601f191660200190565b5f6020828403121561056a575f80fd5b813567ffffffffffffffff811115610580575f80fd5b8201601f81018413610590575f80fd5b80356105a361059e82610533565b610502565b8181528560208385010111156105b7575f80fd5b816020840160208301375f91810160200191909152949350505050565b5f5b838110156105ee5781810151838201526020016105d6565b50505f910152565b5f82516106078184602087016105d4565b9190910192915050565b80516001600160a01b0381168114610627575f80fd5b919050565b80518015158114610627575f80fd5b5f602080838503121561064c575f80fd5b825167ffffffffffffffff80821115610663575f80fd5b9084019060c08287031215610676575f80fd5b61067e6104d9565b82518281111561068c575f80fd5b83019150601f8201871361069e575f80fd5b81516106ac61059e82610533565b81815288868386010111156106bf575f80fd5b6106ce828783018887016105d4565b8252506106dc838501610611565b848201526106ec6040840161062c565b60408201526106fd6060840161062c565b606082015261070e6080840161062c565b608082015260a083015160a08201528094505050505092915050565b8181038181111561074957634e487b7160e01b5f52601160045260245ffd5b92915050565b5f6020828403121561075f575f80fd5b61076882610611565b939250505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212202940411ce303ca043901e859b0a4c3bb7503448bc174ad26f3c3280fa754dc3164736f6c63430008170033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.