Address Contract Partially Verified
Address
0x3fD49A8F37E2349A29EA701b56F10f03B08F1532
Balance
0 ETH
Nonce
1
Code Size
4678 bytes
Creator
0x8FA9aa69...2553 at tx 0x6f0e208a...801ce8
Proxy
EIP-1967 Proxy Implementation: 0xc41D5f76...6Ae0
Indexed Transactions
0
Contract Bytecode
4678 bytes
0x60806040526004361061007f5760003560e01c8063908bfe5e1161004e578063908bfe5e146101b6578063a5fcc8bc146101cb578063c39aa07d146101eb578063f0c01b421461020b576100dd565b806322175a321461010a5780636e9960c31461012a578063704b6c021461016957806389396dc814610189576100dd565b366100dd577fffffffff0000000000000000000000000000000000000000000000000000000060003516156100db576100db6000357fffffffff000000000000000000000000000000000000000000000000000000001661022b565b005b6100db6000357fffffffff000000000000000000000000000000000000000000000000000000001661022b565b34801561011657600080fd5b506100db610125366004610f23565b6102ed565b34801561013657600080fd5b5061013f610395565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561017557600080fd5b506100db610184366004610f23565b6103a4565b34801561019557600080fd5b506101a96101a4366004610f23565b610449565b6040516101609190610fa2565b3480156101c257600080fd5b5061013f61045a565b3480156101d757600080fd5b5061013f6101e6366004610fb5565b610464565b3480156101f757600080fd5b506100db610206366004610f23565b61046f565b34801561021757600080fd5b506100db610226366004610ff7565b610514565b6000610236826105f2565b905073ffffffffffffffffffffffffffffffffffffffff81166102e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69717569646974793a204e6f742061626c6520746f2066696e6420696d706c60448201527f656d656e746174696f6e5f00000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102e98161061c565b5050565b6102f5610640565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742d7468652d61646d696e0000000000000000000000000000000000000060448201526064016102d7565b61039281610680565b50565b600061039f610640565b905090565b6103ac610640565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742d7468652d61646d696e0000000000000000000000000000000000000060448201526064016102d7565b6103928161084e565b60606104548261099f565b92915050565b600061039f610a45565b6000610454826105f2565b610477610640565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742d7468652d61646d696e0000000000000000000000000000000000000060448201526064016102d7565b61039281610a6d565b61051c610640565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742d7468652d61646d696e0000000000000000000000000000000000000060448201526064016102d7565b6105ed83838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610b1392505050565b505050565b6000806105fe83610dd1565b5473ffffffffffffffffffffffffffffffffffffffff169392505050565b3660008037600080366000845af43d6000803e80801561063b573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b600061068b82610e01565b905060008180546040805160208084028201810190925282815292919083018282801561071957602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116106c65790505b50505050509050805160000361078b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696d706c656d656e746174696f6e2d6e6f742d6578697374000000000000000060448201526064016102d7565b60005b81518110156107f45760006107bb8383815181106107ae576107ae61107d565b6020026020010151610dd1565b80547fffffffffffffffffffffffff000000000000000000000000000000000000000016905550806107ec816110ac565b91505061078e565b50610800826000610e14565b60405173ffffffffffffffffffffffffffffffffffffffff841681527fd854fc630d6476d1ad6df14d295fdb83c1464a63cf75d456f14cd75353696ed39060200160405180910390a1505050565b6000610858610640565b905073ffffffffffffffffffffffffffffffffffffffff82166108fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d7565b817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831617905560408051838316815291841660208301527fa2010e522d52edde51a4dcbc8241004a97a55844cfa6823ddabbb3cafe993a6291015b60405180910390a15050565b606060006109ac83610e01565b905080805460408051602080840282018101909252828152929190830182828015610a3857602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116109e55790505b5050505050915050919050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610664565b6000610a77610a45565b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831617905560408051838316815291841660208301527fa0dd191daed6af360e85495ba5fa09c213452c3cda2f13e995775d5756deda009101610993565b8051600003610b7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f6e6f2d736967730000000000000000000000000000000000000000000000000060448201526064016102d7565b6000610b8983610e01565b9050600081805460408051602080840282018101909252828152929190830182828015610c1757602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019060040190602082600301049283019260010382029150808411610bc45790505b505050505090508051600014610c89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f696d706c656d656e746174696f6e2d616c72656164792d65786973740000000060448201526064016102d7565b60005b8351811015610d7f576000610cac8583815181106107ae576107ae61107d565b90506000815473ffffffffffffffffffffffffffffffffffffffff1614610d2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f7369672d616c72656164792d657869737400000000000000000000000000000060448201526064016102d7565b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff871617905580610d77816110ac565b915050610c8c565b5082828151610d919260200190610e39565b507f955f674d8fbada18242ae4d19f71c66ce496150270d0c82520ab4b40ce61d1af8484604051610dc392919061110b565b60405180910390a150505050565b600081604051602001610de49190611142565b604051602081830303815290604052805190602001209050919050565b600081604051602001610de491906111af565b5080546000825560070160089004906000526020600020908101906103929190610ee5565b82805482825590600052602060002090600701600890048101928215610ed55791602002820160005b83821115610ea357835183826101000a81548163ffffffff021916908360e01c02179055509260200192600401602081600301049283019260010302610e62565b8015610ed35782816101000a81549063ffffffff0219169055600401602081600301049283019260010302610ea3565b505b50610ee1929150610ee5565b5090565b5b80821115610ee15760008155600101610ee6565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f1e57600080fd5b919050565b600060208284031215610f3557600080fd5b610f3e82610efa565b9392505050565b600081518084526020808501945080840160005b83811015610f975781517fffffffff000000000000000000000000000000000000000000000000000000001687529582019590820190600101610f59565b509495945050505050565b602081526000610f3e6020830184610f45565b600060208284031215610fc757600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f3e57600080fd5b60008060006040848603121561100c57600080fd5b61101584610efa565b9250602084013567ffffffffffffffff8082111561103257600080fd5b818601915086601f83011261104657600080fd5b81358181111561105557600080fd5b8760208260051b850101111561106a57600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611104577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061113a6040830184610f45565b949350505050565b60408152600061117f60408301601c81527f656970313936372e70726f78792e696d706c656d656e746174696f6e00000000602082015260400190565b90507fffffffff000000000000000000000000000000000000000000000000000000008316602083015292915050565b6040815260006111ec60408301601c81527f656970313936372e70726f78792e696d706c656d656e746174696f6e00000000602082015260400190565b905073ffffffffffffffffffffffffffffffffffffffff831660208301529291505056fea26469706673582212201fff218cffaa39fade94cc7c3d8d8132458d44f6b79c9b35ec58d23a9df8865f64736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (10000 runs)
StrategyProxy.sol 15 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "../infiniteProxy/proxy.sol";
/**
* @title StrategyProxy contract
* @author Cian
* @dev This contract is the actual address of the strategy pool, which
* manages all the assets. The logic of the contract is distributed among
* various functional modules.
*/
contract StrategyProxy is Proxy {
constructor(address _admin, address _dummyImplementation) Proxy(_admin, _dummyImplementation) {}
}
proxy.sol 275 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "./events.sol";
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`.
*/
contract Internals is Events {
struct AddressSlot {
address value;
}
struct SigsSlot {
bytes4[] value;
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Storage slot with the address of the current dummy-implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _DUMMY_IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Returns the storage slot which stores the sigs array set for the implementation.
*/
function _getImplSigsSlot(address implementation_) internal pure returns (bytes32) {
return keccak256(abi.encode("eip1967.proxy.implementation", implementation_));
}
/**
* @dev Returns the storage slot which stores the implementation address for the function sig.
*/
function _getSigsImplSlot(bytes4 sig_) internal pure returns (bytes32) {
return keccak256(abi.encode("eip1967.proxy.implementation", sig_));
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot_) internal pure returns (AddressSlot storage _r) {
assembly {
_r.slot := slot_
}
}
/**
* @dev Returns an `SigsSlot` with member `value` located at `slot`.
*/
function getSigsSlot(bytes32 slot_) internal pure returns (SigsSlot storage _r) {
assembly {
_r.slot := slot_
}
}
/**
* @dev Sets new implementation and adds mapping from implementation to sigs and sig to implementation.
*/
function _setImplementationSigs(address implementation_, bytes4[] memory sigs_) internal {
require(sigs_.length != 0, "no-sigs");
bytes32 slot_ = _getImplSigsSlot(implementation_);
bytes4[] memory sigsCheck_ = getSigsSlot(slot_).value;
require(sigsCheck_.length == 0, "implementation-already-exist");
for (uint256 i = 0; i < sigs_.length; i++) {
bytes32 sigSlot_ = _getSigsImplSlot(sigs_[i]);
require(getAddressSlot(sigSlot_).value == address(0), "sig-already-exist");
getAddressSlot(sigSlot_).value = implementation_;
}
getSigsSlot(slot_).value = sigs_;
emit setImplementationLog(implementation_, sigs_);
}
/**
* @dev Removes implementation and the mappings corresponding to it.
*/
function _removeImplementationSigs(address implementation_) internal {
bytes32 slot_ = _getImplSigsSlot(implementation_);
bytes4[] memory sigs_ = getSigsSlot(slot_).value;
require(sigs_.length != 0, "implementation-not-exist");
for (uint256 i = 0; i < sigs_.length; i++) {
bytes32 sigSlot_ = _getSigsImplSlot(sigs_[i]);
delete getAddressSlot(sigSlot_).value;
}
delete getSigsSlot(slot_).value;
emit removeImplementationLog(implementation_);
}
/**
* @dev Returns bytes4[] sigs from implementation address. If implemenatation is not registered then returns empty array.
*/
function _getImplementationSigs(address implementation_) internal view returns (bytes4[] memory) {
bytes32 slot_ = _getImplSigsSlot(implementation_);
return getSigsSlot(slot_).value;
}
/**
* @dev Returns implementation address from bytes4 sig. If sig is not registered then returns address(0).
*/
function _getSigImplementation(bytes4 sig_) internal view returns (address implementation_) {
bytes32 slot_ = _getSigsImplSlot(sig_);
return getAddressSlot(slot_).value;
}
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Returns the current dummy-implementation.
*/
function _getDummyImplementation() internal view returns (address) {
return getAddressSlot(_DUMMY_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin_) internal {
address oldAdmin_ = _getAdmin();
require(newAdmin_ != address(0), "ERC1967: new admin is the zero address");
getAddressSlot(_ADMIN_SLOT).value = newAdmin_;
emit setAdminLog(oldAdmin_, newAdmin_);
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setDummyImplementation(address newDummyImplementation_) internal {
address oldDummyImplementation_ = _getDummyImplementation();
getAddressSlot(_DUMMY_IMPLEMENTATION_SLOT).value = newDummyImplementation_;
emit setDummyImplementationLog(oldDummyImplementation_, newDummyImplementation_);
}
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/
function _delegate(address implementation_) internal {
// solhint-disable-next-line no-inline-assembly
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize())
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas(), implementation_, 0, calldatasize(), 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize())
switch result
// delegatecall returns 0 on error.
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
/**
* @dev Delegates the current call to the address returned by Implementations registry.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/
function _fallback(bytes4 sig_) internal {
address implementation_ = _getSigImplementation(sig_);
require(implementation_ != address(0), "Liquidity: Not able to find implementation_");
_delegate(implementation_);
}
}
contract AdminStuff is Internals {
/**
* @dev Only admin gaurd.
*/
modifier onlyAdmin() {
require(msg.sender == _getAdmin(), "not-the-admin");
_;
}
/**
* @dev Sets new admin.
*/
function setAdmin(address newAdmin_) external onlyAdmin {
_setAdmin(newAdmin_);
}
/**
* @dev Sets new dummy-implementation.
*/
function setDummyImplementation(address newDummyImplementation_) external onlyAdmin {
_setDummyImplementation(newDummyImplementation_);
}
/**
* @dev Adds new implementation address.
*/
function addImplementation(address implementation_, bytes4[] calldata sigs_) external onlyAdmin {
_setImplementationSigs(implementation_, sigs_);
}
/**
* @dev Removes an existing implementation address.
*/
function removeImplementation(address implementation_) external onlyAdmin {
_removeImplementationSigs(implementation_);
}
constructor(address admin_, address dummyImplementation_) {
_setAdmin(admin_);
_setDummyImplementation(dummyImplementation_);
}
}
abstract contract Proxy is AdminStuff {
constructor(address admin_, address dummyImplementation_) AdminStuff(admin_, dummyImplementation_) {}
/**
* @dev Returns admin's address.
*/
function getAdmin() external view returns (address) {
return _getAdmin();
}
/**
* @dev Returns dummy-implementations's address.
*/
function getDummyImplementation() external view returns (address) {
return _getDummyImplementation();
}
/**
* @dev Returns bytes4[] sigs from implementation address If not registered then returns empty array.
*/
function getImplementationSigs(address impl_) external view returns (bytes4[] memory) {
return _getImplementationSigs(impl_);
}
/**
* @dev Returns implementation address from bytes4 sig. If sig is not registered then returns address(0).
*/
function getSigsImplementation(bytes4 sig_) external view returns (address) {
return _getSigImplementation(sig_);
}
/**
* @dev Fallback function that delegates calls to the address returned by Implementations registry.
*/
fallback() external payable {
_fallback(msg.sig);
}
/**
* @dev Fallback function that delegates calls to the address returned by Implementations registry.
*/
receive() external payable {
if (msg.sig != 0x00000000) {
_fallback(msg.sig);
}
}
}
events.sol 12 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
contract Events {
event setAdminLog(address oldAdmin_, address newAdmin_);
event setDummyImplementationLog(address oldDummyImplementation_, address newDummyImplementation_);
event setImplementationLog(address implementation_, bytes4[] sigs_);
event removeImplementationLog(address implementation_);
}
Read Contract
getAdmin 0x6e9960c3 → address
getDummyImplementation 0x908bfe5e → address
getImplementationSigs 0x89396dc8 → bytes4[]
getSigsImplementation 0xa5fcc8bc → address
Write Contract 4 functions
These functions modify contract state and require a wallet transaction to execute.
addImplementation 0xf0c01b42
address implementation_
bytes4[] sigs_
removeImplementation 0x22175a32
address implementation_
setAdmin 0x704b6c02
address newAdmin_
setDummyImplementation 0xc39aa07d
address newDummyImplementation_
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address